/* Sidebar Menu Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Backdrop */
.sidebar-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Sidebar Container */
.sidebar-menu-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 92vw;
    height: 100%;
    background: #1c1c1c;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}

.sidebar-overlay.active .sidebar-menu-container {
    transform: translateX(0);
}

/* Menu Levels */
.menu-level {
    display: none;
    padding: 20px;
    min-height: 100%;
    color: white;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}

.menu-level.active {
    display: block;
    transform: translateX(0);
}

.menu-level.sliding-out {
    transform: translateX(-100%);
}

/* Menu Header */
.menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.close-btn, .back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    margin-left: auto;
}

.back-btn {
    margin-right: auto;
}

.close-btn:hover, .back-btn:hover {
    opacity: 0.7;
}

.close-btn img, .back-btn img {
    filter: brightness(0) invert(1);
}

/* Menu Title */
.menu-title {
    display: block;
    color: #ffffff;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Menu Items */
.menu-items {
    margin-bottom: 20px;
}

.menu-item, .menu-item-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: none;
    position: relative;
}

/* Main menu items */
#main-menu .menu-item,
#main-menu .menu-item-link {
    font-size: 21px;
    font-weight: 500;
    color: #ffffff;
}

/* Submenu items */
.menu-level:not(#main-menu) .menu-item-link {
    font-size: 20px;
    font-weight: 500;
    color: #d2d2d2;
}

.menu-item span, .menu-item-link span {
    flex: 1;
}

.menu-item img {
    filter: brightness(0) invert(1);
}

/* Separator */
.separator {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 20px 0;
}

.bottom-menu {
    margin-bottom: 30px;
}

/* Remove CTA Section */
.cta-section {
    display: none;
}

/* Icons */
.fas {
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Loading State */
.menu-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .sidebar-menu-container {
        width: 420px;
        max-width: 90vw;
    }
    
    .menu-level {
        padding: 15px;
    }
    
    h3 {
        font-size: 24px;
    }
    
    .menu-item, .menu-item-link {
        font-size: 15px;
        padding: 16px 0;
    }
    
    .book-consultation-btn {
        padding: 14px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .sidebar-menu-container {
        width: 350px;
        max-width: 95vw;
    }
    
    .menu-level {
        padding: 16px 32px;
    }
    
    h3 {
        font-size: 22px;
    }
    
    .menu-item, .menu-item-link {
        font-size: 14px;
        padding: 10px 0;
    }
}

/* Smooth scrolling */
.sidebar-menu-container {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.sidebar-menu-container::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar-menu-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.sidebar-menu-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}