/* =================================================================
   NAV COMPONENT — Single source of truth for header navigation
   Used by all pages via <link rel="stylesheet" href="/css/nav.css">
================================================================= */
:root {
    --nh: 64px;
    --mx: clamp(16px, 5vw, 80px);
    --pill: 9999px;
    --ease: cubic-bezier(.23, 1, .32, 1);
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 var(--mx);
    height: var(--nh);
    display: flex;
    align-items: center;
    transition: all .4s;
    background: rgba(8, 8, 13, .7);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.nav.scrolled {
    background: rgba(8, 8, 13, .85);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.ni {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto
}

.nl {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.15rem;
    color: #fff;
    text-decoration: none
}

.nl img {
    height: 30px;
    filter: brightness(0) invert(1)
}

.nl .s {
    opacity: .3;
    font-weight: 300
}

.nk {
    display: flex;
    align-items: center;
    gap: 4px
}

.nk a,
.nav-dd-trigger {
    padding: 8px 16px;
    border-radius: var(--pill);
    font-size: .875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .55);
    transition: all .25s;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit
}

.nk a:hover,
.nav-dd-trigger:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06)
}

/* Active page indicator */
.nk a.active {
    color: #fff;
    background: rgba(255, 255, 255, .08)
}

/* Services Mega Menu */
.nav-dd {
    position: static
}

.nav-dd-trigger {
    display: flex;
    align-items: center;
    gap: 6px
}

/* Static chevron — no rotation on hover/open */
.nav-dd-trigger .dd-arrow {
    font-size: .55rem;
    display: inline-block;
    opacity: .5;
    transition: opacity .25s
}

.nav-dd-trigger:hover .dd-arrow,
.nav-dd.open .nav-dd-trigger .dd-arrow {
    opacity: .8
}

.nav-dd-menu {
    position: fixed;
    top: var(--nh);
    left: 0;
    right: 0;
    background: #0a0a12;
    border-top: 1px solid rgba(99, 102, 241, .2);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    z-index: 98;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .5)
}

.nav-dd:hover .nav-dd-menu,
.nav-dd.open .nav-dd-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
}

.mega-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px var(--mx);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start
}

.mega-left h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3
}

.mega-left p {
    font-size: .95rem;
    color: rgba(255, 255, 255, .4);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 380px
}

.mega-left .mega-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: rgba(255, 255, 255, .7);
    font-size: .85rem;
    font-weight: 500;
    transition: all .25s;
    text-decoration: none
}

.mega-left .mega-cta:hover {
    border-color: rgba(99, 102, 241, .5);
    color: #fff;
    background: rgba(99, 102, 241, .08)
}

.mega-right {
    display: flex;
    flex-direction: column;
    gap: 0
}

.mega-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    border-radius: 12px;
    transition: all .2s;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .04)
}

.mega-link:last-child {
    border-bottom: none
}

.mega-link:hover {
    background: rgba(255, 255, 255, .03)
}

.mega-link .ml-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0
}

.ml-icon.purple {
    background: rgba(99, 102, 241, .12);
    color: #818cf8
}

.ml-icon.green {
    background: rgba(34, 197, 94, .12);
    color: #4ade80
}

.ml-icon.orange {
    background: rgba(249, 115, 22, .12);
    color: #fb923c
}

.mega-link .ml-info {
    flex: 1
}

.ml-info strong {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .9);
    margin-bottom: 2px
}

.ml-info span {
    font-size: .8rem;
    color: rgba(255, 255, 255, .35)
}

.mega-link .ml-arrow {
    color: rgba(255, 255, 255, .2);
    font-size: .85rem;
    transition: all .25s;
    flex-shrink: 0
}

.mega-link:hover .ml-arrow {
    color: #818cf8;
    transform: translateX(4px)
}

.mega-link:hover .ml-info strong {
    color: #fff
}


/* CTA Button */
.nc {
    padding: 8px 24px !important;
    background: #6366f1 !important;
    color: #fff !important;
    border-radius: var(--pill) !important;
    font-weight: 600 !important
}

.nc:hover {
    background: #818cf8 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, .3) !important
}

/* Mobile toggle */
.nm {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer
}

/* Mobile responsive */
@media(max-width:768px) {
    .nk {
        display: none;
        flex-direction: column;
        position: fixed;
        top: var(--nh);
        left: 0;
        right: 0;
        bottom: 0;
        background: #0c0c14;
        padding: 32px var(--mx);
        gap: 8px;
        z-index: 99;
        overflow-y: auto
    }

    .nk.open {
        display: flex
    }

    .nk.open>a,
    .nk.open .nav-dd-trigger {
        font-size: 1.1rem;
        padding: 16px;
        width: 100%;
        text-align: left
    }

    .nav-dd {
        width: 100%
    }

    .nav-dd-menu {
        position: static;
        transform: none;
        min-width: auto;
        width: 100%;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, .03);
        padding: 8px 0 8px 8px;
        margin-top: 4px;
        border-radius: 12px
    }

    .nav-dd.open .nav-dd-menu {
        display: block
    }

    .mega-inner {
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0
    }

    .mega-left {
        display: none
    }

    .mega-link {
        padding: 14px 12px;
        border-bottom: none
    }

    .mega-link .ml-arrow {
        display: none
    }


    .nm {
        display: block
    }
}