/* Mobile Menu Fix CSS */

/* Mobile Nav Toggler Button Styles */
.mobile-nav__toggler {
    position: relative;
    display: none;
    padding: 2px;
    font-size: 20px;
    cursor: pointer;
    color: #0066cc !important; /* Blue color for the mobile menu button with !important to override theme styles */
    transition: all 500ms ease;
    z-index: 1;
}

.mobile-nav__toggler:hover {
    color: #0099ff !important; /* Lighter blue on hover with !important to ensure it works */
}

/* Make mobile menu toggler visible on small screens */
@media (max-width: 991px) {
    .mobile-nav__toggler {
        display: inline-block;
        margin-right: 20px;
        margin-top: 5px;
    }
    
    /* Hide desktop menu on mobile */
    .main-menu__nav {
        display: none;
    }
    
    /* Adjust logo size for mobile */
    .main-menu__logo img {
        max-width: 150px;
    }
    
    /* Add space for mobile menu button */
    .main-menu .container-fluid {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
    }
    
    /* Ensure mobile menu wrapper is visible when expanded */
    .mobile-nav__wrapper.expanded {
        opacity: 1;
        visibility: visible;
        transform: translateX(0%);
    }
    
    /* Style for mobile menu container */
    .mobile-nav__content {
        width: 300px;
        background-color: var(--nisoz-black);
        z-index: 10;
        position: fixed;
        top: 0;
        bottom: 0;
        left: -100%;
        height: 100vh;
        overflow-y: auto;
        transition: all 500ms ease;
    }
    
    .mobile-nav__wrapper.expanded .mobile-nav__content {
        left: 0;
    }
    
    /* Enhanced Modern Mobile Menu List Styles */
    .mobile-menu__list {
        margin: 0;
        padding: 15px 0;
        list-style: none;
        font-family: 'Poppins', sans-serif;
    }
    
    .mobile-menu__list li {
        position: relative;
        padding: 0;
        margin: 4px 0;
        border-bottom: 1px solid rgba(0, 102, 204, 0.15);
        transition: all 0.4s ease;
        overflow: hidden;
    }
    
    .mobile-menu__list li:last-child {
        border-bottom: none;
    }
    
    .mobile-menu__list li a {
        display: flex;
        align-items: center;
        padding: 14px 20px;
        color: #ffffff;
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        transition: all 0.4s ease;
        border-left: 3px solid transparent;
        position: relative;
        z-index: 1;
    }
    
    .mobile-menu__list li a:before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 0;
        background: rgba(0, 102, 204, 0.08);
        z-index: -1;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    .mobile-menu__list li a:hover {
        color: #0099ff;
        border-left: 3px solid #0099ff;
        transform: translateX(5px);
    }
    
    .mobile-menu__list li a:hover:before {
        width: 100%;
    }
    
    /* Enhanced Modern Submenu Styles */
    .mobile-menu__list .sub-menu {
        display: none;
        padding: 8px 0;
        margin-left: 20px;
        margin-right: 10px;
        background-color: rgba(0, 102, 204, 0.05);
        border-radius: 10px;
        overflow: hidden;
        transition: all 0.4s ease;
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
        border-left: 2px solid rgba(0, 153, 255, 0.2);
    }
    
    .mobile-menu__list .sub-menu.open {
        display: block;
        animation: fadeIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        margin-top: 5px;
        margin-bottom: 5px;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-15px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .mobile-menu__list .sub-menu li {
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        margin: 0;
        transition: background-color 0.3s ease;
    }
    
    .mobile-menu__list .sub-menu li:first-child {
        border-top: none;
    }
    
    .mobile-menu__list .sub-menu li a {
        font-size: 13px;
        padding: 12px 15px 12px 20px;
        text-transform: capitalize;
        letter-spacing: 0.3px;
        opacity: 0.9;
        font-weight: 400;
    }
    
    .mobile-menu__list .sub-menu li a:before {
        background: rgba(0, 102, 204, 0.05);
    }
    
    /* Enhanced Modern Dropdown Toggle Button */
    .dropdown-btn {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        text-align: center;
        line-height: 30px;
        cursor: pointer;
        z-index: 5;
        color: #ffffff;
        background-color: rgba(0, 102, 204, 0.15);
        border-radius: 50%;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(0, 153, 255, 0.1);
    }
    
    .dropdown-btn:hover {
        background-color: rgba(0, 102, 204, 0.25);
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    .dropdown-btn.active {
        transform: translateY(-50%) rotate(180deg);
        color: #0099ff;
        background-color: rgba(0, 153, 255, 0.2);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
    
    /* Additional Mobile Menu Enhancements */
    .mobile-nav__wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 999;
        background-color: rgba(0, 0, 0, 0.7);
        opacity: 0;
        visibility: hidden;
        transition: all 0.5s ease;
        backdrop-filter: blur(4px);
    }
    
    body.mobile-menu-visible {
        overflow: hidden;
    }
    
    /* Mobile Menu Header */
    .mobile-nav__content {
        display: flex;
        flex-direction: column;
    }
    
    .mobile-nav__content .mobile-nav__close {
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 20px;
        color: #ffffff;
        cursor: pointer;
        z-index: 10;
        transition: all 0.3s ease;
    }
    
    .mobile-nav__content .mobile-nav__close:hover {
        color: #0099ff;
        transform: rotate(90deg);
    }
}