/* =========================================================
   PREMIUM DARK GLASSMORPHISM MOBILE MENU
   ========================================================= */

/* Sidebar Container */
.modern-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    /* Dark glass effect */
    background: rgba(18, 18, 22, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 10000;
    box-shadow: -15px 0 40px rgba(0, 0, 0, 0.4);
    transition: right 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    overflow-y: auto;
    /* Subtle border for glass depth */
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.modern-sidebar.active {
    right: 0;
}

/* Sidebar Overlay (Darkens background) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Header Section */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(206, 0, 0, 0.1), transparent);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
    letter-spacing: 1px;
}

.close-sidebar {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s, transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.close-sidebar:hover {
    color: #ff3333;
    transform: rotate(90deg) scale(1.1);
}

/* Navigation Links */
.sidebar-nav {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-nav li a {
    display: block;
    padding: 18px 25px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
}

/* Hover & Active Effects */
.sidebar-nav li a:hover, 
.sidebar-nav li.active > a {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(206, 0, 0, 0.15) 0%, transparent 100%);
    padding-left: 32px;
}

/* Add a glowing left border indicator on hover */
.sidebar-nav li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #ce0000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px #ce0000;
}

.sidebar-nav li a:hover::before,
.sidebar-nav li.active > a::before {
    opacity: 1;
}

/* Hide any remaining icons inside sidebar links */
.sidebar-nav li a i {
    display: none !important;
}

/* Dropdown Sub-menu Styling */
.sidebar-nav .dropdown-menu {
    position: static;
    float: none;
    background: rgba(0, 0, 0, 0.2); /* Slightly darker inner bg */
    border: none;
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    display: none;
}

.sidebar-nav .dropdown.open .dropdown-menu {
    display: block;
    animation: slideDownFade 0.3s ease forwards;
}

/* Adjust padding for nested links */
.sidebar-nav .dropdown-menu li a {
    padding-left: 25px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.01);
}

.sidebar-nav .dropdown-menu li a:hover {
    color: #ffffff;
    padding-left: 32px;
    background: transparent;
}

/* Dropdown Arrow Indicator */
.sidebar-nav .dropdown-toggle::after {
    content: '\f107'; /* FontAwesome angle-down */
    font-family: 'FontAwesome';
    float: right;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease, color 0.3s ease;
}

.sidebar-nav .dropdown.open > .dropdown-toggle::after {
    transform: rotate(180deg);
    color: #ce0000;
}

/* Trigger Button (Hamburger) */
.mobile-menu-trigger {
    display: inline-block;
    padding: 15px 20px;
    font-size: 28px;
    color: #333;
    transition: color 0.3s ease;
}

.mobile-menu-trigger:hover {
    color: #ce0000;
}

/* Custom Scrollbar for Sidebar */
.modern-sidebar::-webkit-scrollbar {
    width: 6px;
}
.modern-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.modern-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.modern-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Animations */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
