/*
Theme Name: Expresso Rio
Theme URI: https://expressorio.com.br
Author: Expresso Rio
Description: Tema jornalístico para o Expresso Rio - notícias do Rio de Janeiro, Campos dos Goytacazes e Norte Fluminense.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: expresso-rio
*/

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Inter:wght@400;500;600;700;800&family=Roboto+Condensed:wght@400;600;700&display=swap');

:root {
  --font-heading: 'Merriweather', Georgia, serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-condensed: 'Roboto Condensed', ui-sans-serif, system-ui, sans-serif;

  --background: #ffffff;
  --foreground: #121212;
  --muted: #f0f0f0;
  --muted-foreground: #737373;
  --border: #e0e0e0;

  /* Azul "RIO" */
  --accent: #3B6CB5;
  /* Dourado newsletter */
  --er-gold: #e7b757;
  --er-gold-foreground: #121212;
  /* Vermelho "APOIE" */
  --er-red: #e51b23;

  --radius: 4px;
  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--background);
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font-family: inherit; }

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

.condensed { font-family: var(--font-condensed); }
.heading-font { font-family: var(--font-heading); }

/* ============ HEADER ============ */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.topbar { background: var(--foreground); color: #fff; }
.topbar .container { height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-social { display: flex; align-items: center; gap: 2px; }
.topbar-social a { padding: 6px; color: rgba(255,255,255,0.7); display: flex; }
.topbar-social a:hover { color: #fff; }
.topbar-social svg { width: 14px; height: 14px; }
.topbar-search { display: flex; align-items: center; gap: 8px; }
.topbar-search input { height: 24px; padding: 0 10px; font-size: 11px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 2px; color: #fff; width: 150px; }
.topbar-search input::placeholder { color: rgba(255,255,255,0.5); }
.topbar-search svg { width: 13px; height: 13px; color: rgba(255,255,255,0.7); }

.midbar { background: #fff; border-bottom: 1px solid var(--border); }
.midbar .container { position: relative; height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.midbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-toggle { background: none; border: none; cursor: pointer; color: var(--foreground); display: flex; padding: 0; }
.menu-toggle:hover { color: var(--accent); }
.midbar-date { font-size: 11px; color: var(--muted-foreground); line-height: 1.2; }
.midbar-date p { margin: 0; }
.midbar-date .day { font-weight: 500; }
.midbar-date .place { font-size: 10px; }
.site-logo { position: absolute; left: 50%; transform: translateX(-50%); }
.site-logo img { height: 48px; width: auto; }
.btn-apoie {
  flex-shrink: 0; padding: 8px 16px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: #fff;
  background: var(--er-red); border-radius: 2px; transition: opacity .15s;
}
.btn-apoie:hover { opacity: .9; color: #fff; }

.main-nav { background: var(--foreground); overflow-x: auto; }
.main-nav .container { display: flex; align-items: center; height: 40px; white-space: nowrap; padding-left: 0; padding-right: 0; }
.main-nav ul { display: flex; height: 100%; }
.main-nav a {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0 12px; height: 100%; display: flex; align-items: center;
  color: rgba(255,255,255,0.8); border-right: 1px solid rgba(255,255,255,0.1);
  transition: color .15s, background .15s;
}
.main-nav li:last-child a { border-right: none; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,0.1); }

.mobile-menu { display: none; background: #fff; border-bottom: 1px solid var(--border); }
.mobile-menu.is-open { display: block; }
.mobile-menu .container { padding: 12px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mobile-menu a { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px; }
.mobile-menu a:hover { color: var(--accent); }

@media (min-width: 1024px) { .mobile-menu { display: none !important; } }

/* ============ BREAKING FEED ============ */
.breaking-feed { background: var(--foreground); color: #fff; border-bottom: 1px solid rgba(255,255,255,0.15); }
.breaking-feed .container { padding: 6px 16px; display: flex; align-items: center; gap: 12px; overflow: hidden; }
.breaking-badge { display: flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 2px 8px; border-radius: 2px; background: var(--er-red); }
.breaking-badge svg { width: 10px; height: 10px; fill: #fff; }
.breaking-badge span { font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.breaking-feed a.headline { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breaking-feed a.headline:hover { color: #fff; }
.breaking-dots { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
.breaking-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); }
.breaking-dots span.active { background: var(--er-red); }

/* ============ CATEGORY TAG ============ */
.kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 8px; display: block; }
.kicker-sm { font-size: 10px; }

/* ============ TOP STORY HERO ============ */
.hero-section { padding: 24px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1fr 320px; } }

.top-story { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.top-story h1 { font-family: var(--font-heading); font-size: 28px; font-weight: 900; line-height: 1.2; margin: 0 0 8px; color: var(--foreground); }
.top-story:hover h1 { color: var(--accent); }
.top-story p.excerpt { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; margin: 0; }
@media (min-width: 640px) { .top-story h1 { font-size: 34px; } }

.secondary-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .secondary-grid { grid-template-columns: 1fr 1fr; } }
.secondary-grid img { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin-bottom: 12px; transition: transform .3s; }
.secondary-grid a:hover img { transform: scale(1.02); }
.secondary-grid h2 { font-family: var(--font-heading); font-size: 17px; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.secondary-grid a:hover h2 { color: var(--accent); }
.secondary-grid p.excerpt { font-size: 12px; color: var(--muted-foreground); margin: 0; line-height: 1.5; }
.secondary-grid p.byline { font-size: 11px; color: var(--muted-foreground); margin: 4px 0 0; }

/* Sidebar */
.sidebar-box { border: 1px solid var(--border); padding: 16px; }
.sidebar-box h3 { font-family: var(--font-heading); font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.newsletter-form label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.newsletter-form label .req { color: var(--er-red); }
.newsletter-form input[type=email] { width: 100%; padding: 8px 12px; font-size: 13px; border: 2px solid var(--accent); border-radius: 2px; margin-bottom: 12px; }
.newsletter-form button {
  width: 100%; padding: 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--er-gold); color: var(--er-gold-foreground); border: none; border-radius: 2px; cursor: pointer; transition: opacity .15s;
}
.newsletter-form button:hover { opacity: .9; }

.ad-placeholder { background: var(--muted); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); color: var(--muted-foreground); font-size: 11px; }
.ad-placeholder.h-24 { height: 96px; }
.ad-placeholder.h-20 { height: 80px; margin-top: 24px; }

.sidebar-list > * + * { border-top: 1px solid var(--border); }
.sidebar-list a { display: block; padding: 12px 0; }
.sidebar-list a:first-child { padding-top: 0; }
.sidebar-list h4 { font-family: var(--font-heading); font-size: 13px; font-weight: 700; line-height: 1.3; margin: 0 0 2px; }
.sidebar-list a:hover h4 { color: var(--accent); }
.sidebar-list p.excerpt { font-size: 11px; color: var(--muted-foreground); margin: 0 0 2px; line-height: 1.4; }
.sidebar-list p.source { font-size: 10px; color: var(--muted-foreground); margin: 0; }

.section-divider { border-top: 1px solid var(--border); }

/* ============ CATEGORY GRID ============ */
.category-section-wrap { background: rgba(0,0,0,0.015); padding: 24px 0; border-top: 1px solid var(--border); }
.category-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 640px) { .category-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-block { border-top: 4px solid var(--foreground); padding-top: 16px; }
.cat-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cat-block-head .cat-title { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.cat-block-head .cat-title:hover { color: var(--accent); }
.cat-block-head .ver-mais { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); }
.cat-block-head .ver-mais:hover { color: var(--accent); }

.cat-featured img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 8px; transition: transform .3s; }
.cat-featured:hover img { transform: scale(1.02); }
.cat-featured h3 { font-family: var(--font-heading); font-size: 14px; font-weight: 700; line-height: 1.35; margin: 0 0 12px; }
.cat-featured:hover h3 { color: var(--accent); }

.cat-list-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.cat-list-item:first-of-type { border-top: none; }
.cat-list-item img { width: 80px; height: 56px; object-fit: cover; flex-shrink: 0; }
.cat-list-item h4 { font-family: var(--font-heading); font-size: 12px; font-weight: 600; line-height: 1.35; margin: 0; }
.cat-list-item:hover h4 { color: var(--accent); }

/* ============ SPONSORED / BRASIL + OPINIAO + MAIS LIDAS ============ */
.bottom-section { padding: 32px 0; border-top: 1px solid var(--border); }
.bottom-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) { .bottom-grid { grid-template-columns: 1fr 1fr 280px; } }

.bottom-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-top: 4px solid var(--foreground); padding-top: 12px; }
.bottom-col-head span.title { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }

.mundo-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.mundo-item:first-child { border-top: none; padding-top: 0; }
.mundo-item img { width: 80px; height: 56px; object-fit: cover; flex-shrink: 0; }
.mundo-item h4 { font-family: var(--font-heading); font-size: 13px; font-weight: 700; line-height: 1.35; margin: 0; }
.mundo-item:hover h4 { color: var(--accent); }

.opiniao-item { display: block; padding: 16px 0; border-top: 1px solid var(--border); }
.opiniao-item:first-child { border-top: none; padding-top: 0; }
.opiniao-item .author { font-size: 11px; font-weight: 600; color: var(--muted-foreground); margin: 0 0 4px; }
.opiniao-item h4 { font-family: var(--font-heading); font-size: 14px; font-weight: 700; line-height: 1.35; margin: 0; }
.opiniao-item:hover h4 { color: var(--accent); }

.mais-lidas-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.mais-lidas-item:first-child { border-top: none; padding-top: 0; }
.mais-lidas-item .rank { font-family: var(--font-condensed); font-size: 22px; font-weight: 900; color: var(--accent); line-height: 1; width: 28px; flex-shrink: 0; }
.mais-lidas-item h4 { font-family: var(--font-heading); font-size: 12px; font-weight: 600; line-height: 1.35; margin: 0 0 2px; }
.mais-lidas-item:hover h4 { color: var(--accent); }
.mais-lidas-item .time { font-size: 10px; color: var(--muted-foreground); margin: 0; }

/* ============ FOOTER ============ */
.site-footer { background: var(--foreground); color: #fff; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 40px 0 32px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 32px; }
@media (min-width: 768px) { .footer-top { grid-template-columns: 1fr auto; } }
.footer-logo img { height: 40px; width: auto; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-tagline { font-size: 12px; color: rgba(255,255,255,0.6); max-width: 320px; line-height: 1.6; }
.footer-newsletter p.label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.8); margin: 0 0 8px; }
.footer-newsletter .form-row { display: flex; gap: 8px; }
.footer-newsletter input { padding: 8px 12px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 2px; font-size: 12px; color: #fff; width: 210px; }
.footer-newsletter input::placeholder { color: rgba(255,255,255,0.4); }
.footer-newsletter button { padding: 8px 16px; background: var(--er-gold); border: none; border-radius: 2px; cursor: pointer; display: flex; align-items: center; }
.footer-newsletter button svg { width: 14px; height: 14px; color: var(--foreground); }

.footer-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 32px; }
@media (min-width: 768px) { .footer-nav-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-nav-grid h3 { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 12px; }
.footer-nav-grid li { margin-bottom: 6px; }
.footer-nav-grid a { font-size: 12px; color: rgba(255,255,255,0.6); }
.footer-nav-grid a:hover { color: #fff; }

.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 24px; }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-bottom p.copy { font-size: 11px; color: rgba(255,255,255,0.4); margin: 0; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.1); }
.footer-socials a:hover { background: var(--accent); }
.footer-socials svg { width: 14px; height: 14px; }
.footer-legal { display: flex; gap: 16px; font-size: 11px; color: rgba(255,255,255,0.4); }
.footer-legal a:hover { color: #fff; }

/* Single post */
.single-post { padding: 32px 0; max-width: 820px; margin: 0 auto; }
.single-post .kicker { margin-top: 0; }
.single-post h1 { font-family: var(--font-heading); font-size: 32px; font-weight: 900; line-height: 1.2; margin: 0 0 16px; }
.single-post .meta { font-size: 12px; color: var(--muted-foreground); margin-bottom: 20px; }
.single-post .featured-img { width: 100%; margin-bottom: 24px; }
.single-post .entry-content { font-size: 16px; line-height: 1.8; }
.single-post .entry-content p { margin: 0 0 20px; }
.single-post .entry-content img { margin: 24px 0; }

/* ============ CORREÇÕES v2 ============ */

/* Imagens secundárias: wrapper para forçar proporção */
.secondary-img-wrap { overflow: hidden; margin-bottom: 12px; aspect-ratio: 16/10; background: var(--muted); }
.secondary-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.secondary-grid a:hover .secondary-img-wrap img { transform: scale(1.02); }
.secondary-img-wrap.no-thumb { display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); font-size: 11px; }

/* Cat featured image wrapper */
.cat-featured-img-wrap { overflow: hidden; margin-bottom: 8px; aspect-ratio: 16/9; background: var(--muted); }
.cat-featured-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cat-featured:hover .cat-featured-img-wrap img { transform: scale(1.02); }
.cat-featured-img-wrap.no-thumb-cat { height: 140px; }

/* ============ PLAYER DE VÍDEO ============ */
.video-section { background: var(--foreground); padding: 20px 0; border-bottom: 3px solid var(--er-red); }
.video-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.video-live-badge { background: var(--er-red); color: #fff; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; padding: 3px 10px; border-radius: 2px; animation: pulse-badge 2s infinite; }
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:.6} }
.video-section-title { font-size: 15px; font-weight: 700; color: #fff; margin: 0; }
.video-embed-wrap { position: relative; width: 100%; padding-bottom: 56.25%; /* 16:9 */ height: 0; overflow: hidden; background: #000; border-radius: 4px; }
.video-embed-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-player-wrap { width: 100%; }
.video-player-wrap iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 4px; display: block; }

/* ============ SINGLE – IMAGEM GRANDE ============ */
.single-article { padding: 0 0 60px; }
.single-container { max-width: 860px; }
.single-kicker { display: inline-block; margin: 28px 0 14px; font-size: 12px; }
.single-title { font-size: clamp(24px, 4vw, 40px); font-weight: 900; line-height: 1.15; margin: 0 0 18px; }
.single-meta { font-size: 12px; color: var(--muted-foreground); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 24px; }
.single-meta .sep { opacity: .4; }

.single-hero-figure { margin: 0 0 28px; }
.single-hero-img { width: 100%; max-height: 540px; object-fit: cover; display: block; border-radius: 4px; }
.single-caption { font-size: 11px; color: var(--muted-foreground); margin-top: 6px; font-style: italic; }

.single-content { font-size: 17px; line-height: 1.85; color: var(--foreground); }
.single-content p { margin: 0 0 22px; }
.single-content h2 { font-family: var(--font-heading); font-size: 22px; font-weight: 700; margin: 36px 0 14px; }
.single-content h3 { font-family: var(--font-heading); font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.single-content img { width: 100%; border-radius: 4px; margin: 24px 0; }
.single-content blockquote { border-left: 4px solid var(--accent); margin: 28px 0; padding: 12px 20px; background: var(--muted); border-radius: 0 4px 4px 0; font-style: italic; font-size: 18px; }
.single-content a { color: var(--accent); text-decoration: underline; }
.single-content ul, .single-content ol { padding-left: 24px; margin: 0 0 22px; }
.single-content li { margin-bottom: 8px; }

.single-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 32px 0 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.single-tag { padding: 4px 12px; background: var(--muted); font-size: 12px; border-radius: 20px; transition: background .15s; }
.single-tag:hover { background: var(--accent); color: #fff; }

.single-nav { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.single-nav a { color: var(--accent); }
.single-nav a:hover { text-decoration: underline; }

.single-comments { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ============ PAGINATION ============ */
.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.nav-links a, .nav-links span { padding: 8px 14px; font-size: 13px; border: 1px solid var(--border); border-radius: 2px; }
.nav-links a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.nav-links .current { background: var(--foreground); color: #fff; border-color: var(--foreground); }

/* ============ MENU WP (remove bullet padrão) ============ */
.main-nav ul.menu, .main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; height: 100%; }
.main-nav li { display: flex; }
.mobile-menu ul.menu, .mobile-menu ul { display: contents; }
.mobile-menu li { display: contents; }
