html,
body,
#page,
.site,
.site-content,
#content,
.ast-container {
    background-color: #070a14;
}

html,
body,
#page,
.site {
    min-height: 100vh;
}

:root {
    /* Fallback: updated in runtime by JS when available */
    --jst-custom-header-h: 72px;
}

/* Mobile menu toggle background */
body.ast-header-break-point .main-header-menu-toggle,
body.ast-header-break-point .ast-mobile-menu-trigger,
body.ast-header-break-point .menu-toggle,
body.ast-header-break-point .ast-button-wrap .menu-toggle,
body.ast-header-break-point .ast-button-wrap .menu-toggle:hover,
body.ast-header-break-point .ast-button-wrap .menu-toggle:focus {
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

body.jst-custom-header #masthead {
    display: none !important;
}

/* Astra sometimes renders responsive header wrappers outside of #masthead */
body.jst-custom-header .ast-mobile-header-wrap,
body.jst-custom-header .ast-mobile-header-content,
body.jst-custom-header .ast-header-break-point .ast-primary-header-bar {
    display: none !important;
}

body.jst-custom-header .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/*
 * Astra applies different spacing rules at the mobile breakpoint via body.ast-header-break-point.
 * Use higher-specificity selectors so the custom-header pages never get a top spacer on any viewport.
 */
body.jst-custom-header #page #content.site-content,
body.jst-custom-header #page .site-content,
body.jst-custom-header.ast-header-break-point #page #content.site-content,
body.jst-custom-header.ast-header-break-point #page .site-content,
body.jst-custom-header.ast-header-break-point .site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.jst-custom-header #page #content.site-content .ast-container,
body.jst-custom-header #page #content.site-content #primary,
body.jst-custom-header #page #content.site-content .content-area,
body.jst-custom-header #page #content.site-content .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.jst-custom-header .site-content > .ast-container,
body.jst-custom-header .site-content > #content,
body.jst-custom-header .site-content > #primary {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.jst-custom-header .site-content .elementor-section:first-child,
body.jst-custom-header .site-content .e-con:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.jst-custom-header #jst-custom-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99991;
    background-color: var(--jst-header-bg, rgba(17,24,39,0.95));
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}

body.jst-custom-header #jst-custom-header .jst-custom-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    justify-content: center;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__menu-wrap {
    flex: 0 0 auto;
    min-width: 0;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__menu > li {
    white-space: nowrap;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__menu a {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 300;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__menu a:hover,
body.jst-custom-header #jst-custom-header .jst-custom-header__menu a:focus {
    color: #7DD3FC !important;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__logo {
    margin-left: 0;
    margin-right: 16px;
    display: flex;
    align-items: center;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__site-name {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
}

body.admin-bar #jst-debug-toggle {
    display: none !important;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 6px;
    margin-left: auto;
    cursor: pointer;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #e5e7eb;
    margin: 4px 0;
}

/* Visual marker when ?jst_gap_debug=1 is active */
body.jst-gap-debug::after {
    content: "JST gap debug active";
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 2147483647;
    background: rgba(11, 16, 32, 0.92);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 10px;
    font: 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    border-radius: 10px;
    pointer-events: none;
}

body.jst-custom-header #jst-custom-header .jst-custom-header__panel {
    padding: 6px 20px 14px;
    border-top: 1px solid rgba(148,163,184,0.25);
}

body.jst-custom-header #jst-custom-header .jst-custom-header__panel .jst-custom-header__menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

@media (max-width: 980px) {
    body.jst-custom-header #jst-custom-header .jst-custom-header__inner {
        justify-content: space-between;
    }

    body.jst-custom-header #jst-custom-header .jst-custom-header__menu-wrap {
        display: none;
    }

    body.jst-custom-header #jst-custom-header .jst-custom-header__toggle {
        display: block;
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        border-color: transparent !important;
        -webkit-tap-highlight-color: transparent;
    }

    body.jst-custom-header #jst-custom-header .jst-custom-header__toggle:hover,
    body.jst-custom-header #jst-custom-header .jst-custom-header__toggle:focus,
    body.jst-custom-header #jst-custom-header .jst-custom-header__toggle:active,
    body.jst-custom-header #jst-custom-header.is-open .jst-custom-header__toggle {
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        border-color: transparent !important;
        outline: none;
    }

    body.jst-custom-header #jst-custom-header .jst-custom-header__logo {
        margin-left: 0;
    }

    body.jst-custom-header #jst-custom-header.is-open .jst-custom-header__panel {
        display: block;
    }

    body.jst-custom-header #jst-custom-header .jst-custom-header__panel[hidden] {
        display: none;
    }
}
