/*
Theme Name: Portal Base
Theme URI: https://example.com/portal-base
Author: Junior Lima
Description: Tema base para portais de notícias, com 5 modelos prontos (Plantão, Revista, Impacto, Popular e Clean). Barra de urgente, colunistas, manchetes, blocos por editoria, vídeos, mais lidas, cores por editoria e espaços publicitários — tudo editável em Aparência > Personalizar.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portal-base
Tags: news, blog, custom-logo, custom-menu, featured-images, theme-options, two-columns, right-sidebar
*/

/* ==========================================================
   1. TOKENS (as cores reais vêm do Personalizar via :root inline)
   ========================================================== */
:root {
  --am-primary: #C8102E;
  --am-dark: #0E1B2C;
  --am-accent: #FFC400;
  --am-bg: #F3F4F6;
  --am-surface: #FFFFFF;
  --am-text: #111827;
  --am-muted: #6B7280;
  --am-line: #E5E7EB;
  --am-font-title: 'Archivo', system-ui, sans-serif;
  --am-font-body: 'Inter', system-ui, sans-serif;
  --am-font-article: 'Source Serif 4', Georgia, serif;
  --am-radius: 6px;
  --am-container: 1240px;
  --am-gap: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--am-bg);
  color: var(--am-text);
  font-family: var(--am-font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--am-primary); }
h1, h2, h3, h4, h5, h6 { font-family: var(--am-font-title); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
button { font: inherit; cursor: pointer; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; z-index: 1000; background: #fff; padding: 12px 16px; left: 8px; top: 8px; }

.am-container { width: 100%; max-width: var(--am-container); margin: 0 auto; padding: 0 16px; }

/* ==========================================================
   2. TOPO (barra fina)
   ========================================================== */
.am-topbar { background: var(--am-dark); color: rgba(255,255,255,.82); font-size: 13px; }
.am-topbar .am-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.am-topbar__left { display: flex; align-items: center; gap: 18px; white-space: nowrap; overflow: hidden; }
.am-topbar__date { display: inline-block; }
.am-topbar__date::first-letter { text-transform: uppercase; }
.am-topbar__city { display: inline-flex; align-items: center; gap: 6px; }
.am-topbar__city::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--am-accent); }
.am-topbar__menu { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.am-topbar__menu a:hover { color: #fff; }

.am-social { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.am-social a { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: inherit; transition: background .15s, color .15s; }
.am-social a:hover { background: var(--am-primary); color: #fff; }
.am-social svg { width: 15px; height: 15px; fill: currentColor; }

/* ==========================================================
   3. CABEÇALHO
   ========================================================== */
.am-header { background: var(--am-surface); border-bottom: 1px solid var(--am-line); }
.am-header .am-container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.am-header__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.am-header__brand .custom-logo { max-height: 72px; width: auto; }
.am-header__ad { flex: 1; display: flex; justify-content: flex-end; }
.am-header__ad img { max-height: 90px; width: auto; }

/* Wordmark quando não há logo enviada */
.am-wordmark { display: inline-flex; flex-direction: column; line-height: .9; font-family: var(--am-font-title); text-transform: uppercase; }
.am-wordmark__top { font-size: 38px; font-weight: 900; letter-spacing: -0.03em; color: var(--am-dark); }
.am-wordmark__bottom { align-self: flex-start; margin-top: 4px; padding: 3px 10px 2px; font-size: 17px; font-weight: 800; letter-spacing: .28em; color: #fff; background: var(--am-primary); border-radius: 2px; }
.am-wordmark__top b { color: var(--am-primary); }
.am-tagline { font-size: 13px; color: var(--am-muted); max-width: 220px; border-left: 2px solid var(--am-line); padding-left: 14px; }

.am-icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.am-icon-btn:hover { background: rgba(0,0,0,.06); }
.am-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ==========================================================
   4. NAVEGAÇÃO
   ========================================================== */
.am-nav { background: var(--am-primary); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.admin-bar .am-nav { top: 32px; }
.am-nav .am-container { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.am-nav__toggle { display: none; color: #fff; }
.am-nav__toggle:hover { background: rgba(255,255,255,.14); }
.am-nav__logo-mini { display: none; font-family: var(--am-font-title); font-weight: 900; text-transform: uppercase; font-size: 18px; letter-spacing: -0.02em; }
.am-menu { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; flex: 1; }
.am-menu > li { position: relative; }
.am-menu > li > a { display: flex; align-items: center; height: 48px; padding: 0 14px; font-family: var(--am-font-title); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.am-menu > li > a:hover,
.am-menu > li.current-menu-item > a,
.am-menu > li.current-category-ancestor > a { background: rgba(0,0,0,.18); color: #fff; }
.am-menu .menu-item-has-children > a::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.am-menu .sub-menu { position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: 8px 0; background: var(--am-surface); color: var(--am-text); border-top: 3px solid var(--am-dark); box-shadow: 0 12px 30px rgba(0,0,0,.18); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; z-index: 60; }
.am-menu li:hover > .sub-menu,
.am-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.am-menu .sub-menu a { display: block; padding: 9px 18px; font-size: 14px; font-weight: 600; }
.am-menu .sub-menu a:hover { background: var(--am-bg); }
.am-nav__search { color: #fff; }
.am-nav__search:hover { background: rgba(255,255,255,.14); }

/* Busca suspensa */
.am-searchbar { display: none; background: var(--am-dark); padding: 14px 0; }
.am-searchbar.is-open { display: block; }
.am-searchform { display: flex; gap: 8px; }
.am-searchform input[type="search"] { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border: 0; border-radius: var(--am-radius); font-size: 16px; }
.am-searchform button { height: 46px; padding: 0 22px; border: 0; border-radius: var(--am-radius); background: var(--am-primary); color: #fff; font-weight: 700; text-transform: uppercase; }

/* ==========================================================
   5. PLANTÃO / URGENTE (ticker)
   ========================================================== */
.am-ticker { background: var(--am-surface); border-bottom: 1px solid var(--am-line); }
.am-ticker .am-container { display: flex; align-items: center; gap: 14px; min-height: 44px; overflow: hidden; }
.am-ticker__label { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; background: var(--am-accent); color: var(--am-dark); font-family: var(--am-font-title); font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; border-radius: 3px; }
.am-ticker__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--am-primary); animation: am-pulse 1.2s infinite; }
.am-ticker__viewport { position: relative; flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
.am-ticker__track { display: flex; gap: 40px; width: max-content; animation: am-marquee var(--am-ticker-speed, 60s) linear infinite; }
.am-ticker:hover .am-ticker__track { animation-play-state: paused; }
.am-ticker__item { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.am-ticker__item time { color: var(--am-primary); font-weight: 800; font-size: 13px; }
@keyframes am-marquee { to { transform: translateX(-50%); } }
@keyframes am-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .am-ticker__track { animation: none; } }

/* ==========================================================
   6. COMPONENTES COMUNS
   ========================================================== */
.am-main { padding: 24px 0 48px; }
.am-section { margin-bottom: 36px; }

.am-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; border-bottom: 3px solid var(--am-cat, var(--am-primary)); }
.am-section-head h2 { display: inline-flex; align-items: center; padding: 7px 14px 5px; background: var(--am-cat, var(--am-primary)); color: #fff; font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; border-radius: 3px 3px 0 0; }
.am-section-head h2 a:hover { color: #fff; }
.am-section-head__more { font-size: 13px; font-weight: 700; text-transform: uppercase; color: var(--am-cat, var(--am-primary)); white-space: nowrap; }
.am-section-head__more::after { content: " ›"; }
.am-section-head--plain { border-bottom-color: var(--am-dark); }
.am-section-head--plain h2 { background: var(--am-dark); }

.am-kicker { display: inline-block; font-family: var(--am-font-title); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--am-cat, var(--am-primary)); }
.am-kicker--tag { padding: 4px 9px 3px; background: var(--am-cat, var(--am-primary)); color: #fff; border-radius: 2px; }
a.am-kicker--tag:hover { color: #fff; filter: brightness(1.1); }

.am-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--am-muted); }
.am-meta time::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; opacity: .5; }

.am-thumb { position: relative; display: block; overflow: hidden; background: var(--am-dark); border-radius: var(--am-radius); aspect-ratio: 16 / 10; }
.am-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a:hover > .am-thumb img,
.am-thumb:hover img { transform: scale(1.04); }
.am-thumb--placeholder { background: linear-gradient(135deg, var(--am-dark), color-mix(in srgb, var(--am-cat, var(--am-primary)) 70%, var(--am-dark))); }
.am-thumb--placeholder::after { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--am-font-title); font-size: 48px; font-weight: 900; color: rgba(255,255,255,.18); }
.am-thumb__play { position: absolute; left: 12px; bottom: 12px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--am-primary); color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.am-thumb__play svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }

/* Card padrão */
.am-card { display: flex; flex-direction: column; gap: 10px; }
.am-card__title { font-size: 18px; font-weight: 700; }
.am-card__title a:hover { color: var(--am-cat, var(--am-primary)); }
.am-card__excerpt { margin: 0; color: var(--am-muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Card sobreposto (imagem com título por cima) */
.am-overlay { position: relative; display: block; overflow: hidden; border-radius: var(--am-radius); background: var(--am-dark); color: #fff; height: 100%; min-height: 220px; }
.am-overlay .am-thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.am-overlay__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 35%, rgba(0,0,0,.92)); }
.am-overlay__title { font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.am-overlay__title a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.am-overlay .am-meta { color: rgba(255,255,255,.75); }
.am-overlay--hero .am-overlay__title { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.08; }
.am-overlay--hero .am-overlay__body { padding: 32px; }
.am-overlay__sub { margin: 0; color: rgba(255,255,255,.85); font-size: 16px; max-width: 640px; }

/* Card horizontal (miniatura + título) */
.am-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.am-row .am-thumb { aspect-ratio: 4 / 3; }
.am-row__title { font-size: 15px; font-weight: 700; line-height: 1.25; margin-top: 4px; }
.am-row--lg { grid-template-columns: 220px 1fr; gap: 20px; }
.am-row--lg .am-row__title { font-size: 20px; }

/* Manchete só texto */
.am-headline { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--am-line); }
.am-headline:first-child { border-top: 0; padding-top: 0; }
.am-headline__title { font-size: 17px; font-weight: 700; line-height: 1.25; }

/* Lista numerada (mais lidas) */
.am-ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.am-ranked li { counter-increment: rank; display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--am-line); }
.am-ranked li:first-child { border-top: 0; padding-top: 0; }
.am-ranked li::before { content: counter(rank); font-family: var(--am-font-title); font-size: 34px; font-weight: 900; line-height: 1; color: var(--am-primary); opacity: .9; }
.am-ranked a { font-weight: 700; font-size: 15px; line-height: 1.3; }

.am-box { background: var(--am-surface); border-radius: var(--am-radius); padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }

/* ==========================================================
   7. HOME
   ========================================================== */

/* Colunistas */
.am-columnists { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.am-columnist { scroll-snap-align: start; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 14px; background: var(--am-surface); border-radius: var(--am-radius); border-top: 3px solid var(--am-primary); }
.am-columnist img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.am-columnist__name { display: block; font-family: var(--am-font-title); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--am-primary); }
.am-columnist__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; font-size: 15px; line-height: 1.25; }

/* Manchetes */
.am-top { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; min-height: 520px; }
.am-top__hero { grid-row: 1 / span 2; }
.am-top-headlines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 24px; margin-top: 20px; padding: 18px 20px; background: var(--am-surface); border-radius: var(--am-radius); }
.am-top-headlines .am-headline { border-top: 0; padding: 0; border-left: 1px solid var(--am-line); padding-left: 18px; }
.am-top-headlines .am-headline:first-child { border-left: 0; padding-left: 0; }

/* Layout com barra lateral */
.am-layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 32px; align-items: start; }
.am-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 72px; }

/* Lista "Últimas" */
.am-latest { display: flex; flex-direction: column; gap: 20px; }
.am-latest .am-row--lg { padding-bottom: 20px; border-bottom: 1px solid var(--am-line); }
.am-latest .am-row--lg:last-child { border-bottom: 0; }
.am-latest .am-card__excerpt { -webkit-line-clamp: 2; margin-top: 6px; }

/* Bloco de editoria: 1 grande + 4 */
.am-block { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.am-block__lead .am-card__title { font-size: 24px; font-weight: 800; }
.am-block__list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-content: start; }
.am-block__list .am-card__title { font-size: 15px; }
.am-block--alt { grid-template-columns: 1fr 1fr 1fr 1fr; }
.am-block--alt .am-card__title { font-size: 16px; }

/* Grade de destaques */
.am-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.am-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Vídeos */
.am-videos { background: var(--am-dark); color: #fff; padding: 32px 0 36px; margin: 8px 0 36px; }
.am-videos .am-section-head { border-bottom-color: var(--am-primary); }
.am-videos .am-section-head__more { color: #fff; }
.am-videos__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto; gap: 18px; }
.am-videos__grid > :first-child { grid-row: 1 / span 2; }
.am-videos .am-card__title { color: #fff; font-size: 16px; }
.am-videos .am-card__title a:hover { color: var(--am-accent); }
.am-videos__grid > :first-child .am-card__title { font-size: 24px; }
.am-videos .am-kicker { color: var(--am-accent); }
.am-videos .am-card__excerpt { color: rgba(255,255,255,.7); }

/* Publicidade */
.am-ad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 auto 32px; text-align: center; }
.am-ad__label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--am-muted); }
.am-ad--sidebar { margin: 0; }
.am-ad img { margin: 0 auto; }

/* ==========================================================
   8. MATÉRIA (single)
   ========================================================== */
.am-article { background: var(--am-surface); border-radius: var(--am-radius); padding: 32px 40px 40px; }
.am-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--am-muted); margin-bottom: 14px; }
.am-breadcrumb a:hover { color: var(--am-primary); }
.am-breadcrumb span[aria-hidden] { opacity: .5; }
.am-article__title { font-size: clamp(28px, 4vw, 44px); font-weight: 900; line-height: 1.08; margin: 12px 0 14px; letter-spacing: -0.02em; }
.am-article__sub { font-size: 20px; line-height: 1.45; color: #374151; margin: 0 0 20px; font-family: var(--am-font-body); }
.am-article__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--am-line); border-bottom: 1px solid var(--am-line); margin-bottom: 24px; }
.am-byline { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.am-byline img { width: 42px; height: 42px; border-radius: 50%; }
.am-byline strong { display: block; }
.am-byline .am-meta { font-size: 13px; }

.am-share { display: flex; align-items: center; gap: 8px; }
.am-share__label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--am-muted); margin-right: 2px; }
.am-share a,
.am-share button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: var(--am-dark); transition: transform .15s; }
.am-share a:hover,
.am-share button:hover { color: #fff; transform: translateY(-2px); }
.am-share svg { width: 16px; height: 16px; fill: currentColor; }
.am-share .is-whatsapp { background: #25D366; }
.am-share .is-facebook { background: #1877F2; }
.am-share .is-x { background: #000; }
.am-share .is-telegram { background: #229ED9; }
.am-share .is-copied { background: var(--am-accent); color: var(--am-dark); }

.am-article__figure { margin: 0 0 28px; }
.am-article__figure img { width: 100%; border-radius: var(--am-radius); }
.am-article__figure figcaption { margin-top: 8px; font-size: 13px; color: var(--am-muted); }

.am-content { font-family: var(--am-font-article); font-size: 19px; line-height: 1.7; color: #1F2937; }
.am-content > * { margin: 0 0 1.15em; }
.am-content h2 { font-size: 28px; margin-top: 1.6em; }
.am-content h3 { font-size: 23px; margin-top: 1.4em; }
.am-content a { color: var(--am-primary); text-decoration: underline; text-underline-offset: 3px; }
.am-content blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--am-primary); font-size: 22px; font-style: italic; color: var(--am-dark); }
.am-content img,
.am-content iframe,
.am-content video { max-width: 100%; border-radius: var(--am-radius); }
.am-content figure { margin-left: 0; margin-right: 0; }
.am-content figcaption,
.am-content .wp-caption-text { font-family: var(--am-font-body); font-size: 13px; color: var(--am-muted); margin-top: 6px; }
.am-content ul,
.am-content ol { padding-left: 1.3em; }
.am-content .alignleft { float: left; margin: 0 1.2em 1em 0; max-width: 50%; }
.am-content .alignright { float: right; margin: 0 0 1em 1.2em; max-width: 50%; }
.am-content .aligncenter { margin-left: auto; margin-right: auto; }
.am-content .wp-block-embed { margin-left: 0; margin-right: 0; }

.am-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.am-tags a { padding: 6px 12px; border-radius: 99px; background: var(--am-bg); font-size: 13px; font-weight: 600; }
.am-tags a:hover { background: var(--am-primary); color: #fff; }

.am-cta-whats { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding: 18px 22px; border-radius: var(--am-radius); background: #E9FBF0; border: 1px solid #B7EBC8; }
.am-cta-whats p { margin: 0; font-weight: 700; color: #0B5132; }
.am-cta-whats a { flex: none; padding: 10px 18px; border-radius: 99px; background: #25D366; color: #fff; font-weight: 800; font-size: 14px; text-transform: uppercase; }
.am-cta-whats a:hover { color: #fff; filter: brightness(1.05); }

.am-related { margin-top: 36px; }

/* Arquivo / editoria */
.am-archive-head { background: var(--am-surface); border-radius: var(--am-radius); padding: 24px 28px; margin-bottom: 24px; border-left: 6px solid var(--am-cat, var(--am-primary)); }
.am-archive-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; text-transform: uppercase; color: var(--am-cat, var(--am-primary)); }
.am-archive-head p { margin: 8px 0 0; color: var(--am-muted); }

.am-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.am-pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--am-radius); background: var(--am-surface); font-weight: 700; }
.am-pagination .page-numbers.current,
.am-pagination a.page-numbers:hover { background: var(--am-primary); color: #fff; }

.am-404 { text-align: center; padding: 60px 20px; }
.am-404 strong { display: block; font-family: var(--am-font-title); font-size: 120px; line-height: 1; font-weight: 900; color: var(--am-primary); }

/* Widgets */
.am-widget { background: var(--am-surface); border-radius: var(--am-radius); padding: 20px; }
.am-widget-title { font-size: 16px; font-weight: 800; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 3px solid var(--am-primary); }
.am-widget ul { list-style: none; margin: 0; padding: 0; }
.am-widget li { padding: 8px 0; border-top: 1px solid var(--am-line); }
.am-widget li:first-child { border-top: 0; }

/* Widgets em blocos (Gutenberg) */
.am-widget h2,
.am-widget .wp-block-heading,
.am-widget .wp-block-search__label { display: block; font-family: var(--am-font-title); font-size: 16px; font-weight: 800; text-transform: uppercase; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 3px solid var(--am-primary); }
.am-widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.am-widget .wp-block-search__input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--am-line); border-radius: var(--am-radius); font: inherit; }
.am-widget .wp-block-search__button { height: 42px; margin: 0; padding: 0 16px; border: 0; border-radius: var(--am-radius); background: var(--am-primary); color: #fff; font-weight: 700; }
.am-widget .wp-block-latest-posts__list li,
.am-widget .wp-block-latest-comments li { font-weight: 600; font-size: 15px; line-height: 1.3; }
.am-widget .wp-block-group > * + * { margin-top: 0; }

/* Comentários */
.am-comments { margin-top: 32px; }
.am-comments .comment-list { list-style: none; padding: 0; }
.am-comments textarea,
.am-comments input[type="text"],
.am-comments input[type="email"],
.am-comments input[type="url"] { width: 100%; padding: 10px 12px; border: 1px solid var(--am-line); border-radius: var(--am-radius); font: inherit; }
.am-comments .submit { padding: 12px 22px; border: 0; border-radius: var(--am-radius); background: var(--am-primary); color: #fff; font-weight: 700; }

/* ==========================================================
   9. RODAPÉ
   ========================================================== */
.am-footer { background: var(--am-dark); color: rgba(255,255,255,.75); padding: 48px 0 0; font-size: 14px; }
.am-footer a:hover { color: #fff; }
.am-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.am-footer .am-wordmark__top { color: #fff; font-size: 30px; }
.am-footer .am-wordmark__bottom { font-size: 14px; }
.am-footer__about { margin: 16px 0 18px; max-width: 360px; }
.am-footer__logo { max-height: 64px; width: auto; }
.am-footer h3 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.am-footer ul { list-style: none; margin: 0; padding: 0; }
.am-footer li { padding: 5px 0; }
.am-footer .am-social a { width: 36px; height: 36px; background: rgba(255,255,255,.08); }
.am-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; }
.am-footer__bottom .am-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.am-footer__menu { display: flex; flex-wrap: wrap; gap: 16px; }

.am-totop { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--am-primary); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); opacity: 0; visibility: hidden; transition: .2s; }
.am-totop.is-visible { opacity: 1; visibility: visible; }
.am-totop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; }

/* ==========================================================
   10. RESPONSIVO
   ========================================================== */
@media (max-width: 1100px) {
  .am-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .am-grid { grid-template-columns: repeat(3, 1fr); }
  .am-top-headlines { grid-template-columns: repeat(2, 1fr); gap: 18px 24px; }
  .am-top-headlines .am-headline:nth-child(3) { border-left: 0; padding-left: 0; }
  .am-block--alt { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .am-header__ad, .am-tagline { display: none; }
  .am-header .am-container { justify-content: center; padding-top: 14px; padding-bottom: 14px; }
  .am-nav__toggle { display: grid; }
  .am-nav__logo-mini { display: block; flex: 1; opacity: 0; transition: opacity .2s; }
  .am-nav.is-stuck .am-nav__logo-mini { opacity: 1; }
  .am-menu { position: fixed; inset: 0 25% 0 0; z-index: 100; flex-direction: column; padding: 70px 0 24px; background: var(--am-dark); overflow-y: auto; transform: translateX(-100%); transition: transform .25s ease; }
  .am-menu.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); }
  .am-menu > li > a { height: auto; padding: 14px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .am-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: rgba(255,255,255,.04); color: #fff; padding: 0; }
  .am-menu .sub-menu a { padding: 11px 34px; }
  .am-menu .sub-menu a:hover { background: rgba(255,255,255,.06); }
  .am-menu__close { position: fixed; top: 14px; left: calc(75% - 54px); z-index: 101; color: #fff; display: none; }
  .am-nav.is-menu-open .am-menu__close { display: grid; }
  .am-menu__close:hover { background: rgba(255,255,255,.14); }

  .am-top { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; }
  .am-top__hero { grid-row: auto; min-height: 380px; }
  .am-top > :not(.am-top__hero) { min-height: 240px; }
  .am-layout { grid-template-columns: 1fr; }
  .am-sidebar { position: static; }
  .am-block, .am-videos__grid { grid-template-columns: 1fr; }
  .am-videos__grid > :first-child { grid-row: auto; }
  .am-grid, .am-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .am-footer__grid { grid-template-columns: 1fr 1fr; }
  .am-article { padding: 22px 20px 28px; }
}

@media (min-width: 901px) { .am-menu__close { display: none; } }

@media (max-width: 600px) {
  .am-topbar__city, .am-topbar__menu, .am-topbar .am-social { display: none; }
  .am-wordmark__top { font-size: 30px; }
  .am-wordmark__bottom { font-size: 14px; }
  .am-top-headlines { grid-template-columns: 1fr; }
  .am-top-headlines .am-headline { border-left: 0; padding-left: 0; border-top: 1px solid var(--am-line); padding-top: 12px; }
  .am-top-headlines .am-headline:first-child { border-top: 0; padding-top: 0; }
  .am-overlay--hero .am-overlay__body { padding: 20px; }
  .am-row--lg { grid-template-columns: 120px 1fr; gap: 14px; }
  .am-row--lg .am-row__title { font-size: 16px; }
  .am-latest .am-card__excerpt { display: none; }
  .am-block__list, .am-block--alt { grid-template-columns: 1fr; }
  .am-block__list .am-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
  .am-grid, .am-grid--3 { grid-template-columns: 1fr; }
  .am-footer__grid { grid-template-columns: 1fr; }
  .am-content { font-size: 18px; }
  .am-article__sub { font-size: 18px; }
  .am-cta-whats { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================
   11. CABEÇALHOS (Personalizar > Modelo do site)
   ========================================================== */
.am-nav__brand { display: none; }

/* Logo centralizada + menu claro */
.am-header-centro .am-header .am-container { flex-direction: column; justify-content: center; text-align: center; gap: 10px; padding-top: 26px; padding-bottom: 22px; }
.am-header-centro .am-header__brand { flex-direction: column; gap: 8px; }
.am-header-centro .am-wordmark { align-items: center; }
.am-header-centro .am-wordmark__bottom { align-self: center; }
.am-header-centro .am-tagline { border-left: 0; padding-left: 0; max-width: none; }
.am-header-centro .am-header__ad { justify-content: center; }
.am-header-centro .am-header { border-bottom: 0; }
.am-header-centro .am-nav { background: var(--am-surface); color: var(--am-text); border-top: 1px solid var(--am-line); border-bottom: 3px solid var(--am-dark); box-shadow: none; }
.am-header-centro .am-menu { justify-content: center; }
.am-header-centro .am-menu > li > a { color: var(--am-text); }
.am-header-centro .am-menu > li > a:hover,
.am-header-centro .am-menu > li.current-menu-item > a,
.am-header-centro .am-menu > li.current-category-ancestor > a { background: transparent; color: var(--am-primary); }
.am-header-centro .am-nav__toggle,
.am-header-centro .am-nav__search { color: var(--am-text); }
.am-header-centro .am-nav__toggle:hover,
.am-header-centro .am-nav__search:hover { background: rgba(0,0,0,.06); }
.am-header-centro .am-nav__logo-mini { color: var(--am-text); }

/* Compacto: logo e menu na mesma barra escura */
.am-header-compacto .am-header { display: none; }
.am-header-compacto .am-nav { background: var(--am-dark); }
.am-header-compacto .am-nav .am-container { min-height: 66px; }
.am-header-compacto .am-nav__brand { display: block; margin-right: 18px; flex: none; }
.am-header-compacto .am-nav__brand .custom-logo { max-height: 42px; width: auto; }
.am-header-compacto .am-wordmark-wrap--nav .am-wordmark__top { color: #fff; font-size: 24px; }
.am-header-compacto .am-wordmark-wrap--nav .am-wordmark__bottom { font-size: 10px; padding: 2px 7px 1px; margin-top: 3px; }
.am-header-compacto .am-menu > li > a { height: 66px; font-size: 14px; border-bottom: 3px solid transparent; }
.am-header-compacto .am-menu > li > a:hover,
.am-header-compacto .am-menu > li.current-menu-item > a,
.am-header-compacto .am-menu > li.current-category-ancestor > a { background: transparent; border-bottom-color: var(--am-accent); }
.am-header-compacto .am-nav__logo-mini { display: none !important; }

/* ==========================================================
   12. MANCHETES (5 formatos)
   ========================================================== */
.am-top--mosaico { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; min-height: 540px; }
.am-top--mosaico .am-overlay__title { font-size: 18px; }
.am-top--mosaico .am-overlay--hero .am-overlay__title { font-size: clamp(26px, 3vw, 40px); }
.am-top--mosaico .am-overlay__body { padding: 16px; }

.am-top--lista { grid-template-columns: 1.7fr 1fr; grid-template-rows: auto; gap: 28px; min-height: 0; align-items: start; }
.am-card--lead .am-card__title { font-size: clamp(26px, 3vw, 38px); font-weight: 800; line-height: 1.1; }
.am-card--lead .am-card__excerpt { font-size: 17px; -webkit-line-clamp: 4; }
.am-card--lead .am-thumb { aspect-ratio: 16 / 9; }
.am-top__list .am-headline__title { font-size: 18px; }

.am-top--largo { display: flex; flex-direction: column; gap: 22px; min-height: 0; }
.am-top--largo .am-top__hero { min-height: 560px; }
.am-top--largo .am-overlay--hero .am-overlay__title { font-size: clamp(30px, 4.4vw, 58px); max-width: 1000px; }

.am-top--dividido { display: flex; flex-direction: column; gap: 28px; min-height: 0; }
.am-split { display: grid; grid-template-columns: 1.45fr 1fr; gap: 36px; align-items: center; }
.am-split .am-thumb { aspect-ratio: 16 / 10; }
.am-split__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.am-split__title { font-size: clamp(28px, 3.4vw, 46px); font-weight: 800; line-height: 1.08; }
.am-split__title a:hover { color: var(--am-cat, var(--am-primary)); }
.am-split__sub { margin: 0; font-size: 18px; color: var(--am-muted); }

/* ==========================================================
   13. MODELOS (estilo de cada um)
   ========================================================== */

/* Revista */
.am-preset-revista .am-topbar { background: var(--am-surface); color: var(--am-muted); border-bottom: 1px solid var(--am-line); }
.am-preset-revista .am-topbar .am-social a:hover { color: #fff; }
.am-preset-revista .am-wordmark__top { font-weight: 900; letter-spacing: -0.01em; text-transform: none; font-size: 44px; }
.am-preset-revista .am-wordmark__bottom { background: transparent; color: var(--am-primary); padding: 0; letter-spacing: .45em; font-family: var(--am-font-body); font-size: 12px; font-weight: 700; }
.am-preset-revista .am-footer .am-wordmark__bottom { color: var(--am-accent); }
.am-preset-revista .am-section-head { border-bottom: 1px solid var(--am-dark); }
.am-preset-revista .am-section-head h2 { background: none; color: var(--am-cat, var(--am-dark)); padding: 0 0 8px; font-size: 26px; text-transform: none; letter-spacing: 0; }
.am-preset-revista .am-section-head h2 a:hover { color: var(--am-primary); }
.am-preset-revista .am-kicker--tag { background: none; color: var(--am-cat, var(--am-primary)); padding: 0 0 2px; border-bottom: 2px solid currentColor; border-radius: 0; }
.am-preset-revista .am-overlay .am-kicker--tag { color: #fff; }
.am-preset-revista .am-card__title,
.am-preset-revista .am-headline__title,
.am-preset-revista .am-row__title { font-weight: 700; }
.am-preset-revista .am-ranked li::before { font-style: italic; color: var(--am-accent); }
.am-preset-revista .am-box { box-shadow: none; border: 1px solid var(--am-line); }
.am-preset-revista .am-ticker__label { background: var(--am-dark); color: #fff; }
.am-preset-revista .am-columnist { border-top-color: var(--am-accent); }

/* Impacto */
.am-preset-impacto .am-card__title,
.am-preset-impacto .am-overlay__title,
.am-preset-impacto .am-headline__title,
.am-preset-impacto .am-row__title,
.am-preset-impacto .am-article__title,
.am-preset-impacto .am-split__title { text-transform: uppercase; letter-spacing: .005em; font-weight: 600; }
.am-preset-impacto .am-wordmark__top { font-weight: 700; letter-spacing: 0; }
.am-preset-impacto .am-section-head { border-bottom-width: 4px; }
.am-preset-impacto .am-section-head h2 { clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); padding-right: 30px; font-weight: 600; letter-spacing: .04em; }
.am-preset-impacto .am-ticker { background: var(--am-accent); border-bottom: 0; }
.am-preset-impacto .am-ticker__label { background: var(--am-dark); color: #fff; }
.am-preset-impacto .am-ticker__item time { color: var(--am-dark); }
.am-preset-impacto .am-ticker__viewport { mask-image: none; }
.am-preset-impacto .am-topbar { background: #000; }
.am-preset-impacto .am-box { box-shadow: none; }
.am-preset-impacto .am-ranked li::before { color: var(--am-dark); }
.am-preset-impacto .am-overlay__body { background: linear-gradient(180deg, transparent, rgba(0,0,0,.65) 40%, rgba(0,0,0,.95)); }

/* Popular */
.am-preset-popular .am-card { background: var(--am-surface); border-radius: var(--am-radius); overflow: hidden; box-shadow: 0 2px 12px rgba(15,23,42,.07); padding-bottom: 16px; transition: transform .2s, box-shadow .2s; }
.am-preset-popular .am-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15,23,42,.12); }
.am-preset-popular .am-card > div { padding: 0 16px; }
.am-preset-popular .am-card .am-thumb { border-radius: 0; }
.am-preset-popular .am-videos .am-card { background: rgba(255,255,255,.06); box-shadow: none; }
.am-preset-popular .am-section-head { border-bottom: 0; }
.am-preset-popular .am-section-head h2 { border-radius: 99px; padding: 8px 20px; font-size: 16px; }
.am-preset-popular .am-kicker--tag { border-radius: 99px; padding: 5px 12px 4px; }
.am-preset-popular .am-nav { box-shadow: inset 0 -4px 0 var(--am-accent); }
.am-preset-popular .am-ticker__label { background: var(--am-accent); color: #fff; border-radius: 99px; }
.am-preset-popular .am-ticker__label::before { background: #fff; }
.am-preset-popular .am-top-headlines { box-shadow: 0 2px 12px rgba(15,23,42,.07); }
.am-preset-popular .am-wordmark__bottom { background: var(--am-accent); border-radius: 99px; }

/* Clean */
.am-preset-clean .am-topbar { display: none; }
.am-preset-clean .am-wordmark__top { font-weight: 800; text-transform: none; letter-spacing: -0.04em; font-size: 40px; }
.am-preset-clean .am-wordmark__bottom { background: none; color: var(--am-primary); padding: 0; font-size: 13px; letter-spacing: .35em; }
.am-preset-clean .am-footer .am-wordmark__bottom { color: var(--am-accent); }
.am-preset-clean.am-header-centro .am-nav,
.am-preset-clean .am-nav { border-bottom-width: 1px; border-bottom-color: var(--am-line); }
.am-preset-clean .am-box,
.am-preset-clean .am-top-headlines { background: transparent; box-shadow: none; padding-left: 0; padding-right: 0; }
.am-preset-clean .am-sidebar .am-box { border: 1px solid var(--am-line); padding: 20px; }
.am-preset-clean .am-section-head { border-bottom: 1px solid var(--am-line); }
.am-preset-clean .am-section-head h2 { background: none; color: var(--am-cat, var(--am-text)); padding: 0 0 10px; font-size: 14px; letter-spacing: .14em; border-bottom: 2px solid var(--am-cat, var(--am-primary)); margin-bottom: -1px; border-radius: 0; }
.am-preset-clean .am-kicker--tag { background: var(--am-surface); color: var(--am-cat, var(--am-primary)); }
.am-preset-clean .am-overlay .am-kicker--tag { background: rgba(255,255,255,.92); }
.am-preset-clean .am-ticker { border-top: 1px solid var(--am-line); }
.am-preset-clean .am-ticker__label { background: transparent; color: var(--am-primary); border: 1px solid currentColor; }
.am-preset-clean .am-columnist { border: 1px solid var(--am-line); border-top: 3px solid var(--am-primary); }
.am-preset-clean .am-article { padding-left: 0; padding-right: 0; }
.am-preset-clean .am-archive-head { background: transparent; padding-left: 0; border-left: 0; border-bottom: 2px solid var(--am-cat, var(--am-primary)); border-radius: 0; }

/* Responsivo dos cabeçalhos e manchetes */
@media (max-width: 900px) {
  .am-header-centro .am-menu > li > a,
  .am-header-centro .am-menu .sub-menu a { color: #fff; }
  .am-header-compacto .am-nav .am-container { min-height: 56px; }
  .am-header-compacto .am-nav__brand { flex: 1; margin-right: 0; }
  .am-header-compacto .am-menu > li > a { height: auto; }
  .am-top--mosaico { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .am-top--mosaico .am-top__hero { grid-column: 1 / -1; }
  .am-top--mosaico > :not(.am-top__hero) { min-height: 200px; }
  .am-top--lista, .am-split { grid-template-columns: 1fr; gap: 18px; }
  .am-top--largo .am-top__hero { min-height: 420px; }
  .am-top--lista > *, .am-top--largo > *, .am-top--dividido > * { min-height: 0 !important; }
  .am-top--largo .am-top__hero { min-height: 420px !important; }
}
@media (max-width: 600px) {
  .am-top--mosaico { grid-template-columns: 1fr; }
  .am-preset-revista .am-wordmark__top, .am-preset-clean .am-wordmark__top { font-size: 32px; }
}
