/* Fix Global Horizontal Scroll */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* =========================================
   NAVIGATION & HEADER RESPONSIVENESS
   ========================================= */

/* Tablet & Mobile Navigation (Below 991px) */
@media (max-width: 991px) {
    

    /* Mobile Menu Wrapper - ensure it acts as a drawer/overlay if needed */
    .navigation-landscape .nav-menus-wrapper,
    .navigation-portrait .nav-menus-wrapper {
        width: 300px !important; /* consistent width, override 100% */
        background-color: #fff;
        height: 100vh;
        overflow-y: auto;
        position: fixed;
        top: 0;
        left: -320px; /* Hide off-screen by default */
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        display: block; /* Ensure it's not hidden by default display rules */
    }

    /* Force Close Button Visibility & Z-Index */
    .nav-menus-wrapper-close-button {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 30px;
        height: 30px;
        z-index: 999999 !important;
        cursor: pointer;
        border-radius: 50%;
        text-align: center;
        line-height: 30px;
        font-weight: bold;
    }

    /* When menu is active (class usually added by JS logic, e.g., 'nav-active' on body or wrapper)
       We will assume standard behaviour, but if JS is missing we might need to check. 
       For now, we style the wrapper itself. 
       The existing JS likely toggles a class on .nav-menus-wrapper or controls 'left' property.
    */
    .navigation-landscape .nav-menus-wrapper.nav-menus-wrapper-open,
    .navigation-portrait .nav-menus-wrapper.nav-menus-wrapper-open {
        left: 0;
    }

    .navigation-landscape .nav-menu > li,
    .navigation-portrait .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid #eee;
        display: block;
        float: none; /* Reset float */
        padding: 0;
    }

    .navigation-landscape .nav-menu > li > a,
    .navigation-portrait .nav-menu > li > a {
        color: #333;
        padding: 12px 20px;
        /* display: block; */
        font-size: 15px;
    }
    
    /* Submenus in mobile */
    .navigation-landscape .nav-menu > li .nav-dropdown,
    .navigation-portrait .nav-menu > li .nav-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        display: none; /* Hidden by default, toggled by JS usually */
        padding-left: 20px;
    }
    
    .navigation-landscape .nav-menu > li.active .nav-dropdown,
    .navigation-landscape .nav-menu > li:hover .nav-dropdown {
        display: block;
    }

    /* Alignment for "Right Side" elements inside the drawer */
    .nav-menu.nav-menu-social {
        display: block !important; /* Stack vertically */
        width: 100%;
        padding: 0 20px;
        margin-top: 20px;
        float: none;
    }

    .nav-menu.nav-menu-social > li {
        width: 100%;
        display: block;
        margin-bottom: 10px;
        text-align: center;
        float: none;
    }

    /* Add Listing Button in Menu */
    .nav-menu.nav-menu-social .list-buttons {
        margin: 0 !important;
        display: block;
    }

    .nav-menu.nav-menu-social .list-buttons a {
        width: 100%;
        justify-content: center;
        display: flex;
    }

    /* Language Switcher in Mobile Menu (if present) */
    .nav-menu-social .dropdown-toggle {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
}