/* Mobile Menu Scroll Fix - Refined */

/* 1. Ensure the mobile menu container is strictly scrollable */
.elementor-nav-menu--dropdown,
.mobile-menu-container,
.hfe-dropdown,
#site-navigation .menu,
.site-header-menu .main-navigation {
    max-height: 80vh !important; /* Limit height to 80% of viewport to guarantee scrolling */
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important; /* Prevent scroll chaining to body */
    -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
    display: block; /* Ensure it takes layout space */
}

/* Specific fix for HFE (Header Footer Elementor) dropdowns */
.hfe-nav-menu__layout-horizontal .hfe-dropdown, 
.hfe-nav-menu__layout-dropdown .hfe-dropdown {
    overflow-y: auto !important;
    max-height: 80vh !important;
}

/* 2. Prevent body from scrolling when menu is open (toggled via JS) */
/* Using overflow hidden instead of position fixed to prevent page jump to top */
body.mobile-menu-open-a4647870 {
    overflow: hidden !important;
    touch-action: none; /* Disable touch actions on body to stop iOS bounce */
}

/* Allow touch actions back on the menu container itself */
body.mobile-menu-open-a4647870 .elementor-nav-menu--dropdown,
body.mobile-menu-open-a4647870 .hfe-dropdown {
    touch-action: auto !important;
}
