/* ================================================
   MENU FIX - Standalone CSS for static HTML sites
   ================================================ */

/* --- Make outer header sticky with white background ---
   Prevents hero image bleeding through on scroll.
   White matches both inner headers (--e-global-color-9d34af3 = #FFFFFF) */
.elementor-location-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background-color: #ffffff !important;
}

/* --- DESKTOP: Show submenu on hover (1025px+) --- */
@media (min-width: 1025px) {
    .elementor-nav-menu--main .menu-item-has-children {
        position: relative;
    }
    .elementor-nav-menu--main .menu-item-has-children:hover > .sub-menu {
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 9999;
        min-width: 200px;
        width: max-content;
    }
}

/* --- MOBILE/TABLET: Full-width dropdown via fixed positioning ---
   position:fixed + 100vw guarantees full width regardless of DOM nesting.
   top is set by JS using toggle.getBoundingClientRect().bottom.
   Since header is sticky, toggle Y never changes = no scroll handler needed. */
@media (max-width: 1024px) {
    .elementor-nav-menu--dropdown.elementor-nav-menu__container {
        position: fixed !important;
        left: 0 !important;
        width: 100vw !important;
        z-index: 9998 !important;
        transform-origin: top center !important;
        box-sizing: border-box !important;
    }
    .elementor-nav-menu--dropdown .menu-item-has-children.sub-open > .sub-menu {
        display: block !important;
    }
}

/* --- HAMBURGER OPEN STATE --- */
.elementor-menu-toggle.elementor-active + .elementor-nav-menu__container {
    max-height: 100vh !important;
    transform: scaleY(1) !important;
    overflow-y: auto !important;
}

/* --- HAMBURGER CLOSED STATE --- */
.elementor-menu-toggle:not(.elementor-active) + .elementor-nav-menu__container {
    max-height: 0 !important;
    transform: scaleY(0) !important;
    overflow: hidden !important;
}

/* --- ICON SWAP --- */
.elementor-menu-toggle.elementor-active .elementor-menu-toggle__icon--open { display: none !important; }
.elementor-menu-toggle.elementor-active .elementor-menu-toggle__icon--close { display: flex !important; }
.elementor-menu-toggle:not(.elementor-active) .elementor-menu-toggle__icon--close { display: none !important; }
.elementor-menu-toggle:not(.elementor-active) .elementor-menu-toggle__icon--open { display: flex !important; }

/* --- CARET ICON --- */
.menu-caret-icon {
    width: 0.55em;
    height: 1em;
    fill: currentColor;
    vertical-align: middle;
    margin-left: 6px;
    display: inline-block;
    flex-shrink: 0;
}
