/* ═══════════════════════════════════════════════════════════════════════════
   BHARAT ECOFUELS — RESPONSIVE ARCHITECTURE
   Mobile-first system. Single source of truth for all viewport-conditional CSS.

   BREAKPOINT SCALE
   ──────────────────────────────────────────────────────────────────────────
   xs    ≥ 360px   compact phones (iPhone SE)            mobile default
   sm    ≥ 480px   large phones
   md    ≥ 768px   tablets (iPad portrait)
   lg    ≥ 1024px  laptops
   xl    ≥ 1280px  desktops
   2xl   ≥ 1680px  ultra-wide

   PHILOSOPHY
   ──────────────────────────────────────────────────────────────────────────
   Defaults written for the SMALLEST screen. Each min-width @media block
   PROGRESSIVELY ENHANCES upward. No max-width queries; no specificity wars.

   Z-INDEX SCALE (declared in design-system.css)
   ──────────────────────────────────────────────────────────────────────────
   --z-floating: 80    --z-nav: 100    --z-drawer: 105    --z-drawer-top: 115
   --z-popup: 200      --z-popup-top: 210
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. GLOBAL VIEWPORT GUARDS ───────────────────────────────────────────── */
:root {
    /* True viewport width, accounting for scrollbar */
    --vw: 100vw;
}
@supports (width: 100svw) {
    :root { --vw: 100svw; }
}

/* No element may exceed the viewport horizontally — anywhere, ever. */
html, body { max-width: 100%; overflow-x: clip; }

/* ─── 2. CONTAINER SYSTEM (mobile-first padding scale) ────────────────────── */
.container, .container-md, .container-sm, .container-xl {
    /* Mobile: 16px gutters. Scales up at md. */
    padding-inline: 16px;
}
@media (min-width: 480px)  { .container, .container-md, .container-sm, .container-xl { padding-inline: 20px; } }
@media (min-width: 768px)  { .container, .container-md, .container-sm, .container-xl { padding-inline: 32px; } }
@media (min-width: 1024px) { .container, .container-md, .container-sm, .container-xl { padding-inline: 40px; } }

/* ─── 3. SECTION SPACING (fluid vertical rhythm — generous breathing) ─────── */
.section {
    padding-block: clamp(3.5rem, 8vw, 7.5rem);
}
.section-tight {
    padding-block: clamp(2.5rem, 5vw, 4.5rem);
}
/* Generous section-header gaps for premium feel */
.section-header { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* ─── 4. HERO HEIGHT (viewport-safe) ──────────────────────────────────────── */
.hero {
    /* On phones, give content room to breathe but never exceed viewport */
    min-height: clamp(560px, 88vh, 720px);
    min-height: clamp(560px, 88svh, 720px);
}
@media (min-width: 768px) {
    .hero {
        min-height: clamp(640px, 90vh, 880px);
        min-height: clamp(640px, 90svh, 880px);
    }
}

.hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
}
@media (min-width: 960px) {
    .hero-inner { grid-template-columns: 1.2fr 1fr; gap: var(--space-12); }
}

.hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}
@media (min-width: 480px) {
    .hero-stats { gap: var(--space-4); }
}

/* ─── 5. SPLIT (Image + Text) ─────────────────────────────────────────────── */
.split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
}
@media (min-width: 860px) {
    .split { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }
    .split.is-reversed { direction: rtl; }
    .split.is-reversed > * { direction: ltr; }
}

/* ─── 6. COLLAGE (about page mission images) ──────────────────────────────── */
/* Mobile-first: even 2-column grid, first image spans full width as a hero tile */
.mission-grid-collage {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 200px;
    height: auto;
}
.mission-grid-collage > * {
    grid-column: auto !important;
    grid-row: auto !important;
}
.mission-grid-collage .mission-tile-left {
    grid-column: 1 / 3 !important;
}
@media (min-width: 860px) {
    .mission-grid-collage {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr 1fr;
        height: 560px;
    }
    .mission-grid-collage .mission-tile-left      { grid-column: 1 / 2 !important; grid-row: 1 / 3 !important; }
    .mission-grid-collage .mission-tile-top-mid   { grid-column: 2 / 4 !important; grid-row: 1 / 2 !important; }
    .mission-grid-collage .mission-tile-right     { grid-column: 4 / 5 !important; grid-row: 1 / 3 !important; }
    .mission-grid-collage .mission-tile-bot-left  { grid-column: 2 / 3 !important; grid-row: 2 / 3 !important; }
    .mission-grid-collage .mission-tile-bot-right { grid-column: 3 / 4 !important; grid-row: 2 / 3 !important; }
    
}

/* ─── 7. FOOTER GRID (mobile-first) ───────────────────────────────────────── */
.footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
}
@media (min-width: 600px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-10); }
}
@media (min-width: 960px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: var(--space-12); }
}

/* ─── 8. ECOSYSTEM / SOCIAL / DOWNLOADS GRIDS ─────────────────────────────── */
.ecosystem-grid, .social-grid, .downloads-grid {
    grid-template-columns: 1fr;
}
@media (min-width: 600px) {
    .ecosystem-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .social-grid, .downloads-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .ecosystem-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ─── 9. BPL FEATURES (3-col on desktop, 2 on tablet, 1 on phone) ─────────── */
.bpl-features {
    grid-template-columns: 1fr;
    gap: var(--space-4);
}
@media (min-width: 600px) {
    .bpl-features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .bpl-features { grid-template-columns: repeat(3, 1fr); }
}

/* ─── 10. PARTNER FORM GRID (1 col on mobile, 2 on tablet, 3 on desktop) ──── */
.form-grid, .form-grid.is-3 {
    grid-template-columns: 1fr;
    gap: var(--space-3);
}
@media (min-width: 600px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
}
@media (min-width: 1024px) {
    .form-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ─── 11. FORM ROW ────────────────────────────────────────────────────────── */
.form-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
}
@media (min-width: 600px) {
    .form-row { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
}

/* ─── 12. JOB CARD (stack on mobile, inline on tablet+) ───────────────────── */
.job-card {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-5);
}
@media (min-width: 600px) {
    .job-card { flex-direction: row; align-items: center; padding: var(--space-6) var(--space-8); }
}
.job-card .btn {
    width: 100%;
    justify-content: center;
}
@media (min-width: 600px) {
    .job-card .btn { width: auto; }
}

/* ─── 13. NEWS ITEM (stack date+title on mobile) ──────────────────────────── */
.news-item {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    padding: var(--space-5) 0;
}
.news-item .news-arrow { display: none; }
@media (min-width: 768px) {
    .news-item {
        grid-template-columns: 160px 1fr auto;
        gap: var(--space-6);
        padding: var(--space-6) 0;
    }
    .news-item .news-arrow { display: inline-flex; }
}

/* ─── 14. SUSTAIN BAND ────────────────────────────────────────────────────── */
.sustain-band {
    grid-template-columns: 1fr;
    text-align: center;
}
.sustain-band-text .flex { justify-content: center; }
@media (min-width: 860px) {
    .sustain-band { grid-template-columns: 1.1fr 1fr; text-align: left; }
    .sustain-band-text .flex { justify-content: flex-start; }
}

/* ─── 15. PAGE HERO ───────────────────────────────────────────────────────── */
.page-hero {
    padding: clamp(5rem, 12vw, 9rem) 0 clamp(3rem, 7vw, 6rem);
}
.page-hero-art {
    display: none;
}
@media (min-width: 860px) {
    .page-hero-art { display: block; }
}

/* ─── 16. FULL-WIDTH BANNER ASPECT ────────────────────────────────────────── */
.full-banner { aspect-ratio: 4 / 3; max-height: 480px; }
@media (min-width: 600px) { .full-banner { aspect-ratio: 16 / 9; max-height: 560px; } }
@media (min-width: 1024px) { .full-banner { aspect-ratio: 21 / 9; max-height: 700px; } }

/* ─── 17. FOOTER BOTTOM (stack on mobile) ─────────────────────────────────── */
.footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
}
@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; text-align: left; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAVIGATION SYSTEM
   Mobile-first: drawer behavior defined first, desktop overrides at lg.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── NAV STRIP (top contact bar) — hidden on mobile ──────────────────────── */
.nav-strip { display: none; }
@media (min-width: 768px) {
    .nav-strip { display: block; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   STICKY HEADER  ──  ALWAYS visible while scrolling (no auto-hide)
   Menu button stays accessible from any scroll position.
   `position: sticky` is set in components.css. This adds the elevated
   shadow state once user scrolls past 12px.
   ═══════════════════════════════════════════════════════════════════════════ */
.nav-shell {
    transition:
        background-color 0.3s var(--ease-out),
        box-shadow 0.3s var(--ease-out);
}
.nav-shell.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 6px 24px rgba(10, 31, 28, 0.06);
}

/* On mobile, the drawer (.nav-list) is `position: fixed` and must anchor to the
   viewport. But `backdrop-filter` on .nav-shell creates a containing block for
   fixed descendants — pinning the drawer to the shell (document-top). When the
   user scrolls down and opens the menu, the drawer ends up above the viewport,
   forcing them to scroll back to the top to see it. Strip backdrop-filter on
   mobile so the drawer always anchors to the viewport. Frosted-glass is a
   desktop affordance; mobile keeps the solid-ish background without blur. */
@media (max-width: 1179px) {
    .nav-shell,
    .nav-shell.is-scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ─── NAV INNER ROW ───────────────────────────────────────────────────────── */
.nav-inner {
    padding: 12px 16px;
    min-height: var(--nav-h-mobile);
    gap: var(--space-3);
}
@media (min-width: 480px) {
    .nav-inner { padding: 12px 20px; }
}
@media (min-width: 1024px) {
    .nav-inner {
        padding: var(--space-3) var(--space-6);
        min-height: var(--nav-h);
        gap: var(--space-5);
    }
}

/* ─── NAV BRAND LOGO ──────────────────────────────────────────────────────── */
.nav-brand img {
    height: 42px;
    max-height: 42px;
    width: auto;
}
@media (min-width: 480px) {
    .nav-brand img { height: 48px; max-height: 48px; }
}
@media (min-width: 1024px) {
    .nav-brand img { height: 70px; max-height: 70px; }
}

/* ─── NAV TOGGLE (burger) ─────────────────────────────────────────────────── */
.nav-toggle {
    display: inline-flex;
    z-index: var(--z-drawer-top);
}
@media (min-width: 1180px) {
    .nav-toggle { display: none; }
}

/* When drawer is open, toggle floats over menu as close button — light theme */
.nav-toggle[aria-expanded="true"] {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    background: var(--pure);
    color: var(--eco-deep);
    border: 1px solid var(--slate-200);
    box-shadow: 0 6px 20px rgba(10, 31, 28, 0.10);
}
.nav-toggle[aria-expanded="true"]:hover {
    background: var(--eco-fog);
    border-color: rgba(21, 128, 61, 0.20);
}


/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER  ──  Premium full-screen overlay
   Header (sticky top) + scrollable links (middle) + footer (sticky bottom)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Visibility toggles between mobile/desktop */
.nav-mobile-only { display: block; }
.nav-desktop-only { display: none; }
.nav-group-label { display: none; }

@media (min-width: 1180px) {
    .nav-mobile-only { display: none; }
    .nav-desktop-only { display: block; }
}

/* ─── Drawer container (mobile only) ──────────────────────────────────────── */
.nav-list {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    opacity: 1;
    color: var(--slate-800);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: var(--z-drawer);
    scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list::before { content: none; }
.nav-list.is-open { transform: translateX(0); }

/* ─── 1. DRAWER HEADER (sticky top) ───────────────────────────────────────── */
.nav-drawer-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #ffffff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 16px;
    padding-top: max(20px, env(safe-area-inset-top) + 8px);
    border-bottom: 0.5px solid #e5e7eb;
}
.nav-drawer-head-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.nav-drawer-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}
.nav-drawer-mark svg { display: block; }
.nav-drawer-brand-name {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    letter-spacing: -0.2px;
    line-height: 1;
}

/* In-header close button */
.nav-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #6b7280;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s var(--ease-out);
}
.nav-drawer-close:hover { background: #e5e7eb; }
.nav-drawer-close svg { display: block; }

/* Hide the burger's morph-to-X behavior — the close button lives in .nav-drawer-head now */
.nav-toggle[aria-expanded="true"] { display: none; }

/* ─── 2. NAV ITEMS (scrollable middle) ────────────────────────────────────── */
.nav-list > li {
    padding: 0 12px;
    flex-shrink: 0;
}

/* Group label (small uppercase) */
.nav-group-label {
    display: block;
    padding: 12px 10px 4px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

/* Each nav item */
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 10px;
    margin: 1px 0;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: #374151;
    line-height: 1.2;
    letter-spacing: -0.005em;
    border-radius: 10px;
    border: 0;
    position: relative;
    min-height: 44px;
    background: transparent;
    transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out);
}
/* Kill ALL pseudo-elements on mobile nav-link — keep it clean */
.nav-link::before,
.nav-link::after { content: none !important; display: none !important; }

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #6b7280;
    flex-shrink: 0;
    transition: color 0.18s var(--ease-out);
}
.nav-link-icon svg { display: block; }
.nav-link-label {
    flex: 1;
    min-width: 0;
}

.nav-link:hover {
    background: #f9fafb;
    color: var(--slate-900);
}
.nav-link:hover .nav-link-icon { color: #4b5563; }

.nav-link.is-active {
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 500;
}
.nav-link.is-active .nav-link-icon { color: #16a34a; }

/* Divider between groups */
.nav-divider {
    display: block;
    flex-shrink: 0;
    height: 0.5px;
    background: #f3f4f6;
    margin: 8px 16px 0;
    padding: 0;
}
.nav-divider::after { content: none; }

/* ─── 3. DRAWER FOOTER (sticky bottom) ────────────────────────────────────── */
.nav-drawer-foot {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #ffffff;
    flex-shrink: 0;
    margin-top: auto;
    padding: 12px 12px;
    padding-bottom: max(20px, env(safe-area-inset-bottom) + 8px);
    border-top: 0.5px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* keep this li flush — no horizontal padding from .nav-list > li rule */
    margin-left: 0;
    margin-right: 0;
}
/* Override the general li padding for the header and footer */
.nav-list > li.nav-drawer-head { padding: 20px 20px 16px; padding-top: max(20px, env(safe-area-inset-top) + 8px); }
.nav-list > li.nav-drawer-foot { padding: 12px 12px; padding-bottom: max(20px, env(safe-area-inset-bottom) + 8px); }

/* Language pill */
.nav-lang-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    width: 100%;
    background: transparent;
    border: 0.5px solid #e5e7eb;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}
.nav-lang-pill:hover { background: #f9fafb; border-color: #d1d5db; }
.nav-lang-pill-icon {
    color: #6b7280;
    flex-shrink: 0;
}
.nav-lang-pill-label {
    flex: 1;
    text-align: left;
}
.nav-lang-pill-chevron {
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.25s var(--ease-out);
}
.nav-has-dropdown.is-open .nav-lang-pill-chevron { transform: rotate(180deg); }

/* Language options dropdown (slides open below pill) */
.nav-lang-pill-options {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    background: transparent !important;
    border: 0 !important;
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s var(--ease-out), margin-top 0.32s var(--ease-out);
}
.nav-has-dropdown.is-open .nav-lang-pill-options {
    max-height: 280px;
    margin-top: 4px !important;
}
.nav-lang-pill-options li { padding: 0 !important; }
.nav-lang-pill-options a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin: 2px 0;
    font-size: 13px;
    color: #4b5563;
    border-radius: 8px;
    background: transparent;
    border: 0;
    transition: background 0.18s var(--ease-out);
}
.nav-lang-pill-options a:hover { background: #f9fafb; }
.nav-lang-pill-options a.is-active {
    background: #f0fdf4;
    color: #16a34a;
    font-weight: 500;
}
.nav-lang-pill-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.nav-lang-pill-options a.is-active .nav-lang-pill-code {
    background: #16a34a;
    color: #ffffff;
}
.nav-lang-pill-native {
    flex: 1;
    color: #374151;
}
.nav-lang-pill-options a.is-active .nav-lang-pill-native { color: #16a34a; }

/* CTA button */
.nav-drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #16a34a;
    color: #ffffff;
    border-radius: 10px;
    padding: 13px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    border: 0;
    text-decoration: none;
    transition: background 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}
.nav-drawer-cta:hover {
    background: #15803d;
    transform: translateY(-1px);
}
.nav-drawer-cta svg { flex-shrink: 0; }

/* ─── DESKTOP RESET — kill drawer behavior at desktop breakpoint ──────────── */
@media (min-width: 1180px) {
    .nav-list {
        position: static;
        inset: auto;
        width: auto;
        height: auto;
        background: none;
        color: inherit;
        flex-direction: row;
        align-items: center;
        transform: none;
        transition: none;
        overflow: visible;
        gap: 2px;
        margin-left: auto;
        z-index: auto;
    }
    .nav-list > li { padding: 0; }
    .nav-drawer-head,
    .nav-drawer-foot,
    .nav-divider,
    .nav-group-label,
    .nav-mobile-only { display: none; }

    /* Desktop nav link styling */
    .nav-link {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 10px 12px;
        margin: 0;
        font-size: 0.88rem;
        font-weight: 500;
        color: var(--slate-700);
        line-height: 1;
        background: transparent;
        border-radius: var(--r-md);
        min-height: auto;
        white-space: nowrap;
    }
    .nav-link-icon { display: none; }
    .nav-link:hover { background: transparent; color: var(--eco-deep); }
    .nav-link.is-active {
        background: transparent;
        color: var(--eco-deep);
        font-weight: 600;
    }
    .nav-link.is-active::after {
        content: '' !important;
        display: block !important;
        position: absolute;
        left: 14px; right: 14px; bottom: 4px;
        height: 2px;
        background: var(--grad-emerald);
        border-radius: 2px;
        border: 0;
        transform: none;
    }

    /* Desktop dropdown popover */
    .nav-dropdown-btn { cursor: pointer; }
    .nav-dropdown-btn svg {
        transition: transform 0.32s var(--ease-out);
        color: var(--slate-400);
    }
    .nav-has-dropdown.is-open .nav-dropdown-btn svg { transform: rotate(180deg); }
    .nav-dropdown {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        min-width: 220px;
        background: #fff;
        border: 1px solid var(--slate-100);
        border-radius: var(--r-md);
        padding: 6px;
        margin: 0;
        max-height: none;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        box-shadow: 0 18px 50px rgba(10, 31, 28, 0.10);
        transition: all var(--t-base) var(--ease-out);
        list-style: none;
    }
    .nav-has-dropdown:hover .nav-dropdown,
    .nav-has-dropdown:focus-within .nav-dropdown,
    .nav-has-dropdown.is-open .nav-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-dropdown a {
        display: block;
        padding: 9px 12px;
        font-size: 0.9rem;
        color: var(--slate-700);
        border-radius: var(--r-sm);
        background: transparent;
        border: 0;
    }
    .nav-dropdown a:hover { background: var(--eco-fog); color: var(--eco-deep); }

    /* Desktop language switcher */
    .nav-lang-btn {
        padding: 8px 12px;
        background: var(--eco-fog);
        border: 1px solid rgba(21, 128, 61, 0.18);
        color: var(--eco-deep);
        border-radius: var(--r-pill);
        font-size: 0.78rem;
        font-weight: 600;
        min-height: 0;
    }
    .nav-lang-btn svg:first-child { color: var(--eco-primary); }
    .nav-lang-current { color: var(--eco-deep); }
    .nav-lang-dropdown a {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
    }
    .nav-lang-code {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px; height: 28px;
        border-radius: 6px;
        background: var(--pure);
        color: var(--eco-primary);
        border: 1px solid rgba(21, 128, 61, 0.10);
        font-size: 0.7rem;
        font-weight: 700;
        flex-shrink: 0;
    }
    .nav-lang-dropdown a.is-active .nav-lang-code {
        background: var(--eco-primary);
        color: var(--pure);
    }
    .nav-lang-native { flex: 1; color: var(--slate-700); }
    .nav-lang-dropdown a.is-active .nav-lang-native { color: var(--eco-deep); font-weight: 600; }

    /* Desktop CTA */
    .nav-cta-wrap { margin-left: var(--space-2); padding: 0; }
    .nav-cta-wrap .btn {
        padding: 0.65rem 1rem;
        font-size: 0.7rem;
        min-height: 0;
        white-space: nowrap;
    }
}

/* ─── STAGGER ENTRY ANIMATION (mobile drawer only) ────────────────────────── */
@media (max-width: 1179px) {
    .nav-list.is-open > li {
        animation: nav-item-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    .nav-list.is-open > li:nth-child(1)  { animation-delay: 0.04s; }
    .nav-list.is-open > li:nth-child(2)  { animation-delay: 0.08s; }
    .nav-list.is-open > li:nth-child(3)  { animation-delay: 0.11s; }
    .nav-list.is-open > li:nth-child(4)  { animation-delay: 0.14s; }
    .nav-list.is-open > li:nth-child(5)  { animation-delay: 0.17s; }
    .nav-list.is-open > li:nth-child(6)  { animation-delay: 0.20s; }
    .nav-list.is-open > li:nth-child(7)  { animation-delay: 0.23s; }
    .nav-list.is-open > li:nth-child(8)  { animation-delay: 0.26s; }
    .nav-list.is-open > li:nth-child(9)  { animation-delay: 0.29s; }
    .nav-list.is-open > li:nth-child(10) { animation-delay: 0.32s; }
    .nav-list.is-open > li:nth-child(11) { animation-delay: 0.35s; }
    .nav-list.is-open > li:nth-child(12) { animation-delay: 0.38s; }
    .nav-list.is-open > li:nth-child(13) { animation-delay: 0.41s; }
}
@keyframes nav-item-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .nav-list { transition: none; }
    .nav-list.is-open > li { animation: none; }
}
/* ═══════════════════════════════════════════════════════════════════════════
   POPUP SYSTEM — bottom sheet on phones, modal on tablet+
   ═══════════════════════════════════════════════════════════════════════════ */

.popup-overlay {
    /* Mobile default: bottom-anchored sheet */
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
    background: rgba(10, 31, 28, 0.50);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    z-index: var(--z-popup);
}

.popup-premium {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 92vh;
    max-height: 92dvh;
    min-height: 56vh;
    border-radius: 24px 24px 0 0;
    margin: 0;
    padding: 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.4);
    animation: sheet-up 0.5s cubic-bezier(0.32, 0.72, 0, 1) both;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--pure);
    position: relative;
}

/* Drag handle (mobile only) */
.popup-premium::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 36px; height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 4px;
    z-index: 6;
    pointer-events: none;
}

.popup-premium .popup-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--eco-deep);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(10, 31, 28, 0.18);
    z-index: var(--z-popup-top);
}

.popup-grid {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    height: auto;
    overflow: hidden;
}

.popup-visual {
    flex: 0 0 auto;
    padding: 28px 24px 22px;
    align-items: flex-start;
    background:
        radial-gradient(circle at 80% 30%, rgba(52, 211, 153, 0.18) 0%, transparent 50%),
        linear-gradient(165deg, #0a1f1c 0%, #115e3b 100%);
}
.popup-visual h3 {
    font-size: 1.4rem;
    margin-bottom: 6px;
    letter-spacing: -0.015em;
    line-height: 1.15;
}
.popup-visual p {
    font-size: 0.86rem;
    margin-bottom: 0;
    opacity: 0.78;
    line-height: 1.5;
}
.popup-eyebrow {
    margin-bottom: 14px;
    padding: 5px 12px;
    font-size: 0.64rem;
    letter-spacing: 0.18em;
}
.popup-brand { margin-bottom: 14px; }
.popup-brand img { height: 42px; padding: 7px 10px; }
.popup-benefits, .popup-trust, .popup-visual-glow { display: none; }

.popup-actions {
    flex: 1 1 auto;
    padding: 22px 20px;
    padding-bottom: max(22px, env(safe-area-inset-bottom) + 16px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: var(--pure);
}
.popup-actions-head { margin-bottom: 16px; }
.popup-actions-head h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
    letter-spacing: -0.005em;
}
.popup-actions-head p {
    font-size: 0.78rem;
    color: var(--slate-500);
}

/* ─── CTA cards: horizontal row layout on mobile ──────────────────────────── */
.popup-cta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
}
.popup-cta {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    padding-right: 38px;
    min-height: 64px;
    border-radius: 14px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    position: relative;
}
.popup-cta-icon {
    margin-bottom: 0;
    width: 40px; height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
}
.popup-cta-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.popup-cta strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}
.popup-cta-sub {
    font-size: 0.72rem;
    color: var(--slate-500);
    line-height: 1.3;
}
.popup-cta::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 7px; height: 7px;
    margin-top: -5px;
    border-top: 2px solid var(--slate-400);
    border-right: 2px solid var(--slate-400);
    transform: rotate(45deg);
    opacity: 0.6;
    transition: opacity var(--t-fast), border-color var(--t-fast);
}
.popup-cta:hover { color: var(--pure); }
.popup-cta:hover::after { opacity: 1; border-color: var(--pure); }
.popup-cta:hover .popup-cta-icon { background: rgba(255, 255, 255, 0.20); color: var(--pure); }
.popup-cta:hover .popup-cta-sub { color: rgba(255, 255, 255, 0.85); }
.popup-cta-gold {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(230, 200, 105, 0.04));
    border-color: rgba(212, 175, 55, 0.30);
}
.popup-cta-gold .popup-cta-icon { background: rgba(212, 175, 55, 0.10); color: var(--gold-deep); }

/* ─── Tab panel (form) ────────────────────────────────────────────────────── */
.popup-tab h5 {
    font-size: 1.15rem;
    margin: 12px 0 16px;
}
.popup-tab .form { gap: 12px; }
.popup-tab .form input,
.popup-tab .form select,
.popup-tab .form textarea {
    font-size: 16px;          /* no iOS auto-zoom */
    min-height: 50px;
    padding: 14px 16px;
    border-radius: 12px;
}
.popup-tab .form textarea { min-height: 88px; }
.popup-tab .btn {
    min-height: 54px;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

/* ─── TABLET+ — switch to centered modal ──────────────────────────────────── */
@media (min-width: 768px) {
    .popup-overlay {
        align-items: center;
        justify-content: center;
        padding: var(--space-4);
    }
    .popup-premium {
        max-width: 880px;
        max-height: 90vh;
        max-height: 90dvh;
        min-height: 0;
        border-radius: var(--r-2xl);
        animation: popup-modal-in 0.4s var(--ease-out) both;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    }
    .popup-premium::before { display: none; }    /* hide drag handle */
    .popup-grid {
        display: grid;
        grid-template-columns: 0.85fr 1fr;
        flex-direction: row;
        height: auto;
        min-height: 540px;
    }
    .popup-visual {
        padding: clamp(2rem, 4vw, 2.75rem);
        align-items: center;
    }
    .popup-visual h3 {
        font-size: clamp(1.5rem, 2.4vw, 1.85rem);
        margin-bottom: var(--space-4);
    }
    .popup-visual p {
        font-size: var(--fs-sm);
        margin-bottom: var(--space-5);
        opacity: 1;
    }
    .popup-eyebrow {
        font-size: 0.7rem;
        margin-bottom: var(--space-5);
        padding: 6px 14px;
    }
    .popup-benefits, .popup-trust, .popup-visual-glow { display: block; }
    .popup-benefits { display: grid; }
    .popup-trust { display: flex; }
    .popup-actions {
        padding: clamp(1.75rem, 3.5vw, 2.5rem);
    }
    .popup-actions-head h4 {
        font-size: clamp(1.4rem, 2.2vw, 1.65rem);
        margin-bottom: 4px;
    }
    .popup-actions-head p { font-size: var(--fs-sm); }
    .popup-cta-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
        margin-bottom: var(--space-5);
    }
    .popup-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-4);
        padding-right: var(--space-4);
        min-height: 0;
    }
    .popup-cta::after { display: none; }
    .popup-cta-icon { margin-bottom: var(--space-2); }
}
@keyframes sheet-up {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes popup-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Compact phones (≤ 360px) — tighten popup further ────────────────────── */
@media (max-width: 359px) {
    .popup-visual { padding: 22px 18px 18px; }
    .popup-visual h3 { font-size: 1.25rem; }
    .popup-actions { padding: 18px 16px; }
    .popup-cta { padding: 12px 14px; padding-right: 34px; }
    .popup-cta-icon { width: 36px; height: 36px; }
    .popup-cta strong { font-size: 0.88rem; }
    .popup-cta-sub { font-size: 0.7rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLOATING BAR + ENQUIRY PILL — viewport-safe positioning
   ═══════════════════════════════════════════════════════════════════════════ */

.floating-bar {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom) + 8px);
}
.floating-btn { width: 46px; height: 46px; }
.floating-enquiry {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(18px, env(safe-area-inset-bottom) + 8px);
    padding: 10px;
    font-size: 0.74rem;
}
.floating-enquiry-text { display: none; }
.floating-enquiry-icon { width: 22px; height: 22px; }

@media (min-width: 768px) {
    .floating-bar {
        right: 20px;
        bottom: 24px;
    }
    .floating-btn { width: 52px; height: 52px; }
    .floating-enquiry {
        left: 20px;
        bottom: 24px;
        padding: 12px 20px 12px 16px;
        font-size: 0.84rem;
    }
    .floating-enquiry-text { display: inline; }
    .floating-enquiry-icon { width: 28px; height: 28px; }
}

/* Hide floating elements while drawer or popup is open */
body:has(.nav-list.is-open) .floating-bar,
body:has(.nav-list.is-open) .floating-enquiry,
body:has(.popup-overlay:not([hidden])) .floating-bar,
body:has(.popup-overlay:not([hidden])) .floating-enquiry {
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms var(--ease-out);
}
