/* ============================================
   UTECH Design System — Responsive
   ============================================ */

/* ── Mobile First: Base is mobile ── */

/* Tablet: 768px+ */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }

  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* Large: 1280px+ */
@media (min-width: 1280px) {
  .container { padding: 0 var(--space-8); }
}

/* ── Mobile Overrides (max-width) ── */

@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: var(--space-12);
    gap: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateX(0);
    pointer-events: all;
  }

  .nav-links a {
    font-size: var(--text-lg);
  }

  .nav-links .btn {
    margin-top: var(--space-4);
  }
}

@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .split-reverse {
    direction: ltr;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-8));
    padding-bottom: var(--space-12);
  }

  .page-hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-8));
    padding-bottom: var(--space-8);
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .mission-panel {
    max-width: 100%;
    aspect-ratio: auto;
  }

  .mission-map {
    min-height: 180px;
  }

  .section {
    padding: var(--space-16) 0;
  }

  .section-header {
    margin-bottom: var(--space-10);
  }

  /* Footer stacking */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Stats row */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    border-right: 0;
    border-bottom: 1px solid var(--dark-border-light);
  }

  .stat-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  /* CTA Banner */
  .cta-banner {
    padding: var(--space-10) var(--space-6);
  }

  /* Hero buttons */
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-3);
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Toast */
  .toast {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
    max-width: none;
  }

  /* Timeline */
  .timeline {
    padding-left: var(--space-8);
  }
}

/* ── Very Small Screens ── */
@media (max-width: 380px) {
  .container {
    padding: 0 var(--space-4);
  }

  .card {
    padding: var(--space-6);
  }

  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stat-card:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--dark-border-light);
  }

  .stat-card:last-child {
    border-bottom: 0;
  }
}
