/*
 * Visual novo (v2): lista da categoria de notícias, página da notícia e página Sobre (functions/noticias-v2.php).
 * Carregado depois do assets/css/empresa-v2.css, de onde vêm os cartões (.ea-card), os botões, os comentários e a grade
 * com a lateral alinhada à busca do cabeçalho. Tudo começa com body.ea-v2 .ea-noticias. Medidas em px (a fonte base do
 * tema é pequena). Tokens --ea-* do global-v2.css (claro e escuro).
 */

/* ---------------------------------------------------------------- grade
   Até 760px uma coluna, na ordem do HTML: conteúdo e depois a lateral (anúncio e Categorias). */
@media (max-width: 760px) {
    body.ea-v2 .ea-noticias.ea-empresa--pc .ea-emp-principal,
    body.ea-v2 .ea-noticias.ea-empresa--pc .ea-emp-lado {
        display: flex;
    }
}

body.ea-v2 .ea-noticias .ea-emp-grade {
    gap: var(--ea-esp-4);
}

/* ---------------------------------------------------------------- cabeçalho do conteúdo */
body.ea-v2 .ea-noticias .ea-not-cabeca {
    border-top: 4px solid var(--ea-cor2);
}

body.ea-v2 .ea-noticias .ea-not-titulo {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    font: 800 clamp(26px, 3.4vw, 38px)/1.12 var(--ea-font-sans);
    letter-spacing: -.03em;
    color: var(--ea-texto-forte);
    text-transform: none;
    overflow-wrap: anywhere;
}

body.ea-v2 .ea-noticias .ea-not-titulo::before,
body.ea-v2 .ea-noticias .ea-not-titulo::after {
    content: none;
}

body.ea-v2 .ea-noticias .ea-not-titulo:focus {
    outline: none;
}

body.ea-v2 .ea-noticias .ea-not-cabeca > p.ea-suave,
body.ea-v2 .ea-noticias .ea-not-descricao {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-descricao p + p {
    margin-top: 8px;
}

body.ea-v2 .ea-noticias .ea-not-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

body.ea-v2 .ea-noticias .ea-not-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

body.ea-v2 .ea-noticias .ea-not-destaque {
    margin: 0 0 18px;
}

body.ea-v2 .ea-noticias .ea-not-destaque img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ---------------------------------------------------------------- texto da notícia e da Sobre (HTML do painel) */
body.ea-v2 .ea-noticias .ea-not-texto {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ea-texto);
}

body.ea-v2 .ea-noticias .ea-not-texto::after {
    content: "";
    display: table;
    clear: both;
}

body.ea-v2 .ea-noticias .ea-card .ea-not-texto p {
    margin: 0 0 16px;
}

body.ea-v2 .ea-noticias .ea-not-texto h2,
body.ea-v2 .ea-noticias .ea-not-texto h3,
body.ea-v2 .ea-noticias .ea-not-texto h4 {
    margin: 26px 0 10px;
    padding: 0;
    border: 0;
    font-family: var(--ea-font-sans);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--ea-texto-forte);
    text-transform: none;
}

body.ea-v2 .ea-noticias .ea-not-texto h2 { font-size: 23px; }
body.ea-v2 .ea-noticias .ea-not-texto h3 { font-size: 19px; }
body.ea-v2 .ea-noticias .ea-not-texto h4 { font-size: 17px; }

body.ea-v2 .ea-noticias .ea-not-texto h2::before,
body.ea-v2 .ea-noticias .ea-not-texto h2::after,
body.ea-v2 .ea-noticias .ea-not-texto h3::before,
body.ea-v2 .ea-noticias .ea-not-texto h3::after {
    content: none;
}

/* listas do texto (notícia, Sobre a cidade, texto da categoria) */
body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) :is(ul, ol) {
    margin: 0 0 16px;
    padding-left: 1.6em;
    line-height: 1.6;
}

body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) ul { list-style: disc outside; }
body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) ol { list-style: decimal outside; }
body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) li ul { list-style-type: circle; }

body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) :is(ul, ol) > li {
    margin: 0 0 8px;
    padding-left: 4px;
}

body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) :is(ul, ol) > li:last-child {
    margin-bottom: 0;
}

body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) li::marker {
    color: var(--ea-marca-laranja);
}

body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) ol > li::marker {
    font-weight: 700;
}

body.ea-v2 .ea-noticias :is(.ea-not-texto, .ea-not-texto-categoria) li > :is(ul, ol) {
    margin: 8px 0 0;
}
body.ea-v2 .ea-noticias .ea-not-texto img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

body.ea-v2 .ea-noticias .ea-not-texto figure,
body.ea-v2 .ea-noticias .ea-not-texto .wp-caption {
    max-width: 100%;
    margin: 0 0 16px;
}

body.ea-v2 .ea-noticias .ea-not-texto figcaption,
body.ea-v2 .ea-noticias .ea-not-texto .wp-caption-text {
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-texto .alignleft {
    float: left;
    margin: 4px 20px 12px 0;
}

body.ea-v2 .ea-noticias .ea-not-texto .alignright {
    float: right;
    margin: 4px 0 12px 20px;
}

body.ea-v2 .ea-noticias .ea-not-texto .aligncenter {
    display: block;
    margin-inline: auto;
}

body.ea-v2 .ea-noticias .ea-not-texto blockquote {
    margin: 0 0 16px;
    padding: 4px 0 4px 16px;
    border-left: 4px solid var(--ea-cor2);
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-texto table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

/* Anúncios do plugin dentro do texto (WP QUADS): no computador o primeiro fica ao lado da introdução, como o plugin
   já faz; no celular todos ficam centralizados entre os parágrafos. */
body.ea-v2 .ea-noticias .ea-not-texto .quads-location {
    max-width: 100%;
    overflow: hidden;
}

body.ea-v2 .ea-noticias .ea-not-anuncio {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
}

body.ea-v2 .ea-noticias .ea-not-anuncio--fim {
    margin-top: 18px;
}

/* Sobre a cidade: subtítulos detectados no texto e atalhos */
body.ea-v2 .ea-noticias .ea-not-texto h3.ea-not-secao {
    clear: both;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--ea-emp-linha);
    font-size: 21px;
    scroll-margin-top: 90px;
}

body.ea-v2 .ea-noticias .ea-not-topicos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

body.ea-v2 .ea-noticias .ea-not-topicos a {
    padding: 6px 13px;
    border-radius: var(--ea-raio-pill);
    background: var(--ea-emp-tom);
    color: var(--ea-cor1-texto);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

body.ea-v2 .ea-noticias .ea-not-topicos a:hover {
    text-decoration: underline;
}

body.ea-v2 .ea-noticias [id] {
    scroll-margin-top: 90px;
}

/* ---------------------------------------------------------------- lista de notícias */
body.ea-v2 .ea-noticias .ea-not-lista {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

body.ea-v2 .ea-noticias .ea-not-item {
    display: grid;
    grid-template-columns: minmax(126px, 29%) minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    overflow: hidden;
    background: var(--ea-quase-branco);
    border: 1px solid var(--ea-emp-linha);
    border-radius: 12px;
}

body.ea-v2 .ea-noticias .ea-not-item__foto {
    display: block;
    align-self: stretch;
    min-height: 100%;
}

body.ea-v2 .ea-noticias .ea-not-item__foto img,
body.ea-v2 .ea-noticias .ea-not-item__sem-foto {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
}

body.ea-v2 .ea-noticias .ea-not-item__sem-foto {
    display: grid;
    place-items: center;
    background: var(--ea-emp-tom);
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-item__sem-foto .ea-ico {
    width: 30px;
    height: 30px;
}

body.ea-v2 .ea-noticias .ea-not-item__texto {
    min-width: 0;
    padding: 11px 16px;
}

body.ea-v2 .ea-noticias .ea-card .ea-not-item__meta {
    margin: 0 0 3px;
    font-size: 13px;
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-item__meta a {
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-item__titulo {
    margin: 0;
    padding: 0;
    border: 0;
    font: 700 17px/1.3 var(--ea-font-sans);
    text-transform: none;
}

body.ea-v2 .ea-noticias .ea-not-item__titulo::before,
body.ea-v2 .ea-noticias .ea-not-item__titulo::after {
    content: none;
}

body.ea-v2 .ea-noticias .ea-not-item__titulo a {
    color: var(--ea-texto-forte);
    text-decoration: none;
}

body.ea-v2 .ea-noticias .ea-not-item__titulo a:hover {
    text-decoration: underline;
}

body.ea-v2 .ea-noticias .ea-card .ea-not-item__resumo {
    margin: 4px 0 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ea-texto-suave);
}

/* Listas da Sobre: mais compactas, foto pequena e linhas separando */
body.ea-v2 .ea-noticias .ea-not-lista--compacta {
    gap: 0;
    margin-top: 6px;
}

body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 14px;
    padding: 11px 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--ea-emp-linha);
    border-radius: 0;
}

body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item__foto {
    align-self: center;
    min-height: 0;
}

body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item__foto img,
body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item__sem-foto {
    height: auto;
    border-radius: 9px;
}

body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item__texto {
    padding: 0;
}

body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item__titulo {
    font-size: 16px;
}

body.ea-v2 .ea-noticias .ea-not-anuncio--csa,
body.ea-v2 .ea-noticias .ea-not-anuncio--lista {
    margin: 4px 0;
}

body.ea-v2 .ea-noticias .ea-not-anuncio .ad_busca {
    margin: 0;
}

/* paginação compacta (a mesma da lista de empresas: functions/categoria-v2.php) */
body.ea-v2 .ea-noticias .ea-cat-paginacao {
    margin-top: 18px;
}

body.ea-v2 .ea-noticias .ea-cat-paginacao .navegacao-pagenavi ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.ea-v2 .ea-noticias .ea-cat-paginacao .navegacao-pagenavi li {
    margin: 0;
}

body.ea-v2 .ea-noticias .ea-cat-paginacao a,
body.ea-v2 .ea-noticias .ea-cat-paginacao span {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    padding: 4px 10px;
    border: 1px solid var(--ea-emp-linha);
    border-radius: 10px;
    background: var(--ea-superficie);
    color: var(--ea-cor1-texto);
    font-weight: 600;
    text-decoration: none;
}

body.ea-v2 .ea-noticias .ea-cat-paginacao a:hover {
    background: var(--ea-emp-tom);
}

body.ea-v2 .ea-noticias .ea-cat-paginacao span.on {
    border-color: transparent;
    background: var(--ea-cor1);
    color: var(--ea-texto-sobre-cor);
}

body.ea-v2 .ea-noticias .ea-cat-paginacao span.expand {
    border: 0;
    background: transparent;
    color: var(--ea-texto-suave);
}

/* ---------------------------------------------------------------- relacionados e autor */
body.ea-v2 .ea-noticias .ea-not-relacionados ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

body.ea-v2 .ea-noticias .ea-not-relacionados li {
    min-width: 0;
    margin: 0;
}

body.ea-v2 .ea-noticias .ea-not-relacionados a {
    display: grid;
    gap: 8px;
    color: var(--ea-texto-forte);
    text-decoration: none;
}

body.ea-v2 .ea-noticias .ea-not-relacionados a:hover strong {
    text-decoration: underline;
}

body.ea-v2 .ea-noticias .ea-not-rel__foto img,
body.ea-v2 .ea-noticias .ea-not-rel__foto .ea-not-item__sem-foto {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
}

body.ea-v2 .ea-noticias .ea-not-relacionados strong {
    font-size: 15px;
    line-height: 1.35;
}

body.ea-v2 .ea-noticias .ea-not-autor__perfil {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

body.ea-v2 .ea-noticias .ea-not-autor__foto {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

body.ea-v2 .ea-noticias .ea-not-autor strong {
    font-size: 16px;
}

body.ea-v2 .ea-noticias .ea-not-autor strong a {
    color: var(--ea-texto-forte);
    text-decoration: none;
}

body.ea-v2 .ea-noticias .ea-not-autor strong a:hover {
    text-decoration: underline;
}

body.ea-v2 .ea-noticias .ea-card .ea-not-autor__perfil p {
    margin-top: 4px;
    font-size: 15px;
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-tags {
    margin-top: 6px;
}

/* ---------------------------------------------------------------- lateral (widgets: anúncio e Categorias) */
body.ea-v2 .ea-noticias .ea-not-lado .widget {
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
}

body.ea-v2 .ea-noticias .ea-not-lado .advt_widget {
    max-width: 100%;
    overflow: hidden;
    text-align: center;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget:not(.advt_widget) {
    padding: clamp(16px, 3vw, 24px);
    background: var(--ea-superficie);
    border: 1px solid var(--ea-emp-linha);
    border-radius: var(--ea-emp-raio);
    box-shadow: var(--ea-sombra-card);
}

body.ea-v2 .ea-noticias .ea-not-lado .widget-title,
body.ea-v2 .ea-noticias .ea-not-lado .widget > h3 {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    background: none;
    font: 700 19.2px/1.25 var(--ea-font-sans);
    color: var(--ea-texto-forte);
    text-transform: none;
    text-align: left;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget-title::before,
body.ea-v2 .ea-noticias .ea-not-lado .widget-title::after,
body.ea-v2 .ea-noticias .ea-not-lado .widget > h3::before,
body.ea-v2 .ea-noticias .ea-not-lado .widget > h3::after {
    content: none;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li::before {
    content: none;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li + li,
body.ea-v2 .ea-noticias .ea-not-lado .widget li > ul > li:first-child {
    border-top: 1px solid var(--ea-emp-linha);
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li > ul {
    padding-left: 14px;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    color: var(--ea-cor1-texto);
    font-size: 15px;
    line-height: 1.35;
    text-decoration: none;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li a::after {
    content: "›";
    color: var(--ea-texto-suave);
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li a:hover {
    text-decoration: underline;
}

body.ea-v2 .ea-noticias .ea-not-lado .widget li.current-cat > a {
    font-weight: 700;
}

/* ---------------------------------------------------------------- celular e janela estreita */
@media (max-width: 760px) {
    body.ea-v2 .ea-noticias .ea-not-item {
        grid-template-columns: minmax(0, 1fr);
    }

    body.ea-v2 .ea-noticias .ea-not-item__foto img,
    body.ea-v2 .ea-noticias .ea-not-item__sem-foto {
        aspect-ratio: 2 / 1;
    }

    body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item__foto img,
    body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item__sem-foto {
        aspect-ratio: 16 / 9;
    }

    body.ea-v2 .ea-noticias .ea-not-texto {
        font-size: 16.5px;
    }

    /* anúncio do plugin: fora do lado do texto, centralizado */
    body.ea-v2 .ea-noticias .ea-not-texto .quads-location {
        float: none !important;
        margin: 0 auto 16px !important;
        text-align: center;
    }

    body.ea-v2 .ea-noticias .ea-not-texto .alignleft,
    body.ea-v2 .ea-noticias .ea-not-texto .alignright {
        float: none;
        display: block;
        margin: 0 auto 14px;
    }

    body.ea-v2 .ea-noticias .ea-not-acoes .ea-botao {
        flex: 1 1 auto;
    }
}

@media (max-width: 460px) {
    body.ea-v2 .ea-noticias .ea-not-relacionados ul {
        grid-template-columns: minmax(0, 1fr);
    }

    body.ea-v2 .ea-noticias .ea-not-lista--compacta .ea-not-item {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 12px;
    }
}
