/*
Theme Name: Portal Maratona
Author: Portal Maratona
Description: Tema editorial do Portal Maratona — notícias, críticas e análises de cinema, streaming, séries e cultura pop. Inclui dados estruturados (NewsArticle, Review, Breadcrumb), Open Graph, sitemap de notícias e campos de crítica/estreia prontos para a API REST.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portal-maratona
*/

:root {
	--pm-ink: #111418;
	--pm-muted: #4A5260;
	--pm-body: #3A414C;
	--pm-line: #E3E5E8;
	--pm-soft: #F4F5F7;
	--pm-navy: #14306B;
	--pm-accent: #C2410C;
	--pm-serif: Newsreader, Georgia, "Times New Roman", serif;
	--pm-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--pm-max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--pm-sans); color: var(--pm-ink); background: #fff; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pm-ink); text-decoration: none; }
a:hover { color: var(--pm-navy); text-decoration: underline; }
button, input { font-family: inherit; }

.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; left: 8px; top: 8px; padding: 12px 16px; background: #fff; z-index: 1000; }

.pm-container { max-width: var(--pm-max); margin: 0 auto; padding: 0 24px; }

/* Barra do topo */
.pm-topbar { background: var(--pm-soft); border-bottom: 1px solid var(--pm-line); font-size: 13px; color: var(--pm-muted); }
.pm-topbar .pm-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.pm-topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.pm-topbar a { color: var(--pm-muted); }

/* Cabeçalho */
.pm-masthead { text-align: center; padding: 36px 24px 20px; }
.pm-logo-wrap { margin: 0; font-size: inherit; font-weight: inherit; }
/* Logo (identidade C): PORTAL / Maratona / barra de progresso */
.pm-logo { --pm-logo-tam: clamp(48px, 8vw, 80px); display: inline-flex; flex-direction: column; align-items: stretch; text-align: left; color: var(--pm-ink); }
.pm-logo:hover { color: var(--pm-ink); text-decoration: none; }
.pm-logo__sup { font-family: var(--pm-sans); font-weight: 700; font-size: calc(var(--pm-logo-tam) * .17); letter-spacing: .55em; line-height: 1; text-transform: uppercase; color: var(--pm-navy); margin-bottom: calc(var(--pm-logo-tam) * .1); }
.pm-logo__nome { font-family: var(--pm-serif); font-weight: 700; font-size: var(--pm-logo-tam); line-height: .9; letter-spacing: -.03em; }
.pm-logo__barra { position: relative; display: block; height: calc(var(--pm-logo-tam) * .075); min-height: 3px; margin-top: calc(var(--pm-logo-tam) * .16); border-radius: 99px; background: var(--pm-line); }
.pm-logo__barra span { position: absolute; left: 0; top: 0; bottom: 0; width: 68%; border-radius: 99px; background: var(--pm-accent); }
.pm-logo__barra span::after { content: ""; position: absolute; right: 0; top: 50%; width: calc(var(--pm-logo-tam) * .19); height: calc(var(--pm-logo-tam) * .19); min-width: 8px; min-height: 8px; border-radius: 50%; background: var(--pm-accent); transform: translate(50%, -50%); }
.pm-logo--escuro { color: #fff; }
.pm-logo--escuro:hover { color: #fff; }
.pm-logo--escuro .pm-logo__sup { color: #C9D3E8; }
.pm-logo--escuro .pm-logo__barra { background: #3A414C; }
.pm-logo--escuro .pm-logo__barra span, .pm-logo--escuro .pm-logo__barra span::after { background: #F07A43; }
.pm-logo-wrap .custom-logo-link { display: inline-block; }
.pm-logo-wrap .custom-logo { max-height: 80px; width: auto; margin: 0 auto; }
.pm-tagline { margin: 8px 0 0; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--pm-muted); }

/* Menu de editorias */
.pm-nav { border-top: 3px solid var(--pm-ink); border-bottom: 1px solid var(--pm-ink); }
.pm-nav .pm-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.pm-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.pm-menu a { display: block; padding: 14px 0; }
.pm-menu .current-menu-item > a, .pm-menu .current-cat > a, .pm-menu .current-post-ancestor > a { color: var(--pm-accent); }
.pm-menu .sub-menu { display: none; }
.pm-search-toggle { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--pm-ink); }
.pm-search-panel { border-bottom: 1px solid var(--pm-line); padding: 16px 0; }
.pm-search-panel[hidden] { display: none; }
.pm-searchform { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-searchform input[type="search"] { flex: 1 1 240px; height: 48px; padding: 0 14px; border: 1px solid #C9CED6; font-size: 16px; }

.pm-btn { height: 48px; padding: 0 24px; border: 0; background: var(--pm-accent); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.pm-btn--navy { background: var(--pm-navy); }
.pm-btn:hover { filter: brightness(1.1); }

/* Estrutura */
.pm-main { padding-top: 32px; display: flex; flex-direction: column; gap: 56px; }
.pm-row { display: flex; flex-wrap: wrap; gap: 32px; }
.pm-row--40 { gap: 40px; }
.pm-col-main { flex: 999 1 560px; min-width: 0; }
.pm-col-side { flex: 1 1 320px; min-width: 0; }
.pm-vazio { font-size: 18px; color: var(--pm-muted); padding: 48px 0; }

.pm-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pm-accent); }
a.pm-kicker:hover { color: var(--pm-accent); }
.pm-meta { font-size: 13px; color: var(--pm-muted); }

.pm-thumb { position: relative; display: block; background: var(--pm-line); overflow: hidden; }
.pm-thumb--video::after { content: ""; position: absolute; left: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(17, 20, 24, .85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 18px no-repeat; }
.pm-thumb--pm-mini.pm-thumb--video::after { left: 6px; bottom: 6px; width: 24px; height: 24px; background-size: 12px; }

/* Vídeos */
.pm-video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.wp-has-aspect-ratio .pm-video { position: absolute; inset: 0; aspect-ratio: auto; }
.pm-video iframe, .pm-video__link, .pm-video__link img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pm-video__link img { object-fit: cover; }
.pm-video__botao { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 54px; border-radius: 14px; background: rgba(17, 20, 24, .85); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.pm-video__link:hover .pm-video__botao, .pm-video__link:focus-visible .pm-video__botao { background: var(--pm-accent); }
.pm-video__link:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.pm-article-body .wp-block-embed { margin: 30px 0; }
.pm-thumb img, .pm-thumb__vazio { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-thumb--pm-destaque, .pm-thumb--pm-card { aspect-ratio: 16 / 9; }
.pm-thumb--pm-poster { aspect-ratio: 2 / 3; }
.pm-thumb--pm-mini { flex: 0 0 88px; height: 64px; }

/* Destaques */
.pm-hero { display: flex; flex-direction: column; gap: 16px; }
.pm-hero__title { margin: 0; font-family: var(--pm-serif); font-weight: 700; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.5px; }
.pm-dek { margin: 0; font-size: 18px; line-height: 1.55; color: var(--pm-body); }
.pm-stack { border-top: 1px solid var(--pm-ink); display: flex; flex-direction: column; }
.pm-stack article { padding: 20px 0; border-bottom: 1px solid var(--pm-line); display: flex; flex-direction: column; gap: 8px; }
.pm-stack article:last-child { border-bottom: 0; }
.pm-h2 { margin: 0; font-family: var(--pm-serif); font-weight: 600; font-size: 22px; line-height: 1.25; }
.pm-h2--lg { font-size: 24px; line-height: 1.2; }

/* Títulos de seção */
.pm-section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; padding-bottom: 10px; border-bottom: 3px solid var(--pm-ink); margin-bottom: 8px; }
.pm-section-head h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.pm-more { font-size: 13px; font-weight: 600; color: var(--pm-navy); }
.pm-section { display: flex; flex-direction: column; gap: 20px; }
.pm-section .pm-section-head { margin-bottom: 0; }

/* Últimas */
.pm-latest-item { display: flex; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--pm-line); align-items: flex-start; }
.pm-latest-item__hora { flex: 0 0 64px; font-size: 13px; color: var(--pm-muted); padding-top: 4px; }
.pm-latest-item__corpo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pm-latest-item h3 { margin: 0; font-family: var(--pm-serif); font-weight: 600; font-size: 21px; line-height: 1.3; }

/* Mais lidas */
.pm-popular { background: var(--pm-soft); padding: 24px; align-self: flex-start; }
.pm-popular ol { list-style: none; margin: 0; padding: 0; counter-reset: pm; }
.pm-popular li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid #D5D8DD; align-items: flex-start; counter-increment: pm; }
.pm-popular li:last-child { border-bottom: 0; }
.pm-popular li::before { content: counter(pm); font-family: var(--pm-serif); font-weight: 700; font-size: 32px; line-height: 1; color: var(--pm-accent); flex: 0 0 28px; }
.pm-popular li a { font-family: var(--pm-serif); font-weight: 600; font-size: 18px; line-height: 1.3; }

/* Cards */
.pm-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pm-grid--3 { gap: 32px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pm-card { display: flex; flex-direction: column; gap: 10px; }
.pm-card h3 { margin: 0; font-family: var(--pm-serif); font-weight: 600; font-size: 20px; line-height: 1.25; }
.pm-card--critica h3 { font-size: 24px; line-height: 1.2; }
.pm-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--pm-body); }
.pm-card__info { font-size: 12px; font-weight: 600; color: var(--pm-muted); }
.pm-card__topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pm-score { font-size: 13px; font-weight: 700; color: #fff; background: var(--pm-navy); padding: 4px 10px; white-space: nowrap; }

/* Newsletter */
.pm-newsletter { background: var(--pm-navy); color: #fff; padding: 48px 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.pm-newsletter__texto { flex: 1 1 380px; }
.pm-newsletter h2 { margin: 0 0 8px; font-family: var(--pm-serif); font-weight: 700; font-size: 34px; line-height: 1.15; }
.pm-newsletter p { margin: 0; font-size: 16px; line-height: 1.5; color: #DCE3F0; }
.pm-newsletter .pm-newsletter__form { flex: 1 1 380px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pm-field { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.pm-field label { font-size: 13px; font-weight: 600; color: #DCE3F0; }
.pm-field input { height: 48px; padding: 0 14px; border: 0; font-size: 16px; }
.pm-side-newsletter { background: var(--pm-soft); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.pm-side-newsletter h2 { margin: 0; font-family: var(--pm-serif); font-weight: 700; font-size: 22px; line-height: 1.2; }
.pm-side-newsletter .pm-newsletter__form { display: flex; flex-direction: column; gap: 12px; }
.pm-side-newsletter .pm-field { flex: none; }
.pm-side-newsletter .pm-field label { color: var(--pm-body); }
.pm-side-newsletter .pm-field input { height: 44px; border: 1px solid #C9CED6; }
.pm-side-newsletter .pm-btn { height: 44px; }
.pm-aviso-admin { flex-basis: 100%; margin: 0; font-size: 12px; opacity: .85; }

/* Rodapé */
.pm-footer { margin-top: 64px; background: var(--pm-ink); color: #C9CED6; }
.pm-footer a { color: #C9CED6; }
.pm-footer a:hover { color: #fff; }
.pm-footer__topo { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding: 48px 0 32px; }
.pm-footer__marca { flex: 1 1 280px; }
.pm-footer__nome { margin: 0; }
.pm-footer__nome .pm-logo { --pm-logo-tam: 40px; }
.pm-footer__marca p:not(.pm-footer__nome) { margin: 10px 0 0; font-size: 14px; line-height: 1.6; max-width: 340px; }
.pm-footer__colunas { flex: 2 1 480px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; font-size: 14px; }
.pm-footer__colunas h2 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #fff; }
.pm-footer__colunas ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pm-footer__base { border-top: 1px solid #2E343D; padding: 20px 0 32px; font-size: 13px; color: #9AA1AC; }

/* Matéria */
.pm-main--materia { gap: 32px; }
.pm-breadcrumb { font-size: 13px; color: var(--pm-muted); display: flex; flex-wrap: wrap; gap: 8px; }
.pm-breadcrumb a { color: var(--pm-muted); }
.pm-materia { display: flex; flex-direction: column; gap: 32px; }
.pm-article-head { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.pm-article-title { margin: 0; font-family: var(--pm-serif); font-weight: 700; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.8px; }
.pm-article-dek { margin: 0; font-family: var(--pm-serif); font-size: 22px; line-height: 1.45; color: var(--pm-body); }
.pm-byline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--pm-line); border-bottom: 1px solid var(--pm-line); }
.pm-byline__autor { display: flex; align-items: center; gap: 12px; }
.pm-byline__autor img { border-radius: 50%; width: 44px; height: 44px; }
.pm-byline__autor > div { display: flex; flex-direction: column; gap: 2px; }
.pm-byline__nome { font-size: 14px; font-weight: 600; }
.pm-share { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-share a, .pm-share button { font-size: 13px; font-weight: 600; padding: 10px 14px; border: 1px solid #C9CED6; background: #fff; color: var(--pm-ink); cursor: pointer; line-height: 1.2; }
.pm-figure { margin: 0; }
.pm-figure img { width: 100%; }
.pm-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--pm-muted); }
.pm-row--materia { gap: 56px; align-items: flex-start; }
.pm-article-body { flex: 999 1 560px; min-width: 0; max-width: 720px; font-family: var(--pm-serif); font-size: 20px; line-height: 1.7; color: #1E232A; }
.pm-article-body p, .pm-article-body ul, .pm-article-body ol { margin: 0 0 22px; }
.pm-article-body h2 { margin: 34px 0 16px; font-weight: 700; font-size: 30px; line-height: 1.2; color: var(--pm-ink); }
.pm-article-body h3 { margin: 28px 0 12px; font-weight: 700; font-size: 24px; line-height: 1.25; color: var(--pm-ink); }
.pm-article-body a { color: var(--pm-navy); text-decoration: underline; }
.pm-article-body blockquote { margin: 30px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--pm-accent); font-size: 26px; line-height: 1.4; font-style: italic; color: var(--pm-ink); }
.pm-article-body blockquote p { margin: 0; }
.pm-article-body figure { margin: 30px 0; }
.pm-article-body figcaption, .pm-article-body .wp-element-caption { font-family: var(--pm-sans); font-size: 13px; color: var(--pm-muted); margin-top: 8px; }
.pm-article-body iframe { max-width: 100%; }
.pm-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; font-family: var(--pm-sans); }
.pm-tags a { font-size: 13px; font-weight: 600; padding: 8px 12px; background: var(--pm-soft); text-decoration: none; color: var(--pm-ink); }

.pm-ficha { font-family: var(--pm-sans); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; border: 1px solid var(--pm-line); border-top: 3px solid var(--pm-navy); padding: 20px; margin: 0 0 28px; }
.pm-ficha__nota { font-family: var(--pm-serif); font-weight: 700; font-size: 44px; line-height: 1; color: var(--pm-navy); }
.pm-ficha__nota span { font-size: 20px; color: var(--pm-muted); }
.pm-ficha dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; line-height: 1.4; }
.pm-ficha dt { font-weight: 700; color: var(--pm-muted); }
.pm-ficha dd { margin: 0; }

.pm-article-side { display: flex; flex-direction: column; gap: 32px; }
.pm-related-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--pm-line); }
.pm-related-item > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pm-related-item .pm-kicker { font-size: 11px; letter-spacing: 1px; }
.pm-related-item__titulo { font-family: var(--pm-serif); font-weight: 600; font-size: 17px; line-height: 1.3; }
.pm-ad { min-height: 250px; border: 1px dashed #C9CED6; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: var(--pm-muted); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }

/* Listagens (editorias, busca, autor) */
.pm-archive-head { display: flex; flex-direction: column; gap: 12px; padding-bottom: 20px; border-bottom: 3px solid var(--pm-ink); }
.pm-archive-head img { border-radius: 50%; }
.pm-archive-title { margin: 0; font-family: var(--pm-serif); font-weight: 700; font-size: clamp(32px, 5vw, 48px); line-height: 1.1; }
.pm-archive-desc { font-size: 17px; line-height: 1.55; color: var(--pm-body); max-width: 760px; }
.pm-archive-desc p { margin: 0; }
.pm-list-item { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--pm-line); }
.pm-list-item .pm-thumb { flex: 0 1 280px; }
.pm-list-item__corpo { flex: 1 1 300px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pm-list-item__corpo p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--pm-body); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 32px; }
.page-numbers { display: inline-block; padding: 10px 14px; border: 1px solid #C9CED6; font-size: 14px; font-weight: 600; }
.page-numbers.current { background: var(--pm-ink); color: #fff; border-color: var(--pm-ink); }

.pm-article-body--pagina { max-width: 760px; }

@media (max-width: 600px) {
	.pm-container { padding: 0 16px; }
	.pm-newsletter { padding: 32px 20px; }
	.pm-newsletter h2 { font-size: 28px; }
	.pm-latest-item__hora { flex-basis: 48px; }
	.pm-article-body { font-size: 19px; }
	.pm-article-dek { font-size: 19px; }
}
