/*
Theme Name:  PetPulse
Theme URI:   https://petpulse.com.br
Author:      PetPulse Editorial
Author URI:  https://petpulse.com.br
Description: Portal de notícias pet moderno, otimizado para Google AdSense e SEO de alta autoridade. Layout Bento Grid, Smart Ad Placement Zones, CLS-otimizado e 100% responsivo.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: petpulse
Tags: news, magazine, adsense, blog, grid-layout, custom-colors, custom-logo, featured-images, sticky-post, threaded-comments, translation-ready
*/

/* ============================================================
   PETPULSE THEME — Design System & Base Styles
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --orange:       #FF5C1A;
  --orange-light: #FF8A56;
  --orange-pale:  #FFF0EA;
  --ink:          #0F0F0F;
  --ink-soft:     #3A3A3A;
  --ink-muted:    #767676;
  --paper:        #FAFAF8;
  --white:        #FFFFFF;
  --border:       #EBEBEB;
  --border-soft:  #F2F2F0;
  --ad-bg:        #F8F4FF;
  --ad-border:    #D4C5FF;
  --ad-label:     #7B5EA7;
  --skeleton:     #EBEBEB;
  --skeleton-shine:#F5F5F5;
  --green:        #2ECC71;
  --blue:         #3498DB;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.12);
  --radius:       12px;
  --radius-sm:    6px;
  --transition:   0.2s cubic-bezier(0.4,0,0.2,1);
  --max-width:    1280px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== SKELETON LOADING (CLS prevention for ads) ===== */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--skeleton) 25%, var(--skeleton-shine) 50%, var(--skeleton) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
}

/* ===== LAYOUT WRAPPER ===== */
.petpulse-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== SITE HEADER / NAVBAR ===== */
#masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;           /* altura fixa — logo não pode estourar */
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;              /* espaço mínimo entre logo, nav e actions */
  overflow: visible;
}

/* ── LOGO / BRANDING ── */
.site-branding {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;         /* não encolhe — logo tem prioridade */
  max-width: 220px;       /* teto: nunca maior que 220px */
  height: 64px;           /* mesma altura do header */
}

/* Logo customizada (imagem enviada via Personalizar) */
.custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 0;
  height: 100%;
}
.custom-logo,
.custom-logo-link img,
.site-branding img {
  max-height: 48px !important;  /* máximo 48px de altura */
  max-width: 200px  !important; /* máximo 200px de largura */
  width: auto       !important;
  height: auto      !important;
  object-fit: contain;
  display: block;
}

/* Logo ícone SVG embutido (fallback sem imagem) */
.site-logo-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--orange);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.site-title {
  line-height: 1;
  white-space: nowrap;
}
.site-title a {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.site-title a span { color: var(--orange); }
.site-description { display: none; }

/* ── NAV: ocupa o espaço restante, centralizado ── */
#primary-navigation {
  display: flex;
  align-items: center;
  flex: 1;               /* cresce para preencher o espaço entre logo e actions */
  justify-content: center;
  min-width: 0;          /* permite encolher se necessário */
  overflow: hidden;
}
#primary-navigation ul {
  display: flex;
  gap: 0;
  list-style: none;
  flex-wrap: nowrap;
}
#primary-navigation ul li a {
  padding: 8px 11px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: block;
  white-space: nowrap;
}
#primary-navigation ul li a:hover,
#primary-navigation ul li.current-menu-item > a {
  color: var(--orange);
  background: var(--orange-pale);
}

/* ── HEADER ACTIONS: não encolhem ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-search {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  font-size: 15px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-search:hover { border-color: var(--orange); color: var(--orange); }
.btn-subscribe {
  padding: 8px 16px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-subscribe:hover {
  background: #E64D0F;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,92,26,0.35);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink-soft);
  flex-shrink: 0;
  line-height: 1;
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink-soft);
}

/* ===== AD LEADERBOARD (CLS-OPTIMIZED) ===== */
.ad-leaderboard-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}
.ad-leaderboard-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: center;
}
/* ⚠️ CRITICAL: min-height prevents CLS — never remove */
.ad-slot-leaderboard {
  min-height: 90px;
  width: 728px;
  max-width: 100%;
}
.ad-slot-300x250 { min-height: 250px; width: 300px; max-width: 100%; }
.ad-slot-300x600 { min-height: 600px; width: 300px; max-width: 100%; }
.ad-slot-320x50  { min-height: 50px;  width: 320px; max-width: 100%; }

/* ── AD PLACEHOLDER: centraliza label + dimensões ── */
.ad-placeholder,
[class*="ad-slot-"] {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}
/* AdSense ins tag centralizado */
.ad-slot-leaderboard ins,
.ad-slot-300x250 ins,
.ad-slot-300x600 ins,
.ad-slot-320x50  ins {
  display: block !important;
  margin: 0 auto !important;
}
/* Estilo do placeholder em desenvolvimento */
.ad-placeholder {
  background: var(--ad-bg) !important;
  border: 1.5px dashed var(--ad-border) !important;
  border-radius: var(--radius) !important;
  width: 100%;
}
.ad-placeholder .ad-label-pill { font-size: 11px; letter-spacing: 1.2px; padding: 4px 12px; }
.ad-placeholder .ad-dims-text  { font-size: 12px; color: var(--ad-label); opacity: 0.65; }

/* ===== BREAKING TICKER ===== */
.breaking-bar {
  background: var(--ink);
  color: var(--white);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.breaking-badge {
  background: var(--orange);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.8px;
  flex-shrink: 0;
}
.ticker-wrap { overflow: hidden; flex: 1; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  gap: 48px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.ticker-item::before { content: "•"; color: var(--orange); margin-right: 8px; }

/* ===== MAIN CONTENT LAYOUT ===== */
#content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ===== SECTION LABELS ===== */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

/* ===== CARDS ===== */
.pp-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.pp-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: transparent;
}

.pp-card-hero {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}
.pp-card-hero .card-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  min-height: 240px;
}
.pp-card-hero .card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.pp-card-hero:hover .card-thumbnail img { transform: scale(1.04); }

.pp-card-sm .card-thumbnail {
  height: 140px;
  overflow: hidden;
  position: relative;
}
.pp-card-sm .card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.pp-card-sm:hover .card-thumbnail img { transform: scale(1.04); }

/* Thumbnail placeholder (no featured image) */
.card-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  background: linear-gradient(135deg, #FFD6C0 0%, #FF8A56 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
}
.pp-card-hero .card-thumbnail-placeholder { min-height: 240px; font-size: 80px; }

.card-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.8px;
}

.card-body { padding: 16px 20px 20px; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.card-meta .sep { width: 3px; height: 3px; background: var(--ink-muted); border-radius: 50%; }
.card-meta .tag-pill {
  background: var(--orange-pale);
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color var(--transition);
}
.pp-card-hero .card-title { font-size: 24px; }
.pp-card-sm .card-title {
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}
.pp-card:hover .card-title { color: var(--orange); }
.card-excerpt {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== IN-FEED AD (native) ===== */
.in-feed-ad-card {
  background: var(--ad-bg);
  border: 1.5px solid var(--ad-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ad-label-pill {
  display: inline-block;
  background: var(--ad-border);
  color: var(--ad-label);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 2px 8px;
  border-radius: 20px;
  align-self: flex-start;
}
.in-feed-ad-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.in-feed-ad-desc  { font-size: 13px; color: var(--ink-soft); }
.in-feed-ad-cta {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  align-self: flex-start;
  cursor: pointer;
  transition: all var(--transition);
}
.in-feed-ad-cta:hover { background: #E64D0F; }

/* ===== CATEGORY TABS ===== */
.category-tabs-wrapper {
  margin-bottom: 20px;
}
.category-tabs,
.species-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.category-tabs::-webkit-scrollbar,
.species-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  padding: 7px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
  background: var(--white);
  transition: all var(--transition);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1.4;
}
.cat-tab:hover,
.cat-tab.active {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
  box-shadow: 0 2px 8px rgba(255,92,26,0.25);
}
/* Espécies: tom levemente diferente no hover não-ativo */
.species-tabs .cat-tab:not(.active):hover {
  background: var(--orange-pale);
  color: var(--orange);
  border-color: var(--orange-light);
  box-shadow: none;
}

/* Contador de posts na aba */
.tab-count {
  display: inline-block;
  background: rgba(0,0,0,0.08);
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 4px;
  line-height: 1.4;
  vertical-align: middle;
}
.cat-tab.active .tab-count {
  background: rgba(255,255,255,0.25);
}

/* ===== NEWS LIST ===== */
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.news-item:hover .news-item-title { color: var(--orange); }
.news-item-img {
  width: 100px;
  min-width: 100px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.news-item-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.news-item-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #FFE8D6, #FFBF96);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.news-item-content { flex: 1; }
.news-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 4px;
  transition: color var(--transition);
}
.news-item-meta { font-size: 11.5px; color: var(--ink-muted); }

/* In-feed strip ad */
.in-feed-strip {
  background: var(--ad-bg);
  border: 1.5px solid var(--ad-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.in-feed-strip-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
}
.in-feed-strip-cta {
  background: var(--orange);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}
.in-feed-strip-cta:hover { background: #E64D0F; }

/* ===== PAGINATION ===== */
.pp-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 32px 0;
}
.pp-pagination .page-numbers {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: all var(--transition);
}
.pp-pagination .page-numbers:hover,
.pp-pagination .page-numbers.current {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ===== SINGLE ARTICLE ===== */
.single-article-header { margin-bottom: 28px; }
.article-category-link {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--orange);
  margin-bottom: 10px;
  display: inline-block;
}
.single-article-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 16px;
}
.article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-weight: 600; color: var(--ink-soft); }

.article-featured-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16/9;
}
.article-featured-image img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Article typography */
.entry-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}
.entry-content p { margin-bottom: 20px; }
.entry-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--ink);
  margin: 32px 0 14px;
}
.entry-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--ink);
  margin: 24px 0 12px;
}
.entry-content ul, .entry-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
  list-style: disc;
}
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; }
.entry-content blockquote {
  border-left: 3px solid var(--orange);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
}
.entry-content a { color: var(--orange); text-decoration: underline; }
.entry-content img {
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

/* In-article native ad */
.in-article-ad {
  background: var(--ad-bg);
  border: 1.5px solid var(--ad-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 28px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.in-article-ad-img {
  width: 80px; min-width: 80px; height: 80px;
  background: linear-gradient(135deg, #DDD0FF, #C4B0FF);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  overflow: hidden;
}
.in-article-ad-img img { width: 100%; height: 100%; object-fit: cover; }
.in-article-ad-content { flex: 1; }
.in-article-ad-sponsor {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--ad-label); margin-bottom: 4px;
}
.in-article-ad-headline { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.in-article-ad-sub { font-size: 12.5px; color: var(--ink-muted); }
.in-article-ad-link {
  font-size: 12px; font-weight: 700; color: var(--orange);
  margin-top: 6px; display: inline-block;
}

/* ===== MULTIPLEX ADS ===== */
.multiplex-section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  margin: 32px 0;
}
.multiplex-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.multiplex-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--ad-border);
  cursor: pointer;
  transition: all var(--transition);
}
.multiplex-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.multiplex-card-img {
  height: 90px;
  background: var(--ad-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.multiplex-card-body { padding: 10px; }
.multiplex-card-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--ad-label);
}
.multiplex-card-title {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  line-height: 1.35; margin-top: 3px;
}

/* ===== SIDEBAR ===== */
#secondary {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
}
.widget-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}

/* Trending widget */
.trending-list { display: flex; flex-direction: column; gap: 10px; }
.trending-item {
  display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer; padding: 6px; border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.trending-item:hover { background: var(--orange-pale); }
.trending-num {
  font-size: 18px; font-weight: 900;
  color: var(--border); min-width: 24px; line-height: 1;
  font-family: 'Playfair Display', serif;
}
.trending-item:hover .trending-num { color: var(--orange-light); }
.trending-text {
  font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--ink-soft);
}
.trending-item:hover .trending-text { color: var(--orange); }

/* Newsletter widget */
.newsletter-widget {
  background: linear-gradient(135deg, var(--ink) 0%, #2D2D2D 100%);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--white);
}
.newsletter-widget .widget-title { color: rgba(255,255,255,0.6); border-color: var(--orange); }
.newsletter-headline { font-family: 'Playfair Display', serif; font-size: 17px; margin-bottom: 6px; }
.newsletter-sub { font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.newsletter-form input[type="email"] {
  width: 100%; padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 8px;
  outline: none;
  transition: border-color var(--transition);
}
.newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-form input[type="email"]:focus { border-color: var(--orange); }
.newsletter-form input[type="submit"] {
  width: 100%; padding: 9px;
  background: var(--orange); color: var(--white);
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.newsletter-form input[type="submit"]:hover { background: #E64D0F; }

/* ===== FOOTER ===== */
#colophon {
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  padding: 48px 24px 24px;
  margin-top: 48px;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 12px;
  line-height: 1.6;
  max-width: 320px;
}
.footer-col-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: rgba(255,255,255,0.8); margin-bottom: 14px;
}
.footer-menu { display: flex; flex-direction: column; gap: 8px; }
.footer-menu a {
  font-size: 13px; color: rgba(255,255,255,0.4);
  transition: color var(--transition);
}
.footer-menu a:hover { color: var(--orange); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== COMMENTS ===== */
#comments { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-title { font-family: 'Playfair Display', serif; font-size: 22px; margin-bottom: 24px; }
.comment-list { margin-bottom: 32px; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.comment-author { font-weight: 600; font-size: 14px; color: var(--ink); }
.comment-meta { font-size: 12px; color: var(--ink-muted); margin-bottom: 8px; }
.comment-content { font-size: 14px; color: var(--ink-soft); line-height: 1.65; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--ink);
  background: var(--white); margin-bottom: 16px; outline: none;
  transition: border-color var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--orange); }
.comment-form textarea { resize: vertical; min-height: 120px; }
.comment-form input[type="submit"] {
  width: auto; padding: 10px 24px;
  background: var(--orange); color: var(--white);
  border: none; font-weight: 700; cursor: pointer;
  border-radius: 24px;
}

/* ===== SEARCH FORM ===== */
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  flex: 1; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color var(--transition);
}
.search-form input[type="search"]:focus { border-color: var(--orange); }
.search-form button {
  padding: 10px 16px; background: var(--orange); color: var(--white);
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; transition: all var(--transition);
}
.search-form button:hover { background: #E64D0F; }

/* ============================================================
   RESPONSIVE — Mobile-First Fixes
   Corrige: textos cortados, overflow, grid, imagens, JSON bug
   ============================================================ */

/* ── GLOBAL OVERFLOW PREVENTION ── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
*, *::before, *::after {
  max-width: 100%;
}
img, video, iframe, embed, object {
  max-width: 100% !important;
  height: auto;
}

/* ── WORD BREAK: evita textos saindo da tela ── */
.card-title,
.card-excerpt,
.news-item-title,
.single-article-title,
.entry-content,
.entry-content p,
.entry-content h2,
.entry-content h3,
.breaking-bar,
.ticker-item,
.in-feed-ad-title,
.in-feed-strip-text,
.newsletter-headline {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ── FIX: conteúdo JSON não deve aparecer como texto ──
   O excerpt/content pode vir como JSON se o post foi
   criado com campo personalizado. O CSS esconde isso
   usando truncagem — a correção real é no PHP (single.php).
*/
.card-excerpt,
.news-item-meta {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── TABLET (max 1024px) ── */
@media (max-width: 1024px) {
  #content {
    grid-template-columns: 1fr 260px;
    gap: 20px;
    padding: 20px 16px;
  }
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .pp-card-hero {
    grid-column: span 2;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .multiplex-grid { grid-template-columns: 1fr 1fr; }
}

/* ── MOBILE (max 768px) ── */
@media (max-width: 768px) {

  /* --- HEADER --- */
  .site-header-inner {
    padding: 0 12px;
    height: 56px;
    gap: 8px;
  }
  /* Logo mobile: contida em 140px máx */
  .site-branding {
    max-width: 140px;
    height: 56px;
  }
  .custom-logo,
  .custom-logo-link img,
  .site-branding img {
    max-height: 38px !important;
    max-width: 130px !important;
  }
  .site-title a { font-size: 18px; }
  .site-logo-icon { width: 30px; height: 30px; font-size: 15px; }
  #primary-navigation {
    display: none;
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 99;
    padding: 12px 0;
    flex-direction: column;
  }
  #primary-navigation.open { display: flex; }
  #primary-navigation ul {
    flex-direction: column;
    width: 100%;
  }
  #primary-navigation ul li a {
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 0;
  }
  .menu-toggle { display: block; }

  /* --- LEADERBOARD AD --- */
  .ad-leaderboard-bar { padding: 6px 0; }
  .ad-slot-leaderboard {
    width: 100% !important;
    min-height: 60px; /* smart banner mobile */
  }

  /* --- BREAKING TICKER --- */
  .breaking-bar { padding: 6px 12px; gap: 8px; }
  .breaking-badge { font-size: 9px; padding: 2px 6px; }
  .ticker-item { font-size: 12px; }

  /* --- CONTENT LAYOUT: coluna única --- */
  #content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 12px;
    max-width: 100%;
  }
  #primary { width: 100%; min-width: 0; }
  #secondary {
    position: static !important;
    width: 100%;
  }

  /* --- BENTO GRID: 1 coluna no mobile --- */
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .pp-card-hero {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  .pp-card-hero .card-title { font-size: 20px; }
  .pp-card-hero .card-thumbnail { min-height: 200px; }
  .pp-card-sm .card-title { font-size: 14px; }
  .pp-card-sm .card-thumbnail { height: 160px; }

  /* --- CARDS: sem overflow --- */
  .pp-card { overflow: hidden; }
  .card-body { padding: 12px 14px 14px; }
  .card-meta { font-size: 10px; flex-wrap: wrap; gap: 4px; }

  /* --- NEWS LIST --- */
  .news-item { padding: 12px 0; gap: 10px; }
  .news-item-img {
    width: 80px;
    min-width: 80px;
    height: 60px;
  }
  .news-item-title { font-size: 14px; }
  .news-item-meta { font-size: 11px; }

  /* --- IN-FEED ADS --- */
  .in-feed-strip {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  .in-feed-strip-text { font-size: 13px; width: 100%; }
  .in-feed-ad-card { padding: 12px 14px; }
  .in-feed-ad-title { font-size: 14px; }

  /* --- CATEGORY TABS --- */
  .category-tabs { gap: 6px; padding-bottom: 4px; }
  .cat-tab { font-size: 12px; padding: 5px 12px; }

  /* --- SINGLE ARTICLE --- */
  .single-article-title { font-size: 22px; line-height: 1.25; }
  .article-byline { font-size: 11.5px; }
  .entry-content { font-size: 15px; }
  .entry-content h2 { font-size: 20px; }
  .entry-content h3 { font-size: 17px; }
  .in-article-ad { flex-direction: column; }
  .in-article-ad-img { width: 100%; height: 120px; min-width: unset; }

  /* --- MULTIPLEX --- */
  .multiplex-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .multiplex-card-title { font-size: 11.5px; }

  /* --- SIDEBAR AD SLOTS --- */
  .ad-slot-300x250 { width: 100% !important; min-height: 250px; }
  .ad-slot-300x600 { width: 100% !important; min-height: 300px; }

  /* --- FOOTER --- */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  #colophon { padding: 32px 16px 80px; /* 80px = espaço para anchor ad */ }
  .footer-bottom { font-size: 11px; }

  /* --- SECTION LABELS --- */
  .section-label { font-size: 10px; margin-bottom: 12px; }
}

/* ── SMALL MOBILE (max 480px) ── */
@media (max-width: 480px) {

  /* Header compacto */
  .site-header-inner { padding: 0 10px; }
  .site-title a { font-size: 18px; }
  .site-logo-icon { width: 30px; height: 30px; font-size: 15px; }
  .btn-subscribe { font-size: 12px; padding: 6px 12px; }

  /* Bento hero ainda menor */
  .pp-card-hero .card-title { font-size: 18px; }
  .pp-card-hero .card-thumbnail { min-height: 180px; }

  /* News items mais compactos */
  .news-item-img { width: 70px; min-width: 70px; height: 52px; }
  .news-item-title { font-size: 13px; }

  /* Footer: 1 coluna */
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .multiplex-grid { grid-template-columns: 1fr; }

  /* In-article ad */
  .in-article-ad { padding: 12px; gap: 10px; }
  .in-article-ad-headline { font-size: 13px; }

  /* Anchor ad espaço */
  #colophon { padding-bottom: 90px; }
}

/* ── FIX: evita que o ticker cause scroll horizontal ── */
.ticker-wrap { overflow: hidden; flex: 1; min-width: 0; }
.ticker-track { will-change: transform; }

/* ── FIX: sidebar sticky só no desktop ── */
@media (min-width: 769px) {
  #secondary { position: sticky; top: 80px; }
}

/* ── FIX: bento grid no desktop mantém 3 colunas ── */
@media (min-width: 1025px) {
  .bento-grid { grid-template-columns: repeat(3, 1fr); }
  .pp-card-hero { grid-column: span 2; grid-row: span 2; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.45s ease both; }
.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.10s; }
.fade-up:nth-child(3) { animation-delay: 0.15s; }
.fade-up:nth-child(4) { animation-delay: 0.20s; }

/* ===== CATEGORY PAGE — Magazine Cards ===== */

/* Section label */
.cat-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ink-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cat-section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  display: block;
}

/* ── CARD BASE ── */
.cat-post-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.cat-post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: transparent;
}

/* ── BENTO: hero (span 2 cols) + 2 small ── */
.cat-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}
.cat-post-card--hero {
  grid-column: span 2;
}

/* ── IMAGE WRAPPER ── */
.cat-card-img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--border-soft);
  text-decoration: none;
}
.cat-post-card--hero .cat-card-img-wrap  { height: 320px; }
.cat-post-card--sm   .cat-card-img-wrap  { height: 200px; }
.cat-card-img-wrap--list                 { height: 240px; }

.cat-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.cat-post-card:hover .cat-card-img { transform: scale(1.04); }

.cat-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px; opacity: 0.25;
  background: var(--border-soft);
}
.cat-card-img-placeholder--list { font-size: 48px; }

/* Badges sobre a imagem */
.cat-card-badge {
  position: absolute; top: 14px; left: 14px;
  color: white; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 4px 12px; border-radius: 20px;
  pointer-events: none;
}
.cat-card-read-time {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0,0,0,0.55); color: white;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ── CARD BODY ── */
.cat-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cat-post-card--sm .cat-card-body   { padding: 16px 18px 18px; }
.cat-post-card--list .cat-card-body { padding: 20px 22px 22px; }

/* Meta: Categoria / Autor */
.cat-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.cat-card-sep { color: var(--border); font-size: 14px; }

/* Título */
.cat-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}
.cat-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
.cat-card-title a:hover { color: var(--orange); }
.cat-card-title--hero { font-size: 24px; font-weight: 900; }

/* Excerpt */
.cat-card-excerpt {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Footer: Leia Mais + Data */
.cat-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
  gap: 8px;
}
.cat-card-readmore {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity var(--transition);
  white-space: nowrap;
}
.cat-card-readmore:hover { opacity: 0.75; }
.cat-card-date {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ── GRID DE CARDS (lista completa) ── */
.cat-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
/* Ad strip no meio do grid ocupa 2 colunas */
.cat-card-grid .in-feed-strip {
  grid-column: span 2;
}

/* ── CATEGORY PAGE — Responsivo ── */
@media (max-width: 900px) {
  .cat-bento        { grid-template-columns: 1fr; }
  .cat-post-card--hero { grid-column: span 1; }
  .cat-post-card--hero .cat-card-img-wrap { height: 240px; }
  .cat-card-title--hero  { font-size: 20px; }
  .cat-card-grid    { grid-template-columns: 1fr; }
  .cat-card-grid .in-feed-strip { grid-column: span 1; }
}

@media (max-width: 600px) {
  .cat-post-card--hero .cat-card-img-wrap,
  .cat-post-card--sm   .cat-card-img-wrap,
  .cat-card-img-wrap--list { height: 200px; }
  .cat-card-body { padding: 14px 16px 16px; gap: 8px; }
  .cat-card-title--hero { font-size: 18px; }
  .cat-card-title       { font-size: 15px; }
  .cat-card-date        { display: none; }
}

/* ===== UTILITIES ===== */
.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;
}
.alignleft  { float: left;  margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin: 0 auto 16px; display: block; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--ink-muted); margin-top: 6px; }
