/* Mobile Menu Fix - Native Structure Implementation */
@media (max-width: 991px) {

    /* 1. Reset / Layout Fixes
    -------------------------------------------------- */
    /* Hide the auto-generated MeanMenu */
    .mobile_menu.mean-container,
    .mean-container {
        display: none !important;
    }

    /* Enhance Header Wrapper Position & Flex Layout */
    .header-wrapper {
        position: relative;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
    }

    /* 2. Menu Area (The Dropdown Wrapper)
    -------------------------------------------------- */
    /* Override Bootstrap d-none */
    .header-wrapper .menu-area {
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: calc(100% - 30px);
        /* Margins */
        margin: 15px auto 0;

        /* Glass / Dark Theme */
        background: rgba(20, 35, 40, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);

        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.05);

        /* Animation State */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 10000;

        max-height: 80vh;
        overflow-y: auto;
    }

    /* Active State (Shown via JS) */
    .header-wrapper .menu-area.active {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    /* Clean up internal spacing */
    .header-wrapper .menu-area .mean-push {
        display: none;
    }

    /* 3. Navigation Styling
    -------------------------------------------------- */
    .header-wrapper .mainmenu {
        display: block !important;
        /* Override inline styles */
        width: 100%;
        padding: 10px 0;
    }

    .header-wrapper .mainmenu ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: block !important;
        /* Ensure vertical stack */
    }

    .header-wrapper .mainmenu ul li {
        display: block !important;
        /* Force one per line */
        width: 100% !important;
        /* Full width */
        margin: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        /* Separator */
        position: relative;
    }

    .header-wrapper .mainmenu ul li:last-child {
        border-bottom: none;
    }

    /* Link Styles */
    .header-wrapper .mainmenu ul li a {
        display: block;
        padding: 14px 20px;
        color: #ffffff;
        font-family: 'Inter', sans-serif;
        font-size: 16px;
        font-weight: 500;
        text-transform: uppercase;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .header-wrapper .mainmenu ul li a:hover {
        color: #64f4ab;
        /* Teal highlight */
        padding-left: 25px;
    }

    /* 4. Submenu Dropdowns
    -------------------------------------------------- */
    .header-wrapper .mainmenu ul.sub-menu {
        display: none;
        /* Hidden by default */
        background: rgba(0, 0, 0, 0.15);
        padding: 5px 0;
    }

    .header-wrapper .mainmenu ul.sub-menu li {
        border-bottom: none;
    }

    .header-wrapper .mainmenu ul.sub-menu li a {
        padding-left: 35px;
        font-size: 14px;
        text-transform: capitalize;
        color: rgba(255, 255, 255, 0.7);
    }

    .header-wrapper .mainmenu ul.sub-menu li a:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    /* Toggle Button (Arrow) */
    .dropdown-toggle-btn {
        position: absolute;
        right: 15px;
        top: 8px;
        width: 35px;
        height: 35px;
        display: flex;
        justify-content: center;
        align-items: center;
        color: rgba(255, 255, 255, 0.5);
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        z-index: 5;
    }

    .dropdown-toggle-btn.active {
        background: rgba(30, 138, 138, 0.4);
        color: #fff;
        transform: rotate(180deg);
    }

    /* 5. Hamburger Menu Fixes
    -------------------------------------------------- */
    /* Ensure the hamburger bar is visible and styled properly */
    .mobile_menu_bar {
        display: block !important;
        cursor: pointer;
        width: 45px;
        height: 45px;
        background: #104c5e;
        /* Teal Box */
        border-radius: 8px;
        position: relative;
        z-index: 10001;
        transition: background 0.3s ease;
        padding: 12px 10px;
    }

    .mobile_menu_bar span {
        display: block;
        width: 100%;
        height: 2px;
        background: #fff;
        margin-bottom: 6px;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .mobile_menu_bar span:last-child {
        margin-bottom: 0;
    }

    /* Hamburger Active State (X Animation) */
    .mobile_menu_bar.on span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile_menu_bar.on span:nth-child(2) {
        opacity: 0;
    }

    .mobile_menu_bar.on span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* 6. Scrollbar
    -------------------------------------------------- */
    .header-wrapper .menu-area::-webkit-scrollbar {
        width: 4px;
    }

    .header-wrapper .menu-area::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    /* 7. Stop Body Scroll
    -------------------------------------------------- */
    body.overflow-hidden {
        overflow: hidden !important;
    }
}