/* Dropdown Menu Styles */

/* Dropdown Container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Toggle */
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

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

.dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e5e7eb;
}

/* Show menu when active */
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Arrow indicator */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 9px solid #e5e7eb;
    z-index: -1;
}

/* Mega Menu Title */
.mega-menu-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 6px;
    background: #f8fafc;
}

/* Dropdown Menu Links */
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: #f0f9ff;
    color: #2563eb;
    transform: translateX(4px);
}

.dropdown-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.75rem 0;
}

/* Mobile Adjustments */
@media (max-width: 1024px) {
    .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
        overflow-y: auto;
    }

    .dropdown.active .dropdown-menu {
        transform: translateY(0);
    }

    .dropdown-menu::before,
    .dropdown-menu::after {
        display: none;
    }
}

/* Accessibility Focus States */
.dropdown-toggle:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

.dropdown-menu a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    background: #f0f9ff;
}

/* Animation for menu items */
.dropdown-menu a {
    opacity: 0;
    transform: translateY(-10px);
}

.dropdown.active .dropdown-menu a {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown.active .dropdown-menu a:nth-child(1) { transition-delay: 0.05s; }
.dropdown.active .dropdown-menu a:nth-child(2) { transition-delay: 0.1s; }
.dropdown.active .dropdown-menu a:nth-child(3) { transition-delay: 0.15s; }
.dropdown.active .dropdown-menu a:nth-child(4) { transition-delay: 0.2s; }
.dropdown.active .dropdown-menu a:nth-child(5) { transition-delay: 0.25s; }
.dropdown.active .dropdown-menu a:nth-child(6) { transition-delay: 0.3s; }
.dropdown.active .dropdown-menu a:nth-child(7) { transition-delay: 0.35s; }
.dropdown.active .dropdown-menu a:nth-child(8) { transition-delay: 0.4s; }

/* Mega menu title shouldn't animate like links */
.dropdown-menu .mega-menu-title {
    opacity: 1;
    transform: none;
}

.dropdown-menu .dropdown-divider {
    opacity: 1;
    transform: none;
}
