/* ============================================================
   RESPONSIVE BREAKPOINTS — FULL UI/UX AUDIT FIX
   ============================================================ */

/* ---------- Large Desktop Cap (max 1440px) ---------- */
@media (max-width: 1440px) {
  .nav-links { gap: 1.5rem; }
}

/* ---------- Desktop Small (max 1200px) ---------- */
@media (max-width: 1200px) {
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.78rem; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: var(--space-lg); }
}

/* ---------- Tablet (max 1024px) ---------- */
@media (max-width: 1024px) {
  .grid-2 { gap: var(--space-lg); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .stats-bar-inner { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  .article-card { grid-template-columns: 220px 1fr; }

  .case-study { grid-template-columns: 1fr; }

  /* Timeline → single column on left */
  .timeline::before { left: 0; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 var(--space-xl) var(--space-xl);
  }
  .timeline-item .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
    right: auto;
  }

  .quote-block { padding: var(--space-lg); }
  .quote-text { font-size: 1.3rem; }

  .hero h1 { max-width: 100%; }

  /* Featured panel → stack */
  .featured-panel { grid-template-columns: 1fr; }
  .featured-panel-aside { min-height: 200px; }

  /* Metric grids */
  .metric-grid { grid-template-columns: repeat(3, 1fr); }

  /* Nav links tighter */
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.76rem; }

  /* Reverse grids reset on tablet if going single-col */
  .grid-2-reverse > *:first-child { order: 0; }
  .grid-2-reverse > *:last-child  { order: 0; }
}

/* ---------- Mobile Nav (max 900px) ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Tablet Small (max 768px) ---------- */
@media (max-width: 768px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 5rem;
    --space-4xl: 6rem;
  }

  /* Core grids → single column */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }

  /* ALL order properties become irrelevant in single-col — reset */
  .grid-2 > [style*="order"],
  .grid-2-reverse > * {
    order: 0 !important;
  }

  /* Sticky sidebar → static on mobile */
  .sidebar-sticky {
    position: static;
    top: auto;
  }

  /* Stats bar */
  .stats-bar { margin-top: -40px; }
  .stat-number { font-size: 2.2rem; }

  /* Page hero */
  .page-hero { min-height: 45vh; padding-top: 90px; }
  .page-hero .hero-overlay {
    background: linear-gradient(180deg,
      rgba(10,22,40,0.65) 0%,
      rgba(10,22,40,0.92) 50%,
      rgba(10,22,40,0.98) 100%);
  }
  .hero-overlay {
    background: linear-gradient(135deg,
      rgba(10,22,40,0.95) 0%,
      rgba(10,22,40,0.85) 50%,
      rgba(10,22,40,0.65) 100%);
  }
  .page-hero h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
  .page-hero .lead { font-size: 1rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Article cards → stack */
  .article-card {
    grid-template-columns: 1fr;
  }
  .article-card-img {
    min-height: 200px;
    max-height: 240px;
    overflow: hidden;
  }
  .article-card-img img {
    height: 100%;
    object-fit: cover;
  }

  /* Section padding reduction */
  .section-padding { padding: var(--space-2xl) 0; }
  .section-padding-lg { padding: var(--space-3xl) 0; }

  /* Typography scale down */
  h1 { font-size: clamp(2rem, 6vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); }

  /* Container padding */
  .container, .container-narrow {
    padding: 0 var(--space-md);
  }

  /* Hero adjustments */
  .hero { min-height: 90vh; }
  .hero-content { padding: var(--space-2xl) 0; padding-top: calc(var(--space-2xl) + 60px); }

  /* Map */
  .global-map-wrapper { padding: var(--space-lg); min-height: 300px; }

  /* Image offset deco → hide on mobile */
  .img-offset::after { display: none; }

  /* Featured panel */
  .featured-panel { grid-template-columns: 1fr; }
  .featured-panel-body { padding: var(--space-lg); }
  .featured-panel-aside { padding: var(--space-lg); min-height: 160px; }

  /* Metric grids → 2 col then stack */
  .metric-grid { grid-template-columns: repeat(2, 1fr); }

  /* Card grid 2x2 → stack 2-col still */
  .card-grid-2x2 { grid-template-columns: repeat(2, 1fr); }

  /* Contact map */
  .contact-map { min-height: 220px; max-height: 280px; }
  .contact-map iframe { height: 260px; }

  /* Board card expand needs more room on mobile */
  .board-card.expanded .board-card-expand {
    max-height: 800px;
  }

  /* Case study order reset */
  .case-study > [style*="order"] {
    order: 0 !important;
  }

  /* Quote block */
  .quote-block { padding: var(--space-lg) var(--space-md); }

  /* Stat grid small */
  .stat-grid-sm { grid-template-columns: 1fr 1fr; }

  /* Nav brand text subtitle */
  .nav-brand-text span { font-size: 0.58rem; }
}

/* ---------- Mobile (max 480px) ---------- */
@media (max-width: 480px) {
  :root {
    --space-lg: 1.75rem;
    --space-xl: 2.5rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
  }

  .stats-bar-inner { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-card { padding: var(--space-sm); }
  .stat-number { font-size: 1.8rem; }

  .grid-4 { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .btn { padding: 0.75rem 1.5rem; font-size: 0.85rem; }

  .pillar { padding: var(--space-md); }

  .gate-content { padding: var(--space-lg) var(--space-md); }

  .back-to-top { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }

  /* Metric grids → single column */
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid-2 { grid-template-columns: 1fr; }

  /* Card grid → single column */
  .card-grid-2x2 { grid-template-columns: 1fr; }

  /* Article card image shorter */
  .article-card-img { min-height: 160px; max-height: 200px; }

  /* Quote text smaller */
  .quote-text { font-size: 1.1rem; line-height: 1.6; }

  /* Page hero shorter + stronger overlay for text visibility */
  .page-hero { min-height: 40vh; padding-bottom: var(--space-xl); }
  .page-hero .hero-overlay {
    background: linear-gradient(180deg,
      rgba(10,22,40,0.7) 0%,
      rgba(10,22,40,0.95) 40%,
      rgba(6,14,26,1) 100%);
  }
  .page-hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .page-hero .lead { font-size: 0.95rem; color: rgba(255,255,255,0.8); }

  /* Board card padding */
  .board-card { padding: var(--space-md); }
  .board-card-header { flex-wrap: wrap; }

  /* Contact map */
  .contact-map { min-height: 200px; max-height: 240px; }
  .contact-map iframe { height: 220px; }

  /* Footer map */
  .footer-map { height: 140px; }

  /* Featured panel body */
  .featured-panel-body { padding: var(--space-md); }
  .featured-panel-aside { padding: var(--space-md); min-height: 120px; }

  /* Stat grid small stacks */
  .stat-grid-sm { grid-template-columns: 1fr; }

  /* Nav brand hide subtitle on very small */
  .nav-brand-text span { display: none; }

  /* Reduce hero-content top padding */
  .hero-content { padding-top: calc(var(--space-xl) + 50px); }

  /* Lead text smaller */
  .lead { font-size: 1.05rem; }

  /* Section headers */
  .section-header { margin-bottom: var(--space-lg); }

  /* Profile table */
  .profile-row { flex-direction: column; gap: 0.25rem; }
  .profile-value { text-align: left; }
}

/* ---------- Extra Small (max 360px) ---------- */
@media (max-width: 360px) {
  .stats-bar-inner { grid-template-columns: 1fr; gap: 0.5rem; }
  .stat-number { font-size: 1.6rem; }
  .hero-tag { font-size: 0.65rem; padding: 0.4rem 0.8rem; }
  .gate-emblem { width: 56px; height: 56px; font-size: 1.2rem; }
  .gate-title { font-size: 0.9rem; }
}
