/* GraphChain Explorer - Responsive Styles */

/* Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Hero Section */
  .section-hero {
    padding: 80px 0 60px;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-status {
    justify-content: center;
  }
  
  /* Stats Grid */
  .stats-card {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  .stats-icon {
    margin-bottom: 0.5rem;
  }
  
  .stats-value {
    font-size: 1.5rem;
  }
  
  /* Cards */
  .card-inner {
    padding: 1rem;
  }
  
  .card-title-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  /* Action Cards */
  .action-card {
    padding: 1rem;
    text-align: center;
  }
  
  .action-content h6 {
    font-size: 1rem;
  }
  
  .action-content p {
    font-size: 0.8rem;
  }
  
  /* Component Cards */
  .skill-card,
  .error-card {
    padding: 1rem;
  }
  
  .skill-card-header,
  .error-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  
  .skill-info,
  .error-info {
    text-align: center;
  }
  
  .skill-capabilities {
    justify-content: center;
  }
  
  .capability-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
  
  .skill-performance {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  /* Navigation */
  .header-search {
    display: none;
  }
  
  .header-action {
    margin-top: 1rem;
  }
  
  /* Search */
  .search-input {
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    font-size: 0.9rem;
  }
  
  .search-icon {
    left: 0.75rem;
    font-size: 1rem;
  }
  
  /* Filters */
  .filter-group {
    justify-content: center;
  }
  
  .filter-button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Hero Section */
  .section-hero {
    padding: 100px 0 70px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  /* Stats Grid */
  .stats-card {
    flex-direction: row;
    text-align: left;
  }
  
  .stats-value {
    font-size: 1.75rem;
  }
  
  /* Component Cards */
  .skill-card-header,
  .error-card-header {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
  
  .skill-info,
  .error-info {
    text-align: left;
  }
  
  .skill-capabilities {
    justify-content: flex-start;
  }
  
  .skill-performance {
    flex-direction: row;
    gap: 1rem;
  }
  
  /* Navigation */
  .header-search {
    display: none;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Hero Section */
  .section-hero {
    padding: 110px 0 80px;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  /* Stats Grid */
  .stats-value {
    font-size: 2rem;
  }
  
  /* Navigation */
  .header-search {
    display: flex;
  }
  
  .header-search .form-control {
    width: 150px;
  }
  
  /* Component Cards */
  .skill-performance {
    flex-direction: row;
    gap: 1.5rem;
  }
  
  /* Action Cards */
  .action-card {
    margin-bottom: 0;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Hero Section */
  .hero-title {
    font-size: 3.25rem;
  }
  
  /* Navigation */
  .header-search .form-control {
    width: 180px;
  }
  
  /* Stats Grid - 4 columns */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
  
  /* Action Cards - 3 columns */
  .action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  /* Hero Section */
  .hero-title {
    font-size: 3.5rem;
  }
  
  /* Navigation */
  .header-search .form-control {
    width: 200px;
  }
  
  /* Container */
  .graphchain-container {
    max-width: 1200px;
  }
  
  /* Stats Grid */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
  
  /* Action Cards */
  .action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
  .graphchain-container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.375rem;
  }
}

/* Height-based Media Queries for Mobile */
@media (max-height: 600px) and (max-width: 767.98px) {
  .section-hero {
    padding: 60px 0 40px;
  }
  
  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
}

/* Landscape Mobile Orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
  .section-hero {
    padding: 40px 0 30px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .stats-card {
    padding: 0.75rem;
  }
  
  .card-inner {
    padding: 0.75rem;
  }
}

/* Print Styles */
@media print {
  .header-main,
  .footer-section,
  .action-card,
  .header-search,
  .header-action {
    display: none !important;
  }
  
  .section-hero {
    padding: 20px 0;
  }
  
  .hero-title {
    font-size: 2rem;
    color: #000 !important;
  }
  
  .stats-card,
  .card,
  .skill-card,
  .error-card {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
  
  .stats-value,
  .skill-type,
  .error-type,
  .card-title h6 {
    color: #000 !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .status-dot {
    animation: none;
  }
  
  .loading-spinner {
    animation: none;
    border: 4px solid var(--primary-blue);
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(0, 0, 0, 0.9);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-hover-border: rgba(255, 255, 255, 1);
  }
  
  .stats-card,
  .card,
  .skill-card,
  .error-card,
  .action-card {
    border-width: 2px;
  }
  
  .capability-tag,
  .validation-badge,
  .severity-badge,
  .status-badge {
    border-width: 2px;
  }
}

/* Focus Styles for Accessibility */
@media (any-hover: none) {
  .skill-card:focus,
  .error-card:focus,
  .action-card:focus,
  .related-skill-item:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
  }
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
  .stats-value,
  .skill-type,
  .error-type,
  .card-title h6,
  .action-content h6 {
    color: #fff;
  }
  
  .hero-title,
  .hero-subtitle {
    color: #fff;
  }
}
