/* Noticias no estilo Tres Barras (24/11/2026): grade de cartoes (home e /noticias), cartao inteiro clicavel
   e leitura de uma noticia com a imagem ao lado do texto.
   Marcacao: .blog-featured (home) e body.noticias .blog (/noticias) > .items-row.row > .col-lg-4 > .card > article.item */

/* ---------- grade unica (as linhas de 3 colunas do tema viram celulas da grade) ---------- */
.blog-featured,
body.noticias .blog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.blog-featured > *,
body.noticias .blog > * { grid-column: 1 / -1; }

.blog-featured .items-row,
body.noticias .blog .items-row { display: contents; }
/* o clearfix do tema gera celulas vazias na grade */
.blog-featured .items-row::before, .blog-featured .items-row::after,
body.noticias .blog .items-row::before, body.noticias .blog .items-row::after { content: none !important; display: none !important; }

.blog-featured .items-row > [class*="col-"],
body.noticias .blog .items-row > [class*="col-"] {
  grid-column: auto;
  flex: none;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 !important;
}

@media (min-width: 1200px) { body.noticias .blog { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 576px) and (max-width: 991px) {
  .blog-featured, body.noticias .blog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 575px) {
  .blog-featured, body.noticias .blog { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

.blog-featured > .item-title h1 { margin: 0 0 4px; }

/* ---------- cartao ---------- */
.blog-featured .card,
body.noticias .blog .card {
  position: relative;
  height: 100%;
  min-height: 0;   /* o tema define .card { min-height: 625px } */
  border: 1px solid #eadde1;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(38, 50, 58, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.blog-featured .card:hover,
body.noticias .blog .card:hover { box-shadow: 0 14px 30px rgba(130, 40, 63, 0.16); transform: translateY(-3px); }

.blog-featured .card > article.item,
body.noticias .blog .card > article.item {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  margin: 0;
}

/* imagem com proporcao fixa */
.blog-featured .item-image,
body.noticias .blog .item-image { float: none !important; margin: 0; overflow: hidden; }
.blog-featured .item-image img,
body.noticias .blog .item-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s;
}
.blog-featured .card:hover .item-image img,
body.noticias .blog .card:hover .item-image img { transform: scale(1.04); }

.blog-featured .card-body,
body.noticias .blog .card-body {
  position: static;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  padding: 16px 18px 18px;
}

/* titulo (sem a barra lateral antiga) */
.blog-featured .card .article-title,
.blog-featured .card .page-header,
body.noticias .blog .card .article-title,
body.noticias .blog .card .page-header { position: static; margin: 0; padding: 0; border: 0; }
.blog-featured .card h2,
body.noticias .blog .card h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 800;
  color: #26323a;
}
.blog-featured .card h2 a,
body.noticias .blog .card h2 a { color: inherit; text-decoration: none; }
.blog-featured .card:hover h2 a,
body.noticias .blog .card:hover h2 a { color: #82283f; }

/* cartao inteiro clicavel: o link do titulo cobre o cartao */
.blog-featured .card h2 a::after,
body.noticias .blog .card h2 a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; }

/* categoria e data em etiquetas (os links delas continuam clicaveis por cima) */
.blog-featured .card dl.article-info,
body.noticias .blog .card dl.article-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.blog-featured .card dl.article-info dd,
body.noticias .blog .card dl.article-info dd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3ecee;
  color: #44525d;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
}
.blog-featured .card dl.article-info dd i,
body.noticias .blog .card dl.article-info dd i { color: #82283f; }
.blog-featured .card dl.article-info a,
body.noticias .blog .card dl.article-info a { position: relative; z-index: 2; pointer-events: auto; color: #44525d; text-decoration: none; }
.blog-featured .card dl.article-info a:hover,
body.noticias .blog .card dl.article-info a:hover { color: #82283f; text-decoration: underline; }
/* acessos: linha discreta, sem etiqueta */
.blog-featured .card dl.article-info dd.hits,
body.noticias .blog .card dl.article-info dd.hits { padding: 0; background: transparent; color: #7a8791; font-weight: 500; }

.blog-featured .card .article-intro-text,
body.noticias .blog .card .article-intro-text { color: #44525d; font-size: 0.93rem; line-height: 1.5; }
.blog-featured .card .article-intro-text:empty,
body.noticias .blog .card .article-intro-text:empty { display: none; }

/* botao "Leia mais" no pe do cartao */
.blog-featured .card p.readmore,
body.noticias .blog .card p.readmore { margin: auto 0 0; padding-top: 14px; }
.blog-featured .card p.readmore a,
body.noticias .blog .card p.readmore a { position: relative; z-index: 2; }

/* paginacao e contador ocupam a grade inteira e ficam centralizados */
.blog-featured > .mt-3, body.noticias .blog > .mt-3 { display: flex; flex-direction: column; align-items: center; }

/* ---------- leitura de uma noticia: imagem a esquerda (50%) com o texto contornando ---------- */
body.view-article .item-page .entry-image.full-image {
  float: left;
  width: 50%;
  max-width: 50%;
  margin: 4px 28px 18px 0 !important;
}
body.view-article .item-page .entry-image.full-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(38, 50, 58, 0.12);
}
/* o que vem depois do texto nao fica ao lado da imagem */
body.view-article .item-page > ul.pager,
body.view-article .item-page > dl.article-info:last-of-type,
body.view-article .item-page .attachmentsContainer { clear: both; }

@media (max-width: 767px) {
  body.view-article .item-page .entry-image.full-image { float: none; width: 100%; max-width: 100%; margin: 0 0 18px 0 !important; }
}

/* resumos com HTML mal fechado engolem o "Acessos" e o botao: garante espaco entre eles */
.blog-featured .card .article-intro-text dl.article-info,
body.noticias .blog .card .article-intro-text dl.article-info { margin: 0 0 6px; }
.blog-featured .card .article-intro-text p.readmore,
body.noticias .blog .card .article-intro-text p.readmore { margin: 0; padding-top: 14px; }

/* titulo do cartao sem a barra lateral do tema (regra reforcada: na home o tema usa seletor mais forte) */
html body .blog-featured .card .article-title.item-title,
html body.noticias .blog .card .article-title.item-title,
html body .blog-featured .card .item-title .page-header,
html body.noticias .blog .card .item-title .page-header {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* ---------- subcategorias em pilulas, antes dos artigos ---------- */
html body .blog .cat-children {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
}
html body .blog .cat-children > h3 {
  flex: 0 0 100%;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7a86;
}
html body .blog .cat-children > div { margin: 0; padding: 0; width: auto; }
html body .blog .cat-children > div > h3.page-header,
html body .blog .cat-children > div > h3.item-title {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 1rem;
  line-height: 1.2;
}
html body .blog .cat-children > div > h3 > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1.5px solid #82283f;
  border-radius: 999px;
  background: #fff;
  color: #82283f;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
}
html body .blog .cat-children > div > h3 > a:hover,
html body .blog .cat-children > div > h3 > a:focus-visible {
  background: #82283f;
  color: #fff;
  box-shadow: 0 6px 16px rgba(130, 40, 63, 0.25);
  transform: translateY(-1px);
  outline: 0;
}
html body .blog .cat-children .badge { margin-left: 2px; padding: 3px 9px; border-radius: 999px; background: #f3ecee; color: #82283f; font-size: 0.75rem; }

/* na home o titulo do cartao e so .item-title (sem .article-title): sem a barra lateral do tema */
html body .blog-featured .card .item-title,
html body.noticias .blog .card .item-title {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}
