/*
Theme Name: Tatu News
Theme URI: https://tatunews.com/
Author: Tatu News
Description: Tema editorial do Tatu News — portal de notícias de Mato Grosso do Sul. Home com carrossel de manchetes, blocos por editoria, últimas notícias com carregamento progressivo, seleção da redação, espaços publicitários em widgets, modo escuro e layout responsivo.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tatunews
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Tokens — identidade Tatu News (azul-marinho + laranja do logotipo)
   Fontes: Lora (títulos/texto), Epilogue (interface), Poppins (rótulos), Anton (marca)
   ========================================================================== */
:root {
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --ui: 'Epilogue', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --label: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --brandfont: 'Anton', Impact, 'Arial Narrow', sans-serif;

  --bg: #ffffff;
  --surface: #f5f6f8;
  --text: #202020;
  --muted: #626b76;
  --navy: #1b2238;          /* azul-marinho do logo: rótulos, números, filetes */
  --brand: #f07d2a;         /* laranja do logo: detalhes decorativos */
  --accent: #e0691a;        /* laranja para textos grandes */
  --primary: #b8530f;       /* laranja escuro: links e itens ativos (contraste AA) */
  --btn: #1b2238;
  --btn-hover: #2d3a5e;
  --logo-navy: #1b2238;
  --border: #e4e7ec;
  --border-strong: #d3d8df;
  --shadow: 0 6px 24px rgba(27, 34, 56, .12);
  --overlay: rgba(14, 18, 32, .55);

  --container: 1240px;
  --gutter: 24px;
  --nav-h: 54px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #10151f;
  --surface: #182030;
  --text: #e9edf3;
  --muted: #9aa6b6;
  --navy: #c9d3ea;
  --brand: #f07d2a;
  --accent: #f59a52;
  --primary: #f6a565;
  --btn: #33406a;
  --btn-hover: #405086;
  --logo-navy: #e9edf3;
  --border: #243046;
  --border-strong: #2f3d58;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  --overlay: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.screen-reader-text, .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--btn); color: #fff; padding: 10px 14px; font-size: 13px; }
.skip-link:focus { left: 16px; }
.icon { width: 1em; height: 1em; flex: none; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding-top: 6px; padding-bottom: 6px; }
.topbar__date { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--text); }
.topbar__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.topbar__edition { font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }

.social { display: flex; align-items: center; gap: 15px; }
.social a { display: inline-flex; color: var(--navy); font-size: 15px; transition: color .2s, transform .2s; }
.social a:hover { color: var(--primary); transform: translateY(-1px); }

/* ---------- Cabeçalho ---------- */
.masthead { background: var(--bg); }
.masthead .container { display: flex; align-items: center; gap: 26px; min-height: 118px; }

.brand { display: inline-flex; flex-direction: column; flex: none; }
.brand .custom-logo-link { display: inline-block; }
.brand .custom-logo { max-height: 62px; width: auto; }
:root[data-theme="dark"] .brand .custom-logo-link { background: #fff; padding: 6px 10px; border-radius: 4px; }
.logo-word { font-family: var(--brandfont); font-size: 50px; line-height: .92; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; text-shadow: 1px 2px 0 rgba(0, 0, 0, .12); }
.logo-word b { font-weight: 400; color: var(--logo-navy); }
.logo-word span { color: var(--brand); }
.brand__slogan { display: block; font-size: 9px; letter-spacing: .3px; color: var(--muted); margin-top: 6px; white-space: nowrap; }

.masthead__divider { width: 1px; height: 58px; background: var(--border-strong); flex: none; }
.masthead__tag { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.masthead__tag strong { color: var(--text); font-weight: 600; }

.masthead__ctas { margin-left: auto; display: flex; gap: 40px; }
.cta { display: flex; align-items: center; gap: 14px; }
.cta__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); color: var(--primary); display: grid; place-items: center; font-size: 17px; transition: background-color .2s, color .2s; }
.cta:hover .cta__icon { background: var(--brand); color: #fff; }
.cta__title { display: block; font-size: 13px; font-weight: 600; color: var(--navy); }
.cta__sub { display: block; font-size: 11px; color: var(--muted); }
.cta:hover .cta__title { color: var(--primary); }

.masthead__mobile { display: none; margin-left: auto; gap: 4px; }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; background: none; border: 0; border-radius: 50%; color: var(--navy); font-size: 19px; transition: background-color .2s; }
.iconbtn:hover { background: var(--surface); }

/* ---------- Menu principal ---------- */
.mainnav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border-strong); transition: box-shadow .2s; }
.admin-bar .mainnav { top: 32px; }
.mainnav.is-stuck { box-shadow: 0 4px 16px rgba(27, 34, 56, .08); }
.mainnav .container { display: flex; align-items: center; gap: 12px; min-height: var(--nav-h); }
.mainnav__menu { display: flex; align-items: center; flex-wrap: wrap; list-style: none; margin: 0 0 0 -9px; padding: 0; }
.mainnav__menu li { position: relative; }
.mainnav__menu > li > a { display: flex; align-items: center; gap: 4px; padding: 16px 9px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; transition: color .2s; }
.mainnav__menu > li > a::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px; background: var(--brand); transform: scaleX(0); transition: transform .2s; }
.mainnav__menu > li > a:hover, .mainnav__menu > li:focus-within > a,
.mainnav__menu > .current-menu-item > a, .mainnav__menu > .current-menu-ancestor > a,
.mainnav__menu > .current-category-ancestor > a, .mainnav__menu > .current-post-ancestor > a,
.mainnav__menu > .current-post-parent > a { color: var(--primary); }
.mainnav__menu > .current-menu-item > a::after, .mainnav__menu > .current-menu-ancestor > a::after,
.mainnav__menu > .current-post-ancestor > a::after, .mainnav__menu > .current-post-parent > a::after { transform: scaleX(1); }
.mainnav__menu .menu-item-has-children > a .caret { font-size: 10px; opacity: .7; }
.mainnav__menu .sub-menu { position: absolute; top: 100%; left: 0; z-index: 60; min-width: 220px; margin: 0; padding: 6px 0; list-style: none; background: var(--bg); border: 1px solid var(--border); border-top: 2px solid var(--brand); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.mainnav__menu li:hover > .sub-menu, .mainnav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mainnav__menu .sub-menu a { display: block; padding: 8px 16px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color .15s, color .15s; }
.mainnav__menu .sub-menu a:hover, .mainnav__menu .sub-menu .current-menu-item > a { background: var(--surface); color: var(--primary); }
.mainnav .iconbtn { margin-left: auto; }

/* ---------- Em pauta ---------- */
.pauta { border-bottom: 1px solid var(--border); }
.pauta .container { display: flex; align-items: center; gap: 28px; min-height: 46px; }
.pauta__label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--label); font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--navy); white-space: nowrap; min-width: 92px; }
.pauta__label::before { content: ''; width: 5px; height: 5px; background: var(--brand); }
.pauta__tags { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; list-style: none; margin: 0; padding: 0; }
.pauta__tags::-webkit-scrollbar { display: none; }
.pauta__tags a { font-size: 11px; color: var(--text); white-space: nowrap; transition: color .2s; }
.pauta__tags a:hover { color: var(--primary); }
.pauta__tags .sub-menu { display: none; }
.pauta__phrase { margin-left: auto; font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- Publicidade ---------- */
.pub { text-align: center; margin: 18px auto 22px; }
.pub__tag { display: block; font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pub__item { max-width: 728px; margin: 0 auto; }
.pub__item img { margin: 0 auto; }
.pub--box .pub__item { max-width: 300px; }
.pub-ph { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 728px; min-height: 90px; margin: 0 auto; padding: 16px 28px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--brand); text-align: left; transition: border-color .2s; }
.pub-ph:hover { border-left-color: var(--navy); }
.pub-ph__title { display: block; font-family: var(--label); font-weight: 700; font-size: 23px; line-height: 1.1; letter-spacing: -.2px; color: var(--navy); }
.pub-ph__sub { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.pub-ph__spec { font-size: 10.5px; color: var(--muted); }
.pub-ph__spec b { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--primary); }
.pub--box .pub-ph { flex-direction: column; justify-content: center; text-align: center; max-width: 300px; min-height: 250px; border-left-width: 1px; border-top: 5px solid var(--brand); }

/* ---------- Peças comuns ---------- */
.kicker { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--navy); margin-bottom: 9px; transition: color .2s; }
a.kicker:hover { color: var(--primary); }
.meta { display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: 11px; color: var(--muted); }
.title { font-family: var(--serif); font-weight: 700; color: var(--text); line-height: 1.28; }
.title a { transition: color .2s; }
.title a:hover { color: var(--primary); }
.excerpt { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }

.thumb { position: relative; display: block; overflow: hidden; background: var(--surface); aspect-ratio: var(--ar, 16 / 10); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
a.thumb:hover img, .card:hover .thumb img, .item:hover .thumb img { transform: scale(1.04); }
.thumb--empty { display: grid; place-items: center; color: var(--border-strong); }
.thumb--empty .logo-word { font-size: 28px; opacity: .35; text-shadow: none; }

.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--primary); white-space: nowrap; }
.link-arrow .icon { font-size: 13px; transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(3px); }

.btn-outline { display: inline-flex; align-items: center; gap: 10px; padding: 13px 30px; background: var(--bg); color: var(--primary); border: 1px solid var(--primary); border-radius: 3px; font-size: 12px; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s; }
.btn-outline:hover { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn-outline[aria-busy="true"] { opacity: .6; pointer-events: none; }

.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; margin: 0 0 22px; border-top: 2px solid var(--border-strong); border-bottom: 1px solid var(--border); }
.sec-head h2 { display: flex; align-items: center; gap: 8px; font-family: var(--label); font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--text); }
.sec-head h2::before { content: ''; width: 6px; height: 6px; background: var(--brand); flex: none; }
.sec-head .link-arrow { font-size: 10.5px; }
.aside-title { display: flex; align-items: center; gap: 8px; font-family: var(--label); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 14px; }

/* ---------- Home: destaque ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 286px; margin-top: 4px; }
.home-top__main { padding-right: 26px; border-right: 1px solid var(--border); min-width: 0; }
.home-top__aside { padding-left: 26px; min-width: 0; }

.slider { position: relative; }
.slide { display: none; grid-template-columns: minmax(0, .78fr) minmax(0, 1fr); gap: 30px; align-items: center; }
.slide.is-active { display: grid; animation: fadeIn .5s ease; }
.slide__title { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 2.5vw, 35px); line-height: 1.2; letter-spacing: -1px; margin: 0; }
.slide__title a:hover { color: var(--primary); }
.slide .excerpt { margin: 16px 0 18px; }
.slide .thumb { --ar: 434 / 277; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slider__controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 16px; }
.slider__btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; background: none; border: 0; font-size: 12px; color: var(--primary); }
.slider__btn .icon { font-size: 13px; }
.slider__btn--next { justify-self: end; }
.slider__btn--prev { justify-self: start; }
.dots { display: flex; gap: 2px; }
.dots button { position: relative; width: 16px; height: 16px; padding: 0; background: none; border: 0; }
.dots button::after { content: ''; position: absolute; inset: 4.5px; border-radius: 50%; background: var(--border-strong); transition: background-color .2s, transform .2s; }
.dots button.is-active::after { background: var(--brand); transform: scale(1.15); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.home-top .grid-3 { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border); }
.card .thumb { margin-bottom: 14px; --ar: 245 / 147; }
.card .title { font-size: 16.5px; margin: 0 0 8px; }
.card .excerpt { font-size: 12px; }

.foco__lead .title { font-size: 20px; line-height: 1.25; margin: 0 0 12px; }
.foco__lead .thumb { --ar: 215 / 123; margin-bottom: 10px; }
.foco__item { border-top: 1px solid var(--border); padding: 12px 0; }
.foco__lead + .foco__item { margin-top: 14px; }
.foco__item .title { font-size: 14.5px; line-height: 1.3; margin: 0 0 6px; }

/* Grades com divisória vertical (gap + linha no meio do gap: colunas de mesma largura) */
.block-3, .grid-3--divided { --col-gap: 44px; column-gap: var(--col-gap); }
.block-3 > *, .grid-3--divided > * { position: relative; min-width: 0; }
.block-3 > * + *::before, .grid-3--divided > * + *::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--col-gap) / -2); border-left: 1px solid var(--border); }

.home-block { margin-top: 40px; }
.block-3 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
.block-3 .card--lead .thumb { --ar: 410 / 220; }
.block-3 .card--lead .title { font-size: 22px; line-height: 1.25; }
.block-3 .card--lead .excerpt { font-size: 12.5px; }
.block-3 .card .thumb { --ar: 255 / 147; }

.band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 44px; margin: 44px 0 24px; padding: 26px 34px; background: var(--surface); border-left: 4px solid var(--brand); }
.band__num { font-family: var(--brandfont); font-size: 54px; line-height: 1; color: var(--navy); letter-spacing: 1px; }
.band__title { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -.5px; margin: 0 0 4px; }
.band__text { font-size: 12px; color: var(--muted); margin: 0; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; margin-top: 10px; }
.two-col > * { min-width: 0; }

.item { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 26px; padding: 18px 0 20px; border-bottom: 1px solid var(--border); }
.list > .item:first-child { padding-top: 0; }
.item .title { font-size: 20px; line-height: 1.3; margin: 0 0 12px; }
.item .thumb { --ar: 219 / 130; }
.item--wide { grid-template-columns: minmax(0, 1fr) 270px; }
.item--wide .thumb { --ar: 270 / 106; }
.item--wide .title { font-size: 19px; }
.load-more { text-align: center; margin: 28px 0 8px; }

.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px; padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.rank__n { font-family: var(--serif); font-size: 24px; line-height: 1.05; color: var(--accent); }
.rank .title { font-size: 15.5px; line-height: 1.32; margin: 0 0 4px; }

.promo { background: var(--surface); padding: 26px 24px; margin-top: 10px; border-top: 3px solid var(--navy); }
.promo .kicker { font-size: 9.5px; color: var(--primary); }
.promo__title { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.25; margin: 2px 0 14px; }
.promo p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0 0 18px; }
.aside-sticky { position: sticky; top: calc(var(--nav-h) + 20px); }
.admin-bar .aside-sticky { top: calc(var(--nav-h) + 52px); }

.home-bottom { margin-top: 36px; }
.home-bottom .card .thumb { --ar: 16 / 7.2; }

/* ---------- Tatu TV (player do YouTube) ---------- */
.tv { margin-top: 48px; padding: 48px 0; background: #121829; color: #fff; border-top: 4px solid var(--brand); }
:root[data-theme="dark"] .tv { background: #0b0f18; border-bottom: 1px solid var(--border); }
.tv + .container .home-block { margin-top: 44px; }
.tv__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.tv__player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 4px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.tv__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv__play { position: absolute; inset: 0; display: block; color: #fff; }
.tv__play img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .3s; }
.tv__play::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .65)); pointer-events: none; }
.tv__play:hover img { transform: scale(1.03); filter: brightness(.9); }
.tv__btn { position: absolute; left: 50%; top: 50%; z-index: 2; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; transform: translate(-50%, -50%); box-shadow: 0 8px 30px rgba(0, 0, 0, .45); transition: transform .2s ease, background-color .2s; }
.tv__btn svg { width: 32px; height: 32px; margin-left: 4px; }
.tv__btn::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(240, 125, 42, .55); animation: tvPulso 2.2s ease-out infinite; }
.tv__play:hover .tv__btn, .tv__play:focus-visible .tv__btn { transform: translate(-50%, -50%) scale(1.08); background: #ff8f3f; }
@keyframes tvPulso { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.tv__legenda { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 2; font-family: var(--serif); font-size: 16px; font-weight: 600; line-height: 1.35; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.tv__poster { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, #2a3557, #121829 70%); }
.tv__poster .logo-word { font-size: 72px; }
.tv__poster .logo-word b, .tv__titulo b { color: #fff; }

.tv__badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px; background: rgba(240, 125, 42, .14); color: #f6a565; font-family: var(--label); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.tv__badge i { width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 7px; border-color: transparent transparent transparent currentColor; }
.tv__badge--live { background: rgba(229, 57, 53, .16); color: #ff8a80; }
.tv__badge--live i { width: 8px; height: 8px; border: 0; border-radius: 50%; background: #ff3b30; animation: tvVivo 1.4s ease-in-out infinite; }
@keyframes tvVivo { 50% { opacity: .3; } }
.tv__titulo { display: block; margin: 16px 0 12px; font-size: 64px; line-height: .95; text-shadow: none; }
.tv__texto { margin: 0; max-width: 400px; font-size: 14px; line-height: 1.7; color: #c3cad8; }
.tv__acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 26px; }
.tv__cta { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 3px; background: var(--brand); color: #1b2238; font-size: 13px; font-weight: 700; transition: background-color .2s; }
.tv__cta .icon { font-size: 18px; }
.tv__cta:hover { background: #ff8f3f; }
.tv__link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .35); padding-bottom: 2px; transition: border-color .2s; }
.tv__link:hover { border-color: #fff; }

/* ---------- Arquivo / busca ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0 18px; border-bottom: 1px solid var(--border); }
.page-head h1 { font-family: var(--serif); font-weight: 700; font-size: 28px; letter-spacing: -.5px; }
.page-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .icon { font-size: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; padding: 0; list-style: none; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 11.5px; font-weight: 500; transition: border-color .2s, color .2s; }
.chips a:hover { border-color: var(--brand); color: var(--primary); }
.chips small { color: var(--muted); font-size: 10px; }

.list { margin-top: 6px; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.empty strong { display: block; font-family: var(--serif); font-size: 22px; color: var(--text); margin-bottom: 6px; }
.empty .search-inline { max-width: 520px; margin: 20px auto 0; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); font-size: 12px; color: var(--text); transition: border-color .2s, color .2s; }
.pagination a.page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page-numbers.current { background: var(--btn); border-color: var(--btn); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; }
.pagination .prev, .pagination .next { color: var(--primary); border-color: var(--primary); padding: 0 14px; }

/* ---------- Matéria ---------- */
.post { display: grid; grid-template-columns: 186px minmax(0, 1fr); gap: 56px; margin-top: 44px; }
.post__aside { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.admin-bar .post__aside { top: calc(var(--nav-h) + 56px); }
.post__info { font-size: 11px; line-height: 1.6; color: var(--text); }
.post__info a { color: var(--primary); }
.post__info a:hover { text-decoration: underline; }
.post__info time { margin-left: 8px; }
.share { display: grid; gap: 8px; margin-top: 26px; }
.share a, .share button { display: grid; place-items: center; height: 48px; background: var(--btn); color: #fff; border: 0; font-size: 17px; transition: background-color .2s; }
.share a:hover, .share button:hover { background: var(--btn-hover); }
.share .share--wa { background: #1f9e4f; }
.share .share--wa:hover { background: #188442; }

.post__title { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 3.3vw, 42px); line-height: 1.16; letter-spacing: -1px; margin: 0 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.post__fina { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 28px; max-width: 760px; }
.post__figure { margin: 0 0 30px; }
.post__figure .thumb { --ar: 16 / 9.6; }
.post__figure figcaption { font-size: 10.5px; color: var(--muted); margin-top: 14px; }

.entry-content { max-width: 660px; font-family: var(--serif); font-size: 17.5px; line-height: 1.78; color: var(--text); overflow-wrap: break-word; }
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content > div > p, .entry-content p { margin: 0 0 1.15em; }
.entry-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.entry-content strong { font-weight: 700; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--serif); line-height: 1.3; margin: 1.6em 0 .6em; }
.entry-content h2 { font-size: 1.35em; }
.entry-content h3 { font-size: 1.18em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--brand); font-style: italic; color: var(--text); }
.entry-content img { height: auto; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption, .entry-content .wp-caption-text { font-family: var(--ui); font-size: 11px; color: var(--muted); margin-top: 8px; }
.entry-content iframe, .entry-content video, .entry-content embed { max-width: 100%; }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.entry-content table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 14px; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.entry-content .pub { margin: 26px 0; font-family: var(--ui); font-size: 15px; line-height: 1.6; }
.entry-content .pub a { text-decoration: none; color: inherit; }
.alignleft { float: left; margin: 6px 22px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 22px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-block-embed__wrapper { position: relative; }

.post-tags { max-width: 660px; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.post-tags a { padding: 5px 11px; background: var(--surface); font-size: 11px; color: var(--muted); }
.post-tags a:hover { color: var(--primary); }

.post-nav { max-width: 680px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--border); }
.post-nav a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start; }
.post-nav a.next { grid-template-columns: minmax(0, 1fr) 72px; text-align: right; }
.post-nav a.next .thumb { order: 2; }
.post-nav .thumb { --ar: 1; }
.post-nav small { display: block; font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.post-nav strong { font-family: var(--serif); font-size: 15.5px; line-height: 1.3; }
.post-nav a:hover strong { color: var(--primary); }

.related { margin-top: 56px; }
.related__head { padding: 16px 0; margin-bottom: 24px; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--border); }
.related__head h2 { font-family: var(--label); font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.related .card .thumb { --ar: 225 / 160; }
.related .card .title { font-size: 19px; }

/* Páginas institucionais */
.page-body { max-width: 760px; padding: 34px 0 10px; }
.page-body .entry-content { max-width: none; }

.not-found { padding: 80px 0; text-align: center; }
.not-found h1 { font-family: var(--serif); font-size: 34px; margin-bottom: 10px; }
.not-found p { color: var(--muted); margin: 0 0 24px; }
.search-inline { display: flex; gap: 10px; }
.not-found .search-inline { max-width: 520px; margin: 0 auto 28px; }
.search-inline input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.search-inline button { padding: 12px 20px; border: 0; background: var(--btn); color: #fff; font-size: 13px; font-weight: 600; }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: 64px; background: var(--surface); border-top: 4px solid var(--navy); }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.3fr; gap: 32px; padding: 40px 0 36px; }
.footer__desc { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 16px 0 18px; }
.site-footer h4 { font-family: var(--label); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .sub-menu { display: none; }
.site-footer li a { font-size: 12px; transition: color .2s; }
.site-footer li a:hover { color: var(--primary); }
.footer__phrase { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0; }
.footer__label { font-size: 9.5px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin: 16px 0 3px; }
.footer__contact { display: block; font-size: 12px; color: var(--muted); }
.footer__contact:hover { color: var(--primary); }
.site-footer .link-arrow { margin-top: 22px; }
.site-footer .logo-word { font-size: 40px; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 20px 0 72px; border-top: 1px solid var(--border-strong); font-size: 11px; color: var(--muted); }
.site-footer .footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer .footer__legal a { font-size: 11px; }
.footer__legal a:hover { color: var(--primary); }
.footer__bottom .link-arrow { font-size: 11px; }

/* ---------- Flutuantes ---------- */
.theme-toggle { position: fixed; left: 12px; bottom: 16px; z-index: 60; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--navy); font-size: 15px; box-shadow: var(--shadow); transition: transform .2s; }
.theme-toggle:hover { transform: rotate(-15deg); }
.wa-float { position: fixed; right: 20px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 12px; font-weight: 600; box-shadow: var(--shadow); transition: transform .2s; }
.wa-float .icon { font-size: 19px; color: #1faa53; }
.wa-float:hover { transform: translateY(-2px); }

/* ---------- Busca (sobreposição) ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 100000; background: var(--overlay); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-box { background: var(--bg); padding: 34px 0; box-shadow: var(--shadow); transform: translateY(-12px); transition: transform .25s; }
.search-overlay.is-open .search-box { transform: none; }
.search-form { display: flex; align-items: center; gap: 12px; }
.search-form input { flex: 1; min-width: 0; padding: 10px 2px; background: transparent; border: 0; border-bottom: 2px solid var(--border-strong); color: var(--text); font-family: var(--serif); font-size: 24px; outline: none; transition: border-color .2s; }
.search-form input:focus { border-bottom-color: var(--brand); }
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-form button[type="submit"] { padding: 13px 26px; background: var(--btn); color: #fff; border: 0; border-radius: 3px; font-size: 13px; font-weight: 600; }
.search-form button[type="submit"]:hover { background: var(--btn-hover); }
.search-box__hint { font-size: 11px; color: var(--muted); margin: 10px 0 0; }

/* ---------- Menu lateral (mobile) ---------- */
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 100001; width: min(320px, 86vw); padding: 18px 22px 28px; overflow-y: auto; background: var(--bg); box-shadow: var(--shadow); transform: translateX(-100%); visibility: hidden; transition: transform .28s ease, visibility .28s; }
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.drawer__head .logo-word { font-size: 34px; }
.drawer__head .custom-logo { max-height: 42px; }
.drawer__head .brand__slogan { display: none; }
.drawer__menu, .drawer__menu .sub-menu { list-style: none; margin: 0; padding: 0; }
.drawer__menu { margin-top: 8px; }
.drawer__menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); font-family: var(--serif); font-size: 18px; font-weight: 600; }
.drawer__menu .sub-menu a { padding: 9px 0 9px 16px; font-family: var(--ui); font-size: 14px; font-weight: 500; color: var(--muted); }
.drawer__menu .current-menu-item > a { color: var(--primary); }
.drawer__foot { margin-top: 24px; display: grid; gap: 14px; font-size: 12px; color: var(--muted); }
.backdrop { position: fixed; inset: 0; z-index: 100000; background: var(--overlay); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.backdrop.is-open { opacity: 1; visibility: visible; }
body.no-scroll { overflow: hidden; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1180px) {
  .masthead__ctas { gap: 24px; }
  .cta:nth-child(2) { display: none; }
  .mainnav__menu > li > a { padding: 16px 7px; font-size: 12.5px; }
}

@media (max-width: 980px) {
  :root { --nav-h: 0px; }
  .masthead { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); }
  .admin-bar .masthead { top: 46px; }
  .masthead .container { min-height: 72px; }
  .masthead__divider, .masthead__tag, .masthead__ctas { display: none; }
  .masthead__mobile { display: flex; }
  .mainnav { display: none; }
  .logo-word { font-size: 38px; }
  .brand .custom-logo { max-height: 46px; }
  .brand__slogan { display: none; }
  .pauta__phrase { display: none; }

  .home-top, .two-col { grid-template-columns: 1fr; }
  .home-top__main { padding-right: 0; border-right: 0; }
  .home-top__aside { padding-left: 0; margin-top: 30px; padding-top: 18px; border-top: 2px solid var(--border-strong); }
  .foco { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
  .foco__lead { grid-row: span 3; }
  .foco__lead + .foco__item { margin-top: 0; }
  .foco__item:nth-child(2) { border-top: 0; padding-top: 0; }

  .block-3 { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .block-3 > .card--lead { grid-column: 1 / -1; }
  .block-3 > :nth-child(2)::before { display: none; }
  .two-col aside { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
  .two-col aside > .rank-wrap { grid-column: 1 / -1; }
  .aside-sticky { position: static; }

  .post { grid-template-columns: 1fr; gap: 0; margin-top: 28px; }
  .post__aside { position: static; order: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; margin-bottom: 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .post__main { display: contents; }
  .post__header { order: 1; }
  .post__rest { order: 3; min-width: 0; }
  .share { grid-auto-flow: column; margin-top: 0; }
  .share a, .share button { width: 44px; height: 40px; font-size: 15px; }

  .footer__grid { grid-template-columns: 1fr 1fr; }

  .tv { padding: 36px 0; }
  .tv__grid { grid-template-columns: 1fr; gap: 26px; }
  .tv__titulo { font-size: 50px; margin-top: 12px; }
  .tv__texto { max-width: 560px; }
}

@media (max-width: 782px) {
  .admin-bar .masthead { top: 0; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { font-size: 14px; }
  .topbar .container { min-height: 40px; }
  .topbar__edition { display: none; }
  .topbar__date { font-size: 10px; }
  .social { gap: 14px; }

  .slide { grid-template-columns: 1fr; gap: 16px; }
  .slide .thumb { order: -1; }
  .slide__title { font-size: 25px; letter-spacing: -.5px; }
  .slide .excerpt { margin: 10px 0 12px; }

  .grid-3, .block-3 { grid-template-columns: 1fr; gap: 0; }
  .grid-3 > *, .block-3 > * { padding: 0 0 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
  .grid-3 > *::before, .block-3 > *::before { display: none; }
  .grid-3 > *:last-child, .block-3 > *:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
  .card { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 0 14px; }
  .card .thumb { grid-column: 2; grid-row: 1 / span 4; margin: 0; --ar: 1 !important; align-self: start; }
  .card > :not(.thumb) { grid-column: 1; }
  .card .kicker { margin-bottom: 5px; }
  .card .title { font-size: 16px !important; }
  .card .excerpt { display: none; }
  .card--lead { display: block; }
  .card--lead .thumb { margin-bottom: 12px; --ar: 16 / 10 !important; }
  .card--lead .title { font-size: 21px !important; }
  .card--lead .excerpt { display: block; }

  .foco { display: block; }
  .two-col aside { display: block; }
  .promo { margin-top: 24px; }

  .item, .item--wide { grid-template-columns: minmax(0, 1fr) 110px; gap: 14px; padding: 16px 0; }
  .item .thumb { --ar: 1; }
  .item .title { font-size: 16px; margin-bottom: 8px; }
  .item .excerpt { display: none; }

  .sec-head h2 { font-size: 16px; }
  .band { grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; padding: 20px; }
  .band__num { font-size: 42px; }
  .band__title { font-size: 19px; }
  .band .link-arrow { grid-column: 1 / -1; margin-top: 8px; }
  .pub-ph { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 18px; }
  .pub-ph__title { font-size: 19px; }

  .page-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-head h1 { font-size: 24px; }
  .entry-content { font-size: 17px; }
  .alignleft, .alignright { float: none; margin: 1em 0; }
  .post-nav { grid-template-columns: 1fr; gap: 20px; }

  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__bottom { flex-direction: column-reverse; align-items: flex-start; padding-bottom: 76px; }

  .tv { margin-top: 32px; padding: 0 0 30px; }
  .tv .container { padding: 0; }
  .tv__player { border-radius: 0; box-shadow: none; }
  .tv__info { padding: 0 var(--gutter); }
  .tv__btn { width: 64px; height: 64px; }
  .tv__btn svg { width: 26px; height: 26px; }
  .tv__legenda { font-size: 14px; left: 14px; right: 14px; bottom: 12px; }
  .tv__titulo { font-size: 44px; }
  .tv__poster .logo-word { font-size: 52px; }

  .wa-float { padding: 11px; right: 14px; }
  .wa-float span { display: none; }
  .search-form input { font-size: 19px; }
  .search-form button[type="submit"] { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .mainnav, .pauta, .pub, .share, .post-nav, .related, .site-footer, .theme-toggle, .wa-float, .masthead__mobile, .search-overlay, .drawer, .backdrop { display: none !important; }
  .post { display: block; }
}
