/* custom.css — SOLO lo que Tailwind no cubre: variables de tema, anuncios,
   tipografía del cuerpo del artículo (contenido de WP sin clases), tonos de categoría. */

:root {
  --paper: 255 255 255;
  --surface: 245 245 244;
  --ink: 17 17 20;
  --muted: 91 91 102;
  --line: 229 229 231;
  --line-strong: 150 150 160;
  --accent: 214 58 36;
  --accent-fg: 255 255 255;
}
.dark {
  --paper: 14 14 17;
  --surface: 24 24 28;
  --ink: 240 240 242;
  --muted: 161 161 170;
  --line: 42 42 48;
  --line-strong: 95 95 105;
  --accent: 255 106 82;
  --accent-fg: 14 14 17;
}
html { color-scheme: light; scroll-behavior: smooth; }
html.dark { color-scheme: dark; }
body { overflow-x: hidden; }

:focus-visible { outline: 3px solid rgb(var(--accent)); outline-offset: 2px; border-radius: 4px; }
.news-card:has(a:focus-visible) { outline: 3px solid rgb(var(--accent)); outline-offset: 3px; }
.news-card a:focus-visible { outline: none; }

.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Tonos de categoría (chips) ---------- */
.chip { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; border-radius: 999px; padding: .2rem .65rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: rgb(var(--tone)); background: rgb(var(--tone) / .12); }
.chip-overlay { color: #111114; background: rgb(255 255 255 / .92); }
.chip-overlay::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: rgb(var(--tone-l)); }
.tone-nacionales { --tone-l: 29 78 216; --tone: var(--tone-l); }
.tone-internacionales { --tone-l: 109 40 217; --tone: var(--tone-l); }
.tone-deportes { --tone-l: 21 128 61; --tone: var(--tone-l); }
.tone-politica { --tone-l: 185 28 28; --tone: var(--tone-l); }
.tone-gobierno { --tone-l: 3 105 161; --tone: var(--tone-l); }
.tone-entretenimiento { --tone-l: 190 24 93; --tone: var(--tone-l); }
.tone-economia { --tone-l: 161 98 7; --tone: var(--tone-l); }
.tone-ciencia-y-tecnologia { --tone-l: 15 118 110; --tone: var(--tone-l); }
.tone-salud { --tone-l: 4 120 87; --tone: var(--tone-l); }
.tone-estilo-de-vida { --tone-l: 162 28 175; --tone: var(--tone-l); }
.dark .tone-nacionales { --tone: 147 197 253; }
.dark .tone-internacionales { --tone: 196 181 253; }
.dark .tone-deportes { --tone: 134 239 172; }
.dark .tone-politica { --tone: 252 165 165; }
.dark .tone-gobierno { --tone: 125 211 252; }
.dark .tone-entretenimiento { --tone: 249 168 212; }
.dark .tone-economia { --tone: 252 211 77; }
.dark .tone-ciencia-y-tecnologia { --tone: 94 234 212; }
.dark .tone-salud { --tone: 110 231 183; }
.dark .tone-estilo-de-vida { --tone: 240 171 252; }

/* ---------- Componente de anuncio: .ad-slot + modificador ---------- */
.ad-wrap { display: flex; justify-content: center; width: 100%; }
.ad-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; width: 100%;
  border: 2px dashed rgb(var(--line-strong)); border-radius: .75rem; background: rgb(var(--surface)); color: rgb(var(--muted));
  font-size: .75rem; text-align: center; overflow: hidden; }
.ad-slot .ad-label { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ad-300x250 { max-width: 300px; aspect-ratio: 300 / 250; }
.ad-300x600 { max-width: 300px; aspect-ratio: 300 / 600; }
.ad-1000x90 { max-width: 1000px; aspect-ratio: 1000 / 90; }
.ad-1000x90 .ad-size-m { display: none; }
@media (max-width: 767px) {
  .ad-1000x90 { max-width: 320px; aspect-ratio: 320 / 100; }
  .ad-1000x90 .ad-size-d { display: none; }
  .ad-1000x90 .ad-size-m { display: inline; }
}

/* ---------- Cinta de última hora ---------- */
.ticker-track { width: max-content; will-change: transform; }

/* ---------- Cuerpo del artículo (HTML que vendrá de the_content()) ---------- */
.article-body { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.8; }
.article-body > * + * { margin-top: 1.25em; }
.article-body h2 { font-family: Newsreader, Georgia, serif; font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); line-height: 1.2; font-weight: 700; margin-top: 1.9em; }
.article-body h3 { font-weight: 700; font-size: 1.2em; margin-top: 1.6em; }
.article-body a { color: rgb(var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li + li { margin-top: .5em; }
.article-body blockquote { border-left: 4px solid rgb(var(--accent)); padding: .25em 0 .25em 1.2em; margin: 2em 0;
  font-family: Newsreader, Georgia, serif; font-size: 1.35em; font-style: italic; line-height: 1.4; }
.article-body blockquote cite { display: block; margin-top: .6em; font: 600 .75em/1 Inter, sans-serif; font-style: normal; color: rgb(var(--muted)); }
.article-body figure img { width: 100%; height: auto; }
.article-body figcaption { margin-top: .6rem; font-size: .85rem; color: rgb(var(--muted)); line-height: 1.4; }

/* ---------- Visor de historias ---------- */
.story-bar > i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
