/* --- HEADER --- */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.header-wrapper.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--border-color);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    transition: var(--transition);
}

.header-wrapper.scrolled .header-main {
    height: 70px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

/* Nav */
.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-item {
    position: static;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 16px;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link i {
    font-size: 11px;
    margin-top: 1px;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%; /* Position exactly at the bottom of the header */
    left: 0;
    width: 100%;
    background: var(--bg-white);
    box-shadow: var(--shadow-heavy);
    padding: 40px 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border-top: 1px solid var(--border-color);
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

/* Ensure header stays visible and connected when menu is open */
.header-wrapper:has(.nav-item:hover) {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--border-color);
}

.mega-column h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 700;
}

.mega-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.mega-item:hover {
    background: var(--bg-light);
}

.mega-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 48, 219, 0.05);
    color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.mega-content span {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
    font-size: 15px;
}

.mega-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cta {
    padding: 12px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-outline {
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(0, 48, 219, 0.04);
    transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 26px;
    margin-left: 10px;
}

/* --- FOOTER --- */
footer {
    background: #000000 !important; /* Forces black background */
    color: #FFFFFF;
    padding: 100px 0 50px;
    border-top: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 80px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    text-decoration: none;
}

.footer-logo img {
    height: 30px;
    display: block;
}

.footer-logo-text {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
    font-size: 16px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #FFFFFF;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 14px;
}

.footer-col ul li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: #FFFFFF;
}

.footer-cta-group {
    margin-top: 30px;
    display: flex;
    gap: 12px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-size: 15px;
}

.social-links {
    display: flex;
    gap: 24px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    transition: var(--transition);
}

.social-links a:hover {
    color: #FFFFFF;
}

/* --- MOBILE NAV --- */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    z-index: 1100;
    padding: 80px 40px;
    transform: translateX(100%);
    transition: var(--transition);
    overflow-y: auto;
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 20px;
    gap: 12px;
}

.mobile-accordion-content {
    display: none;
    padding-bottom: 24px;
}

.mobile-sub-link {
    display: block;
    padding: 12px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 16px;
    text-align: center;
}

.mobile-nav-cta {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    .header-actions .btn-cta {
        display: none; /* Hide primary CTAs on tablet/small screens to show toggle */
    }
    .mobile-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    footer {
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .footer-brand p {
        margin: 0 auto;
    }
    .footer-cta-group {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
}
