.h-topo,
.h-cab,
.h-rodape {
    --hc-roxo: #7941af;
    --hc-roxo-escuro: #5b2d8a;
    --hc-tinta: #1a1530;
    --hc-suave: #6c6781;
    --hc-linha: #e3dee8;
    --hc-amarelo: #ffcb0b;
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-align: left;
}

.h-topo *,
.h-topo *::before,
.h-topo *::after,
.h-cab *,
.h-cab *::before,
.h-cab *::after,
.h-rodape *,
.h-rodape *::before,
.h-rodape *::after {
    box-sizing: border-box;
}

.h-topo a,
.h-cab a,
.h-rodape a,
.h-topo a:hover,
.h-cab a:hover,
.h-rodape a:hover,
.h-topo a:focus,
.h-cab a:focus,
.h-rodape a:focus {
    text-decoration: none;
}

:where(.h-topo, .h-cab, .h-rodape) button {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

:where(.h-topo, .h-cab, .h-rodape) :is(p, h4) {
    margin: 0;
}

:where(.h-topo, .h-cab, .h-rodape) svg {
    width: 1em;
    height: 1em;
    flex: none;
}

.h-topo :focus-visible,
.h-cab :focus-visible,
.h-rodape :focus-visible {
    outline: 3px solid var(--hc-amarelo);
    outline-offset: 2px;
}

.hc-wrap {
    width: 100%;
    max-width: 1248px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- barra superior ---------- */
.h-topo {
    background: var(--hc-roxo);
    color: rgba(255, 255, 255, .82);
    font-size: .8rem;
    line-height: 1.4;
}

.h-topo-in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 36px;
}

.h-topo-portais,
.h-topo-dir {
    display: flex;
    align-items: center;
    gap: 22px;
}

.h-topo a {
    color: inherit;
}

.h-topo a:hover {
    color: #fff;
}

.h-topo-ola {
    color: #fff;
    font-weight: 600;
}

.h-topo-ola small {
    margin-left: 6px;
    font-size: 1em;
    font-weight: 400;
    opacity: .78;
}

.h-idiomas {
    display: flex;
    gap: 2px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, .25);
}

.h-idiomas button {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .75);
}

.h-idiomas button:hover {
    background: #fff;
    color: var(--hc-roxo);
}

/* ---------- cabeçalho ---------- */
.h-cab {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--hc-linha);
    font-size: 16px;
    line-height: 1.5;
}

.h-cab.h-cab--fixo {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
}

.h-cab-marca {
    display: block;
    height: 0;
    margin: 0;
    padding: 0;
}

.h-cab-in {
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 76px;
}

.h-logo {
    display: block;
    flex: none;
}

.h-logo img {
    display: block;
    width: 160px;
    height: 68px;
    max-width: none;
    object-fit: cover;
}

.h-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
    font-weight: 600;
    font-size: .95rem;
    color: var(--hc-tinta);
}

.h-nav>a {
    position: relative;
    padding: 6px 0;
    color: var(--hc-tinta);
}

.h-nav>a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--hc-roxo);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s;
}

.h-nav>a:hover {
    color: var(--hc-roxo);
}

.h-nav>a:hover::after {
    transform: scaleX(1);
}

.h-nav-acoes {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 6px;
}

.hc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 16px;
    border: 2px solid transparent;
    border-radius: 4px;
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.1;
    white-space: nowrap;
    transition: background-color .15s, color .15s, border-color .15s;
}

.h-cab .hc-btn--pri {
    background: var(--hc-roxo);
    color: #fff;
}

.h-cab .hc-btn--pri:hover {
    background: var(--hc-roxo-escuro);
    color: #fff;
}

.h-cab .hc-btn--linha {
    background: var(--hc-roxo);
    color: #fff;
}

.h-cab .hc-btn--linha:hover {
    background: var(--hc-roxo-escuro);
    color: #fff;
}

.h-cab .hc-btn--texto {
    padding: 0 8px;
    color: var(--hc-suave);
}

.h-cab .hc-btn--texto:hover {
    color: var(--hc-tinta);
}

.h-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--hc-linha) !important;
    border-radius: 4px;
    font-size: 22px;
    color: var(--hc-tinta);
}

.h-menu-fecha {
    display: none;
}

.h-menu-aberto .h-menu-abre {
    display: none;
}

.h-menu-aberto .h-menu-fecha {
    display: block;
}

/* ---------- rodapé ---------- */
.h-rodape {
    background: #140a24;
    color: rgba(255, 255, 255, .66);
    font-size: .92rem;
    line-height: 1.55;
}

.h-rodape img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* páginas antigas que envolvem o include num <footer class="footer"> próprio */
footer:has(> .h-rodape) {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}

.h-rodape-topo {
    display: grid;
    grid-template-columns: 1.4fr repeat(5, 1fr);
    gap: 40px 28px;
    padding: 72px 0 56px;
}

.h-rodape-marca img {
    width: 150px;
    margin-bottom: 18px;
}

.h-rodape-marca p {
    max-width: 30ch;
    margin: 0;
}

.h-sociais {
    display: flex;
    gap: 8px;
    margin-top: 22px;
}

.h-sociais a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 4px;
    color: #fff;
    font-size: 18px;
    transition: background-color .15s, border-color .15s, color .15s;
}

.h-sociais a:hover {
    background: var(--hc-amarelo);
    border-color: var(--hc-amarelo);
    color: var(--hc-tinta);
}

.h-rodape-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.h-rodape-col h4 {
    margin-bottom: 6px;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .09em;
    line-height: 1.3;
    text-transform: uppercase;
    color: #fff;
}

.h-rodape-col a,
.h-rodape-col button {
    text-align: left;
    line-height: 1.35;
    color: rgba(255, 255, 255, .66);
    transition: color .15s;
}

.h-rodape-col a:hover,
.h-rodape-col button:hover {
    color: var(--hc-amarelo);
}

.h-rodape-base {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .85rem;
}

.h-rodape-base p {
    margin: 0;
}

.h-rodape-base a {
    color: inherit;
}

.h-rodape-base a:hover {
    color: #fff;
}

/* ---------- responsivo ---------- */
@media (max-width: 1180px) {
    .h-nav {
        gap: 20px;
        font-size: .9rem;
    }

    .h-rodape-topo {
        grid-template-columns: repeat(3, 1fr);
    }

    .h-rodape-marca {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1023px) {
    .h-cab-in {
        min-height: 68px;
    }

    .h-logo img {
        width: 136px;
        height: 58px;
    }

    .h-menu {
        display: inline-flex;
    }

    .h-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 59;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: calc(100vh - 104px);
        height: calc(100dvh - 104px);
        margin: 0;
        padding: 12px 24px 32px;
        border-top: 1px solid var(--hc-linha);
        background: #fff;
        overflow-y: auto;
        font-size: 1.1rem;
    }

    body.h-menu-aberto {
        overflow: hidden;
    }

    .h-menu-aberto .h-nav {
        display: flex;
    }

    .h-cab--fixo .h-nav {
        height: calc(100vh - 58px);
        height: calc(100dvh - 58px);
    }

    .h-nav>a {
        padding: 16px 0;
        border-bottom: 1px solid var(--hc-linha);
    }

    .h-nav>a::after {
        display: none;
    }

    .h-nav-acoes {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin: 24px 0 0;
    }

    .h-nav-acoes .hc-btn {
        min-height: 50px;
    }
}

@media (max-width: 767px) {
    .hc-wrap {
        padding: 0 16px;
    }

    .h-topo-portais {
        display: none;
    }

    .h-topo-in {
        justify-content: flex-end;
    }

    .h-topo-ola small {
        display: none;
    }

    .h-rodape-topo {
        grid-template-columns: 1fr 1fr;
        padding-top: 56px;
    }

    .h-rodape-base {
        flex-direction: column;
    }
}
/* ==========================================================================
   Modal de login (includes/rodape.php) — o mesmo em todas as páginas
   ========================================================================== */
.hl-modal {
    --hc-roxo: #7941af;
    --hc-roxo-escuro: #5b2d8a;
    --hc-roxo-claro: #f1eaf8;
    --hc-tinta: #1a1530;
    --hc-suave: #6c6781;
    --hc-papel: #f7f4ee;
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex !important; /* ganha de um display:block inline que algum script antigo coloque */
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 10, 36, .6);
    font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    color: var(--hc-tinta);
    -webkit-font-smoothing: antialiased;
    animation: hl-fade .2s ease-out;
}
.hl-modal[hidden] { display: none !important; }
.hl-modal *, .hl-modal *::before, .hl-modal *::after { box-sizing: border-box; }
body.hl-travado { overflow: hidden; }

.hl-caixa {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    margin: 0;
    padding: 36px 32px 32px;
    background: #fff;
    border-radius: 12px;
    border-top: 4px solid var(--hc-roxo);
    animation: hl-entra .25s ease-out;
}
.hl-modal .hl-titulo {
    margin: 0;
    padding: 0;
    font-family: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.7rem;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--hc-tinta);
    text-transform: none;
}
.hl-modal .hl-sub { margin: 6px 0 24px; font-size: .93rem; color: var(--hc-suave); }
.hl-modal .hl-fechar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--hc-suave);
    cursor: pointer;
}
.hl-modal .hl-fechar:hover { background: var(--hc-papel); color: var(--hc-tinta); }
.hl-modal .hl-fechar svg { width: 20px; height: 20px; }
.hl-modal form { margin: 0; }
.hl-modal .hl-rotulo {
    display: block;
    margin: 0 0 6px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--hc-tinta);
}
.hl-modal input.hl-campo {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0 0 16px;
    padding: 0 14px;
    border: 1px solid #cfc8d6;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    font: inherit;
    color: var(--hc-tinta);
    transition: border-color .15s, box-shadow .15s;
}
.hl-modal input.hl-campo:focus { outline: none; border-color: var(--hc-roxo); box-shadow: 0 0 0 3px var(--hc-roxo-claro); }
.hl-modal .hl-links { display: flex; justify-content: space-between; gap: 12px; margin: -4px 0 22px; font-size: .88rem; }
.hl-modal .hl-links a { color: var(--hc-roxo); font-weight: 600; text-decoration: none; }
.hl-modal .hl-links a:hover { color: var(--hc-roxo); text-decoration: underline; }
.hl-modal .hl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--hc-roxo);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.1;
    color: #fff;
    cursor: pointer;
    transition: background-color .15s;
}
.hl-modal .hl-btn:hover { background: var(--hc-roxo-escuro); color: #fff; }
.hl-modal .hl-btn + .hl-btn { margin-top: 10px; }
.hl-modal :focus-visible { outline: 3px solid var(--hc-roxo); outline-offset: 2px; }

@keyframes hl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hl-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 767px) {
    .hl-caixa { padding: 32px 20px 24px; }
    .hl-modal .hl-links { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .hl-modal, .hl-caixa { animation: none; }
}
