/*!
 * Theme Name: 24/7 Periodico Digital
 * Description: CSS principal del tema
 * Version: 1.0.0
 */

:root {
  --bg:      oklch(99% 0.002 95);
  --surface: oklch(100% 0 0);
  --fg:      oklch(15% 0.02 240);
  --muted:   oklch(48% 0.015 250);
  --border:  oklch(90% 0.008 240);
  --accent:  oklch(50% 0.22 28);
  --accent-light: oklch(60% 0.16 28);
  --py-blue: oklch(55% 0.18 260);
  --py-red:  oklch(52% 0.23 28);
  --tag-bg:  oklch(95% 0.003 250);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Serif 4', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* ── Themes ── */
body.theme-azul {
  --bg:      oklch(20% 0.02 260);
  --surface: oklch(24% 0.025 260);
  --fg:      oklch(96% 0.005 260);
  --muted:   oklch(72% 0.012 260);
  --border:  oklch(35% 0.02 260);
  --accent:  oklch(72% 0.12 220);
  --accent-light: oklch(78% 0.10 220);
  --py-blue: oklch(65% 0.14 240);
  --py-red:  oklch(72% 0.12 220);
  --tag-bg:  oklch(28% 0.015 260);
}
body.theme-teal {
  --bg:      oklch(98% 0.004 250);
  --surface: oklch(100% 0 0);
  --fg:      oklch(15% 0.02 240);
  --muted:   oklch(48% 0.015 250);
  --border:  oklch(90% 0.008 240);
  --accent:  oklch(55% 0.14 180);
  --accent-light: oklch(62% 0.10 180);
  --py-blue: oklch(55% 0.18 260);
  --py-red:  oklch(55% 0.14 180);
  --tag-bg:  oklch(95% 0.003 250);
}
body.theme-dorado {
  --bg:      oklch(98% 0.004 95);
  --surface: oklch(100% 0 0);
  --fg:      oklch(15% 0.02 90);
  --muted:   oklch(48% 0.015 90);
  --border:  oklch(90% 0.008 90);
  --accent:  oklch(60% 0.14 80);
  --accent-light: oklch(68% 0.10 80);
  --py-blue: oklch(55% 0.18 260);
  --py-red:  oklch(60% 0.14 80);
  --tag-bg:  oklch(95% 0.003 90);
}
body.theme-violeta {
  --bg:      oklch(98% 0.004 300);
  --surface: oklch(100% 0 0);
  --fg:      oklch(15% 0.02 300);
  --muted:   oklch(48% 0.015 300);
  --border:  oklch(90% 0.008 300);
  --accent:  oklch(52% 0.18 300);
  --accent-light: oklch(60% 0.14 300);
  --py-blue: oklch(55% 0.18 260);
  --py-red:  oklch(52% 0.18 300);
  --tag-bg:  oklch(95% 0.003 300);
}

/* ══════════════════════════════════════════
   Links
   ══════════════════════════════════════════ */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   Images
   ══════════════════════════════════════════ */
img {
  max-width: 100%;
  height: auto;
}

/* ══════════════════════════════════════════
   Masthead / Header
   ══════════════════════════════════════════ */
.masthead {
  background: var(--surface);
  border-bottom: 3px solid var(--fg);
  padding: 24px 0 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.masthead-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.masthead-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
}
.masthead-ad { justify-self: end; }
.masthead-logo {
  display: block;
  max-height: 56px;
  max-width: 220px;
  object-fit: contain;
}
.masthead-title-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--fg);
  text-transform: uppercase;
}
.masthead-sub {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.masthead-sub .sep { color: var(--border); }
.masthead-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Ad slot in masthead */
.ad-slot-masthead {
  width: 180px;
  height: 90px;
  background: oklch(92% 0.003 250);
  border: 2px dashed var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 8px;
}
.ad-slot-masthead .ad-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ad-slot-masthead .ad-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

/* ══════════════════════════════════════════
   Primary Navigation
   ══════════════════════════════════════════ */
.nav-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 99;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.masthead ~ .nav-bar { top: auto; }
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
.nav-inner ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
}
.nav-inner li { position: relative; }
.nav-inner a {
  display: block;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 590;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-inner a:hover,
.nav-inner .current-menu-item > a,
.nav-inner .current_page_parent > a {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.nav-cta {
  margin-left: auto;
  padding: 6px 14px !important;
  border: 1px solid var(--accent) !important;
  border-radius: 4px;
  color: var(--accent) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--accent) !important;
  transition: background 0.15s, color 0.15s;
}
.nav-cta:hover {
  background: var(--accent);
  color: #fff !important;
}

/* Submenus */
.nav-inner .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 200px;
  flex-direction: column;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.nav-inner li:hover > .sub-menu { display: flex; }
.nav-inner .sub-menu a {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-transform: none;
  font-weight: 500;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  color: var(--fg);
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  margin: 5px 0;
  transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Nav fade indicator */
.nav-fade {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, var(--surface));
  pointer-events: none;
  z-index: 2;
  display: none;
}

/* ══════════════════════════════════════════
   Theme Switcher
   ══════════════════════════════════════════ */
.theme-toggle {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 200;
}
.theme-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
}
.theme-toggle-btn:hover {
  background: var(--tag-bg);
  color: var(--fg);
}
.theme-menu {
  position: absolute;
  top: 44px;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  padding: 6px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 201;
}
.theme-menu.open { display: flex; }
.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.theme-option:hover { background: var(--tag-bg); }
.theme-option.active { background: var(--tag-bg); outline: 1px solid var(--border); }
.theme-option img {
  width: 48px;
  height: 24px;
  object-fit: contain;
  border-radius: 3px;
  background: var(--bg);
}
.theme-option span { flex: 1; }
.theme-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

/* ══════════════════════════════════════════
   Main Layout Grid
   ══════════════════════════════════════════ */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}
.page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto auto;
  gap: 28px;
}
.main-rail { grid-column: 1; }
.side-rail { grid-column: 2; grid-row: 1 / span 3; }
.bottom-rail { grid-column: 1; }

/* ══════════════════════════════════════════
   Story Cards
   ══════════════════════════════════════════ */
.story-lead { margin-bottom: 28px; }
.story-lead-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  background: var(--border);
  display: block;
  border: 1px solid var(--border);
}
.story-kicker {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.story-lead .story-headline {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 8px 0 10px;
  color: var(--fg);
}
.story-lead .story-deck {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 65ch;
}
.story-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 8px;
}
.story-meta a {
  color: var(--accent);
  text-decoration: none;
}
.story-meta a:hover { text-decoration: underline; }

.story-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.story-card {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.story-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.story-card .story-headline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--fg);
}
.story-card .story-deck {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   Sidebar
   ══════════════════════════════════════════ */
.side-rail {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}
.side-section {
  margin-bottom: 28px;
}
.side-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--accent);
}
.side-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.side-item:last-child { border-bottom: none; }
.side-item .story-headline {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 590;
  line-height: 1.35;
  margin-bottom: 4px;
  color: var(--fg);
}
.side-item .story-meta {
  font-size: 10px;
  margin-top: 2px;
}

/* Weather widget */
.weather-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 2px;
  margin-bottom: 28px;
}
.weather-temp {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--fg);
}
.weather-desc {
  font-size: 13px;
  color: var(--muted);
}

/* Opinion widget */
.opinion-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.opinion-item:last-child { border-bottom: none; }
.opinion-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tag-bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}
.opinion-text { flex: 1; }
.opinion-text .story-headline {
  font-size: 14px;
  font-weight: 590;
  line-height: 1.35;
  color: var(--fg);
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════
   Section Dividers & Titles
   ══════════════════════════════════════════ */
.section-divider {
  grid-column: 1 / -1;
  border: none;
  border-top: 2px solid var(--fg);
  margin: 8px 0 24px;
  position: relative;
}
.section-divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  color: var(--fg);
}

/* ══════════════════════════════════════════
   Footer
   ══════════════════════════════════════════ */
.page-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  border-top: 3px solid var(--fg);
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer-links li { list-style: none; }
.footer-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.footer-links a:hover { color: var(--fg); }
.footer-copy {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.footer-copy .accent { color: var(--accent); }

/* ══════════════════════════════════════════
   Ad Slots
   ══════════════════════════════════════════ */
.ad-slot {
  background: oklch(92% 0.005 250);
  border: 1px dashed var(--border);
  border-radius: 4px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  padding: 12px;
  margin: 0;
}
.ad-slot a { color: var(--muted); }
.ad-slot img { max-width: 100%; height: auto; }
.ad-slot-banner {
  min-height: 90px;
  max-width: 970px;
  margin: 0 auto;
  width: 100%;
}
.ad-slot-inline {
  min-height: 140px;
  margin: 28px 0;
}
.ad-slot-leaderboard {
  min-height: 250px;
  margin: 32px 0;
}
.ad-slot-sidebar {
  min-height: 120px;
  margin: 20px 0 28px;
  font-size: 13px;
}
.ad-slot-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 6px;
}
.ad-slot-top {
  background: oklch(94% 0.004 250);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}
.ad-slot-bottom {
  background: oklch(94% 0.004 250);
  border-top: 1px solid var(--border);
  padding: 20px;
  margin-top: 0;
}

/* ══════════════════════════════════════════
   Single Post
   ══════════════════════════════════════════ */
.single-article {
  max-width: 800px;
  margin: 0 auto;
}
.single-article .story-lead-img {
  height: 480px;
  margin-bottom: 24px;
}
.single-article .story-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
  color: var(--fg);
}
.single-article .story-deck {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 20px;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.article-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tag-bg);
}
.article-author-info { flex: 1; }
.article-author-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
}
.article-author-role {
  font-size: 12px;
  color: var(--muted);
}
.article-content {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  color: var(--fg);
}
.article-content p {
  margin-bottom: 1.25em;
}
.article-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin: 1.5em 0 0.5em;
  color: var(--fg);
}
.article-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  margin: 1.25em 0 0.5em;
}
.article-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5em 0;
  padding: 12px 24px;
  font-size: 20px;
  font-style: italic;
  color: var(--muted);
  background: var(--tag-bg);
}
.article-content ul,
.article-content ol {
  margin: 0 0 1.25em 1.5em;
}
.article-content li { margin-bottom: 0.5em; }
.article-content figure {
  margin: 1.5em 0;
}
.article-content figcaption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}
.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
}
.article-content .wp-caption-text { font-size: 13px; color: var(--muted); }

/* Article footer */
.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.article-tags a {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  background: var(--tag-bg);
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.article-tags a:hover {
  background: var(--accent);
  color: #fff;
}

/* Author bio box */
.author-bio {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: 32px;
}
.author-bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--tag-bg);
}
.author-bio-content { flex: 1; }
.author-bio-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.author-bio-name a { color: var(--fg); text-decoration: none; }
.author-bio-name a:hover { color: var(--accent); }
.author-bio-role { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.author-bio-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }
.author-bio-social {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.author-bio-social a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.author-bio-social a:hover { color: var(--accent); }

/* Related posts */
.related-posts {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px solid var(--fg);
}

/* ══════════════════════════════════════════
   Archive / Blog list
   ══════════════════════════════════════════ */
.archive-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.archive-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin-bottom: 8px;
}
.archive-desc {
  font-size: 16px;
  color: var(--muted);
  max-width: 65ch;
}
.archive-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.archive-item-img {
  width: 280px;
  height: 180px;
  object-fit: cover;
  background: var(--border);
  border: 1px solid var(--border);
}
.archive-item-content { flex: 1; }
.archive-item .story-headline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--fg);
}
.archive-item .story-deck {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════
   Author archive
   ══════════════════════════════════════════ */
.author-header {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.author-header-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tag-bg);
  flex-shrink: 0;
}
.author-header-name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
}
.author-header-role { font-size: 14px; color: var(--accent); margin-bottom: 6px; }
.author-header-bio { font-size: 15px; color: var(--muted); max-width: 65ch; }

/* ══════════════════════════════════════════
   Taxonomy: Personalidad archive
   ══════════════════════════════════════════ */
.personalidad-header {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.personalidad-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.personalidad-foto {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--tag-bg);
  flex-shrink: 0;
}
.personalidad-cargo {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════
   Pagination
   ══════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s;
}
.pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ══════════════════════════════════════════
   Search
   ══════════════════════════════════════════ */
.search-form {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-body);
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
}
.search-form button {
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}
.search-form button:hover { opacity: 0.9; }
.search-info {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.search-highlight { color: var(--accent); font-weight: 600; }

/* ══════════════════════════════════════════
   Comments
   ══════════════════════════════════════════ */
.comments-area {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 2px solid var(--fg);
}
.comments-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--fg);
}
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment-list li { margin-bottom: 24px; }
.comment-body {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.comment-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--tag-bg);
}
.comment-content { flex: 1; }
.comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 2px;
}
.comment-metadata {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.comment-metadata a { color: var(--muted); }
.comment-text { font-size: 15px; line-height: 1.6; }
.comment-text p { margin-bottom: 0.75em; }
.comment-reply-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.comment-reply-link:hover { text-decoration: underline; }

/* Comment form */
.comment-respond { margin-top: 32px; }
.comment-reply-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}
.comment-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--fg);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-body);
  margin-bottom: 12px;
}
.comment-form textarea { resize: vertical; min-height: 120px; }
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.comment-form .submit {
  padding: 10px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}
.comment-form .submit:hover { opacity: 0.9; }
.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   404 Page
   ══════════════════════════════════════════ */
.error-404 {
  text-align: center;
  padding: 80px 16px;
  max-width: 600px;
  margin: 0 auto;
}
.error-404-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
}
.error-404-text {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ══════════════════════════════════════════
   WordPress Core Alignments
   ══════════════════════════════════════════ */
.alignleft { float: left; margin: 0.5em 1.5em 1em 0; }
.alignright { float: right; margin: 0.5em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100vw; margin-left: calc(-50vw + 50%); }
.wp-caption { max-width: 100%; }
.wp-caption img { display: block; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
}
.screen-reader-text:focus {
  clip: auto !important;
  display: block;
  height: auto;
  width: auto;
  padding: 15px 23px 14px;
  background: var(--surface);
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
  z-index: 100000;
  top: 5px;
  left: 5px;
  border: 2px solid var(--accent);
}
.sticky { }
.bypostauthor { }

/* ══════════════════════════════════════════
   Gallery (WP)
   ══════════════════════════════════════════ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 1.5em 0;
}
.gallery-item { overflow: hidden; }
.gallery-item img { display: block; width: 100%; height: auto; border: 1px solid var(--border); }
.gallery-caption { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ══════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════ */
.btn {
  display: inline-block;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { opacity: 0.9; color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* ══════════════════════════════════════════
   Utility
   ══════════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

/* Tablet (768px – 1023px) */
@media (max-width: 1023px) {
  .page-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .page { padding: 24px 20px 40px; }
  .side-rail {
    grid-column: 1;
    grid-row: auto;
    border-left: none;
    padding-left: 0;
    border-top: 2px solid var(--fg);
    padding-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .weather-widget { margin: 0; }
  .story-row { grid-template-columns: 1fr 1fr; gap: 20px; }
  .story-lead-img { height: 300px; }
  .story-card-img { height: 160px; }
  .masthead { padding: 18px 0 12px; position: relative; }
  .masthead-inner { padding: 0 20px; }
  .masthead-brand { gap: 10px; }
  .masthead-logo { max-height: 48px; max-width: 180px; }
  .masthead-title-text { font-size: clamp(16px, 2.5vw, 22px); }
  .ad-slot-masthead { width: 160px; height: 80px; }
  .ad-slot-masthead .ad-text { font-size: 10px; }
  .nav-bar { position: sticky; top: 0; }
  .section-divider { grid-column: 1; }
  .bottom-rail .story-row { grid-template-columns: 1fr 1fr !important; }

  /* Archive */
  .archive-item { grid-template-columns: 1fr; gap: 16px; }
  .archive-item-img { width: 100%; height: 220px; }

  /* Single */
  .single-article .story-lead-img { height: 340px; }
  .single-article .story-headline { font-size: clamp(24px, 5vw, 36px); }
  .article-content { font-size: 17px; }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
  .page { padding: 18px 14px 36px; gap: 18px; }

  .masthead {
    padding: 14px 0 10px;
    position: relative;
    border-bottom-width: 2px;
  }
  .masthead-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 14px;
  }
  .masthead-ad { display: none; }
  .masthead-brand { gap: 8px; flex-direction: column; }
  .masthead-logo { max-height: 44px; max-width: 160px; }
  .masthead-title-text { font-size: 18px; letter-spacing: 0; }
  .masthead-sub { font-size: 10px; letter-spacing: 0.06em; gap: 6px; }
  .masthead-date { font-size: 10px; }

  .menu-toggle { display: block; }
  .nav-inner { padding: 0 8px; position: relative; }
  .nav-inner ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 2px solid var(--fg);
    z-index: 300;
    box-shadow: 0 16px 32px rgba(0,0,0,0.15);
  }
  .nav-inner ul.open { display: flex; }
  .nav-inner li { width: 100%; }
  .nav-inner a {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
  }
  .nav-cta { margin-left: 0; text-align: center; }
  .nav-fade { display: None; }

  /* Submenus mobile */
  .nav-inner .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
  }
  .nav-inner .sub-menu a { padding-left: 32px; font-size: 12px; }

  .side-rail {
    grid-column: 1;
    grid-row: auto;
    display: block;
    border-left: none;
    padding-left: 0;
    border-top: 2px solid var(--fg);
    padding-top: 18px;
  }
  .story-row { grid-template-columns: 1fr; gap: 16px; }
  .story-lead-img { height: 220px; }
  .story-lead .story-headline { font-size: clamp(20px, 4vw, 26px); }
  .story-lead .story-deck { font-size: 15px; }
  .story-card-img { height: 200px; }
  .story-card .story-headline { font-size: 18px; }
  .story-card .story-deck { font-size: 13px; }
  .section-divider { grid-column: 1; margin: 4px 0 18px; }
  .section-title { font-size: 20px; }
  .side-label { font-size: 10px; letter-spacing: 0.08em; }
  .side-item .story-headline { font-size: 14px; }
  .weather-temp { font-size: 28px; }
  .bottom-rail .story-row { grid-template-columns: 1fr !important; }
  .bottom-rail .story-card-img { height: 180px !important; }

  .page-footer { padding: 24px 14px 36px; }
  .footer-links { gap: 14px; }
  .footer-links a { font-size: 11px; }
  .footer-copy { font-size: 10px; }

  /* Archive */
  .archive-item-img { height: 180px; }
  .archive-item .story-headline { font-size: 18px; }

  /* Single */
  .single-article .story-lead-img { height: 240px; }
  .single-article .story-deck { font-size: 16px; }
  .article-content { font-size: 16px; }
  .author-header { flex-direction: column; text-align: center; }
  .author-bio { flex-direction: column; text-align: center; }

  .comment-body { flex-direction: column; }
}

/* Small mobile (< 400px) */
@media (max-width: 399px) {
  .masthead-brand { gap: 6px; }
  .masthead-logo { max-height: 38px; max-width: 140px; }
  .masthead-title-text { font-size: 16px; }
  .story-lead-img { height: 180px; }
  .story-card-img { height: 160px; }
  .story-lead .story-headline { font-size: 19px; }
}

/* ══════════════════════════════════════════
   Print styles
   ══════════════════════════════════════════ */
@media print {
  .nav-bar, .masthead-ad, .ad-slot, .ad-slot-top, .ad-slot-bottom,
  .side-rail, .theme-toggle, .menu-toggle, .nav-fade,
  .comment-respond, .footer-links { display: none !important; }

  body { background: #fff; color: #000; }
  .page { max-width: 100%; padding: 0; }
  .page-grid { display: block; }
  .single-article { max-width: 100%; }
  a { color: #000; text-decoration: underline; }
  .masthead { position: static; border-bottom: 2px solid #000; padding: 12px 0; }
  .page-footer { border-top: 2px solid #000; }
}
