/* Premium 3D Dropdown Menu */

/* 1. Remove overflow hidden on parent containers (done inline in blade or here) */
.premium-dropdown {
    position: relative;
    /* Ensure no overflow hidden here */
}

/* 2. The dropdown menu container */
.premium-dropdown-menu {
    display: block !important;
    position: absolute !important;
    top: 100%;
    left: 0;
    min-width: 320px;
    max-width: 90vw; /* Prevent screen overflow */
    padding: 1rem;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
    
    /* 3D Origin and Base State */
    transform-origin: top center;
    perspective: 1200px;
    transform: rotateX(-18deg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease, 
                visibility 0.3s;
                
    /* Hover Bridge - Create an invisible area between nav link and menu */
    margin-top: 14px; 
}

/* The invisible bridge pseudo-element */
.premium-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
}

/* Active State (Triggered by JS hover class) */
.premium-dropdown.hover-active .premium-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: rotateX(0deg);
}

/* 3. Staggered Items Animation */
.premium-dropdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: var(--bs-dark);
    
    /* Initial state for items */
    opacity: 0;
    transform: rotateY(-15deg) translateX(-15px);
}

/* When dropdown is active, animate items in */
.premium-dropdown.hover-active .premium-dropdown-item {
    opacity: 1;
    transform: rotateY(0deg) translateX(0);
}

/* Stagger Delays (up to 8 items) */
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(1) { transition-delay: 0.05s; }
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(2) { transition-delay: 0.1s; }
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(3) { transition-delay: 0.15s; }
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(4) { transition-delay: 0.2s; }
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(5) { transition-delay: 0.25s; }
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(6) { transition-delay: 0.3s; }
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(7) { transition-delay: 0.35s; }
.premium-dropdown.hover-active .premium-dropdown-item:nth-child(8) { transition-delay: 0.4s; }

/* Item Hover State */
.premium-dropdown-item:hover {
    background: var(--bs-light);
    transform: translateX(5px) !important; /* Override the cascade transform */
    transition-delay: 0s !important; /* Instant hover effect */
}

/* Icon box */
.premium-dropdown-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    color: white;
    border-radius: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.premium-dropdown-item:hover .premium-dropdown-icon {
    transform: scale(1.1);
}

.premium-dropdown-text {
    display: flex;
    flex-direction: column;
}
.premium-dropdown-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--bs-dark);
}
.premium-dropdown-desc {
    font-size: 0.75rem;
    color: var(--bs-secondary);
}
