/*
Theme Name: Brasil em Foco
Theme URI: https://brasilemfoco.com.br
Author: Brasil em Foco
Author URI: https://brasilemfoco.com.br
Description: Tema jornalístico oficial do Brasil em Foco — azul, dourado e branco, 2 colunas de notícias, cobertura política e eleitoral.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: brasil-em-foco
Tags: news, blog, two-columns, custom-colors, featured-images
*/

/* ─── GOOGLE FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Serif+4:wght@300;400;600&family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

/* ─── VARIÁVEIS ─── */
:root {
  --azul:          #0a2463;
  --azul-medio:    #1a3a7a;
  --azul-claro:    #1e4fb5;
  --dourado:       #c9a227;
  --dourado-claro: #e8c547;
  --dourado-escuro:#a07d10;
  --branco:        #ffffff;
  --cinza-claro:   #f5f5f0;
  --cinza-medio:   #e0ddd5;
  --cinza-texto:   #444;
  --preto:         #111;
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--branco);
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--preto);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul-claro); text-decoration: none; }
a:hover { color: var(--dourado-escuro); }

/* ─── TOPBAR ─── */
#topbar {
  background: var(--azul);
  color: rgba(255,255,255,0.75);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  padding: 7px 0;
  border-bottom: 2px solid var(--dourado);
}
#topbar .topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#topbar a { color: rgba(255,255,255,0.7); margin-left: 16px; transition: color .2s; }
#topbar a:hover { color: var(--dourado-claro); }

/* ─── TICKER ─── */
#breaking-bar {
  background: var(--dourado);
  color: var(--azul);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
  overflow: hidden;
  position: relative;
}
#breaking-bar .breaking-label {
  background: var(--azul);
  color: var(--dourado-claro);
  padding: 0 16px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: absolute;
  left: 0; top: 0; bottom: 0;
  display: flex; align-items: center;
  z-index: 2;
}
#breaking-bar .ticker-wrap { overflow: hidden; margin-left: 120px; }
#breaking-bar .ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
#breaking-bar .ticker-track span { margin-right: 60px; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── HEADER / LOGO ─── */
#masthead {
  background: var(--branco);
  padding: 24px 0 0;
  border-bottom: 3px solid var(--azul);
}
#masthead .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.logo-block { display: flex; align-items: center; gap: 16px; }
.logo-icon {
  width: 60px; height: 60px;
  background: var(--azul);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--dourado);
  flex-shrink: 0;
}
.logo-icon svg { width: 32px; height: 32px; }
.site-title {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
}
.site-title .t-brasil { color: var(--azul); }
.site-title .t-em    { color: var(--dourado); font-style: italic; font-size: 34px; margin: 0 8px; }
.site-title .t-foco  { color: var(--azul-claro); }
.site-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--dourado-escuro);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 4px;
}
.header-search { display: flex; align-items: center; }
.header-search form { display: flex; border: 1.5px solid var(--azul); overflow: hidden; }
.header-search input[type="search"] {
  border: none; outline: none;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  width: 220px;
  background: var(--cinza-claro);
}
.header-search button {
  background: var(--azul);
  color: white;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background .2s;
}
.header-search button:hover { background: var(--azul-claro); }

/* ─── NAV ─── */
#site-navigation {
  background: var(--azul);
  margin-top: 18px;
}
#site-navigation .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
}
#site-navigation ul { list-style: none; display: flex; flex-wrap: wrap; }
#site-navigation ul li a {
  display: inline-block;
  color: rgba(255,255,255,0.85);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
#site-navigation ul li a:hover,
#site-navigation ul li.current-menu-item > a {
  color: var(--dourado-claro);
  border-bottom-color: var(--dourado);
  background: rgba(255,255,255,.06);
}
#site-navigation ul ul {
  display: none; position: absolute;
  background: var(--azul-medio);
  min-width: 180px; z-index: 99;
  flex-direction: column;
}
#site-navigation ul li:hover > ul { display: flex; }
#site-navigation ul ul li a { padding: 10px 18px; font-size: 12px; border-bottom: none; }

/* ─── LAYOUT PRINCIPAL ─── */
#page { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
#primary { width: 100%; }

/* ─── SECTION HEADING ─── */
.section-heading {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px; padding-bottom: 10px;
  border-bottom: 2px solid var(--azul);
}
.section-heading h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 2px; color: var(--azul);
}
.section-heading .pill {
  background: var(--dourado);
  color: var(--azul);
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 2px;
}

/* ─── HERO (POST DESTAQUE) ─── */
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.hero-main {
  background: var(--cinza-claro);
  border: 1px solid var(--cinza-medio);
  overflow: hidden;
  transition: box-shadow .2s;
}
.hero-main:hover { box-shadow: 0 8px 32px rgba(10,36,99,.13); }
.hero-main .post-thumbnail { height: 280px; overflow: hidden; }
.hero-main .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.hero-main .post-thumbnail.no-img {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-claro) 60%, var(--dourado) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
}
.hero-body { padding: 22px; }
.post-category-tag {
  display: inline-block;
  background: var(--azul);
  color: var(--dourado-claro);
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 10px; margin-bottom: 10px;
}
.hero-body h2, .hero-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 900;
  line-height: 1.25; color: var(--azul);
  margin-bottom: 12px;
}
.hero-body h2 a, .hero-body h3 a { color: var(--azul); }
.hero-body h2 a:hover, .hero-body h3 a:hover { color: var(--azul-claro); }
.hero-body .excerpt { font-size: 15px; color: var(--cinza-texto); line-height: 1.7; }
.post-meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  font-family: 'Inter', sans-serif; font-size: 12px; color: #888;
}
.post-meta .author { color: var(--azul-claro); font-weight: 600; }
.post-meta .dot { color: #ccc; }

/* ─── LISTA LATERAL ─── */
.hero-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  background: var(--cinza-claro);
  border: 1px solid var(--cinza-medio);
  padding: 16px; display: flex; gap: 12px;
  transition: box-shadow .2s, border-color .2s;
}
.side-card:hover { box-shadow: 0 4px 16px rgba(10,36,99,.1); border-color: var(--dourado); }
.side-card .thumb { width: 80px; height: 70px; flex-shrink: 0; overflow: hidden; }
.side-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-card .thumb.no-img {
  background: var(--azul);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.side-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 14px; font-weight: 700;
  line-height: 1.3; color: var(--azul); margin-bottom: 5px;
}
.side-card h4 a { color: var(--azul); }
.side-card h4 a:hover { color: var(--azul-claro); }
.side-card .side-meta { font-family: 'Inter', sans-serif; font-size: 11px; color: #888; }

/* ─── GRID 2 COLUNAS ─── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.news-card {
  border: 1px solid var(--cinza-medio);
  background: var(--branco);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.news-card:hover { box-shadow: 0 6px 24px rgba(10,36,99,.11); transform: translateY(-2px); }
.news-card .card-thumb { height: 180px; overflow: hidden; }
.news-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .card-thumb img { transform: scale(1.03); }
.news-card .card-thumb.no-img {
  background: linear-gradient(135deg, var(--azul), var(--azul-claro));
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}
.card-body { padding: 18px; }
.card-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700;
  line-height: 1.3; color: var(--azul); margin-bottom: 10px;
}
.card-body h3 a { color: var(--azul); }
.card-body h3 a:hover { color: var(--azul-claro); }
.card-body .excerpt { font-size: 14px; color: var(--cinza-texto); line-height: 1.65; }

/* ─── PAGINAÇÃO ─── */
.pagination { margin: 32px 0; text-align: center; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--azul);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--azul);
  transition: all .2s;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--azul); color: white;
}

/* ─── POST INDIVIDUAL ─── */
.single-post #page { max-width: 860px; }
.entry-header { margin-bottom: 28px; }
.entry-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 36px; font-weight: 900;
  line-height: 1.2; color: var(--azul);
  margin: 12px 0 16px;
}
.entry-header .entry-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-family: 'Inter', sans-serif; font-size: 13px; color: #888;
  padding-bottom: 18px; border-bottom: 2px solid var(--cinza-medio);
}
.entry-header .entry-meta .author { color: var(--azul-claro); font-weight: 600; }
.featured-image { margin-bottom: 28px; }
.featured-image img { width: 100%; height: 420px; object-fit: cover; }
.entry-content {
  font-size: 17px; line-height: 1.85; color: #222;
}
.entry-content p { margin-bottom: 20px; }
.entry-content h2, .entry-content h3 {
  font-family: 'Playfair Display', serif;
  color: var(--azul); margin: 28px 0 14px;
}
.entry-content blockquote {
  border-left: 4px solid var(--dourado);
  padding: 12px 20px; margin: 24px 0;
  background: var(--cinza-claro);
  font-style: italic; color: var(--azul-medio);
}

/* ─── WIDGETS / SIDEBAR ─── */
.widget { margin-bottom: 32px; }
.widget-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; letter-spacing: 2px;
  color: var(--azul);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--azul);
  margin-bottom: 14px;
}
.widget ul { list-style: none; }
.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--cinza-medio);
  font-family: 'Inter', sans-serif; font-size: 13px;
}
.widget ul li a { color: var(--azul); font-weight: 500; }
.widget ul li a:hover { color: var(--dourado-escuro); }

/* ─── FOOTER ─── */
#colophon {
  background: var(--azul);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 0;
  border-top: 4px solid var(--dourado);
  margin-top: 48px;
}
#colophon .footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-brand .site-title { font-size: 30px; }
.footer-brand .site-title .t-brasil,
.footer-brand .site-title .t-foco { color: white; }
.footer-brand p {
  margin-top: 10px;
  font-family: 'Inter', sans-serif; font-size: 13px;
  line-height: 1.6; color: rgba(255,255,255,.6);
}
#colophon h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px; letter-spacing: 2px;
  color: var(--dourado-claro); margin-bottom: 12px;
}
#colophon ul { list-style: none; }
#colophon ul li { margin-bottom: 7px; }
#colophon ul li a {
  color: rgba(255,255,255,.65);
  font-family: 'Inter', sans-serif; font-size: 13px;
  transition: color .2s;
}
#colophon ul li a:hover { color: var(--dourado-claro); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; justify-content: space-between;
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ─── RESPONSIVO ─── */
@media (max-width: 900px) {
  .hero-grid, .news-grid { grid-template-columns: 1fr; }
  #colophon .footer-inner { grid-template-columns: 1fr; }
  .site-title { font-size: 30px; }
  .header-search input[type="search"] { width: 160px; }
}
@media (max-width: 600px) {
  .site-title { font-size: 24px; }
  .site-title .t-em { font-size: 22px; }
  #site-navigation ul li a { padding: 10px 12px; font-size: 12px; }
  .entry-header h1 { font-size: 26px; }
}
