/* dropdown.css - Custom Premium Animated Dropdowns */
.nav-item.premium-dropdown {
    position: relative;
}

.premium-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 16px;
    margin-top: 0; /* Fixed: Removed margin to prevent hover gap that closes dropdown */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
    pointer-events: none;
}

[data-theme="dark"] .premium-dropdown-menu {
    background: rgba(25, 25, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-item.premium-dropdown:hover .premium-dropdown-menu,
.nav-item.premium-dropdown.show .premium-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Dropdown Items */
.premium-dropdown-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--bs-heading-color, #333);
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 3px solid transparent;
}

[data-theme="dark"] .premium-dropdown-item {
    color: rgba(255, 255, 255, 0.9);
}

.premium-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bs-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 0;
    border-radius: inherit;
}

.premium-dropdown-item:hover {
    transform: translateX(5px);
    border-left-color: var(--bs-primary);
    color: var(--bs-primary);
}

[data-theme="dark"] .premium-dropdown-item:hover {
    color: #fff;
}

.premium-dropdown-item:hover::before {
    opacity: 0.05;
}

[data-theme="dark"] .premium-dropdown-item:hover::before {
    opacity: 0.15;
}

.premium-dropdown-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
    color: var(--bs-secondary, #666);
    margin-right: 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 1;
}

[data-theme="dark"] .premium-dropdown-icon {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
}

.premium-dropdown-item:hover .premium-dropdown-icon {
    background: var(--bs-primary);
    color: #fff;
    transform: scale(1.1);
}

.premium-dropdown-text {
    z-index: 1;
}

.premium-dropdown-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    display: block;
    transition: color 0.2s ease;
}

.premium-dropdown-desc {
    font-size: 12px;
    color: var(--bs-secondary, #777);
    display: block;
    line-height: 1.4;
}

[data-theme="dark"] .premium-dropdown-desc {
    color: rgba(255, 255, 255, 0.5);
}

/* Staggered Animation on Load */
.premium-dropdown-item {
    opacity: 0;
    transform: translateY(10px);
}

.nav-item.premium-dropdown:hover .premium-dropdown-item,
.nav-item.premium-dropdown.show .premium-dropdown-item {
    animation: dropSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item.premium-dropdown:hover .premium-dropdown-item:nth-child(1) { animation-delay: 0.05s; }
.nav-item.premium-dropdown:hover .premium-dropdown-item:nth-child(2) { animation-delay: 0.1s; }
.nav-item.premium-dropdown:hover .premium-dropdown-item:nth-child(3) { animation-delay: 0.15s; }
.nav-item.premium-dropdown:hover .premium-dropdown-item:nth-child(4) { animation-delay: 0.2s; }
.nav-item.premium-dropdown:hover .premium-dropdown-item:nth-child(5) { animation-delay: 0.25s; }

/* Mobile Accordion Style */
@media (max-width: 991px) {
    .premium-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 0 1rem;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none; /* Handled by JS */
    }
    .premium-dropdown-item {
        opacity: 1;
        transform: none;
        animation: none !important;
    }
}
