/* ============================================
   MEGA MENU - Ultra Modern Design 2026
   ============================================ */

/* Header Base */
.mega-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #FFFFFF;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.mega-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.mega-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #111827;
    font-weight: 700;
    font-size: 1.1rem;
}

.mega-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mega-logo:hover .mega-logo-icon {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.mega-logo-icon svg {
    color: #111827;
}

/* Navigation */
.mega-nav {
    display: flex;
    align-items: center;
}

.mega-nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-nav-item {
    position: relative;
}

.mega-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mega-nav-link:hover {
    color: #111827;
    background: rgba(255, 255, 255, 0.1);
}

.mega-nav-item.has-mega:hover .mega-nav-link,
.mega-nav-item.has-mega.active .mega-nav-link {
    color: #111827;
    background: rgba(99, 102, 241, 0.2);
}

.mega-arrow {
    transition: transform 0.3s ease;
}

.mega-nav-item.has-mega:hover .mega-arrow,
.mega-nav-item.has-mega.active .mega-arrow {
    transform: rotate(180deg);
}

/* Mega Dropdown */
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 700px;
    background: rgba(249, 250, 251, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.mega-dropdown-sm {
    min-width: 380px;
}

.mega-nav-item.has-mega:hover .mega-dropdown,
.mega-nav-item.has-mega.active .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-dropdown-inner {
    display: flex;
    gap: 8px;
    padding: 16px;
}

/* Columns */
.mega-col {
    flex: 1;
    min-width: 160px;
    padding: 8px;
}

.mega-col-wide {
    flex: 2;
}

.mega-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-col-icon {
    font-size: 1.1rem;
}

/* Links */
.mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-links li {
    margin-bottom: 4px;
    opacity: 0;
    transform: translateX(-10px);
    animation: megaFadeIn 0.4s ease forwards;
}

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

@keyframes megaFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mega-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mega-links a:hover {
    color: #111827;
    background: rgba(99, 102, 241, 0.2);
    transform: translateX(4px);
}

.mega-badge {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #111827;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Featured Links */
.mega-links-featured a {
    padding: 14px;
    gap: 14px;
}

.mega-links-featured a:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
}

.mega-rank-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mega-links-featured strong {
    display: block;
    color: #111827;
    margin-bottom: 2px;
}

.mega-links-featured small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Cards Grid */
.mega-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mega-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.95);
    animation: megaCardIn 0.4s ease forwards;
}

.mega-nav-item.has-mega:hover .mega-card:nth-child(1) { animation-delay: 0.1s; }
.mega-nav-item.has-mega:hover .mega-card:nth-child(2) { animation-delay: 0.15s; }
.mega-nav-item.has-mega:hover .mega-card:nth-child(3) { animation-delay: 0.2s; }
.mega-nav-item.has-mega:hover .mega-card:nth-child(4) { animation-delay: 0.25s; }

@keyframes megaCardIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mega-card:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

.mega-card-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.mega-card-content h5 {
    color: #111827;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.mega-card-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0;
}

/* Featured Card */
.mega-featured {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
    padding: 20px !important;
}

.mega-featured-card {
    text-align: center;
}

.mega-featured-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.mega-featured-card h5 {
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.mega-featured-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.mega-featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #111827;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mega-featured-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5);
}

/* CTA Button */
.mega-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mega-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: #111827;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mega-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.mega-cta:hover::before {
    left: 100%;
}

.mega-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5);
}

.mega-cta svg {
    transition: transform 0.3s ease;
}

.mega-cta:hover svg {
    transform: translateX(4px);
}

/* Mobile Toggle */
.mega-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
}

.mega-mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mega-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mega-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mega-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mega-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mega-mobile-menu.active {
    right: 0;
}

.mega-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mega-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mega-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #111827;
    font-weight: 600;
}

.mega-mobile-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #111827;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
}

.mega-mobile-nav {
    padding: 20px;
}

.mega-mobile-link {
    display: block;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mega-mobile-link:hover {
    color: #111827;
    background: rgba(99, 102, 241, 0.2);
}

.mega-mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

/* Body padding for fixed header */
body {
    padding-top: 72px;
}

/* Responsive */
@media (max-width: 1024px) {
    .mega-nav {
        display: none;
    }
    
    .mega-mobile-toggle {
        display: flex;
    }
    
    .mega-cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .mega-header-inner {
        padding: 0 16px;
        height: 64px;
    }
    
    .mega-logo-text {
        display: none;
    }
    
    body {
        padding-top: 64px;
    }
}
