.site-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    height: 38px;

    background: var(--green-950, #042f2a);
    color: rgba(255, 255, 255, 0.78);

    font-size: 12px;

    transition:
        transform 0.34s ease,
        opacity 0.34s ease;
}

.topbar-inner {
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.topbar-inner span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar-divider {
    width: 1px;
    height: 14px;

    background: rgba(255, 255, 255, 0.18);
}

body.has-scrolled .site-topbar {
    transform: translateY(-100%);
    opacity: 0;
}


/* ========================================
   HEADER
   ======================================== */

.site-header {
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    z-index: 1001;

    transition:
        top 0.34s ease,
        transform 0.34s ease;
}

.header-shell {
    width: min(100% - 48px, 1120px);
    height: 74px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;

    padding: 0 18px 0 24px;

    background: rgba(255, 255, 255, 0.88);

    border: 1px solid rgba(228, 216, 201, 0.92);
    border-radius: 999px;

    box-shadow: 0 26px 70px rgba(31, 36, 33, 0.12);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    transition:
        height 0.34s ease,
        box-shadow 0.34s ease,
        background 0.34s ease;
}

.site-header.is-compact {
    top: 14px;
}

.site-header.is-compact .header-shell {
    height: 66px;

    background: rgba(255, 255, 255, 0.94);

    box-shadow: 0 18px 48px rgba(31, 36, 33, 0.11);
}


/* ========================================
   MARCA
   ======================================== */

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.brand img {
    width: 138px;
    height: auto;
}


/* ========================================
   NAVEGAÇÃO DESKTOP
   ======================================== */

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

.nav-item {
    position: relative;
}

.nav-link {
    height: 44px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 0 15px;

    border-radius: 999px;

    color: rgba(31, 36, 33, 0.86);

    font-size: 14px;
    font-weight: 700;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.nav-link:hover {
    background: rgba(232, 241, 238, 0.86);
    color: var(--green-900, #075f55);
}

.nav-caret {
    font-size: 13px;

    transition: transform 0.25s ease;
}

.nav-item:hover .nav-caret {
    transform: rotate(180deg);
}


/* ========================================
   MEGA MENU
   ======================================== */

.mega-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;

    width: min(760px, calc(100vw - 56px));

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(-50%) translateY(8px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateX(-50%) translateY(0);
}

.mega-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 240px;
    gap: 22px;

    padding: 24px;

    border: 1px solid rgba(228, 216, 201, 0.98);
    border-radius: 26px;

    background: rgba(255, 255, 255, 0.97);

    box-shadow: 0 34px 90px rgba(31, 36, 33, 0.16);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.mega-small {
    width: 510px;
}

.mega-small .mega-panel {
    grid-template-columns: 1fr;
    gap: 8px;
}

.mega-heading {
    margin-bottom: 10px;

    color: var(--champagne, #c89b6d);

    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mega-link {
    display: block;

    padding: 10px 12px;

    border-radius: 14px;

    color: var(--graphite);

    font-size: 14px;
    font-weight: 760;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.mega-link span {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
}

.mega-link:hover {
    background: var(--green-100);
    color: var(--green-900, #075f55);

    transform: translateX(2px);
}

.mega-card {
    position: relative;
    overflow: hidden;

    padding: 20px;

    border-radius: 22px;

    background: linear-gradient(
        135deg,
        var(--green-900, #075f55),
        var(--green-800)
    );

    color: #ffffff;
}

.mega-card::after {
    content: "";
    position: absolute;
    right: -54px;
    bottom: -54px;

    width: 150px;
    height: 150px;

    border: 1px solid rgba(200, 155, 109, 0.38);
    border-radius: 50%;
}

.mega-card h3 {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.35;
    font-weight: 850;
    letter-spacing: 0;
}

.mega-card p {
    margin: 8px 0 16px;

    color: rgba(255, 255, 255, 0.74);

    font-size: 12px;
    line-height: 1.55;
}


/* ========================================
   BOTÃO DO HEADER
   ======================================== */

.header-cta {
    flex: 0 0 auto;
}

.header-cta .btn {
    border: 1px solid var(--green-950, #042f2a);

    background: var(--green-950, #042f2a);
    color: #ffffff;

    box-shadow: 0 8px 22px rgba(4, 47, 42, 0.14);

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.header-cta .btn:hover {
    border-color: var(--champagne, #c89b6d);

    background: var(--champagne, #c89b6d);
    color: var(--green-950, #042f2a);

    transform: translateY(-2px);

    box-shadow: 0 12px 28px rgba(4, 47, 42, 0.18);
}

.header-cta .btn:focus-visible {
    outline: 3px solid rgba(200, 155, 109, 0.35);
    outline-offset: 4px;
}


/* ========================================
   BOTÃO MOBILE
   ======================================== */

.mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border: 0;
    border-radius: 50%;

    background: var(--green-900, #075f55);
    color: #ffffff;

    cursor: pointer;
}

.mobile-toggle span {
    position: relative;

    display: block;

    width: 18px;
    height: 2px;

    background: currentColor;
}

.mobile-toggle span::before,
.mobile-toggle span::after {
    content: "";
    position: absolute;
    left: 0;

    width: 18px;
    height: 2px;

    background: currentColor;

    transition:
        transform 0.25s ease,
        top 0.25s ease;
}

.mobile-toggle span::before {
    top: -6px;
}

.mobile-toggle span::after {
    top: 6px;
}


/* ========================================
   MENU MOBILE
   ======================================== */

.mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1100;

    width: min(420px, 100%);
    padding: 24px;

    overflow: auto;

    background: linear-gradient(
        160deg,
        var(--green-950, #042f2a),
        var(--green-900, #075f55)
    );

    color: #ffffff;

    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.2);

    transform: translateX(100%);

    transition: transform 0.34s ease;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 28px;
}

.mobile-menu-head img {
    width: 120px;
}

.mobile-close {
    width: 40px;
    height: 40px;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;

    background: transparent;
    color: #ffffff;

    font-size: 26px;
    line-height: 1;
}

.mobile-group {
    padding: 16px 0;

    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-group-title {
    margin-bottom: 10px;

    color: var(--champagne, #c89b6d);

    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 0;

    color: rgba(255, 255, 255, 0.88);

    font-weight: 700;
}

.mobile-sub {
    margin: 4px 0 6px;
    padding-left: 12px;

    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-sub a {
    display: block;

    padding: 7px 0;

    color: rgba(255, 255, 255, 0.66);

    font-size: 14px;
}

.mobile-menu .btn {
    margin-top: 16px;
}


/* ========================================
   BACKDROP
   ======================================== */

.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;

    background: rgba(4, 47, 42, 0.34);

    opacity: 0;
    visibility: hidden;

    transition: 0.25s;
}

.menu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}


/* ========================================
   RESPONSIVO
   ======================================== */

@media (max-width: 1040px) {
    .nav-desktop,
    .header-cta {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .header-shell {
        width: min(100% - 28px, 1120px);
        height: 66px;

        padding: 0 12px 0 18px;
    }

    .site-header {
        top: 48px;
    }

    .site-header.is-compact {
        top: 10px;
    }

    .site-topbar {
        height: 34px;
    }

    .topbar-inner {
        height: 34px;
        gap: 10px;

        font-size: 11px;
    }

    .topbar-inner .hide-sm,
    .topbar-divider {
        display: none;
    }

    .brand img {
        width: 122px;
    }
}


/* ========================================
   AJUSTE V2: DROPDOWN MAIS ESTÁVEL
   ======================================== */

.nav-item::after {
    content: "";
    position: absolute;
    top: 100%;
    left: -24px;
    right: -24px;

    height: 30px;

    pointer-events: auto;
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu,
.nav-item.is-open .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateX(-50%) translateY(0);
}

.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret,
.nav-item.is-open .nav-caret {
    transform: rotate(180deg);
}

.mega-menu {
    top: calc(100% + 10px);
}

.mega-panel {
    box-shadow:
        0 38px 95px rgba(31, 36, 33, 0.18),
        0 2px 0 rgba(233, 85, 36, 0.08) inset;
}

.mega-link:hover {
    background: rgba(232, 241, 238, 0.92);
    color: var(--green-900, #075f55);
}

.site-topbar strong,
.topbar-inner a {
    color: var(--brand-orange);
}

/* ========================================
   OCULTAR LINK "ESTRUTURA" NO MENU
   ======================================== */

/* Menu desktop */
