/* =========================================================================
   VORTEX ELITE SOLUTIONS — PREMIUM FLOATING HEADER
   header.css
   Depends on the CSS custom properties defined in :root below.
   No Bootstrap. No jQuery. Pure CSS + vanilla JS (header.js).
   ========================================================================= */

:root {
    --ve-royal-blue: #163B73;
    --ve-royal-blue-soft: #2A5296;
    --ve-elite-purple: #6B4FA3;
    --ve-gold: #D4A017;
    --ve-gold-soft: #E8C468;
    --ve-charcoal: #1F2937;
    --ve-white: #FFFFFF;
    --header-top-margin: 25px;
    --header-side-margin: 40px;
    --header-height: 95px;
    --header-height-scrolled: 72px;
    --header-radius: 22px;
    --header-ease: cubic-bezier(.16,.84,.44,1);
}

/* =====================================================
   HEADER SHELL — floats, never touches the browser edges
   ===================================================== */
.site-header {
    position: fixed;
    top: var(--header-top-margin);
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1600px;
    z-index: 1000;
    border-radius: var(--header-radius);
    transition: box-shadow .45s var(--header-ease), transform .45s var(--header-ease);
}

    /* Hidden while scrolling down; reappears only once the user is back at the top */
    .site-header.is-hidden {
        transform: translateX(-50%) translateY(calc(-100% - var(--header-top-margin) - 20px));
    }

.header-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    height: var(--header-height);
    padding: 0 2rem;
    border-radius: var(--header-radius);
    background: linear-gradient(135deg, rgba(107,79,163,0.32), rgba(22,59,115,0.42));
    border: 1px solid rgba(212,160,23,0.35);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 18px 50px -22px rgba(10,17,32,0.55);
    transition: height .45s var(--header-ease), padding .45s var(--header-ease), backdrop-filter .45s var(--header-ease), box-shadow .45s var(--header-ease), background .45s var(--header-ease);
}

/* Sticky / scrolled compact state — height & chrome tighten, header stays floating */
.site-header.is-scrolled .header-inner {
    height: var(--header-height-scrolled);
    padding: 0 1.6rem;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 22px 60px -20px rgba(10,17,32,0.68);
    background: linear-gradient(135deg, rgba(107,79,163,0.42), rgba(22,59,115,0.55));
}

/* =====================================================
   LEFT — LOGO + TAGLINE
   ===================================================== */
.header-left {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    outline-offset: 4px;
}

.logo-mark {
    height: 55px;
    width: 55px;
    flex-shrink: 0;
    transition: transform .5s var(--header-ease), filter .5s var(--header-ease);
}

.site-header.is-scrolled .logo-mark {
    height: 44px;
    width: 44px;
}



/* ===========================
   Logo Wordmark (Image)
   =========================== */

.logo-wordmark {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    line-height: 1;
    flex-shrink: 0;
}

    .logo-wordmark img {
        display: block;
        width: auto;
        height: 35px; /* Desktop size */
        max-width: 240px;
        object-fit: contain;
    }

.header-tagline {
    display: block;
    margin-left: .6rem;
    padding-left: .9rem;
    border-left: 1px solid rgba(255,255,255,.22);
    font-size: .66rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.5;
    color: rgba(255,255,255,.75);
    white-space: nowrap;
}

/* =====================================================
   CENTER — PRIMARY NAVIGATION
   ===================================================== */
.header-center {
    justify-self: center;
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.6rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: .55rem .2rem;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 500;
    letter-spacing: .03em;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    transition: color .3s var(--header-ease), transform .3s var(--header-ease);
}

    /* gold underline growing from center + lift */
    .nav-link::before {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--ve-gold), transparent);
        transform: translateX(-50%);
        transition: width .3s var(--header-ease);
    }

    .nav-link:hover,
    .nav-link:focus-visible {
        color: #fff;
        transform: translateY(-2px);
    }

        .nav-link:hover::before,
        .nav-link:focus-visible::before {
            width: 100%;
        }

    /* Active page — premium glass capsule, not just an underline */
    .nav-link.active {
        color: #fff;
        padding: .55rem 1.1rem;
        border-radius: 100px;
        background: linear-gradient(135deg, rgba(107,79,163,.55), rgba(22,59,115,.45));
        border: 1px solid rgba(212,160,23,.6);
        box-shadow: 0 0 18px rgba(212,160,23,.3), inset 0 0 12px rgba(212,160,23,.12);
    }

        .nav-link.active::before {
            display: none;
        }

        .nav-link.active:hover {
            transform: none;
        }

/* =====================================================
   SERVICES MEGA MENU (desktop, >=992px)
   Opens on hover-intent and on click/tap; see header.js.
   ===================================================== */
.nav-item.has-mega {
    position: static;
}

.mega-caret {
    font-size: .62rem;
    margin-left: .4rem;
    transition: transform .35s var(--header-ease);
}

.nav-link[aria-expanded="true"] .mega-caret {
    transform: rotate(180deg);
}

.mega-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: min(1180px, 92vw);
    z-index: 1100;
    border-radius: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s var(--header-ease), transform .4s var(--header-ease), visibility .4s;
}

.nav-item.has-mega.is-open .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.6rem;
    padding: 2.2rem;
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(22,59,115,.94), rgba(107,79,163,.9));
    border: 1px solid rgba(212,160,23,.4);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 40px 90px -26px rgba(6,10,20,.65);
    max-height: 74vh;
    overflow-y: auto;
}

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

.mega-category {
    min-width: 0;
}

.mega-category-head {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    text-decoration: none;
    padding-bottom: .7rem;
    margin-bottom: .6rem;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.mega-category-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(212,160,23,.16);
    border: 1px solid rgba(212,160,23,.4);
    color: var(--ve-gold-soft);
    font-size: .95rem;
    transition: background .3s var(--header-ease), transform .3s var(--header-ease);
}

.mega-category-head:hover .mega-category-icon {
    background: rgba(212,160,23,.32);
    transform: scale(1.06);
}

.mega-category-title {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.mega-category-desc {
    display: block;
    font-size: .72rem;
    color: rgba(255,255,255,.55);
    margin-top: .2rem;
    line-height: 1.4;
}

.mega-sublist {
    list-style: none;
    margin: 0 0 .4rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .42rem;
}

    .mega-sublist a {
        display: inline-flex;
        align-items: center;
        gap: .4rem;
        font-size: .82rem;
        color: rgba(255,255,255,.7);
        text-decoration: none;
        transition: color .25s var(--header-ease), transform .25s var(--header-ease), padding-left .25s var(--header-ease);
    }

        .mega-sublist a::before {
            content: '';
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--ve-gold-soft);
            opacity: .6;
            transition: opacity .25s var(--header-ease);
        }

        .mega-sublist a:hover,
        .mega-sublist a:focus-visible {
            color: #fff;
            padding-left: .2rem;
        }

            .mega-sublist a:hover::before,
            .mega-sublist a:focus-visible::before {
                opacity: 1;
            }

.mega-view-all {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--ve-gold-soft);
    text-decoration: none;
}

    .mega-view-all i {
        font-size: .65rem;
        transition: transform .3s var(--header-ease);
    }

    .mega-view-all:hover i {
        transform: translateX(3px);
    }

.mega-promo {
    position: relative;
    padding: 1.8rem 1.5rem;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(212,160,23,.22), rgba(255,255,255,.05));
    border: 1px solid rgba(212,160,23,.45);
    display: flex;
    flex-direction: column;
}

.mega-promo-eyebrow {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ve-gold-soft);
}

.mega-promo h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin: .6rem 0 .8rem;
    line-height: 1.25;
}

.mega-promo p {
    font-size: .82rem;
    line-height: 1.6;
    color: rgba(255,255,255,.72);
    margin-bottom: 1.4rem;
}

.mega-promo-btn {
    margin-top: auto;
    justify-content: center;
    text-align: center;
}

/* =====================================================
   RIGHT — ACTIONS
   ===================================================== */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .7rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border-radius: 100px;
    font-size: .82rem;
    font-weight: 600;
    color: rgba(255,255,255,.88);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(8px);
    text-decoration: none;
    white-space: nowrap;
    transition: transform .35s var(--header-ease), border-color .35s var(--header-ease), box-shadow .35s var(--header-ease), background .35s var(--header-ease);
}

    .icon-btn i {
        font-size: .85rem;
        color: var(--ve-gold-soft);
    }

    .icon-btn:hover,
    .icon-btn:focus-visible {
        transform: translateY(-2px);
        border-color: rgba(212,160,23,.55);
        box-shadow: 0 10px 26px -12px rgba(212,160,23,.4);
        background: rgba(255,255,255,.1);
    }

.btn-quote {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    padding: .68rem 1.5rem;
    border-radius: 100px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--ve-charcoal);
    background: linear-gradient(135deg, var(--ve-gold-soft), var(--ve-gold));
    border: 1px solid rgba(255,255,255,.4);
    text-decoration: none;
    box-shadow: 0 12px 30px -12px rgba(212,160,23,.55);
    transition: transform .35s var(--header-ease), box-shadow .35s var(--header-ease);
}

    .btn-quote:hover,
    .btn-quote:focus-visible {
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 18px 40px -12px rgba(212,160,23,.7);
    }

    .btn-quote .ripple {
        position: absolute;
        border-radius: 50%;
        background: rgba(255,255,255,.55);
        transform: scale(0);
        animation: ve-ripple .6s ease-out forwards;
        pointer-events: none;
    }

@keyframes ve-ripple {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* =====================================================
   MOBILE TOGGLE (custom, no Bootstrap hamburger)
   ===================================================== */
.mobile-toggle {
    display: none;
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.06);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

    .mobile-toggle span {
        position: absolute;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: var(--ve-gold-soft);
        transition: transform .35s var(--header-ease), opacity .35s var(--header-ease), width .35s var(--header-ease);
    }

        .mobile-toggle span:nth-child(1) {
            transform: translateY(-6px);
        }

        .mobile-toggle span:nth-child(2) {
            width: 14px;
            align-self: flex-end;
        }

        .mobile-toggle span:nth-child(3) {
            transform: translateY(6px);
        }

    .mobile-toggle.is-open span:nth-child(1) {
        transform: rotate(45deg);
    }

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

    .mobile-toggle.is-open span:nth-child(3) {
        transform: rotate(-45deg);
    }

/* =====================================================
   MOBILE FULL-SCREEN GLASS OVERLAY
   ===================================================== */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: linear-gradient(160deg, rgba(15,25,45,.94), rgba(31,41,55,.97));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .45s var(--header-ease), visibility .45s, transform .45s var(--header-ease);
}

    .mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.mobile-close {
    position: absolute;
    top: 32px;
    right: 32px;
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: transform .35s var(--header-ease), border-color .35s var(--header-ease);
}

    .mobile-close:hover {
        transform: rotate(90deg);
        border-color: var(--ve-gold);
    }

/* Panel stack — Level 1 (main), Level 2 (categories), Level 3 (sub-services) */
.mobile-panels {
    position: relative;
    width: 100%;
    height: 100%;
}

.mobile-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6.5rem 1.6rem 2.5rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(28px);
    transition: opacity .4s var(--header-ease), transform .4s var(--header-ease), visibility .4s;
}

.mobile-menu.is-open .mobile-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.mobile-menu.is-open .mobile-panel.slide-in-left,
.mobile-menu.is-open .mobile-panel.slide-out-right {
    transform: translateX(-28px);
}

.mobile-menu.is-open .mobile-panel.slide-in-right,
.mobile-menu.is-open .mobile-panel.slide-out-left {
    transform: translateX(28px);
}

.mobile-menu.is-open .mobile-panel.slide-out-left,
.mobile-menu.is-open .mobile-panel.slide-out-right {
    opacity: 0;
}

.mobile-panel-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.6rem;
    padding: .5rem .9rem;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.8);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .3s var(--header-ease), color .3s var(--header-ease);
}

    .mobile-panel-back:hover {
        border-color: var(--ve-gold);
        color: #fff;
    }

    .mobile-panel-back i {
        color: var(--ve-gold-soft);
        font-size: .7rem;
    }

.mobile-panel-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.6rem;
    align-self: flex-start;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6rem;
}

.mobile-panel.is-active .mobile-nav-list li,
.mobile-panel.is-active .mobile-category-list li,
.mobile-panel.is-active .mobile-service-list li {
    animation: ve-fade-up .5s var(--header-ease) both;
}

.mobile-nav-list li:nth-child(1) {
    animation-delay: .06s;
}

.mobile-nav-list li:nth-child(2) {
    animation-delay: .12s;
}

.mobile-nav-list li:nth-child(3) {
    animation-delay: .18s;
}

.mobile-nav-list li:nth-child(4) {
    animation-delay: .24s;
}

.mobile-nav-link {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-size: 2.1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: .01em;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    cursor: pointer;
    transition: color .3s var(--header-ease);
}

    .mobile-nav-link i {
        font-size: 1.1rem;
        color: var(--ve-gold-soft);
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus-visible {
        color: var(--ve-gold-soft);
    }

    .mobile-nav-link.active {
        color: var(--ve-gold);
    }

/* Level 2 — service categories */
.mobile-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.mobile-category-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    padding: .9rem 1.1rem;
    border-radius: 16px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    font-size: .98rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: border-color .3s var(--header-ease), background .3s var(--header-ease);
}

    .mobile-category-row:hover {
        border-color: rgba(212,160,23,.5);
        background: rgba(255,255,255,.08);
    }

    .mobile-category-row .mega-category-icon {
        margin-right: .2rem;
    }

    .mobile-category-row .mobile-row-chevron {
        margin-left: auto;
        color: var(--ve-gold-soft);
        font-size: .75rem;
    }

/* Level 3 — sub-services */
.mobile-service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

    .mobile-service-list a {
        display: block;
        padding: .8rem 1rem;
        border-radius: 12px;
        color: rgba(255,255,255,.85);
        text-decoration: none;
        font-size: .92rem;
        transition: background .3s var(--header-ease), color .3s var(--header-ease), padding-left .3s var(--header-ease);
    }

        .mobile-service-list a:hover,
        .mobile-service-list a:focus-visible {
            background: rgba(212,160,23,.14);
            color: #fff;
            padding-left: 1.3rem;
        }

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    width: 100%;
    max-width: 420px;
    margin-top: 2.2rem;
}

    .mobile-actions .icon-btn,
    .mobile-actions .btn-quote {
        justify-content: center;
    }

/* =====================================================
   ENTRANCE ANIMATION (page load) — pure CSS, no GSAP needed
   ===================================================== */
@keyframes ve-slide-left {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }

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

@keyframes ve-fade-up {
    from {
        opacity: 0;
        transform: translateY(-14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ve-slide-right {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

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

@keyframes ve-sweep {
    0% {
        transform: translateX(-140%) skewX(-12deg);
        opacity: 0;
    }

    35% {
        opacity: .5;
    }

    100% {
        transform: translateX(220%) skewX(-12deg);
        opacity: 0;
    }
}

.site-header.animate-in .header-left {
    animation: ve-slide-left .8s var(--header-ease) both;
}

.site-header.animate-in .header-center {
    animation: ve-fade-up .8s var(--header-ease) .15s both;
}

.site-header.animate-in .header-right {
    animation: ve-slide-right .8s var(--header-ease) .1s both;
}

.header-sweep {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 26%;
    background: linear-gradient(90deg, transparent, rgba(212,160,23,.35), transparent);
    pointer-events: none;
    border-radius: var(--header-radius);
}

.site-header.animate-in .header-sweep {
    animation: ve-sweep 1s var(--header-ease) .55s 1 both;
}

@media (prefers-reduced-motion: reduce) {
    .site-header *, .mobile-menu * {
        animation: none !important;
        transition: none !important;
    }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width:1200px) {
    .header-tagline {
        display: none;
    }

    .nav-list {
        gap: 1.8rem;
    }
}

@media (max-width:992px) {
    :root {
        --header-side-margin: 20px;
    }

    .site-header {
        width: calc(100% - 40px);
    }

    .header-center,
    .header-right .icon-btn {
        display: none;
    }

    .header-right {
        gap: .6rem;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
    }
}

@media (max-width:560px) {
    .site-header {
        top: 14px;
        width: calc(100% - 24px);
    }

    .header-inner {
        padding: 0 1.1rem;
    }

    @media (max-width: 991px) {

        .logo-wordmark img {
            height: 34px;
            max-width: 190px;
        }
    }

    @media (max-width: 576px) {

        .logo-wordmark img {
            height: 28px;
            max-width: 160px;
        }
    }

    .btn-quote {
        padding: .6rem 1.1rem;
        font-size: .78rem;
    }

    .mobile-nav-link {
        font-size: 1.7rem;
    }
}
