/* Shared by the pages that use the frosted header, the mobile bottom bar and the modals.
   Moved out of the three includes on 2026-09-24; the values are unchanged except the
   header button colour (white text now 5.9:1), 44px controls and a 60px bottom bar.
   Colour variables are read with fallbacks, so each page keeps its own palette. */

/* ===== Header: light frosted ===== */
    .nav-light-frosted {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,0.06));
    }
    
    .nav-light-frosted .nav-inner {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1.125rem 2.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-light-frosted .nav-logo img {
        height: 26px;
        transition: opacity 0.4s ease;
    }
    
    .nav-light-frosted .nav-logo:hover img {
        opacity: 0.7;
    }
    
    .nav-light-frosted .nav-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-light-frosted .nav-link {
        color: var(--ink-soft, #2d2d2d);
        text-decoration: none;
        font-size: 0.8125rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        border: 1px solid var(--border-subtle, rgba(0,0,0,0.06));
        background: transparent;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-light-frosted .nav-link:hover {
        color: var(--eco-green-deep, #008f5a);
        border-color: var(--eco-green, #00a86b);
        background: var(--eco-green-light, rgba(0,168,107,0.08));
    }
    
    .nav-light-frosted .nav-cta {
        background: var(--eco-green-cta, #007a4f);
        color: white;
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: 0.625rem 1.375rem;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.8125rem;
        letter-spacing: 0.01em;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 1px 3px rgba(0, 168, 107, 0.2);
        white-space: nowrap;
    }
    
    .nav-light-frosted .nav-cta:hover {
        background: var(--eco-green-cta-hover, #00663f);
        box-shadow: 0 4px 12px rgba(0, 168, 107, 0.25);
        transform: translateY(-1px);
    }
    
    /* Tablet: hide less important nav links first */
    @media (max-width: 1100px) {
        .nav-light-frosted .nav-inner {
            padding: 1rem 1.5rem;
        }
        
        .nav-light-frosted .nav-link {
            padding: 0.5rem 0.75rem;
            font-size: 0.75rem;
        }
        
        .nav-light-frosted .nav-cta {
            padding: 0.5rem 1rem;
            font-size: 0.75rem;
            min-height: 44px;
        }
    }
    
    /* Hide nav links on mobile (bottom bar takes over) */
    @media (max-width: 900px) {
        .nav-light-frosted .nav-link {
            display: none;
        }
        
        .nav-light-frosted .nav-inner {
            padding: 1rem 1.25rem;
        }
    }

/* ===== Mobile bottom bar ===== */
    /* Mobile Bottom Bar - Base (hidden on desktop) */
    .mobile-bottom-bar {
        display: none;
    }
    
    @media (max-width: 900px) {
        /* Show sticky bottom bar */
        .mobile-bottom-bar {
            display: flex;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(180deg, 
                rgba(10, 31, 20, 0.97) 0%, 
                rgba(5, 20, 12, 0.99) 100%);
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            border-top: 1px solid rgba(0, 182, 122, 0.2);
            padding: 0.25rem 0.25rem;
            padding-bottom: calc(0.25rem + env(safe-area-inset-bottom));
            z-index: 1000;
            box-shadow: 
                0 -8px 32px rgba(0, 0, 0, 0.25),
                0 -2px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(0, 182, 122, 0.1);
        }
        
        .mobile-bottom-bar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 3px;
            background: linear-gradient(90deg, 
                rgba(0, 182, 122, 0.3) 0%, 
                rgba(0, 182, 122, 0.6) 50%, 
                rgba(0, 182, 122, 0.3) 100%);
            border-radius: 0 0 3px 3px;
        }
        
        .mobile-bottom-item:focus-visible {
            outline: 2px solid #00d68f;
            outline-offset: -2px;
        }
        .mobile-bottom-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.125rem;
            padding: 0.375rem 0.25rem;
            text-decoration: none;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            border-radius: 12px;
            position: relative;
            overflow: hidden;
            min-height: 44px;
        }
        
        .mobile-bottom-item::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(
                ellipse at center bottom,
                rgba(0, 182, 122, 0.15) 0%,
                transparent 70%
            );
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .mobile-bottom-item:active::before {
            opacity: 1;
        }
        
        .mobile-bottom-item:active {
            transform: scale(0.96);
        }
        
        .mobile-bottom-icon {
            display: block;
            width: 22px;
            height: 22px;
            color: rgba(255, 255, 255, 0.85);
            transition: all 0.3s ease;
        }
        .mobile-bottom-icon svg {
            display: block;
            width: 22px;
            height: 22px;
        }
        
        .mobile-bottom-item:active .mobile-bottom-icon {
            color: #00d68f;
            transform: scale(1.1);
        }
        
        .mobile-bottom-label {
            font-size: 0.75rem;
            font-weight: 500;
            line-height: 1.1;
            color: rgba(255, 255, 255, 0.8);
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            transition: all 0.3s ease;
        }
        
        .mobile-bottom-item:active .mobile-bottom-label {
            color: #00d68f;
        }
        
        .mobile-bottom-item:not(:last-child)::after {
            content: '';
            position: absolute;
            right: 0;
            top: 20%;
            height: 60%;
            width: 1px;
            background: linear-gradient(
                to bottom,
                transparent 0%,
                rgba(255, 255, 255, 0.08) 50%,
                transparent 100%
            );
        }
        
        /* Add body padding when bar is visible */
        body {
            padding-bottom: calc(60px + env(safe-area-inset-bottom));
        }
    }

/* ===== Modals ===== */
/* Modal Styles - Premium Edition */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 10, 15, 0.85);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: linear-gradient(165deg, #ffffff 0%, #f8faf9 100%);
    border-radius: 24px;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    box-shadow: 
        0 0 0 1px rgba(0, 182, 122, 0.08),
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 25px 50px -12px rgba(0, 50, 30, 0.2),
        0 50px 100px -20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.modal-scroll {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.modal-sticky-footer {
    flex-shrink: 0;
    position: relative;
    background: var(--modal-footer-bg, #ffffff);
}

.modal-sticky-footer::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Scroll indicator - only visible when scrollable */
.modal-scroll {
    position: relative;
}

.scroll-indicator {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: center;
    padding: 0.75rem 0 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    background: linear-gradient(to top, rgba(255,255,255,1) 60%, rgba(255,255,255,0) 100%);
    margin-top: -2rem;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator svg {
    width: 28px;
    height: 16px;
    animation: scrollNudge 1.2s ease-in-out 3;
    filter: drop-shadow(0 1px 3px rgba(0, 182, 122, 0.3));
}

@keyframes scrollNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Subtle top accent line */
.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #00b67a 0%, #00d68f 100%);
    border-radius: 0 0 3px 3px;
}

.modal-header {
    padding: 1.5rem 2rem 0;
    position: relative;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1.5px solid rgba(0, 182, 122, 0.3);
    color: #008f5d;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.modal-badge svg {
    width: 13px;
    height: 13px;
    stroke-width: 2;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0a1f14;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.modal-close {
    position: absolute;
    top: 1.75rem;
    right: 1.75rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.8);
    color: #4a5d53;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.modal-close:hover {
    background: #ffffff;
    border-color: rgba(0, 182, 122, 0.3);
    color: #00a06b;
    transform: rotate(90deg);
}

.modal-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.5;
}

.modal-body {
    padding: 1.25rem 2rem 2rem;
}

.modal-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 182, 122, 0.08);
}

.modal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.modal-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #007a4d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    display: block;
}

.modal-text {
    font-size: 1rem;
    color: #2a3b32;
    line-height: 1.7;
    font-weight: 400;
}

.modal-footer {
    padding: 0.75rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: #ffffff;
    border-top: 1px solid rgba(0, 182, 122, 0.1);
}

.modal-footer .modal-btn {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    justify-content: center;
}

/* Sticky footer context - inside modal-sticky-footer */
.modal-sticky-footer .modal-footer {
    border-top: none;
    padding-bottom: 0.5rem;
}

/* Premium buttons - compact */
.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.modal-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #00b67a 0%, #00a06b 100%);
    color: white;
    box-shadow: 
        0 2px 4px rgba(0, 182, 122, 0.2),
        0 8px 16px -4px rgba(0, 182, 122, 0.3);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(0, 182, 122, 0.25),
        0 12px 24px -4px rgba(0, 182, 122, 0.35);
}

.modal-btn-secondary {
    background: rgba(0, 182, 122, 0.06);
    color: #00875a;
    border: 1px solid rgba(0, 182, 122, 0.15);
}

.modal-btn-secondary:hover {
    background: rgba(0, 182, 122, 0.1);
    border-color: rgba(0, 182, 122, 0.25);
}

.modal-btn-outline {
    background: transparent;
    color: #3d4f46;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-btn-outline:hover {
    border-color: rgba(0, 182, 122, 0.4);
    color: #00875a;
    background: rgba(0, 182, 122, 0.04);
}

/* Trust section - Premium */
.modal-trust {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f0f5f3 0%, #e8efec 100%);
    border-radius: 0 0 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid rgba(0, 182, 122, 0.1);
}

.modal-trust-logo {
    height: 26px;
    flex-shrink: 0;
    opacity: 0.9;
}

.modal-anniversary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #f7e27a 0%, #daa520 100%);
    padding: 0.45rem 1rem;
    border-radius: 100px;
    box-shadow: 
        0 2px 4px rgba(218, 165, 32, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.modal-anniversary-badge .anniversary-number {
    font-size: 0.95rem;
    font-weight: 800;
    color: #5c4a1f;
    line-height: 1;
}

.modal-anniversary-badge .anniversary-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #5c4a1f;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.modal-trust-cnv {
    font-size: 0.8rem;
    color: #3d4f46;
    text-align: right;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* Legacy trust icon style */
.modal-trust-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-trust-icon svg {
    width: 18px;
    height: 18px;
    color: #000;
}

.modal-trust-text {
    font-size: 0.85rem;
    color: #2d3640;
    line-height: 1.4;
}

.modal-trust-text strong {
    color: #0f1419;
    font-weight: 700;
}

/* Compact modal for smaller desktop viewports */
@media (max-height: 800px) {
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem 0;
    }
    
    .modal-badge {
        padding: 0.375rem 0.75rem;
        margin-bottom: 0.75rem;
        font-size: 0.75rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .modal-section {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .modal-label {
        margin-bottom: 0.25rem;
        font-size: 0.8rem;
    }
    
    .modal-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .modal-footer {
        padding: 0.625rem 1.5rem;
        gap: 0.5rem;
    }
    
    .modal-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .modal-trust {
        padding: 0.75rem 1.5rem;
    }
    
    .modal-trust-logo {
        height: 22px;
    }
    
    .modal-anniversary-badge {
        padding: 0.35rem 0.75rem;
    }
    
    .modal-anniversary-badge .anniversary-number {
        font-size: 0.85rem;
    }
    
    .modal-anniversary-badge .anniversary-label {
        font-size: 0.7rem;
    }
    
    .modal-trust-cnv {
        font-size: 0.75rem;
    }
    
    .modal-close {
        top: 1.25rem;
        right: 1.25rem;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal {
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .modal::before {
        width: 48px;
        height: 5px;
        top: 10px;
        background: rgba(0, 0, 0, 0.25);
        border-radius: 3px;
    }
    
    /* Scrollable area - contains header and body only */
    .modal-scroll {
        flex: 1;
        overflow-y: auto;
    }
    
    /* Scroll indicator - keep visible on mobile too */
    .scroll-indicator {
        padding: 0.5rem 0 0.75rem;
        margin-top: -1.5rem;
    }
    
    /* Sticky footer with buttons + trust bar */
    .modal-sticky-footer {
        flex-shrink: 0;
        background: #ffffff;
    }
    
    .modal-sticky-footer::before {
        top: -20px;
        height: 20px;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 0;
    }
    
    .modal-title {
        font-size: 1.35rem;
        padding-right: 3.5rem;
        line-height: 1.25;
    }
    
    .modal-body {
        padding: 1rem 1.5rem 0.75rem;
    }
    
    .modal-section {
        margin-bottom: 0.875rem;
        padding-bottom: 0.875rem;
    }
    
    .modal-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .modal-text {
        font-size: 0.9rem;
        line-height: 1.55;
    }
    
    /* Buttons - sticky in footer */
    .modal-sticky-footer .modal-footer {
        padding: 0.75rem 1rem;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.375rem;
        border-top: 1px solid rgba(0, 182, 122, 0.1);
    }
    
    .modal-footer .modal-btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        padding: 0.625rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Primary button full width */
    .modal-footer .modal-btn-primary {
        flex: 1 1 100%;
    }
    
    /* Compact trust bar */
    .modal-trust {
        padding: 0.5rem 1rem;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
        border-radius: 0;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .modal-trust-logo {
        height: 20px;
    }
    
    .modal-anniversary-badge {
        padding: 0.25rem 0.5rem;
    }
    
    .modal-anniversary-badge .anniversary-number {
        font-size: 0.75rem;
    }
    
    .modal-anniversary-badge .anniversary-label {
        font-size: 0.55rem;
    }
    
    .modal-trust-cnv {
        font-size: 0.65rem;
        text-align: right;
        flex-shrink: 0;
    }
    
    .modal-close {
        top: 1.25rem;
        right: 1.25rem;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.06);
        border: none;
    }
    
    .modal-close:active {
        background: rgba(0, 0, 0, 0.12);
        transform: scale(0.95);
    }
    
    .modal-close svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .modal-footer .modal-btn {
        flex: 1 1 100%;
        font-size: 0.8rem;
    }
    
    .modal-trust {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    
    .modal-trust-cnv {
        width: 100%;
        text-align: center;
        margin-top: 0.25rem;
    }
}
