/* ================================
   REMOVE NUMBER FIELD SPINNERS
================================ */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ================================
   PREVENT HORIZONTAL OVERFLOW
================================ */
html,
body {
    overflow-x: hidden !important;
}

/* ================================
   HIDE DEFAULT ASTRA PAGE TITLES / WRAPPERS
   Elementor pages should control their own page titles
================================ */
body.page .entry-header,
body.page .entry-title,
body.page .page-title,
body.page .ast-single-post-order,
body.page header.entry-header,
body.page .ast-article-single > .entry-header {
    display: none !important;
}

/* Remove default Astra content spacing on Elementor pages */
body.page .site-content,
body.page .content-area,
body.page .site-main,
body.page .ast-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ================================
   HEADER BASE STATE
   Transparent fixed header on desktop for all pages
================================ */
.site-header {
    z-index: 9999;
    transition:
        background-color 0.25s ease-in-out,
        padding 0.25s ease-in-out;
}

@media (min-width: 922px) {
    .site-header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        background-color: transparent !important;
    }

    .main-header-bar {
        background-color: transparent !important;
    }

    .main-header-menu > li > a {
        color: #ffffff !important;
        transition: color 0.25s ease-in-out;
    }
}

/* ================================
   SCROLLED HEADER
   Requires body.shf-scrolled to be added by your existing JS/snippet
================================ */
@media (min-width: 922px) {
    body.shf-scrolled .site-header {
        background-color: #ffffff !important;
    }

    body.shf-scrolled .main-header-bar {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        background-color: #ffffff !important;
    }

    body.shf-scrolled .site-logo-img img {
        max-height: 38px !important;
        width: auto !important;
        height: auto !important;
        transition: max-height 0.25s ease-in-out;
    }

    body.shf-scrolled .site-branding,
    body.shf-scrolled .ast-site-identity {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: -4px !important;
        margin-bottom: 0 !important;
    }

    body.shf-scrolled .main-header-bar .ast-container,
    body.shf-scrolled .main-header-bar .ast-container-inner {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.shf-scrolled .main-header-menu > li > a {
        color: #445e87 !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        margin-top: 0 !important;
        line-height: 1.2 !important;
    }
}

/* ================================
   DESKTOP DROPDOWNS
================================ */
@media (min-width: 922px) {
    .ast-desktop .main-header-menu .sub-menu,
    .main-header-bar-navigation .sub-menu,
    .main-header-menu .sub-menu {
        background-color: #445e87 !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        min-width: 180px !important;
    }

    .ast-desktop .main-header-menu .sub-menu li a,
    .main-header-bar-navigation .sub-menu li a,
    .main-header-menu .sub-menu li a {
        display: block !important;
        width: 100% !important;
        background-color: #445e87 !important;
        color: #ffffff !important;
        border: 1px solid #ffffff !important;
        padding: 10px 18px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        line-height: 1.3 !important;
        white-space: normal !important;
    }

    .ast-desktop .main-header-menu .sub-menu li,
    .main-header-bar-navigation .sub-menu li,
    .main-header-menu .sub-menu li {
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .ast-desktop .main-header-menu > li.menu-item-has-children {
        position: relative;
    }

    .ast-desktop .main-header-menu > li.menu-item-has-children::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 115px;
    }
}

/* ================================
   MOBILE MENU
================================ */
@media (max-width: 921px) {
    .ast-header-break-point .main-header-menu .sub-menu,
    .ast-header-break-point .main-header-menu .sub-menu li a {
        background-color: #445e87 !important;
        color: #ffffff !important;
        border: none !important;
    }
}

/* ================================
   LOGO POSITIONING
================================ */
.ast-site-identity .custom-logo {
    margin-top: 5px;
    display: block;
}