/* ================================
   Modern Mega Dropdown Menu Styles
   ================================ */

/* Dropdown Parent */
.nav-item.dropdown-item {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

/* Link with Dropdown Arrow */
.nav-link-with-dropdown {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    padding: 0.5rem 0 !important;
}

/* Dropdown Icon/Arrow */
.dropdown-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0.6 !important;
    margin-top: 2px !important;
}

.nav-item.dropdown-item:hover .dropdown-icon {
    transform: rotate(180deg) !important;
    opacity: 1 !important;
}

/* Mega Dropdown Container */
.mega-dropdown {
    position: absolute !important;
    top: calc(100% + 0.75rem) !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-10px) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 20px !important;
    padding: 1rem !important;
    min-width: 260px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(138, 43, 226, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    z-index: 1000 !important;
}

.nav-item.dropdown-item:hover .mega-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Dropdown Content Wrapper */
.dropdown-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
}

/* Dropdown Links */
.dropdown-link {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.875rem 1.125rem !important;
    color: #374151 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    background: transparent !important;
    font-weight: 500 !important;
}

.dropdown-link::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 3px !important;
    height: 100% !important;
    background: linear-gradient(135deg, #8a2be2, #00d9ff) !important;
    transform: scaleY(0) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 0 3px 3px 0 !important;
    opacity: 0 !important;
}

.dropdown-link:hover::before {
    transform: scaleY(1) !important;
    opacity: 1 !important;
}

.dropdown-link:hover {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.08), rgba(0, 217, 255, 0.06)) !important;
    color: #8a2be2 !important;
    padding-left: 1.375rem !important;
    box-shadow: 0 4px 12px rgba(138, 43, 226, 0.1) !important;
}

/* Link Icon */
.link-icon {
    font-size: 1rem !important;
    opacity: 0.4 !important;
    transition: all 0.3s ease !important;
    transform: translateX(0) !important;
    color: #8a2be2 !important;
}

.dropdown-link:hover .link-icon {
    opacity: 1 !important;
    transform: translateX(6px) !important;
}

/* Link Text */
.link-text {
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
}

/* Arrow Indicator for Dropdown Parent */
.mega-dropdown::before {
    content: '' !important;
    position: absolute !important;
    top: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) rotate(45deg) !important;
    width: 16px !important;
    height: 16px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.03) !important;
}

/* Smooth Entrance Animation for Dropdown Items */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item.dropdown-item:hover .dropdown-link {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.nav-item.dropdown-item:hover .dropdown-link:nth-child(1) { animation-delay: 0.05s !important; }
.nav-item.dropdown-item:hover .dropdown-link:nth-child(2) { animation-delay: 0.1s !important; }
.nav-item.dropdown-item:hover .dropdown-link:nth-child(3) { animation-delay: 0.15s !important; }
.nav-item.dropdown-item:hover .dropdown-link:nth-child(4) { animation-delay: 0.2s !important; }
.nav-item.dropdown-item:hover .dropdown-link:nth-child(5) { animation-delay: 0.25s !important; }
.nav-item.dropdown-item:hover .dropdown-link:nth-child(6) { animation-delay: 0.3s !important; }

/* Separator between items */
.dropdown-link + .dropdown-link {
    border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
    margin-top: 0.15rem !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mega-dropdown {
        position: static !important;
        transform: none !important;
        margin-top: 0.5rem !important;
        width: 100% !important;
    }
    
    .mega-dropdown::before {
        display: none !important;
    }
    
    .nav-item.dropdown-item .mega-dropdown {
        display: none !important;
    }
    
    .nav-item.dropdown-item:hover .mega-dropdown,
    .nav-item.dropdown-item:focus-within .mega-dropdown {
        display: block !important;
    }
}
