/* ============================================================
   style.css — Estrutura base dos artigos
   As CORES vêm de tema_wb.css (escuro) e tema_wr.css (claro)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* Escala tipográfica global — controlada pelos botões A+ / A− */
:root { --escala-texto: 1; }

html {
    font-size: calc(100% * var(--escala-texto, 1));
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 130px;
}

body {
    margin: 0;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    background: var(--wa-bg);
    color: var(--wa-text);
    transition: background .25s ease, color .25s ease, opacity .18s ease;
}

/* Transição suave antes de navegar */
body.saindo { opacity: 0; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--wa-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: .88em;
    background: var(--wa-surface-2);
    padding: .15em .4em;
    border-radius: 5px;
    color: var(--wa-accent);
}

.container { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ---------- ACESSIBILIDADE ---------- */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.pular-para-conteudo {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--wa-accent); color: #fff;
    padding: 12px 20px; border-radius: 0 0 10px 0;
    font-weight: 700; font-size: .9rem;
}
.pular-para-conteudo:focus { left: 0; text-decoration: none; }

:focus-visible {
    outline: 3px solid var(--wa-focus);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- BARRA DE PROGRESSO ---------- */
.barra-progresso {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: var(--wa-accent);
    z-index: 999;
    transition: width .1s linear;
}

/* ---------- CABEÇALHO ---------- */
.wa-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--wa-header);
    border-bottom: 1px solid var(--wa-border);
    backdrop-filter: blur(8px);
}

.topo { padding-top: 10px; padding-bottom: 10px; }

.topo-linha {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}
.topo-linha--marca { min-height: 46px; }

.topo-linha--ferramentas {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--wa-border);
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.topo-linha--ferramentas::-webkit-scrollbar { height: 5px; }
.topo-linha--ferramentas::-webkit-scrollbar-thumb { background: var(--wa-border); border-radius: 3px; }

.wa-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.wa-brand:hover { text-decoration: none; }

.wa-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--wa-accent);
    color: #fff; font-weight: 700; font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.wa-brand-texto { display: flex; flex-direction: column; line-height: 1.2; }
.wa-brand-texto strong { color: var(--wa-header-text); font-size: .98rem; }
.wa-brand-texto small { color: var(--wa-header-muted); font-size: .7rem; }

.topo-acoes { display: flex; align-items: center; gap: 8px; }

/* ---------- BOTÕES DE FERRAMENTA ---------- */
.btn-icone {
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--wa-border);
    background: var(--wa-surface-2);
    color: var(--wa-header-text);
    font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s ease, background .15s ease;
}
.btn-icone:hover { transform: scale(1.08); background: var(--wa-accent); }

.grupo-ferramentas {
    display: flex; align-items: center; gap: 5px;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    border-radius: 10px;
    padding: 4px 8px;
    flex-shrink: 0;
}

.btn-ferramenta {
    display: inline-flex; align-items: center; gap: 5px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--wa-text-soft);
    font-size: .8rem; font-weight: 600;
    font-family: inherit;
    padding: 6px 10px;
    border-radius: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-ferramenta:hover { background: var(--wa-hover); color: var(--wa-text); }
.btn-ferramenta:disabled { opacity: .4; cursor: not-allowed; }
.btn-ferramenta--destaque { background: var(--wa-accent); color: #fff; }
.btn-ferramenta--destaque:hover { background: var(--wa-accent); color: #fff; filter: brightness(1.12); }
.btn-ferramenta--sutil { border-color: var(--wa-border); }
.btn-ferramenta--voltar { background: var(--wa-surface-2); border-color: var(--wa-border); }
.btn-ferramenta--home { background: var(--wa-accent-soft); border-color: var(--wa-accent-border); color: var(--wa-accent); }
.btn-ferramenta--home:hover { background: var(--wa-accent); color: #fff; }

.valor-fonte {
    font-size: .74rem; font-weight: 700;
    color: var(--wa-text-muted);
    min-width: 40px; text-align: center;
    font-variant-numeric: tabular-nums;
}

.rotulo-select {
    font-size: .7rem; text-transform: uppercase;
    letter-spacing: .6px; font-weight: 700;
    color: var(--wa-text-muted);
    padding-left: 4px;
}

.select-ferramenta {
    background: var(--wa-surface);
    color: var(--wa-text);
    border: 1px solid var(--wa-border);
    border-radius: 7px;
    padding: 5px 8px;
    font-size: .78rem;
    font-family: inherit;
    max-width: 165px;
    cursor: pointer;
}
.select-ferramenta:focus-visible { outline: 3px solid var(--wa-focus); }

/* ---------- HOME ---------- */
.home { padding: 36px 20px 56px; }

.home-cabecalho { text-align: center; margin-bottom: 34px; }

.home-titulo {
    font-size: 2.05rem; line-height: 1.18;
    margin: 14px 0 12px; font-weight: 800;
    letter-spacing: -.02em;
}
.home-titulo span { color: var(--wa-accent); }

.home-subtitulo {
    font-size: 1rem; color: var(--wa-text-muted);
    max-width: 540px; margin: 0 auto;
}

.grade-artigos {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card-artigo {
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card-artigo:hover {
    transform: translateY(-3px);
    border-color: var(--wa-accent-border);
    box-shadow: var(--wa-shadow);
}
.card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-link:hover { text-decoration: none; }

.card-banner {
    width: 100%; aspect-ratio: 16 / 9;
    object-fit: cover; display: block;
    background: var(--wa-surface-2);
}
.card-banner--fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; font-weight: 900; color: #fff;
    background: linear-gradient(135deg, var(--wa-accent-2), var(--wa-accent));
}

.card-corpo { padding: 18px 20px 20px; }

.categoria-badge--mini { font-size: .66rem; padding: 3px 10px; margin-bottom: 10px; }

.card-titulo { font-size: 1.12rem; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
.card-subtitulo { font-size: .87rem; color: var(--wa-text-muted); margin: 0 0 12px; line-height: 1.55; }
.card-meta { font-size: .75rem; color: var(--wa-text-muted); margin: 0 0 14px; }
.card-acao { font-size: .84rem; font-weight: 700; color: var(--wa-accent); }

.home-vazio { text-align: center; color: var(--wa-text-muted); grid-column: 1 / -1; }

/* ---------- ARTIGO ---------- */
.artigo { padding: 32px 20px 56px; }

.artigo-cabecalho { margin-bottom: 24px; }

.categoria-badge {
    display: inline-block;
    background: var(--wa-accent-soft);
    color: var(--wa-accent);
    border: 1px solid var(--wa-accent-border);
    padding: 5px 14px; border-radius: 999px;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .8px; text-transform: uppercase;
    margin-bottom: 14px;
}

.artigo-titulo {
    font-size: 2.05rem; line-height: 1.2;
    margin: 0 0 12px; font-weight: 800;
    letter-spacing: -.02em;
}

.artigo-subtitulo {
    font-size: 1.02rem; line-height: 1.6;
    color: var(--wa-text-muted);
    margin: 0 0 18px;
}

.artigo-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: .82rem; color: var(--wa-text-muted);
    padding-bottom: 18px;
    border-bottom: 1px solid var(--wa-border);
}
.artigo-meta .separador { opacity: .5; }

.banner { margin: 0 0 30px; }
.banner img {
    width: 100%; border-radius: 16px;
    box-shadow: var(--wa-shadow);
    aspect-ratio: 16 / 9; object-fit: cover;
}

.banner-fallback {
    width: 100%; aspect-ratio: 16 / 9; border-radius: 16px;
    background: linear-gradient(135deg, var(--wa-accent-2), var(--wa-accent));
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    color: #fff; text-align: center; padding: 20px;
    box-shadow: var(--wa-shadow);
}
.banner-fallback.pequeno { aspect-ratio: 16 / 7; }
.banner-letra { font-size: 3.2rem; font-weight: 900; opacity: .9; }
.banner-aviso { font-size: .78rem; opacity: .9; }
.banner-aviso code { background: rgba(255,255,255,.2); color: #fff; }

.artigo-cartao {
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: 18px;
    padding: 30px 28px;
    box-shadow: var(--wa-shadow);
}

.artigo-titulo-interno {
    font-size: 1.36rem; font-weight: 700;
    margin: 0 0 18px; line-height: 1.3;
    padding-left: 14px;
    border-left: 4px solid var(--wa-accent);
}

.conteudo p {
    margin: 0 0 17px;
    color: var(--wa-text-soft);
    font-size: 1rem;
}
.conteudo p:last-child { margin-bottom: 0; }

.conteudo:first-of-type p:first-of-type::first-letter {
    float: left;
    font-size: 3rem; line-height: .85;
    font-weight: 800;
    margin: 5px 10px 0 0;
    color: var(--wa-accent);
}

.imagem-conteudo { margin: 26px 0; }
.imagem-conteudo img {
    width: 100%; border-radius: 14px;
    border: 1px solid var(--wa-border);
}
.imagem-conteudo figcaption {
    margin-top: 10px;
    font-size: .8rem; font-style: italic;
    color: var(--wa-text-muted);
    text-align: center;
}

.tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 26px; padding-top: 18px;
    border-top: 1px solid var(--wa-border);
}
.tag {
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    color: var(--wa-text-muted);
    padding: 4px 12px; border-radius: 999px;
    font-size: .74rem; font-weight: 500;
}

/* ---------- BLOCOS ---------- */
.bloco {
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: 18px;
    padding: 24px 28px;
    margin-top: 20px;
    box-shadow: var(--wa-shadow);
}
.bloco h3 {
    margin: 0 0 16px;
    font-size: 1rem; font-weight: 700;
}

.lista-referencias { margin: 0; padding-left: 20px; }
.lista-referencias li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--wa-border);
}
.lista-referencias li:last-child { border-bottom: none; padding-bottom: 0; }
.lista-referencias a { font-weight: 600; font-size: .94rem; }
.ref-desc {
    display: block;
    font-size: .8rem;
    color: var(--wa-text-muted);
    margin-top: 3px;
}

.grade-links { display: grid; gap: 10px; }
.link-card {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--wa-text);
    font-size: .92rem; font-weight: 500;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.link-card:hover {
    text-decoration: none;
    border-color: var(--wa-accent);
    transform: translateX(4px);
    background: var(--wa-accent-soft);
}
.link-seta { color: var(--wa-accent); font-size: 1.05rem; flex-shrink: 0; }
.outro-categoria {
    display: block;
    font-size: .68rem; text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--wa-accent);
    margin-bottom: 2px; font-weight: 700;
}

/* ---------- RODAPÉ ---------- */
.wa-footer {
    background: var(--wa-surface);
    border-top: 1px solid var(--wa-border);
    padding: 24px 0;
    margin-top: 20px;
}
.wa-footer p {
    margin: 0; text-align: center;
    font-size: .8rem; color: var(--wa-text-muted);
}
.wa-footer a { font-weight: 600; }

/* ---------- VOLTAR AO TOPO ---------- */
.btn-topo {
    position: fixed; bottom: 22px; right: 22px;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--wa-accent); color: #fff;
    border: none; font-size: 1.15rem; cursor: pointer;
    box-shadow: var(--wa-shadow);
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: all .25s ease;
    z-index: 90;
}
.btn-topo.visivel { opacity: 1; visibility: visible; transform: translateY(0); }
.btn-topo:hover { transform: translateY(-3px) scale(1.05); }

/* ---------- STATUS DE TRADUÇÃO ---------- */
.trad-status {
    position: fixed; bottom: 22px; left: 50%;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px;
    background: var(--wa-surface);
    border: 1px solid var(--wa-accent-border);
    color: var(--wa-text);
    padding: 11px 20px;
    border-radius: 999px;
    font-size: .85rem; font-weight: 600;
    box-shadow: var(--wa-shadow);
    z-index: 200;
}
.trad-spinner {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid var(--wa-border);
    border-top-color: var(--wa-accent);
    animation: girar .8s linear infinite;
    flex-shrink: 0;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- AVISOS (TOASTS) ---------- */
.toasts {
    position: fixed; top: 16px; right: 16px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 300; max-width: min(340px, calc(100vw - 32px));
}
.toast {
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-left: 4px solid var(--wa-accent);
    color: var(--wa-text);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .85rem;
    box-shadow: var(--wa-shadow);
    animation: entrarToast .25s ease;
}
.toast--erro { border-left-color: #e57373; }
.toast--ok { border-left-color: #25d366; }
.toast.saindo { opacity: 0; transform: translateX(16px); transition: all .3s ease; }
@keyframes entrarToast {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: none; }
}

/* ---------- ESTADO DE ERRO ---------- */
.erro-box {
    min-height: 62vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; gap: 12px;
}
.erro-box h1 { font-size: 1.5rem; margin: 0; }
.erro-box p { color: var(--wa-text-muted); margin: 0; }
.erro-debug {
    max-width: 100%; overflow-x: auto;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    border-left: 3px solid #e57373;
    border-radius: 10px;
    padding: 13px 16px;
    font-size: .8rem; text-align: left;
    color: #e57373;
    white-space: pre-wrap;
    margin: 8px 0 14px;
}
.btn-principal {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--wa-accent); color: #fff;
    padding: 11px 24px; border-radius: 999px;
    font-weight: 600; font-size: .9rem;
    text-decoration: none;
    transition: filter .2s ease, transform .2s ease;
}
.btn-principal:hover { filter: brightness(1.1); transform: translateY(-2px); text-decoration: none; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 700px) {
    html { scroll-padding-top: 150px; }

    .artigo { padding: 24px 16px 40px; }
    .home { padding: 26px 16px 40px; }

    .artigo-titulo { font-size: 1.58rem; }
    .home-titulo { font-size: 1.58rem; }
    .artigo-subtitulo { font-size: .96rem; }
    .artigo-cartao { padding: 22px 18px; border-radius: 14px; }
    .artigo-titulo-interno { font-size: 1.15rem; }
    .conteudo p { font-size: .96rem; }
    .conteudo:first-of-type p:first-of-type::first-letter { font-size: 2.4rem; }
    .bloco { padding: 18px 18px; border-radius: 14px; }
    .banner-letra { font-size: 2.2rem; }

    .btn-ferramenta { font-size: .76rem; padding: 6px 8px; }
    .select-ferramenta { max-width: 140px; font-size: .74rem; }
    .rotulo-select { display: none; }
    .btn-ferramenta--home { font-size: .76rem; padding: 6px 10px; }
    .btn-topo { bottom: 14px; right: 14px; }
}

@media (min-width: 1400px) {
    .container { max-width: 920px; }
    .artigo-titulo, .home-titulo { font-size: 2.35rem; }
    .conteudo p { font-size: 1.05rem; }
}

/* ---------- IMPRESSÃO ---------- */
@media print {
    .wa-header, .btn-topo, .toasts, .trad-status,
    .barra-progresso, .pular-para-conteudo, .tags { display: none !important; }
    body { background: #fff; color: #000; }
    .artigo-cartao, .bloco { border: 1px solid #ccc; box-shadow: none; }
}

/* ============================================================
   MENU LATERAL DE CATEGORIAS + LAYOUT EXPANDIDO
   Bloco final: grade conteúdo + menu, submenus e responsividade
   ============================================================ */

/* ---------- Grade principal (conteúdo + menu à direita) ---------- */
.layout-artigos {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 20px;
    align-items: start;
}

.container.topo-largo { max-width: 1560px; }

.area-conteudo { min-width: 0; }

/* Conteúdo do artigo ocupa mais espaço na página */
.area-conteudo > .artigo,
.area-conteudo > .home { padding: 30px 0 56px; }
.area-conteudo .artigo-cartao { padding: 36px 36px; }
.area-conteudo .conteudo p { font-size: 1.04rem; line-height: 1.78; }
.area-conteudo .artigo-titulo { font-size: 2.3rem; }
.area-conteudo .home-titulo { font-size: 2.2rem; }
.area-conteudo .grade-artigos { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.area-conteudo .erro-box { min-height: 60vh; }

/* ---------- Menu lateral ---------- */
.menu-lateral {
    position: sticky;
    top: 92px;
    align-self: start;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 112px);
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: 18px;
    box-shadow: var(--wa-shadow);
    overflow: hidden;
    z-index: 120;
}

.menu-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 15px;
    background: var(--wa-header);
    border-bottom: 1px solid var(--wa-border);
    flex-shrink: 0;
}
.menu-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.menu-logo:hover { text-decoration: none; }
.menu-logo .wa-avatar { width: 34px; height: 34px; font-size: .76rem; }
.menu-logo-texto strong {
    display: block;
    font-size: .92rem;
    line-height: 1.1;
    color: var(--wa-header-text);
}
.menu-logo-texto small {
    font-size: .62rem;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--wa-header-muted);
}

.menu-fechar {
    display: none;
    width: 32px; height: 32px;
    align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--wa-border);
    border-radius: 8px;
    color: var(--wa-header-text);
    font-size: .85rem;
    cursor: pointer;
}
.menu-fechar:hover { background: var(--wa-accent); border-color: var(--wa-accent); color: #fff; }

/* Filtro do menu */
.menu-busca { padding: 11px 14px; border-bottom: 1px solid var(--wa-border); flex-shrink: 0; }
.menu-busca input {
    width: 100%;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    color: var(--wa-text);
    border-radius: 9px;
    padding: 8px 11px;
    font-size: .83rem;
    font-family: inherit;
    outline: none;
}
.menu-busca input::placeholder { color: var(--wa-text-muted); }
.menu-busca input:focus { border-color: var(--wa-accent); }

/* Navegação com rolagem própria */
.menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px 14px;
    scrollbar-width: thin;
}
.menu-nav::-webkit-scrollbar { width: 6px; }
.menu-nav::-webkit-scrollbar-thumb { background: var(--wa-border); border-radius: 3px; }

.menu-secao {
    margin: 12px 8px 6px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: var(--wa-text-muted);
}

/* Item simples (Todos os artigos) */
.menu-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--wa-text-soft);
    font-size: .86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.menu-link:hover { background: var(--wa-hover); color: var(--wa-text); text-decoration: none; }
.menu-link.ativo { background: var(--wa-accent); color: #fff; }
.menu-link.ativo .menu-contador { background: rgba(255,255,255,.22); color: #fff; }

/* Grupo de categoria (details/summary = submenu acessível sem JS) */
.menu-grupo { border-radius: 12px; margin-bottom: 1px; }

.menu-categoria {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: .86rem;
    font-weight: 600;
    color: var(--wa-text-soft);
    cursor: pointer;
    list-style: none;
    transition: background .15s ease, color .15s ease;
}
.menu-categoria::-webkit-details-marker { display: none; }
.menu-categoria::marker { content: ''; }
.menu-categoria:hover { background: var(--wa-hover); color: var(--wa-text); }
.menu-grupo[open] > .menu-categoria { color: var(--wa-accent); }

.menu-icone { font-size: .95rem; line-height: 1; flex-shrink: 0; }
.menu-texto {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.menu-contador {
    flex-shrink: 0;
    min-width: 22px;
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--wa-surface-2);
    color: var(--wa-text-muted);
    font-variant-numeric: tabular-nums;
}
.menu-contador.zerado { opacity: .55; }

.menu-seta {
    flex-shrink: 0;
    font-size: .8rem;
    color: var(--wa-text-muted);
    transition: transform .22s ease;
}
.menu-grupo[open] .menu-seta { transform: rotate(180deg); }

/* Submenu em árvore */
.submenu {
    list-style: none;
    margin: 2px 0 8px 18px;
    padding: 0 0 0 14px;
    border-left: 1px dashed var(--wa-border);
}
.submenu-link {
    display: flex;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--wa-text-muted);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.submenu-link:hover { background: var(--wa-accent-soft); color: var(--wa-text); text-decoration: none; }
.submenu-link.ativo { background: var(--wa-accent-soft); color: var(--wa-accent); font-weight: 700; }
.submenu-marca { flex-shrink: 0; color: var(--wa-accent); font-weight: 700; opacity: .7; }
.submenu-texto { overflow-wrap: anywhere; }
.submenu-vazio {
    padding: 6px 9px;
    font-size: .76rem;
    font-style: italic;
    color: var(--wa-text-muted);
    opacity: .7;
}

.menu-rodape {
    flex-shrink: 0;
    padding: 11px 15px;
    border-top: 1px solid var(--wa-border);
    background: var(--wa-surface-2);
}
.menu-rodape p { margin: 0; font-size: .76rem; font-weight: 700; color: var(--wa-text-soft); }
.menu-rodape small { font-size: .68rem; color: var(--wa-text-muted); }

/* Botão que abre o menu em telas menores */
.btn-ferramenta--menu { display: none; }

/* Overlay do menu */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(3px);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.menu-overlay.aberto { opacity: 1; visibility: visible; }

/* ---------- Tablet e smartphone: menu off-canvas ---------- */
@media (max-width: 1199.98px) {
    .layout-artigos {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 0 16px;
    }

    .btn-ferramenta--menu { display: inline-flex; }
    .menu-fechar { display: inline-flex; }

    .menu-lateral {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 330px;
        max-width: 88vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 18px 0 0 18px;
        transform: translateX(105%);
        transition: transform .3s cubic-bezier(.4, 0, .2, 1);
        z-index: 160;
    }
    .menu-lateral.aberto { transform: translateX(0); }

    .area-conteudo .artigo-cartao { padding: 28px 26px; }
    .area-conteudo .artigo-titulo { font-size: 2rem; }
}

@media (max-width: 700px) {
    .layout-artigos { padding: 0 12px; }
    .area-conteudo > .artigo,
    .area-conteudo > .home { padding: 22px 0 40px; }

    .area-conteudo .artigo-cartao { padding: 22px 18px; }
    .area-conteudo .artigo-titulo { font-size: 1.56rem; }
    .area-conteudo .home-titulo { font-size: 1.56rem; }
    .area-conteudo .conteudo p { font-size: .97rem; line-height: 1.72; }
    .area-conteudo .grade-artigos { grid-template-columns: 1fr; }

    .menu-lateral { width: 300px; max-width: 90vw; }
    .menu-categoria, .menu-link { font-size: .84rem; }
    .submenu-link { font-size: .78rem; }
    .btn-ferramenta--menu { font-size: .76rem; padding: 6px 9px; }
}

/* ---------- TV e monitores grandes ---------- */
@media (min-width: 1600px) {
    .layout-artigos {
        grid-template-columns: minmax(0, 1fr) 350px;
        gap: 40px;
        padding: 0 32px;
    }
    .area-conteudo .artigo-cartao { padding: 42px 44px; }
    .area-conteudo .artigo-titulo { font-size: 2.6rem; }
    .area-conteudo .conteudo p { font-size: 1.1rem; line-height: 1.82; }
    .area-conteudo .grade-artigos { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

    .menu-lateral { max-height: calc(100vh - 120px); }
    .menu-categoria, .menu-link { font-size: .94rem; padding: 11px 12px; }
    .submenu-link { font-size: .87rem; padding: 8px 10px; }
    .menu-secao { font-size: .68rem; }
}

@media (min-width: 2000px) {
    .layout-artigos { max-width: 1800px; }
    .area-conteudo .artigo-titulo { font-size: 2.9rem; }
    .area-conteudo .conteudo p { font-size: 1.18rem; }
}

/* ---------- Impressão: menu não vai para o papel ---------- */
@media print {
    .menu-lateral, .menu-overlay, .btn-ferramenta--menu { display: none !important; }
    .layout-artigos { display: block; padding: 0; }
}

/* ============================================================
   DIAGRAMA DO ARTIGO — prints e esquemas técnicos
   ============================================================ */
.imagem-conteudo.diagrama {
    margin: 30px 0;
}

.imagem-conteudo.diagrama img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--wa-border);
    background: #ffffff;            /* preserva o fundo original do print */
    padding: 10px;
    object-fit: contain;            /* não corta o diagrama */
}

.imagem-conteudo.diagrama figcaption {
    margin-top: 10px;
    font-size: .8rem;
    font-style: italic;
    color: var(--wa-text-muted);
    text-align: center;
}

/* No celular, o diagrama pode ser ampliado com toque */
@media (max-width: 700px) {
    .imagem-conteudo.diagrama img { padding: 6px; }
}

/* ============================================================
   CORREÇÃO — Load de tradução
   O atributo [hidden] perde para o display:flex de .trad-status.
   Sem esta regra o spinner fica visível o tempo todo.
   ============================================================ */
.trad-status[hidden] { display: none !important; }

/* Enquanto traduz, o seletor fica bloqueado (evita troca dupla) */
.select-ferramenta:disabled {
    opacity: .55;
    cursor: progress;
}

/* Sinaliza leitura em atualização, sem piscar a tela toda */
body.traduzindo [data-texto] {
    opacity: .55;
    transition: opacity .2s ease;
}

/* ============================================================
   COMPARTILHAMENTO SOCIAL — barra, modal, prévia e carregamento
   ============================================================ */

/* ---------- BARRA COM O BOTÃO ---------- */
.share-barra {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
}

/* Posição 1: mesma linha da categoria */
.share-barra--topo { margin-left: 10px; }

/* Posição 2: abaixo das hashtags, alinhada à esquerda */
.share-barra--fim {
    display: flex;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--wa-border);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-accent-border);
    color: var(--wa-accent);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 7px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.share-btn:hover {
    background: var(--wa-accent);
    border-color: var(--wa-accent);
    color: #fff;
    transform: translateY(-1px);
}
.share-btn:active { transform: translateY(0) scale(.98); }

.share-btn-icone { font-size: .95rem; line-height: 1; }

.share-btn-redes { display: inline-flex; gap: 2px; }
.share-btn-redes i {
    font-style: normal;
    font-size: .62rem;
    font-weight: 800;
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--wa-accent-soft);
    color: var(--wa-accent);
    transition: background .18s ease, color .18s ease;
}
.share-btn:hover .share-btn-redes i {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

/* ---------- MODAL ---------- */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.share-modal[hidden] { display: none !important; }

.share-fundo {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
    animation: shareEntrarFundo .2s ease;
}
@keyframes shareEntrarFundo { from { opacity: 0; } to { opacity: 1; } }

.share-caixa {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: 20px;
    padding: 24px 24px 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
    animation: shareEntrarCaixa .25s cubic-bezier(.2, .8, .3, 1);
}
@keyframes shareEntrarCaixa {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.share-x {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--wa-border);
    border-radius: 9px;
    color: var(--wa-text-muted);
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.share-x:hover { background: var(--wa-surface-2); color: var(--wa-text); }

.share-titulo {
    margin: 0 0 4px;
    font-size: 1.14rem;
    font-weight: 800;
    padding-right: 40px;
}
.share-desc {
    margin: 0 0 18px;
    font-size: .84rem;
    color: var(--wa-text-muted);
}

/* ---------- PRÉVIA ---------- */
.share-preview {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 14px;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 18px;
}

.share-preview-midia {
    border-radius: 10px;
    overflow: hidden;
    background: var(--wa-bg);
    aspect-ratio: 16 / 10;
}
.share-preview-midia img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.share-preview-vazio {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: var(--wa-text-muted);
}

.share-preview-info { min-width: 0; }

.share-preview-cat {
    display: block;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--wa-accent);
    margin-bottom: 4px;
}

.share-preview-titulo {
    margin: 0 0 5px;
    font-size: .95rem;
    line-height: 1.3;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-sub {
    margin: 0 0 6px;
    font-size: .74rem;
    line-height: 1.45;
    color: var(--wa-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-preview-link {
    display: block;
    font-size: .62rem;
    color: var(--wa-text-muted);
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- PLATAFORMAS ---------- */
.share-plataformas {
    border: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.share-legenda {
    grid-column: 1 / -1;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--wa-text-muted);
    padding: 0;
    margin-bottom: 4px;
}

.share-opcao {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    border-radius: 11px;
    padding: 9px 11px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.share-opcao:hover { border-color: var(--wa-accent-border); }

.share-opcao input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.share-opcao-icone {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--wa-accent-soft);
    color: var(--wa-accent);
    font-size: .82rem;
    font-weight: 800;
    font-style: normal;
}

.share-opcao-texto { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.share-opcao-nome { font-size: .82rem; font-weight: 700; color: var(--wa-text); }
.share-opcao-tipo { font-size: .66rem; color: var(--wa-text-muted); }

.share-opcao input:checked + .share-opcao-icone { background: var(--wa-accent); color: #fff; }
.share-opcao:has(input:checked) {
    border-color: var(--wa-accent);
    background: var(--wa-accent-soft);
}
.share-opcao input:focus-visible + .share-opcao-icone {
    outline: 3px solid var(--wa-focus);
    outline-offset: 2px;
}

/* ---------- AVISO ---------- */
.share-aviso {
    margin: 0 0 16px;
    font-size: .77rem;
    line-height: 1.5;
    color: var(--wa-text-muted);
    background: var(--wa-surface-2);
    border-left: 3px solid var(--wa-accent);
    border-radius: 0 8px 8px 0;
    padding: 9px 12px;
}

/* ---------- AÇÕES ---------- */
.share-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.share-acoes[hidden] { display: none !important; }

.share-btn-sec {
    background: transparent;
    border: 1px solid var(--wa-border);
    color: var(--wa-text-muted);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.share-btn-sec:hover {
    background: var(--wa-surface-2);
    color: var(--wa-text);
    border-color: var(--wa-accent-border);
}

.share-btn-principal {
    background: var(--wa-accent);
    border: 1px solid var(--wa-accent);
    color: #fff;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}
.share-btn-principal:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ---------- CARREGAMENTO ---------- */
.share-load {
    padding: 6px 0 2px;
}
.share-load[hidden] { display: none !important; }

.share-load-topo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.share-load-spinner {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid var(--wa-border);
    border-top-color: var(--wa-accent);
    animation: shareGirar .8s linear infinite;
}
@keyframes shareGirar { to { transform: rotate(360deg); } }

.share-load-texto {
    font-size: .84rem;
    font-weight: 600;
    color: var(--wa-text);
}

.share-load-trilha {
    height: 6px;
    border-radius: 999px;
    background: var(--wa-surface-2);
    overflow: hidden;
    border: 1px solid var(--wa-border);
}

.share-load-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--wa-accent-2), var(--wa-accent));
    transition: width .45s ease;
}

.share-load-dica {
    margin: 9px 0 0;
    font-size: .74rem;
    line-height: 1.5;
    color: var(--wa-text-muted);
    min-height: 1.1em;
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 700px) {
    .share-barra--topo {
        margin-left: 0;
        margin-top: 10px;
        display: flex;
    }
    .share-btn {
        font-size: .72rem;
        padding: 6px 11px;
    }
    .share-btn-redes { display: none; }

    .share-modal { padding: 10px; align-items: flex-end; }

    .share-caixa {
        max-width: 100%;
        max-height: calc(100vh - 20px);
        border-radius: 18px 18px 0 0;
        padding: 20px 16px 18px;
    }

    .share-preview { grid-template-columns: 96px 1fr; gap: 10px; padding: 10px; }
    .share-preview-titulo { font-size: .86rem; -webkit-line-clamp: 2; }

    .share-plataformas { grid-template-columns: 1fr; }

    .share-acoes { flex-direction: column-reverse; }
    .share-btn-principal,
    .share-btn-sec { width: 100%; padding: 12px; font-size: .84rem; }
}

@media (min-width: 1600px) {
    .share-caixa { max-width: 600px; padding: 28px; }
    .share-preview { grid-template-columns: 160px 1fr; }
    .share-preview-titulo { font-size: 1.05rem; }
    .share-btn { font-size: .84rem; padding: 8px 16px; }
}

@media print {
    .share-barra, .share-modal { display: none !important; }
}
/* ============================================================
   VÍDEO AULA — faixa de chamada e modal com iframe
   ============================================================ */

/* ---------- FAIXA ---------- */
.video-faixa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, var(--wa-accent-2), var(--wa-accent));
    border-radius: 14px;
    padding: 16px 20px;
    margin: 0 0 26px;
    color: #fff;
    box-shadow: var(--wa-shadow);
}

.video-faixa-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.video-faixa-rotulo {
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    opacity: .85;
}

.video-faixa-titulo {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.video-faixa-desc {
    font-size: .78rem;
    opacity: .88;
    line-height: 1.4;
}

.video-faixa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #fff;
    color: var(--wa-accent-2);
    border: none;
    font-family: inherit;
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .3px;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease;
}
.video-faixa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}
.video-faixa-btn:active { transform: translateY(0) scale(.98); }

.video-faixa-icone {
    font-size: .78rem;
    line-height: 1;
}

/* ---------- MODAL ---------- */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 520;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.video-modal[hidden] { display: none !important; }

.video-fundo {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(4px);
    animation: videoEntrarFundo .2s ease;
}
@keyframes videoEntrarFundo {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-caixa {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
    animation: videoEntrarCaixa .24s cubic-bezier(.2, .8, .3, 1);
}
@keyframes videoEntrarCaixa {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.video-topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.video-titulo {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--wa-text);
}

.video-x {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wa-surface-2);
    border: 1px solid var(--wa-border);
    border-radius: 9px;
    color: var(--wa-text-muted);
    font-size: .85rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.video-x:hover { background: var(--wa-accent); border-color: var(--wa-accent); color: #fff; }

/* Palco do player — proporção 16:9 fixa, sem cortes */
.video-palco {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-palco iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-nota {
    margin: 10px 2px 0;
    font-size: .72rem;
    color: var(--wa-text-muted);
    line-height: 1.5;
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 700px) {
    .video-faixa {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
        margin-bottom: 20px;
    }
    .video-faixa-btn {
        justify-content: center;
        padding: 11px 18px;
        width: 100%;
    }
    .video-faixa-titulo { font-size: .93rem; }

    .video-modal { padding: 8px; }
    .video-caixa {
        max-height: calc(100vh - 16px);
        border-radius: 14px;
        padding: 12px;
    }
    .video-titulo { font-size: .86rem; }
}

@media (min-width: 1600px) {
    .video-caixa { max-width: 1060px; padding: 20px; }
    .video-titulo { font-size: 1.05rem; }
    .video-faixa-titulo { font-size: 1.08rem; }
}

/* ---------- IMPRESSÃO ---------- */
@media print {
    .video-faixa, .video-modal { display: none !important; }
}
/* ============================================================
   VÍDEO — elemento alvo do player e aviso de retomada
   ============================================================ */

/* Div que a IFrame API substitui pelo iframe */
.video-alvo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Aviso "Retomando de 2:31" */
.video-retomar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--wa-accent-soft);
    border: 1px solid var(--wa-accent-border);
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--wa-text);
}
.video-retomar[hidden] { display: none !important; }

.video-retomar-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--wa-accent-border);
    color: var(--wa-accent);
    font-family: inherit;
    font-size: .72rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.video-retomar-btn:hover {
    background: var(--wa-accent);
    border-color: var(--wa-accent);
    color: #fff;
}

/* ============================================================
   PAGINAÇÃO E FILTROS DA HOME
   ============================================================ */

/* ---------- chips de filtro ativo ---------- */
.filtros-ativos {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: center; gap: 8px;
    margin-top: 16px;
}

.filtro-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--wa-accent-soft);
    border: 1px solid var(--wa-accent-border);
    color: var(--wa-text);
    font-size: .78rem;
    padding: 4px 5px 4px 12px;
    border-radius: 999px;
}
.filtro-chip strong { color: var(--wa-accent); font-weight: 700; }

.filtro-x {
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--wa-surface);
    color: var(--wa-text-muted);
    font-size: .6rem;
    text-decoration: none;
}
.filtro-x:hover { background: var(--wa-accent); color: #fff; text-decoration: none; }

.filtro-limpar { font-size: .76rem; font-weight: 700; color: var(--wa-text-muted); }
.filtro-limpar:hover { color: var(--wa-accent); }

/* ---------- bloco de paginação ---------- */
.paginacao-artigos {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--wa-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.paginacao-artigos[hidden] { display: none !important; }

.paginacao-resumo {
    margin: 0;
    font-size: .78rem;
    color: var(--wa-text-muted);
    text-align: center;
}
.paginacao-resumo strong { color: var(--wa-text); font-weight: 700; }

.paginacao-botoes {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 5px;
}

.pag-num, .pag-seta {
    min-width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 8px;
    background: var(--wa-surface);
    border: 1px solid var(--wa-border);
    border-radius: 9px;
    color: var(--wa-text-soft);
    font-size: .8rem; font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pag-num:hover, .pag-seta:hover {
    background: var(--wa-accent-soft);
    border-color: var(--wa-accent-border);
    color: var(--wa-accent);
    text-decoration: none;
}
.pag-num.atual {
    background: var(--wa-accent);
    border-color: var(--wa-accent);
    color: #fff;
    font-weight: 800;
    cursor: default;
}
.pag-seta { font-size: 1.05rem; }
.pag-seta.desativado { opacity: .35; pointer-events: none; }

.pag-reticencias {
    min-width: 22px;
    text-align: center;
    color: var(--wa-text-muted);
    font-size: .8rem;
}

.paginacao-total { margin: 0; font-size: .72rem; color: var(--wa-text-muted); }

/* ---------- item "Ver todos" e categoria ativa no menu ---------- */
.submenu-todos { font-weight: 700; }
.submenu-todos .submenu-marca { opacity: 1; }

.menu-grupo.categoria-ativa > .menu-categoria {
    background: var(--wa-accent-soft);
    color: var(--wa-accent);
}

/* ---------- responsivo ---------- */
@media (max-width: 700px) {
    .pag-num, .pag-seta { min-width: 30px; height: 30px; font-size: .74rem; padding: 0 5px; }
    .paginacao-artigos { gap: 10px; margin-top: 20px; }
    .paginacao-resumo { font-size: .72rem; }
}
@media (min-width: 1600px) {
    .pag-num, .pag-seta { min-width: 40px; height: 40px; font-size: .88rem; }
}
@media print {
    .paginacao-artigos, .filtros-ativos { display: none !important; }
}