/* /css/mobile-menu.css */

:root {
    --color-bg-card: #0f172a; /* Dark Topbar Color */
    --color-border-default: rgba(255, 255, 255, 0.08);
    --primary-700: #f8fafc;
    --primary-500: #94a3b8;
    --accent-500: #fbbf24; /* Amber/Gold for better contrast on dark */
    --accent-300: #fcd34d;
    --header-height: 70px;
}

/* --- From menu.css --- */

body.no-scroll {
    overflow: hidden !important;
}

    #dropdown-menu {
        position: fixed;
        top: var(--header-height, 70px);
        right: -400px;
        width: 380px;
        height: calc(100vh - var(--header-height, 70px));
        max-width: 100vw;
        background: var(--color-bg-card);
        z-index: 40; /* Lower than site-header (50) to slide behind */
        box-shadow: -2px 0 40px rgba(0,0,0,0.12), -1px 0 10px rgba(0,0,0,0.08);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, visibility 0.3s;
        overflow-y: auto;
        overflow-x: hidden;
        border-left: 1px solid var(--color-border-default);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        display: block;
    }#dropdown-menu.active {
    right: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    box-shadow: -2px 0 50px rgba(0,0,0,0.15), -1px 0 15px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    #dropdown-menu {
        width: 90vw;
        max-width: 400px;
        right: -90vw;
        top: var(--header-height, 60px);
        height: calc(100vh - var(--header-height, 60px));
        box-shadow: none;
    }
    #dropdown-menu.active {
        right: 0;
    }
}

@media (max-width: 600px) {
    #dropdown-menu {
        width: 100vw;
        max-width: 100vw;
        right: -100vw;
    }
    #dropdown-menu.active {
        right: 0;
    }
}

@media (max-width: 768px) {
    #dropdown-menu {
        width: 100%;
        max-width: 100%;
        right: auto;
        left: -100%;
        top: var(--header-height, 70px); /* attach just below the sticky nav */
        height: calc(100vh - var(--header-height, 70px));
        max-height: calc(100vh - var(--header-height, 70px));
        box-shadow: none;
        border-left: none;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s, visibility 0.3s;
        padding-top: 10px;
    }
    #dropdown-menu.active {
        left: 0;
        right: auto;
    }

    /* Hide overlay on mobile as menu covers full screen */
    .menu-overlay {
        display: none !important;
    }
}


.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .menu-overlay {
        top: var(--header-height, 70px);
        height: calc(100vh - var(--header-height, 70px));
    }
}

/* User Section */
.user-section {
    padding: 24px 20px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.user-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.user-avatar {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-avatar:hover::before {
    opacity: 1;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-details h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #f8fafc;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-details span {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 8px;
    margin-top: 2px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.user-details span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.user-details span:hover::before {
    left: 100%;
}

@media (max-width: 480px) {
    .user-section { padding: 24px 16px; }
    .user-avatar { width: 44px; height: 44px; font-size: 16px; }
}
@media (max-width: 768px) {
    .user-section { padding: 22px 18px; }
    .user-avatar { width: 48px; height: 48px; font-size: 17px; }
}


/* Menu Links */
.menu-links {
    padding: 20px 0 60px 0;
}

.menu-section {
    border-bottom: 1px solid rgba(0,0,0,0.03);
    position: relative;
    margin-bottom: 6px;
}

.menu-section:first-child {
    margin-top: 8px;
}

.menu-section:last-child {
    border-bottom: none;
    margin-bottom: 20px;
}

.menu-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.05), transparent);
}

.menu-section:last-child::after {
    display: none;
}

.menu-section-title {
    padding: 20px 20px 12px;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-section-title::before {
    content: '';
    width: 12px;
    height: 1px;
    background: linear-gradient(90deg, var(--primary-500), transparent);
    flex-shrink: 0;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--primary-700); /* Primary 700 */
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0,0,0,0.02);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.1px;
    margin: 0;
    border-radius: 0;
}

.menu-link:last-child {
    border-bottom: none;
}

.menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-500));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-link::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #007cba;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-500); /* Accent 500 */
    transform: translateX(6px);
    padding-left: 26px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.menu-link:hover::before {
    width: 3px;
    background: linear-gradient(135deg, var(--accent-500), var(--accent-300));
}

.menu-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    background: #1B828A;
}

.menu-link.active {
    background: linear-gradient(135deg, rgba(0,124,186,0.08), rgba(0,86,179,0.04));
    color: #007cba;
    font-weight: 600;
    border-left: 3px solid #007cba;
    padding-left: 17px;
    box-shadow: inset 0 0 0 1px rgba(0,124,186,0.12);
}

.menu-link.active::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    background: #007cba;
}

.menu-link i {
    width: 18px;
    margin-right: 16px;
    font-size: 13px;
    opacity: 0.6;
    transition: all 0.25s ease;
    text-align: center;
}

.menu-link:hover i,
.menu-link.active i {
    opacity: 1;
    transform: scale(1.05);
}

/* Menu Animations */
.menu-link {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

#dropdown-menu.active .menu-link {
    animation-delay: calc(var(--i) * 0.05s);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- From hamburger-menu-dx.css --- */

.hamburger-menu-dx {
    all: unset;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: var(--spacing-xxl, 48px);
    height: var(--spacing-xxl, 48px);
    padding: var(--spacing-xxxs, 4px);
    cursor: pointer;
    user-select: none;
    transition: var(--transition-bounce, all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55));
    position: relative;
    z-index: var(--z-index-dropdown, 1040);
    border-radius: var(--radius-lg, 12px);
    background: transparent;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-menu-dx:hover {
    background: transparent;
    transform: scale(1.05);
}

.hamburger-menu-dx.active {
    background: transparent;
}

.hamburger-menu-dx:active {
    transform: scale(0.95);
}

.hamburger-menu-dx:focus-visible {
    outline: 2px solid var(--color-focus-light, #007bff);
    outline-offset: 2px;
}

.hamburger-line-dx {
    display: block;
    width: var(--space-lg, 28px);
    height: 2px;
    background: var(--color-text-primary, #333);
    border-radius: var(--radius-xl-xs, 4px);
    transition: var(--transition-bounce, all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55));
    transform-origin: center;
    position: relative;
}

.hamburger-line-dx:nth-child(1) {
    width: var(--space-lg, 28px);
}

.hamburger-line-dx:nth-child(2) {
    width: var(--space-lg, 28px);
    margin-left: auto;
}

.hamburger-line-dx:nth-child(3) {
    width: var(--space-lg, 28px);
}

.hamburger-menu-dx.active .hamburger-line-dx:nth-child(1) {
    transform: translateY(var(--space-xs, 8px)) rotate(45deg);
}

.hamburger-menu-dx.active .hamburger-line-dx:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-menu-dx.active .hamburger-line-dx:nth-child(3) {
    transform: translateY(calc(-1 * var(--space-xs, 8px))) rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger-menu-dx {
        width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .hamburger-line-dx {
        height: 2.5px;
    }
    
    .hamburger-line-dx:nth-child(1) {
        width: 26px;
    }
    
    .hamburger-line-dx:nth-child(2) {
        width: 26px;
    }
    
    .hamburger-line-dx:nth-child(3) {
        width: 26px;
    }
}

@media (min-width: 769px) {
    .hamburger-menu-dx {
        display: none;
    }
}

.mobile-submenu {
    padding-left: 1.5rem;
    display: none;
}

.mobile-submenu.open {
    display: block;
    animation: fadeInUp 0.3s ease forwards;
}

.sub-link {
    font-size: 0.9em;
    opacity: 0.8;
}

.mobile-submenu-toggle svg {
    transition: transform 0.3s ease;
}

