/* Loader and Navigation Animations */

/* Prevent Flash - Must be first */
html,
body {
    background-color: #1b1b18 !important;
    overflow: hidden;
}

/* Hide all content until loader is ready */
body:not(.loader-ready) > *:not(#loader):not(script) {
    visibility: hidden !important;
}

/* Show content only after loader completes */
body.loader-done {
    background-color: #ede7db !important;
    overflow: visible;
}

body.loader-done > * {
    visibility: visible !important;
}

/* Z-INDEX Values */
#section-kYksPsq7_h {
    z-index: 99 !important;
}

/* Nav Sections */
body:not(.has-funnel-builder) #section-4hcS9sD17J,
body:not(.has-funnel-builder) #section-gs7_Vr7US1,
body:not(.has-funnel-builder) #section-p-41UvcD17 {
    z-index: 1200 !important;
}

/* Popup Elements */
#overlay {
    z-index: 2000 !important;
}

#hl_main_popup {
    z-index: 2001 !important;
}

/* Background */
#second-bg {
    z-index: 1000;
}

/* Override GHL Preview Container */
#preview-container {
    margin-top: 0 !important;
}

/* Timing Values */
body:not(.has-funnel-builder) #section-4hcS9sD17J,
body:not(.has-funnel-builder) #section-gs7_Vr7US1,
body:not(.has-funnel-builder) #section-p-41UvcD17 {
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
}

#second-bg {
    transition: opacity 2.2s cubic-bezier(0.25, 0.1, 0.25, 1) 1s !important;
}

/* Loader & Spinner */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1b1b18;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 1s ease,
                opacity 0.6s ease 0.4s,
                visibility 0.6s ease 0.4s;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

#loader.hide {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loader .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #ede7db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Nav Sections (Not in Funnel Builder) */
body:not(.has-funnel-builder) #section-4hcS9sD17J,
body:not(.has-funnel-builder) #section-gs7_Vr7US1,
body:not(.has-funnel-builder) #section-p-41UvcD17 {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    min-height: 60px;
    transform: translateY(-100%);
    display: none;
}

/* When Nav is Shown */
body:not(.has-funnel-builder) #section-4hcS9sD17J.show,
body:not(.has-funnel-builder) #section-gs7_Vr7US1.show,
body:not(.has-funnel-builder) #section-p-41UvcD17.show {
    transform: translateY(0) !important;
    display: block !important;
    position: fixed !important;
    top: 0 !important;
}

/* Tablet Nav (481px-1250px) */
@media (min-width: 481px) and (max-width: 1250px) {
    body:not(.has-funnel-builder) #section-gs7_Vr7US1.show {
        display: block !important;
        transform: translateY(0) !important;
    }

    body:not(.has-funnel-builder) #section-4hcS9sD17J,
    body:not(.has-funnel-builder) #section-p-41UvcD17 {
        display: none !important;
    }
}

/* Desktop Nav (1251px+) */
@media (min-width: 1251px) {
    body:not(.has-funnel-builder) #section-4hcS9sD17J.show {
        display: block !important;
        transform: translateY(0) !important;
    }

    body:not(.has-funnel-builder) #section-gs7_Vr7US1,
    body:not(.has-funnel-builder) #section-p-41UvcD17 {
        display: none !important;
    }
}

/* Mobile Nav (0-480px) */
@media (max-width: 480px) {
    body:not(.has-funnel-builder) #section-p-41UvcD17.show {
        display: block !important;
        transform: translateY(0) !important;
    }

    body:not(.has-funnel-builder) #section-4hcS9sD17J,
    body:not(.has-funnel-builder) #section-gs7_Vr7US1 {
        display: none !important;
    }
}

/* Prevent Content Shift */
body:not(.has-funnel-builder) {
    margin-top: 86px !important;
    padding-top: 0 !important;
}

/* Second Background */
#second-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ede7db;
    opacity: 1;
    transform: translateY(0);
}

/* Fade-Out Effect */
#second-bg.fade {
    opacity: 0;
    pointer-events: none;
}

/* Reference Section – Set Nav Width */
#section-kYksPsq7_h {
    --nav-width: 1200px;
    width: 100%;
    max-width: var(--nav-width);
    margin: 0 auto;
    position: fixed !important;
    top: 0 !important;
}
