/* ============================================================
   NOMA SERVICE CONSOLIDATED LIMITED
   Global Responsive & Mobile CSS — v1.0
   Breakpoints: 1200px | 1024px | 900px | 768px | 600px | 480px | 360px
   ============================================================ */

/* ── 1. CONTAINER UTILITY ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 60px);
  padding-right: clamp(16px, 4vw, 60px);
}

/* ── 2. NAV — LARGE DESKTOP ADJUSTMENTS ─────────────────────── */
@media (max-width: 1200px) {
  .header-nav .nav-link {
    font-size: 13px;
    padding: 0 10px;
  }
  .header-actions .header-cta-outline {
    display: none;
  }
}

@media (max-width: 1100px) {
  .header-nav .nav-item:nth-child(n+7) {
    display: none;
  }
}

/* ── 3. NAV — TABLET (hide desktop nav, show hamburger) ──────── */
@media (max-width: 1024px) {
  .header-nav {
    display: none !important;
  }
  .header-actions .header-cta-outline,
  .header-actions .header-cta:not(.hamburger) {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
}

/* ── 4. PAGE HEADER ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .page-header-wrap {
    padding: 140px 0 70px;
  }
}

@media (max-width: 768px) {
  .page-header-wrap {
    padding: 120px 0 60px;
  }
  .page-header-title {
    font-size: clamp(28px, 6vw, 44px);
  }
  .page-header-sub {
    font-size: 15px;
  }
  .page-header-ctas {
    gap: 10px;
  }
  .page-header-ctas .btn {
    padding: 12px 22px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .page-header-wrap {
    padding: 110px 0 48px;
  }
  .page-header-ctas {
    flex-direction: column;
  }
  .page-header-ctas .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ── 5. HOME HERO ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-headline { font-size: clamp(38px, 5.5vw, 72px); }
  .hero-inner { gap: 48px; }
}

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
    align-items: center;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-visual {
    display: none;
  }
  .hero-ticker {
    justify-content: center;
  }
  .hero-stats-ribbon {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero-headline { font-size: clamp(32px, 7vw, 52px); }
  .hero-sub { font-size: 15px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-stats-ribbon { flex-wrap: wrap; gap: 16px; }
  .hero-stat-item { min-width: 140px; }
}

@media (max-width: 480px) {
  .hero-wrap { min-height: 100svh; }
  .hero-stats-ribbon { gap: 12px; }
  .hero-stat-number { font-size: 28px; }
}

/* ── 6. GRID LAYOUTS ────────────────────────────────────────── */

/* 2-col → 1-col on mobile */
@media (max-width: 768px) {
  .grid-2,
  .two-col,
  .split-section {
    grid-template-columns: 1fr !important;
  }
  .split-section-reverse {
    direction: ltr !important;
  }
}

/* 3-col grid */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr !important; }
}

/* 4-col grid */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr !important; }
}

/* ── 7. CARDS ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .card-grid--2 {
    grid-template-columns: 1fr;
  }
  .insight-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .feature-card,
  .corridor-card,
  .commodity-card,
  .insight-card {
    padding: 24px 20px;
  }
}

/* ── 8. SECTION SPACING ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .section-pad { padding-top: 80px; padding-bottom: 80px; }
  .section-pad-lg { padding-top: 100px; padding-bottom: 100px; }
}
@media (max-width: 768px) {
  .section-pad { padding-top: 60px; padding-bottom: 60px; }
  .section-pad-lg { padding-top: 80px; padding-bottom: 80px; }
  .section-pad-sm { padding-top: 48px; padding-bottom: 48px; }
}
@media (max-width: 480px) {
  .section-pad { padding-top: 48px; padding-bottom: 48px; }
  .section-pad-lg { padding-top: 60px; padding-bottom: 60px; }
}

/* ── 9. TYPOGRAPHY SCALING ──────────────────────────────────── */
@media (max-width: 768px) {
  .section-title {
    font-size: clamp(26px, 5.5vw, 40px) !important;
  }
  .section-sub {
    font-size: 15px !important;
  }
  .display-xl {
    font-size: clamp(32px, 6vw, 56px) !important;
  }
  .display-lg {
    font-size: clamp(28px, 5vw, 48px) !important;
  }
}

/* ── 10. BUTTONS ────────────────────────────────────────────── */
@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-group .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ── 11. STAT RIBBONS / METRICS ─────────────────────────────── */
@media (max-width: 900px) {
  .stats-ribbon {
    flex-wrap: wrap;
    gap: 20px;
  }
  .stats-ribbon-item {
    flex: 1 1 140px;
    text-align: center;
  }
  .stats-ribbon-divider { display: none; }
}

@media (max-width: 480px) {
  .stats-ribbon-item {
    flex: 1 1 100%;
  }
}

/* ── 12. INSIGHT / BLOG CARDS ───────────────────────────────── */
@media (max-width: 1024px) {
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .insight-card-featured {
    grid-column: 1 / -1;
  }
}

/* ── 13. TRADE CORRIDORS MAP ────────────────────────────────── */
@media (max-width: 900px) {
  .corridor-map-container {
    /* height removed — use auto so cards + map stack without clipping */
  }
  .corridor-map-pins .pin-label {
    font-size: 10px;
  }
}
@media (max-width: 600px) {
  .corridor-map-container {
    /* height removed — use auto */
  }
}

/* ── 14. PERFORMANCE CHARTS ─────────────────────────────────── */
@media (max-width: 768px) {
  .chart-container {
    height: 260px !important;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .chart-container {
    height: 220px !important;
  }
}

/* ── 15. GALLERY ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .gallery-item--wide {
    grid-column: span 1 !important;
  }
  .gallery-item--tall {
    grid-row: span 1 !important;
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}

/* ── 16. FORMS ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-row-2 {
    grid-template-columns: 1fr !important;
  }
  .form-row-3 {
    grid-template-columns: 1fr !important;
  }
}

/* ── 17. TABLE / DATA ───────────────────────────────────────── */
@media (max-width: 768px) {
  .data-table {
    overflow-x: auto;
    display: block;
    -webkit-overflow-scrolling: touch;
  }
  .data-table table {
    min-width: 600px;
  }
}

/* ── 18. SIDEBAR LAYOUTS ────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar-layout {
    grid-template-columns: 1fr !important;
  }
  .sidebar-layout .sidebar {
    order: -1;
  }
}

/* ── 19. PROCESS STEPS ──────────────────────────────────────── */
@media (max-width: 768px) {
  .process-steps {
    flex-direction: column;
    gap: 0;
  }
  .process-step-connector {
    display: none;
  }
  .process-step {
    border-left: 2px solid var(--color-green);
    padding-left: 20px;
    margin-bottom: 28px;
  }
  .process-step:last-child {
    margin-bottom: 0;
  }
}

/* ── 20. MODAL / LIGHTBOX ───────────────────────────────────── */
@media (max-width: 768px) {
  .modal-inner {
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-header {
    padding: 20px 20px 16px;
  }
  .modal-body {
    padding: 20px;
  }
}

/* ── 21. TESTIMONIALS / QUOTES ──────────────────────────────── */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .testimonial-quote {
    font-size: 17px;
  }
}

/* ── 22. CTA SECTIONS ───────────────────────────────────────── */
@media (max-width: 768px) {
  .cta-section-inner {
    flex-direction: column;
    text-align: center;
    gap: 28px;
  }
  .cta-section-actions {
    flex-direction: column;
    width: 100%;
  }
  .cta-section-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .cta-title {
    font-size: clamp(24px, 5vw, 38px) !important;
  }
}

/* ── 23. IMPACT STORIES ─────────────────────────────────────── */
@media (max-width: 900px) {
  .impact-grid {
    grid-template-columns: 1fr;
  }
  .impact-story-featured {
    flex-direction: column;
  }
  .impact-story-image {
    width: 100%;
    height: 260px;
  }
}

/* ── 24. COMMODITIES ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .commodity-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .commodity-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 25. OPERATIONS INFRASTRUCTURE ─────────────────────────── */
@media (max-width: 900px) {
  .ops-feature-grid {
    grid-template-columns: 1fr;
  }
  .ops-visual {
    display: none;
  }
}

/* ── 26. THRUM PLATFORM ─────────────────────────────────────── */
@media (max-width: 900px) {
  .thrum-split {
    flex-direction: column;
  }
  .thrum-feature-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .thrum-dashboard-mockup {
    transform: none !important;
    width: 100%;
    height: 220px;
  }
}

/* ── 27. CONTACT PAGE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr !important;
  }
  .contact-map {
    height: 280px;
  }
}

/* ── 28. ACCORDION ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .accordion-panel-body {
    font-size: 14px;
    padding: 16px 18px;
  }
}

/* ── 29. TABS ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tabs-nav {
    flex-wrap: wrap;
    gap: 6px;
  }
  .tab-btn {
    font-size: 12px;
    padding: 8px 14px;
  }
}

/* ── 30. TICKER / MARQUEE ───────────────────────────────────── */
@media (max-width: 600px) {
  .ticker-item {
    font-size: 12px;
  }
}

/* ── 31. PERFORMANCE PAGE ───────────────────────────────────── */
@media (max-width: 1024px) {
  .perf-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .perf-kpi-grid {
    grid-template-columns: 1fr;
  }
  .perf-tab-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .perf-tab-nav::-webkit-scrollbar { display: none; }
}

/* ── 32. ABOUT PAGE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-split {
    grid-template-columns: 1fr !important;
  }
  .about-values-grid {
    grid-template-columns: 1fr 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .about-values-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 33. TRADE WITH US FORM ─────────────────────────────────── */
@media (max-width: 900px) {
  .trade-form-layout {
    grid-template-columns: 1fr !important;
  }
  .trade-form-sidebar {
    order: -1;
  }
}

/* ── 34. FOOTER ADJUSTMENTS ─────────────────────────────────── */
@media (max-width: 600px) {
  .footer-newsletter-form {
    flex-direction: column;
  }
  .footer-newsletter-btn {
    width: 100%;
    text-align: center;
  }
  .footer-trust {
    justify-content: center;
  }
}

/* ── 35. PRINT BASICS ───────────────────────────────────────── */
@media print {
  .site-header,
  .site-footer,
  .mobile-menu,
  .hamburger,
  .hero-ctas,
  .cta-section,
  .breadcrumb-wrap { display: none !important; }

  body {
    font-size: 11pt;
    color: #000;
  }
  .container {
    max-width: 100%;
    padding: 0;
  }
}

/* ── 36. MISC UTILITY ───────────────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block !important; }
  .show-mobile-flex { display: flex !important; }
  .text-center-mobile { text-align: center !important; }
  .mt-0-mobile { margin-top: 0 !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ── 37. BREADCRUMBS ────────────────────────────────────────── */
@media (max-width: 600px) {
  .breadcrumb-list {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .breadcrumb-list li::before {
    margin: 0 4px;
  }
}

/* ── 38. SMOOTH SCROLL PADDING FOR FIXED HEADER ────────────── */
html {
  scroll-padding-top: 80px;
}

/* ── 39. OVERFLOW PREVENTION ────────────────────────────────── */
body {
  overflow-x: hidden;
}

/* ── 40. TOUCH TARGET MINIMUMS ──────────────────────────────── */
@media (max-width: 768px) {
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  .footer-link,
  .mobile-nav-link,
  .mobile-dropdown-link {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* ── 41. RESPONSIVE INLINE-GRID UTILITY CLASSES ─────────────── */
/* These replace inline style="display:grid;grid-template-columns:..."
   which would otherwise block CSS media query overrides.           */

/* Base (desktop) definitions */
.noma-grid-4   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.noma-grid-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.noma-grid-3c  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.noma-grid-6   { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.noma-grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.noma-stat-band   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.06); }
.noma-stat-band-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: rgba(255,255,255,0.06); }
.noma-month-grid  { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 8px; }

@media (max-width: 1024px) {
  .noma-grid-4   { grid-template-columns: repeat(2, 1fr); }
  .noma-grid-6   { grid-template-columns: repeat(3, 1fr); }
  .noma-stat-band-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .noma-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .noma-stat-band-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .noma-grid-4   { grid-template-columns: repeat(2, 1fr); }
  .noma-grid-3   { grid-template-columns: 1fr; }
  .noma-grid-3c  { grid-template-columns: 1fr; }
  .noma-grid-6   { grid-template-columns: repeat(3, 1fr); }
  .noma-grid-2   { grid-template-columns: 1fr; }
  .noma-stat-band   { grid-template-columns: repeat(2, 1fr); }
  .noma-stat-band-5 { grid-template-columns: repeat(2, 1fr); }
  .noma-month-grid  { display: none; } /* Too cramped — hidden on mobile; chart still visible */
}

@media (max-width: 480px) {
  .noma-grid-4   { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .noma-grid-6   { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .noma-stat-band   { grid-template-columns: repeat(2, 1fr); }
  .noma-stat-band-5 { grid-template-columns: repeat(2, 1fr); }
}

/* Prevent any section from causing horizontal scroll */
.container, .container-wide {
  max-width: 100%;
}
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── 42. FIX REVEAL ANIMATIONS CAUSING HORIZONTAL OVERFLOW ──── */
/* reveal-right/reveal-left use translateX which pushes elements   */
/* off-screen before scroll triggers, causing a white panel on     */
/* the right side of the page on mobile.                           */
@media (max-width: 1024px) {
  .reveal-right {
    transform: translateY(20px) !important;
  }
  .reveal-right.revealed {
    transform: translateY(0) !important;
  }
  .reveal-left {
    transform: translateY(20px) !important;
  }
  .reveal-left.revealed {
    transform: translateY(0) !important;
  }
  /* Sections that contain 2-col layouts must clip overflow */
  .section-pad,
  section {
    overflow-x: hidden;
  }
}

/* Stat band cells: fill the grid cell's background correctly when grid wraps */
@media (max-width: 768px) {
  .noma-stat-band > div,
  .noma-stat-band-5 > div {
    padding: 20px 16px;
  }
  .noma-stat-band > div:not(:nth-child(2n)),
  .noma-stat-band-5 > div:not(:nth-child(2n)) {
    border-right: 1px solid rgba(255,255,255,0.06);
  }
  .noma-stat-band > div:not(:nth-last-child(-n+2)),
  .noma-stat-band-5 > div:not(:nth-last-child(-n+2)) {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  /* Year cards: prevent text overflow */
  .noma-grid-3 .info-card {
    min-width: 0;
    overflow: hidden;
  }
  /* Export/int cards: single column on small screens */
  .noma-grid-4 .int-card {
    min-width: 0;
  }
}

/* ── 43. GLOBAL IMAGE-BLOCK HEIGHT SCALING ───────────────────── */
@media (max-width: 1024px) {
  .image-block { height: 380px !important; }
}
@media (max-width: 768px) {
  .image-block { height: 280px !important; }
}
@media (max-width: 480px) {
  .image-block { height: 220px !important; }
}

/* ── 44. FORM GRID STACKING ──────────────────────────────────── */
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr !important; }
}

/* ── 45. MOBILE PADDING ADJUSTMENTS ─────────────────────────── */
@media (max-width: 480px) {
  .section-pad { padding: 48px 0; }
  .section-pad-sm { padding: 32px 0; }
}
