/* ==========================================================================
   AIStack Theme: Navbar & 5-Column Mega Menu (Bootstrap 5 Dark Theme)
   ========================================================================== */

/* Global Dark Baseline */
body.bg-dark-theme {
    background-color: #030712;
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
}

/* Header Outer Bar */
.aistack-navbar-wrapper {
    background-color: #020617;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Brand / Logo Styling */
.brand-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    display: block;
}

.brand-tagline {
    font-size: 0.65rem;
    color: #94a3b8;
    letter-spacing: 0.2px;
    font-weight: 400;
    margin-top: 3px;
}

/* Standard Nav Links */
.navbar-nav .nav-link {
    font-size: 0.95rem;
    font-weight: 400;
    color: #f1f5f9 !important;
    padding: 0.6rem 1.1rem !important;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #38bdf8 !important;
}

/* Analyze Button (Gradient Pill) */
.btn-analyze {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6d3df5 0%, #306ee8 40%, #00b4d8 100%);
    box-shadow: 0 4px 15px rgba(109, 61, 245, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-analyze:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.4);
    color: #ffffff;
}

.btn-analyze svg {
    transition: transform 0.2s ease;
}

.btn-analyze:hover svg {
    transform: translateX(3px);
}

/* ==========================================================================
   Mega Menu Core Mechanics
   ========================================================================== */

/* Full-width container positioning */
.dropdown-mega {
    position: static !important;
}

.aistack-megamenu {
    background-color: #050b18 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.6) !important;
}

/* Desktop Hover Trigger (Opens smoothly without clicking) */
@media (min-width: 1200px) {
    .dropdown-mega:hover .aistack-megamenu {
        display: block;
        animation: fadeInMega 0.2s ease-in-out;
    }
}

@keyframes fadeInMega {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 5-Column Alignment and Dynamic Heights */
.mega-columns-wrapper {
    align-items: stretch;
}

.mega-col {
    display: flex;
    flex-direction: column;
}

/* Category Headings */
.mega-heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #38bdf8;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

/* Navigation Links */
.mega-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mega-link {
    font-size: 0.88rem;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 400;
    display: inline-block;
    transition: color 0.15s ease, transform 0.15s ease;
}

.mega-link:hover {
    color: #ffffff;
    transform: translateX(3px);
}

/* Clean vertical separator line between columns on desktop */
@media (min-width: 992px) {
    .mega-col:not(:last-child) {
        border-right: 1px solid rgba(255, 255, 255, 0.04);
        padding-right: 1.5rem;
    }
}