/**
 * Simple Mobile Menu - Clean Implementation
 */

/* ========================================
   MOBILE ONLY (max-width: 991px)
   ======================================== */
@media screen and (max-width: 991px) {
    
    /* HIDE TOP BAR ON MOBILE */
    body .top_bar,
    body #header .top_bar,
    body .header-box .top_bar {
        display: none !important;
    }
    
    /* 1. HIDE DESKTOP MENU COMPLETELY */
    body .header-box .main_menu_nav,
    body #header .main_menu_nav,
    body .nav-box > .main_menu_nav {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* 2. SHOW HAMBURGER BUTTON */
    body .menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 45px !important;
        height: 45px !important;
        background: #fff !important;
        border: 2px solid #333 !important;
        border-radius: 5px !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 10001 !important;
        margin-left: auto !important;
    }
    
    /* 3. HAMBURGER ICON (3 lines) */
    body .menu-toggle button {
        width: 25px !important;
        height: 2px !important;
        background: #333 !important;
        border: none !important;
        position: relative !important;
        display: block !important;
        cursor: pointer !important;
    }
    
    body .menu-toggle button::before,
    body .menu-toggle button::after {
        content: '' !important;
        width: 25px !important;
        height: 2px !important;
        background: #333 !important;
        position: absolute !important;
        left: 0 !important;
        display: block !important;
        transition: all 0.3s ease !important;
    }
    
    body .menu-toggle button::before {
        top: -8px !important;
    }
    
    body .menu-toggle button::after {
        top: 8px !important;
    }
    
    /* 4. X ICON WHEN ACTIVE */
    body .menu-toggle.active button {
        background: transparent !important;
    }
    
    body .menu-toggle.active button::before {
        top: 0 !important;
        transform: rotate(45deg) !important;
    }
    
    body .menu-toggle.active button::after {
        top: 0 !important;
        transform: rotate(-45deg) !important;
    }
    
    /* 5. POSITION BUTTON FIXED WHEN MENU OPEN */
    body.mobile-menu-open .menu-toggle {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        z-index: 10001 !important;
    }
    
    /* 6. MOBILE MENU OVERLAY (HIDDEN BY DEFAULT) - SLIDE FROM RIGHT */
    body #mobile-menu-overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 80% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 10000 !important;
        overflow-y: auto !important;
        padding: 80px 0 20px 0 !important;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2) !important;
        transition: right 0.3s ease-in-out !important;
    }
    
    /* Close button inside menu */
    body #mobile-menu-overlay .mobile-menu-close {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 36px !important;
        color: #333 !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        background: #f0f0f0 !important;
        border-radius: 50% !important;
        line-height: 1 !important;
        transition: all 0.3s ease !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-close:hover {
        background: #e0e0e0 !important;
        transform: rotate(90deg) !important;
    }
    
    /* 7. SHOW OVERLAY WHEN MENU OPEN - SLIDE IN FROM RIGHT */
    body.mobile-menu-open #mobile-menu-overlay {
        right: 0 !important;
    }
    
    /* Add backdrop overlay */
    body #mobile-menu-overlay::before {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: -100vw !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: -1 !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
        pointer-events: none !important;
    }
    
    body.mobile-menu-open #mobile-menu-overlay::before {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* 8. MENU ITEMS STYLING - LIKE DESKTOP */
    body #mobile-menu-overlay .mobile-menu-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list > li {
        border-bottom: 1px solid #f0f0f0 !important;
        position: relative !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list > li > a {
        display: block !important;
        padding: 15px 20px !important;
        color: #333 !important;
        font-size: 16px !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        background: #fff !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list > li > a:hover {
        background: #f8f8f8 !important;
        color: #5e21a0 !important;
    }
    
    /* 9. SUBMENU STYLING - DROPDOWN STYLE */
    body #mobile-menu-overlay .mobile-menu-list .sub-menu {
        list-style: none !important;
        padding: 0 !important;
        background: #f8f8f8 !important;
        display: none !important;
        margin: 0 !important;
    }
    
    /* Show submenu when parent has submenu-open class */
    body #mobile-menu-overlay .mobile-menu-list .menu-item-has-children.submenu-open > .sub-menu {
        display: block !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list .sub-menu li {
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list .sub-menu li a {
        display: block !important;
        padding: 12px 20px 12px 40px !important;
        color: #666 !important;
        font-size: 15px !important;
        text-decoration: none !important;
        background: #f8f8f8 !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list .sub-menu li a:hover {
        background: #fff !important;
        color: #5e21a0 !important;
    }
    
    /* Dropdown plus/minus icon indicator */
    body #mobile-menu-overlay .mobile-menu-list .menu-item-has-children > a {
        position: relative !important;
        padding-right: 50px !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list .menu-item-has-children > a::after {
        content: '+' !important;
        font-family: Arial, sans-serif !important;
        font-size: 24px !important;
        font-weight: bold !important;
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        transition: transform 0.3s ease !important;
        color: #5e21a0 !important;
        line-height: 1 !important;
    }
    
    body #mobile-menu-overlay .mobile-menu-list .menu-item-has-children.submenu-open > a::after {
        content: '−' !important;
    }
    
    /* 10. LOGO ADJUSTMENTS */
    body .header-box .logo-desktop {
        display: none !important;
    }
    
    body .header-box .logo-mobile {
        display: block !important;
    }
    
    body .header-box .logo-mobile img {
        max-width: 150px !important;
        height: auto !important;
    }
    
    /* 11. PREVENT BODY SCROLL WHEN MENU OPEN */
    body.mobile-menu-open {
        overflow: hidden !important;
    }
}

/* ========================================
   DESKTOP (min-width: 992px)
   ======================================== */
@media screen and (min-width: 992px) {
    body .menu-toggle {
        display: none !important;
    }
    
    body #mobile-menu-overlay {
        display: none !important;
    }
    
    body .header-box .logo-mobile {
        display: none !important;
    }
    
    body .header-box .logo-desktop {
        display: block !important;
    }
}
