/* Global header overrides: keep Helix sticky logic from shifting the floating header. */
#sp-header,
#sp-header.header-sticky {
    animation: none !important;
}

.sticky-header-placeholder {
    display: none !important;
    height: 0 !important;
}

body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header,
body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header.header-sticky {
    position: fixed !important;
    top: 16px !important;
    left: 50% !important;
    right: auto !important;
    width: 95vw !important;
    max-width: calc(100vw - 20px) !important;
    transform: translateX(-50%) !important;
    z-index: 1100 !important;
    background-color: rgba(255, 252, 240, 0.88) !important;
    backdrop-filter: blur(10px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(130%) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14) !important;
    overflow: hidden;
    transition: background-color 0.25s ease, box-shadow 0.25s ease !important;
}

body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header > .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-inline: clamp(14px, 2.4vw, 30px) !important;
}

body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-main-body,
body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) main,
body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) .body-innerwrapper > main {
    padding-top: 112px !important;
    transition: none !important;
}

body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) .sppb-section.sppb-row-have-ext-bg:first-of-type {
    margin-top: -112px !important;
}

@media (max-width: 991.98px) {
    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header,
    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header.header-sticky {
        top: 10px !important;
        width: 95vw !important;
        max-width: calc(100vw - 16px) !important;
        border-radius: 18px !important;
        background-color: rgba(255, 252, 240, 0.92) !important;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16) !important;
        height: 58px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header .logo {
        height: 58px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #offcanvas-toggler {
        height: 58px !important;
        line-height: 58px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header .logo a {
        display: inline-flex;
        align-items: center;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header .logo-image-phone {
        width: auto !important;
        height: 42px !important;
        max-height: 42px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header > .container {
        padding-inline: 14px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-main-body,
    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) main,
    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) .body-innerwrapper > main {
        padding-top: 80px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) .sppb-section.sppb-row-have-ext-bg:first-of-type {
        margin-top: -80px !important;
    }
}

@media (max-width: 575.98px) {
    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-header .logo-image-phone {
        height: 40px !important;
        max-height: 40px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) #sp-main-body,
    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) main,
    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) .body-innerwrapper > main {
        padding-top: 76px !important;
    }

    body:not(.itemid-101):not(.itemid-105):not(.itemid-291):not(.itemid-412):not(.itemid-413) .sppb-section.sppb-row-have-ext-bg:first-of-type {
        margin-top: -76px !important;
    }
}

/* Home pages keep zero top offset because the floating header sits over the hero. */
body.itemid-101 #sp-main-body,
body.itemid-101 main,
body.itemid-101 .body-innerwrapper > main,
body.itemid-105 #sp-main-body,
body.itemid-105 main,
body.itemid-105 .body-innerwrapper > main,
body.itemid-291 #sp-main-body,
body.itemid-291 main,
body.itemid-291 .body-innerwrapper > main,
body.itemid-412 #sp-main-body,
body.itemid-412 main,
body.itemid-412 .body-innerwrapper > main,
body.itemid-413 #sp-main-body,
body.itemid-413 main,
body.itemid-413 .body-innerwrapper > main {
    padding-top: 0 !important;
}

body.itemid-101 .sppb-section.sppb-row-have-ext-bg:first-of-type,
body.itemid-105 .sppb-section.sppb-row-have-ext-bg:first-of-type,
body.itemid-291 .sppb-section.sppb-row-have-ext-bg:first-of-type,
body.itemid-412 .sppb-section.sppb-row-have-ext-bg:first-of-type,
body.itemid-413 .sppb-section.sppb-row-have-ext-bg:first-of-type {
    margin-top: 0 !important;
}

/* Touch target fallback for collapse-style CTA buttons */
.btn.btn-outline-secondary.rounded-pill.d-inline-flex.align-items-center.gap-2 {
    min-height: 44px;
}
