/* Mobile Menu Styles */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;  /* Lower than menu but above other content */
    backdrop-filter: blur(5px);
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: white;
    z-index: 10001;  /* Higher z-index to ensure it appears above all content */
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #475569;
}

.mobile-menu-nav {
    padding: 1rem;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    margin-bottom: 0.5rem;
}

.mobile-menu-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: #1e293b;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background: #f1f5f9;
    color: #295DFC;
}

.mobile-menu-submenu {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0.5rem 0 0 0;
}

.mobile-menu-submenu .mobile-menu-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.mobile-menu-submenu .mobile-menu-link:hover,
.mobile-menu-submenu .mobile-menu-link.active {
    color: #295DFC;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
    }
    
    .mobile-menu-header {
        padding: 1rem;
    }
    
    .mobile-menu-nav {
        padding: 0.5rem;
    }
    
    .mobile-menu-link {
        padding: 0.9rem;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .mobile-menu-link {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
    
    .mobile-menu-submenu .mobile-menu-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Animation classes for mobile menu */
.mobile-menu-slide-in {
    animation: slideInMenu 0.3s ease forwards;
}

.mobile-menu-slide-out {
    animation: slideOutMenu 0.3s ease forwards;
}

@keyframes slideInMenu {
    from {
        left: -100%;
    }
    to {
        left: 0;
    }
}

@keyframes slideOutMenu {
    from {
        left: 0;
    }
    to {
        left: -100%;
    }
}

/* Show/hide based on screen size */
@media (min-width: 993px) {
    .mobile-menu-toggle {
        display: none;
    }
}

@media (max-width: 992px) {
    .header .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
}