/* =====================================================================
   CABEÇALHO NDR — regra única do menu do site
   ---------------------------------------------------------------------
   Todas as regras do cabeçalho ficam SOMENTE neste arquivo. Ele usa
   classes exclusivas (.ndr-header, .ndr-nav...) e define cada medida
   explicitamente, para que nenhum outro CSS (Bootstrap, tema, CSS de
   página ou de widgets de terceiros) consiga mover o menu depois que a
   página aparece. Não há transições em largura, padding ou fonte:
   apenas em cor, sombra e opacidade.

   Desktop (>= 1200px): logo | menu centralizado | botão Central de Ajuda
   Compacto (992-1199px): logo | menu (com "Loja"), sem o botão
   Celular/tablet (< 992px): logo | botão hambúrguer com menu suspenso
   ===================================================================== */

.ndr-header {
    --ndr-h-verde: #177865;
    --ndr-h-laranja: #ff6f2c;
    --ndr-h-texto: #273044;
    --ndr-h-linha: #e8edf5;
    --ndr-h-altura: 84px;

    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--ndr-h-linha);
    font-family: 'Mulish', sans-serif;
    transition: box-shadow .2s ease;
}

.ndr-header.is-scrolled {
    box-shadow: 0 8px 24px rgba(22, 32, 50, .08);
}

.ndr-header *,
.ndr-header *::before,
.ndr-header *::after {
    box-sizing: border-box;
}

/* Mesma largura e recuo (12px) do .container do Bootstrap: a logo fica alinhada
   com o texto das páginas e o botão com a borda direita do conteúdo. */
.ndr-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 1320px;
    height: var(--ndr-h-altura);
    margin: 0 auto;
    padding: 0 12px;
}

/* ---------- logo ---------- */
.ndr-header__logo {
    flex: 0 0 auto;
    display: block;
    line-height: 0;
}

.ndr-header__logo img {
    display: block;
    width: 119px;
    height: 52px;
    max-width: none;
    object-fit: contain;
}

/* ---------- menu ---------- */
.ndr-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.ndr-nav__list,
.ndr-sub {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ndr-nav__list {
    display: flex;
    align-items: center;
    gap: 26px;
}

.ndr-nav__item {
    position: relative;
    margin: 0;
    padding: 0;
}

.ndr-nav__link {
    display: flex;
    align-items: center;
    gap: 7px;
    height: var(--ndr-h-altura);
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ndr-h-verde);
    font-family: 'Mulish', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .35px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease;
}

.ndr-nav__link:hover,
.ndr-nav__link:focus-visible,
.ndr-nav__item.is-current > .ndr-nav__link,
.ndr-nav__item.is-open > .ndr-nav__link {
    color: var(--ndr-h-laranja);
    text-decoration: none;
}

.ndr-nav__link:focus-visible,
.ndr-header__cta:focus-visible,
.ndr-header__toggle:focus-visible {
    outline: 2px solid var(--ndr-h-laranja);
    outline-offset: 4px;
    border-radius: 4px;
}

/* seta dos itens com submenu */
.ndr-nav__item--sub > .ndr-nav__link::after {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

/* ---------- submenu ---------- */
.ndr-sub {
    position: absolute;
    top: calc(100% - 10px);
    left: -18px;
    z-index: 10;
    min-width: 300px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--ndr-h-linha);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(22, 32, 50, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.ndr-sub a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--ndr-h-texto);
    font-family: 'Mulish', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    white-space: normal;
}

.ndr-sub a:hover,
.ndr-sub a:focus-visible,
.ndr-sub a.is-current {
    background: #f2fbf8;
    color: var(--ndr-h-verde);
    text-decoration: none;
}

/* "Loja" aparece só quando o botão não cabe (< 1200px) */
.ndr-nav__item--loja {
    display: none;
}

/* ---------- botão Central de Ajuda ---------- */
.ndr-header__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 20px;
    border-radius: 10px;
    background: var(--ndr-h-laranja);
    color: #fff;
    font-family: 'Mulish', sans-serif;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .3px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(255, 111, 44, .26);
    transition: background-color .15s ease, box-shadow .15s ease;
}

.ndr-header__cta:hover,
.ndr-header__cta:focus-visible {
    background: #e95e20;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(255, 111, 44, .34);
}

.ndr-header__cta i {
    font-size: 15px;
}

/* ---------- botão hambúrguer (só celular/tablet) ---------- */
.ndr-header__toggle {
    display: none;
}

/* =====================================================================
   Desktop: submenu abre ao passar o mouse ou com o teclado
   ===================================================================== */
@media (min-width: 992px) {
    .ndr-nav__item:hover > .ndr-sub,
    .ndr-nav__item:focus-within > .ndr-sub,
    .ndr-nav__item.is-open > .ndr-sub {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    /* último item: submenu alinhado à direita para não sair da tela */
    .ndr-nav__item--sub:nth-last-child(-n+2) > .ndr-sub {
        left: auto;
        right: -18px;
    }
}

/* =====================================================================
   Desktop médio: 1200px a 1399px (conteúdo com 1170px, como o tema)
   ===================================================================== */
@media (min-width: 1200px) and (max-width: 1399px) {
    .ndr-header__inner {
        max-width: 1170px;
        gap: 20px;
    }

    .ndr-nav__list {
        gap: 17px;
    }

    .ndr-nav__link {
        font-size: 12.5px;
        letter-spacing: .2px;
    }

    .ndr-header__cta {
        padding: 0 16px;
        font-size: 12.5px;
    }
}

/* =====================================================================
   Compacto: 992px a 1199px
   ===================================================================== */
@media (min-width: 992px) and (max-width: 1199px) {
    .ndr-header {
        --ndr-h-altura: 76px;
    }

    .ndr-header__inner {
        gap: 16px;
        max-width: 960px;
    }

    .ndr-header__logo img {
        width: 101px;
        height: 44px;
    }

    .ndr-nav {
        justify-content: flex-end;
    }

    .ndr-nav__list {
        gap: 16px;
    }

    .ndr-nav__link {
        font-size: 12px;
        letter-spacing: 0;
    }

    .ndr-nav__item--loja {
        display: block;
    }

    .ndr-header__cta {
        display: none;
    }
}

/* =====================================================================
   Celular e tablet: menor que 992px
   ===================================================================== */
@media (max-width: 991px) {
    .ndr-header {
        --ndr-h-altura: 70px;
    }

    .ndr-header__logo img {
        width: 101px;
        height: 44px;
    }

    .ndr-header__cta {
        display: none;
    }

    .ndr-header__inner {
        padding: 0 16px;
    }

    .ndr-header__toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 46px;
        height: 46px;
        margin: 0 0 0 auto;
        padding: 0 12px;
        border: 0;
        border-radius: 10px;
        background: var(--ndr-h-verde);
        cursor: pointer;
    }

    .ndr-header__toggle span {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: #fff;
        transition: transform .2s ease, opacity .2s ease;
    }

    .ndr-header.is-open .ndr-header__toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .ndr-header.is-open .ndr-header__toggle span:nth-child(2) {
        opacity: 0;
    }

    .ndr-header.is-open .ndr-header__toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .ndr-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        background: #fff;
        border-top: 1px solid var(--ndr-h-linha);
        box-shadow: 0 18px 30px rgba(22, 32, 50, .12);
    }

    .ndr-header.is-open .ndr-nav {
        display: block;
    }

    .ndr-nav__list {
        display: block;
        padding: 6px 0;
    }

    .ndr-nav__item {
        border-bottom: 1px solid #f0f3f8;
    }

    .ndr-nav__item:last-child {
        border-bottom: 0;
    }

    .ndr-nav__item--loja {
        display: block;
    }

    .ndr-nav__link {
        justify-content: space-between;
        width: 100%;
        height: auto;
        padding: 16px 20px;
        color: var(--ndr-h-texto);
        font-size: 14px;
    }

    .ndr-nav__item.is-open > .ndr-nav__link::after {
        transform: rotate(-135deg);
        margin-top: 3px;
    }

    .ndr-sub {
        display: none;
        position: static;
        min-width: 0;
        padding: 0 12px 12px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    .ndr-nav__item.is-open > .ndr-sub {
        display: block;
    }
}

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