/* Enhanced Dropdown Menu Styles */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--background-darker);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border-radius: 8px;
    overflow: hidden;
    transform-origin: top;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    display: block;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding-left: 20px;
}

/* Show dropdown on hover for desktop */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-content {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Dropdown arrow indicator */
    .dropdown > a::after {
        content: ' ▼';
        font-size: 0.7em;
        vertical-align: middle;
        transition: transform 0.3s ease;
    }
    
    .dropdown:hover > a::after {
        transform: rotate(180deg);
    }
    
    /* Nested dropdowns */
    .dropdown-content .dropdown {
        position: relative;
    }
    
    .dropdown-content .dropdown-content {
        left: 100%;
        top: 0;
        margin-top: 0;
    }
    
    /* Animation for nested dropdowns */
    .dropdown-content .dropdown:hover .dropdown-content {
        transform: translateX(0);
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--background-dark);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }
    
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.3);
        transform: none;
        opacity: 1;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
        max-height: 500px; /* Adjust based on your content */
    }
    
    .dropdown-content a {
        padding: 12px 24px;
        border-left: 3px solid transparent;
    }
    
    .dropdown-content a:hover {
        border-left: 3px solid var(--secondary-color);
    }
    
    .dropdown-content .dropdown-content {
        left: 0;
        padding-left: 24px;
    }
    
    /* Mobile dropdown indicator */
    .dropdown > a::after {
        content: ' ▼';
        font-size: 0.7em;
        vertical-align: middle;
        float: right;
        transition: transform 0.3s ease;
    }
    
    .dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 10px;
    }
}

/* Accessibility improvements */
.dropdown-content a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: -2px;
}

/* Animation for dropdown items */
.dropdown-content a {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
} 