/* ============================================================
   SALA DE NOTÍCIAS - Estilo principal (responsivo)
   As CORES vêm de variáveis definidas dinamicamente pelo admin
   (ver bloco <style> no cabeçalho, gerado por layout.php).
   ============================================================ */

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font, 'Segoe UI', system-ui, sans-serif);
  background: var(--bg, #f4f7f4);
  color: var(--text, #14211a);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link, #12592f); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }

/* ---------------- Cabeçalho ---------------- */
.topbar {
  background: var(--header-bg, #12592f);
  color: var(--header-text, #fff);
}
.topbar__inner { display: flex; align-items: center; gap: 18px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--header-text); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand__logo { height: var(--logo-h, 56px); width: auto; max-width: 340px; object-fit: contain; }

/* Logotipo montado no editor (ícone + linhas de texto) */
.logoart { display: flex; align-items: center; gap: 12px; }
.logoart__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.logoart__icon--photo img { width: 100%; height: 100%; display: block; }
.logoart__lines { display: flex; flex-direction: column; justify-content: center; line-height: 1.06; }
.logoart__line { display: block; white-space: nowrap; }
.brand__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent, #37c871); color: #04170c; font-weight: 900; font-size: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.brand__name { font-size: 22px; letter-spacing: .3px; line-height: 1.05; }
.brand__name small { display: block; font-size: 11px; font-weight: 600; opacity: .8; letter-spacing: 2px; text-transform: uppercase; }
.topbar__spacer { flex: 1; }
.topbar__now { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.topbar__date { color: var(--header-text); font-weight: 700; font-size: 15px; white-space: nowrap; opacity: .95; }
.topbar__time { color: var(--header-text); font-weight: 600; font-size: 13px; opacity: .8; font-variant-numeric: tabular-nums; letter-spacing: .5px; }

.searchbox { display: flex; align-items: center; background: rgba(255,255,255,.15); border-radius: 999px; padding: 4px 4px 4px 14px; }
.searchbox input { border: 0; background: transparent; color: #fff; padding: 8px; width: 190px; outline: none; }
.searchbox input::placeholder { color: rgba(255,255,255,.7); }
.searchbox button { border: 0; background: var(--accent); color: #04170c; width: 36px; height: 36px; border-radius: 999px; cursor: pointer; font-size: 15px; }

.hamburger { display: none; background: transparent; border: 0; color: var(--header-text); font-size: 26px; cursor: pointer; padding: 4px 8px; }

/* ---- Editor-chefe no cabeçalho (opcional) ---- */
/* Quando a foto está ativa, a busca vai para a esquerda e desce até a linha do menu. */
.topbar__inner.has-editor { align-items: flex-start; padding-bottom: 10px; }
.topbar__inner.has-editor .brand,
.topbar__inner.has-editor .hamburger { align-self: center; }
/* No modo editor a busca desce; a data/hora acompanha, na mesma linha da busca. */
.topbar__inner.has-editor .topbar__now { align-self: flex-end; margin-bottom: 5px; }
/* A busca fica logo ao lado da foto, alinhada embaixo (junto à linha do menu). */
.searchbox--low { align-self: flex-end; margin-right: 18px; }

.editorchip { display: flex; align-items: center; gap: 11px; background: transparent; border: 0; padding: 0;
  cursor: pointer; color: var(--header-text); font-family: inherit; }
.editorchip img { width: var(--editor-h, 84px); height: var(--editor-h, 84px); border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.28); transition: transform .25s ease; }
.editorchip:hover img { transform: scale(1.06); }
.editorchip__txt { text-align: left; line-height: 1.15; }
.editorchip__txt strong { display: block; font-size: 14px; }
.editorchip__txt small { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: 1.2px; }

/* Modal do editor-chefe */
.emodal { position: fixed; inset: 0; z-index: 210; background: rgba(0,0,0,.82); display: flex;
  align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .25s; }
.emodal.open { opacity: 1; visibility: visible; }
.emodal__box { background: var(--surface); border-radius: 16px; max-width: 620px; width: 100%;
  position: relative; overflow: hidden; max-height: 90vh; overflow-y: auto; }
/* Foto inteira, sem cortar o topo (rosto) */
.emodal__img { width: 100%; max-height: 58vh; object-fit: contain; display: block; background: #0f1a14; }
.emodal__body { padding: 22px 24px 26px; }
.emodal__body h3 { margin: 0 0 6px; font-size: 22px; }
.emodal__role { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.emodal__body p { margin: 0; color: var(--muted); line-height: 1.75; white-space: pre-line; }
.emodal__close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }

/* ---------------- Menu ---------------- */
.mainnav { background: var(--primary-dark, #12592f); border-top: 1px solid rgba(255,255,255,.12); }
.mainnav__list { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.mainnav__list a {
  display: block; color: var(--header-text, #fff); padding: 13px 16px; font-size: 14.5px; font-weight: 600;
  border-bottom: 3px solid transparent;
}
.mainnav__list a:hover { background: rgba(255,255,255,.08); text-decoration: none; border-bottom-color: var(--accent); }
.mainnav__list a.is-active { border-bottom-color: var(--accent); }

/* ---------------- Faixa de publicidade / destaque ---------------- */
.strip-ad { background: #e9edea; padding: 18px 0; text-align: center; color: #88948c; }
.strip-ad small { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #9aa79f; margin-bottom: 6px; }
.strip-ad__inner { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
.strip-ad__inner img { max-width: 100%; height: auto; border-radius: 6px; }
.strip-ad__inner .adticker { flex: 1 1 100%; }
.strip-ad__ad { display: flex; justify-content: center; align-items: center; flex: 1 1 auto; min-width: 0; }

/* ---- Texto animado (faixa tipo "letreiro") ---- */
.adticker { width: 100%; overflow: hidden; border-radius: 8px; padding: 12px 0;
  font-weight: 700; font-size: 15px; background: var(--primary); color: #fff; }
/* O texto começa fora da barra (o padding-left de 100% empurra para a borda
   direita) e atravessa até sair do outro lado — sempre da direita p/ a esquerda,
   ou o contrário, independente do tamanho do texto. */
.adticker__track { display: inline-block; white-space: nowrap; padding-left: 100%; will-change: transform; }
.adticker__track span { padding-right: 48px; }
.adticker--left  .adticker__track { animation: adticker-left  var(--tspeed, 18s) linear infinite; }
.adticker--right .adticker__track { animation: adticker-right var(--tspeed, 18s) linear infinite; }
@keyframes adticker-left  { from { transform: translateX(0); }     to { transform: translateX(-100%); } }
@keyframes adticker-right { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.adticker:hover .adticker__track { animation-play-state: paused; }

/* Mensagens alternando (aparecendo / subindo) */
.adticker--fade, .adticker--slide { position: relative; min-height: 46px; }
.adticker__msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 14px; opacity: 0; transition: opacity .5s ease, transform .5s ease; }
.adticker--fade .adticker__msg.is-active { opacity: 1; }
.adticker--slide .adticker__msg { transform: translateY(100%); }
.adticker--slide .adticker__msg.is-active { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .adticker__track { animation: none; }
}

/* ---------------- Grid da home ---------------- */
.section-title { display: flex; align-items: center; gap: 12px; margin: 30px 0 16px; }
.section-title h2 { font-size: 20px; margin: 0; position: relative; padding-left: 14px; }
.section-title h2::before { content:""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 5px; border-radius: 3px; background: var(--primary); }
.section-title .line { flex: 1; height: 1px; background: #dde5df; }

.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 8px; align-items: stretch; }
/* Coluna da direita = lista vertical de manchetes (miniatura + título).
   Os itens se distribuem para a BASE alinhar com o card de destaque à esquerda,
   sem cortar nem esticar nenhuma foto. */
.hero-side { display: grid; grid-template-columns: 1fr; gap: 14px; align-content: space-between; }
.hero-side .card--row { grid-template-columns: 96px 1fr; }

/* ---------------- Card de notícia ---------------- */
.card { background: var(--surface, #fff); border-radius: var(--radius, 14px); overflow: hidden; }
.card--flat { background: transparent; }
.card__img { aspect-ratio: 16/10; background: #eef2ef; overflow: hidden; display: block; }
/* A foto aparece INTEIRA (sem corte), ajustada dentro de uma área de tamanho controlado */
.card__img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .5s ease; }
/* Card de destaque: área um pouco mais larga (16:9) */
.card--hero .card__img { aspect-ratio: 16/9; }
/* Miniatura quadrada do card em linha continua recortada (fica mais uniforme) */
.card--row .card__img { aspect-ratio: 1/1; }
.card--row .card__img img { object-fit: cover; }
/* Capa de reserva (verde) para notícias sem foto */
.card__img--ph { aspect-ratio: 16/10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.card__img--ph:hover { text-decoration: none; }
.card__ph-mark { width: 54px; height: 54px; border-radius: 13px; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 24px; letter-spacing: 1px; }
.card__ph-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; opacity: .92; padding: 0 14px; text-align: center; }
.card--row .card__ph-mark { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
.card--row .card__ph-label { display: none; }
.card:hover .card__img img { transform: scale(1.05); }
.card__body { padding: 14px 4px 6px; }
.card__cat { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.card__title { font-size: 17px; font-weight: 800; line-height: 1.25; margin: 0 0 8px; color: var(--text); }
.card--hero .card__title { font-size: 30px; }
.card--hero .card__excerpt { font-size: 15.5px; color: var(--muted); }
.card__title a { color: inherit; }
.card__title a:hover { color: var(--primary); text-decoration: none; }
.card__excerpt { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.card__meta { font-size: 12.5px; color: var(--muted); }

.card--sm { display: grid; grid-template-columns: 1fr; gap: 0; }
.card--row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.card--row .card__img { aspect-ratio: 1/1; border-radius: 10px; }
.card--row .card__title { font-size: 15px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ---------------- Layout com barra lateral ---------------- */
.with-aside { display: grid; grid-template-columns: 1fr 320px; gap: 34px; margin-top: 20px; align-items: start; }
.aside__box { background: var(--surface); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; }
.aside__box h3 { margin: 0 0 14px; font-size: 15px; text-transform: uppercase; letter-spacing: .6px; color: var(--primary); }
.ranklist { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.ranklist li { counter-increment: r; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #e2e9e4; }
.ranklist li:last-child { border-bottom: 0; }
.ranklist li::before { content: counter(r); font-weight: 900; font-size: 20px; color: var(--accent); }
.ranklist a { font-weight: 700; font-size: 14.5px; color: var(--text); }

/* ---------------- Artigo ---------------- */
.article { background: var(--surface); border-radius: var(--radius); padding: 30px; max-width: 820px; margin: 22px auto; }
.article__cat { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; }
.article h1 { font-size: 34px; line-height: 1.18; margin: 10px 0 12px; }
.article .sub { font-size: 19px; color: var(--muted); margin: 0 0 18px; }
.article__meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; border-top: 1px solid #e5ece7; border-bottom: 1px solid #e5ece7; padding: 12px 0; margin-bottom: 22px; }
.article__cover { border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.article__content { font-size: 17.5px; line-height: 1.75; }
.article__content p { margin: 0 0 20px; }
.article__content img { border-radius: 10px; margin: 10px 0; }
.article__content h2 { font-size: 24px; margin: 30px 0 12px; }
.article__content blockquote { border-left: 4px solid var(--accent); margin: 20px 0; padding: 6px 18px; color: var(--muted); font-style: italic; }

/* Galeria de fotos da notícia (miniaturas que abrem grandes) */
.news-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 28px 0 6px; }
.news-gallery__item { position: relative; display: block; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden; background: #e6ede8; }
.news-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-gallery__item:hover img { transform: scale(1.08); }
.news-gallery__zoom { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; background: rgba(13,61,34,.28); opacity: 0; transition: opacity .25s; }
.news-gallery__item:hover .news-gallery__zoom { opacity: 1; }

/* Lightbox (visualização em tela cheia) */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .25s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; box-shadow: 0 10px 50px rgba(0,0,0,.5); }
.lightbox__close { position: absolute; top: 16px; right: 22px; font-size: 34px; color: #fff; background: transparent; border: 0; cursor: pointer; line-height: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; color: #fff; background: rgba(255,255,255,.12); border: 0; cursor: pointer; width: 56px; height: 66px; border-radius: 10px; }
.lightbox__nav--prev { left: 16px; } .lightbox__nav--next { right: 16px; }
.lightbox__nav:hover { background: rgba(255,255,255,.26); }
@media (max-width: 600px) { .lightbox__nav { width: 44px; height: 54px; font-size: 30px; } }

/* ---------------- Áudio / Vídeo ---------------- */
.media-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.media-card__cover { aspect-ratio: 16/9; background: #cfe0d5 center/cover no-repeat; position: relative; }
.media-card__cover .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 46px; color: #fff; background: rgba(0,0,0,.25); }
.media-card__body { padding: 16px; }
.media-card__body h3 { margin: 0 0 6px; font-size: 17px; }
.media-card__body p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.media-card audio { width: 100%; }
.ratio-16x9 { position: relative; aspect-ratio: 16/9; }
.ratio-16x9 iframe, .ratio-16x9 video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------------- Rádio Web (player fixo) ---------------- */
.radiobar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--footer-bg, #0d3d22); color: var(--footer-text, #e7f3ec);
  box-shadow: 0 -8px 24px rgba(0,0,0,.28);
  transform: translateY(0); transition: transform .3s ease;
}
.radiobar.hidden { transform: translateY(110%); }
.radiobar__inner { display: flex; align-items: center; gap: 16px; padding: 10px 16px; max-width: 1180px; margin: 0 auto; }
.radiobar__btn { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: #04170c; font-size: 18px; flex: none; }
.radiobar__title { font-weight: 800; font-size: 14px; }
.radiobar__title small { display: block; font-weight: 500; opacity: .8; font-size: 12px; }
.radiobar__eq { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.radiobar__eq span { width: 4px; background: var(--accent); height: 6px; border-radius: 2px; }
.radiobar.playing .radiobar__eq span { animation: eq .9s ease-in-out infinite; }
.radiobar__eq span:nth-child(2){ animation-delay:.15s } .radiobar__eq span:nth-child(3){ animation-delay:.3s } .radiobar__eq span:nth-child(4){ animation-delay:.45s }
@keyframes eq { 0%,100%{height:6px} 50%{height:22px} }
.radiobar__spacer { flex: 1; }
.radiobar__vol { width: 90px; }
.radiobar__close { background: transparent; border: 0; color: inherit; font-size: 20px; cursor: pointer; opacity: .7; }

/* ---------------- Rodapé ---------------- */
.footer { background: var(--footer-bg, #0d3d22); color: var(--footer-text, #e7f3ec); margin-top: 40px; padding: 36px 0 90px; }
.footer a { color: var(--footer-text); }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand:hover { text-decoration: none; }
.footer__mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #04170c; font-weight: 900; font-size: 18px; }
.footer__logo { height: var(--logo-h, 56px); max-height: 70px; width: auto; object-fit: contain; }
.footer__name { font-size: 20px; font-weight: 800; line-height: 1.1; }
.footer__name small { display: block; font-size: 12px; font-weight: 500; opacity: .75; margin-top: 2px; }
.footer__social { display: flex; gap: 8px; }
.footer__social a { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); align-items: center; justify-content: center; font-size: 16px; }
.footer__social a:hover { background: var(--accent); color: #04170c; text-decoration: none; }
.footer__cats { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); }
.footer__cats a { font-size: 13.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.08); }
.footer__cats a:hover { background: var(--accent); color: #04170c; text-decoration: none; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; font-size: 13px; opacity: .9; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer__links a { opacity: .85; }
.footer__links a:hover { opacity: 1; }
.footer__credit { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; font-size: 12.5px; opacity: .7; }

/* ---------------- Botões / utilidades ---------------- */
.btn { display: inline-block; background: var(--primary); color: #fff; padding: 11px 20px; border-radius: 10px; font-weight: 700; border: 0; cursor: pointer; }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn--ghost { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.pagebanner { background: var(--primary-dark); color: #fff; padding: 30px 0; }
.pagebanner h1 { margin: 0; font-size: 30px; }
.pagebanner p { margin: 6px 0 0; opacity: .85; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.tag-badge { background: var(--accent); color: #04170c; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }

/* ---------------- Responsivo ---------------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .with-aside { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .brand__logo { max-height: 46px; }
  .editorchip img { width: 52px; height: 52px; border-width: 2px; }
  .editorchip__txt { display: none; }
  .topbar__inner.has-editor { align-items: center; padding-bottom: 0; }
  .hamburger { display: block; }
  .topbar__date { font-size: 12px; white-space: nowrap; }
  .topbar__time { font-size: 11px; }
  .searchbox { display: none; }
  .mainnav { display: none; }
  .mainnav.open { display: block; }
  .mainnav__list { flex-direction: column; }
  .mainnav__list a { border-bottom: 1px solid rgba(255,255,255,.1); }
  .grid-3, .grid-2, .hero-side { grid-template-columns: 1fr; }
  .card--hero .card__title { font-size: 24px; }
  .article { padding: 20px; }
  .article h1 { font-size: 26px; }
  .footer__grid { grid-template-columns: 1fr; }
  .radiobar__vol { display: none; }
}
