/* ==========================================================================
   Premium Navbar & Mega Menu Styles
   ========================================================================== */

/* Glassmorphic Sticky Navbar */
.sticky-top.glass-navbar {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.18);
    box-shadow: 0 10px 35px rgba(23, 37, 84, 0.08);
    transition: all 0.3s ease;
}

/* Ensure logo is displayed in full color with white glass frame */
.glass-navbar .navbar-brand img {
    filter: none !important;
    background: #ffffff;
    border-radius: 0.85rem;
    padding: 4px;
    width: 50px !important;
    height: 50px !important;
    object-fit: contain;
    box-shadow: 0 4px 14px rgba(23, 37, 84, 0.12);
    transition: transform 0.3s ease;
}
.glass-navbar .navbar-brand:hover img {
    transform: scale(1.05);
}

/* Navigation Links */
.glass-navbar .navbar-nav .nav-link {
    color: #0f172a !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.5rem !important;
    position: relative;
    transition: color 0.3s ease;
}

.glass-navbar .navbar-nav .nav-link:hover,
.glass-navbar .navbar-nav .nav-link.active {
    color: #4f46e5 !important;
}

/* Hover Underline Animation */
.glass-navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #4f46e5;
    transition: width 0.3s ease;
    border-radius: 2px;
}
.glass-navbar .navbar-nav .nav-link:hover::after,
.glass-navbar .navbar-nav .nav-link.active::after {
    width: 80%;
}

/* ==========================================================================
   Mega Menu System
   ========================================================================== */

@media (min-width: 992px) {
    .mega-dropdown:hover > .mega-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        margin-top: 0;
        top: 100%;
        animation: megaFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
}

.mega-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    display: none;
    opacity: 0;
    visibility: hidden;
    top: 120%;
}

@keyframes megaFadeUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.mega-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    margin-bottom: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 0.5rem;
}

.mega-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.mega-link:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(147, 51, 234, 0.05));
    transform: translateX(5px);
}

.mega-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #4f46e5;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mega-link:hover .mega-icon {
    background: #4f46e5;
    color: white;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.mega-text h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    transition: color 0.3s ease;
}

.mega-link:hover .mega-text h5 {
    color: #4f46e5;
}

.mega-text p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Magnetic CTA Button in Navbar */
.nav-cta {
    background: linear-gradient(135deg, #2563eb, #9333ea);
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 9999px;
    font-weight: 700;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
    margin-left: 1.5rem;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.6);
    color: white !important;
}
.nav-cta::after {
    display: none !important;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .mega-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 1rem;
        background: transparent;
    }
    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
