/* 71-espacos.css — RDM-010: banners nos espaços (inc/espacos.php; conteúdo em wp-admin → Banners).
 * Arte grande sem texto + texto em HTML por cima (véu escuro), selo "Publicidade" só em parceiro, botão dourado; o banner inteiro
 * é clicável (link esticado do botão). Variação membro × visitante pelo html[data-plano] (script do <head>), sem pulo.
 * Formatos: cabecalho = faixa fina de ponta a ponta ACIMA do menu (todas as páginas); horizontal = 970×250 / 16:7 no celular;
 * retangulo = 300×250 (lateral); card = célula da grade de posts (mesmo tamanho dos cards).
 * O banner do cabeçalho é primeira tela: mudou → regerar o crítico (node scripts/gerar-critico.mjs). */

/* ── banner (base) ── */
.re-banner {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
    width: 100%;
    margin: 28px auto;
    border: 1px solid var(--re-borda);
    border-radius: 14px;
    background: var(--re-noite);
    box-shadow: var(--re-sombra);
    color: var(--re-perg);
    text-align: left;
}
.re-banner picture {
    display: contents;
}
.re-banner__arte,
.re-banner::after {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}
.re-banner__arte {
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.re-banner::after {
    content: "";
    z-index: -1;
    background: linear-gradient(0deg, var(--re-veu) 0%, var(--re-veu) 42%, var(--re-veu-0) 100%);
}
.re-banner__selo {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--re-selo);
    color: var(--re-ouro-claro);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.6;
    text-transform: uppercase;
}
.re-banner .re-var {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    box-sizing: border-box;
    padding: 14px 16px;
}
.re-banner__kicker,
.re-banner__titulo,
.re-banner__texto {
    margin: 0;
}
.re-banner__kicker {
    color: var(--re-ouro-claro);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.re-banner__titulo {
    color: var(--re-perg);
    font-size: clamp(1.05rem, 0.9rem + 0.9vw, 1.6rem);
    font-weight: 800;
    line-height: 1.15;
}
.re-banner__texto {
    color: var(--re-perg);
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.88;
}
.re-banner__botao {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-top: 6px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--re-ouro-claro), var(--re-ouro));
    color: var(--re-noite);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.re-banner__botao::before { /* o banner inteiro leva ao destino */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
}
.re-banner:hover .re-banner__botao,
.re-banner__botao:focus-visible {
    /* realce por troca de fundo, NUNCA filter/transform no link: filter vira referência de posição do ::before esticado,
       ele encolhe para o tamanho do botão, o mouse sai, o hover acaba e volta — o cursor piscava sem parar (r58.57) */
    background: linear-gradient(180deg, var(--re-ouro-hover), var(--re-ouro-claro));
    color: var(--re-noite);
}
.re-banner__botao:focus-visible {
    outline: 2px solid var(--re-ouro-claro);
    outline-offset: 3px;
}

/* ── cabeçalho: faixa FINA de ponta a ponta, ACIMA do menu (todas as páginas; rola junto, o menu fixo continua igual).
   Desktop: chamada, título, frase e botão numa linha só; celular: título e botão. ── */
.re-topo {
    width: 100%;
}
.re-banner--cabecalho {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: none;
    min-height: 56px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--re-borda);
    border-radius: 0;
    box-shadow: none;
}
.re-banner--cabecalho::after {
    background: linear-gradient(90deg, var(--re-veu) 0%, var(--re-veu) 55%, var(--re-veu-0) 100%);
}
.re-banner--cabecalho .re-banner__arte {
    object-position: right 40%;
}
.re-banner--cabecalho .re-var {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    padding: 6px 12px 6px 16px;
}
.re-banner--cabecalho .re-banner__kicker,
.re-banner--cabecalho .re-banner__texto {
    display: none;
}
.re-banner--cabecalho .re-banner__titulo {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.25;
}
.re-banner--cabecalho .re-banner__botao {
    flex: none;
    min-height: 34px;
    margin: 0;
    padding: 0 14px;
    font-size: 0.8rem;
}
.re-banner--cabecalho .re-banner__botao::before {
    border-radius: 0;
}
.re-banner--cabecalho .re-banner__selo { /* "Publicidade" (só parceiro), discreto no canto */
    top: 3px;
    right: auto;
    left: 6px;
    padding: 0 6px;
    font-size: 0.5rem;
    line-height: 1.7;
}
@media (min-width: 768px) {
    .re-banner--cabecalho {
        min-height: 52px;
    }
    .re-banner--cabecalho .re-var {
        justify-content: center;
        gap: 14px;
        padding: 6px 24px;
    }
    .re-banner--cabecalho .re-banner__kicker {
        display: block;
        flex: none;
    }
    .re-banner--cabecalho .re-banner__titulo {
        display: block;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 0.98rem;
    }
    .re-banner--cabecalho .re-banner__selo {
        top: 50%;
        left: 12px;
        transform: translateY(-50%);
        font-size: 0.55rem;
    }
}
@media (min-width: 1200px) {
    .re-banner--cabecalho .re-banner__texto {
        display: block;
        overflow: hidden;
        min-width: 0;
        max-width: 46ch;
        font-size: 0.84rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

/* ── horizontal: 16:7 no celular (o texto longo some), 970×250 a partir do tablet com o texto à esquerda ── */
.re-banner--horizontal {
    max-width: 970px;
    aspect-ratio: 16 / 7; /* é o mínimo: em tela estreita o banner cresce com o texto (sem min-height: 0) */
}
@media (max-width: 767px) {
    .re-banner--horizontal .re-banner__texto {
        display: none;
    }
}
@media (min-width: 768px) {
    .re-banner--horizontal {
        aspect-ratio: 970 / 250;
        justify-content: center;
    }
    .re-banner--horizontal::after {
        background: linear-gradient(90deg, var(--re-veu) 0%, var(--re-veu) 36%, var(--re-veu-0) 78%);
    }
    .re-banner--horizontal .re-var {
        max-width: 58%;
        padding: 18px 28px;
    }
}

/* ── retângulo (barra lateral): 300×250 ── */
.re-banner--retangulo {
    max-width: 336px;
    aspect-ratio: 6 / 5;
}
.re-banner--retangulo .re-banner__titulo {
    font-size: 1.1rem;
}
.re-banner--retangulo .re-banner__texto {
    font-size: 0.82rem;
}

/* ── card: uma CÉLULA da grade de posts (home, busca), do tamanho dos cards vizinhos ── */
.re-banner--card {
    max-width: none;
    height: 100%;
    min-height: 220px;
    margin: 0;
    aspect-ratio: auto;
}
@media (min-width: 768px) {
    .re-banner--card {
        min-height: 320px;
    }
}
.re-linha-parceiro { /* anúncio de parceiro (formato livre) na grade: linha inteira */
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

/* rodapé: respiro antes do footer */
.re-rodape .re-banner {
    margin: 32px auto 24px;
}

/* ── membro × visitante (html[data-plano], script do <head>). No FIM do arquivo e com duas classes: vence o display das
   variações (.re-banner .re-var) pela ordem, sem !important ── */
.re-var.re-var--membro {
    display: none;
}
html:is([data-plano="1"], [data-plano="2"], [data-plano="3"]) .re-var.re-var--membro {
    display: flex;
}
html:is([data-plano="1"], [data-plano="2"], [data-plano="3"]) .re-var.re-var--visitante {
    display: none;
}
