/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.dropdown-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: rgba(26, 30, 45, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-menu a:hover {
    background: rgba(0, 133, 255, 0.15);
    color: var(--primary);
    padding-left: 1.25rem;
}

/* Light Mode Overrides */
body.light-mode .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body.light-mode .dropdown-menu a {
    color: #333;
}

body.light-mode .dropdown-menu a:hover {
    background: rgba(0, 133, 255, 0.1);
    color: var(--primary);
}

/* Mobile dropdown */
@media (max-width: 768px) {
    .nav-dropdown {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .nav-dropdown>a {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 0;
        font-weight: 600;
        letter-spacing: 0.5px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
        border: none;
        padding: 0;
        margin: 0;
        background: transparent;
        box-shadow: none;
        text-align: center;
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 300px;
        padding: 0.5rem 0;
        margin-top: 0.25rem;
    }

    .nav-dropdown.active>a {
        background: rgba(0, 133, 255, 0.1);
        border-color: rgba(0, 133, 255, 0.2);
        color: var(--primary);
    }

    .nav-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }

    .dropdown-menu a {
        padding: 0.8rem 1rem;
        color: var(--text-muted);
        border-radius: 6px;
        margin: 2px 0;
    }

    .dropdown-menu a:hover,
    .dropdown-menu a:active {
        background: rgba(255, 255, 255, 0.05);
        color: var(--text);
        padding-left: 1rem;
        /* Reset desktop shift */
    }
}