/* ============================================================
   EL ÚLTIMO GRITO — hoja de estilos
   Paleta: fondo azul-negro, blanco, acento rojo.
   ============================================================ */
:root {
  --bg:        #0c1720;   /* fondo principal (color EXACTO del fondo del logo) */
  --bg-soft:   #13212d;   /* paneles / tarjetas */
  --bg-softer: #1c2c3a;   /* hover, bordes suaves */
  --line:      #263646;
  --ink:       #f4f6f8;   /* texto principal */
  --ink-soft:  #aeb7c2;   /* texto secundario */
  --ink-faint: #7c8895;
  --red:       #d8232a;   /* acento de marca */
  --red-dark:  #b31d23;
  --red-soft:  rgba(216,35,42,0.12);
  --white:     #ffffff;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 8px 30px rgba(0,0,0,0.35);
  --maxw:      1200px;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-serif:'Source Serif 4', Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { margin: 0; line-height: 1.1; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Etiquetas / botones ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .72rem;
  font-weight: 600;
  color: var(--red);
  border-left: 3px solid var(--red);
  padding: 1px 0 1px 7px;
}
.tag--lg { font-size: .85rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: .85rem;
  padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: .15s ease;
  background: var(--bg-softer); color: var(--ink);
}
.btn:hover { background: var(--line); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn--ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn--danger { background: transparent; border-color: rgba(216,35,42,.4); color: #ff6b6b; }
.btn--danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn--block { width: 100%; }
.btn--sm { padding: 5px 11px; font-size: .72rem; }

/* ============================================================
   CABECERA
   ============================================================ */
.masthead { border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 50; background: var(--bg); }
.masthead__top { background: var(--bg); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand__logo { width: 52px; height: 52px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; }
.brand__name {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: 1.7rem; letter-spacing: .02em; line-height: 1; color: var(--white);
}
.brand__slogan { font-size: .72rem; color: var(--ink-faint); letter-spacing: .02em; margin-top: 3px; }
.masthead__meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.masthead__date { font-size: .74rem; color: var(--ink-faint); text-transform: capitalize; }
.masthead__admin {
  font-family: var(--font-head); text-transform: uppercase; font-size: .74rem;
  letter-spacing: .06em; color: var(--ink-soft); border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 20px; transition: .15s;
}
.masthead__admin:hover { color: var(--white); border-color: var(--red); }

.mainnav { background: var(--bg); border-top: 1px solid var(--line); }
.mainnav__inner { display: flex; align-items: center; }
.mainnav__toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.4rem; cursor: pointer; padding: 10px 0; }
.mainnav__links { list-style: none; display: flex; margin: 0; padding: 0; flex-wrap: wrap; }
.mainnav__links a {
  display: block; font-family: var(--font-head); text-transform: uppercase;
  font-weight: 500; letter-spacing: .05em; font-size: .9rem;
  padding: 13px 16px; color: var(--ink-soft); border-bottom: 3px solid transparent;
  transition: .15s; margin-bottom: -1px;
}
.mainnav__links a:hover { color: var(--red); border-bottom-color: var(--red); }
.mainnav__links a.is-active { color: var(--white); border-bottom-color: var(--red); }

/* ============================================================
   PORTADA
   ============================================================ */
main { min-height: 60vh; padding-bottom: 40px; }

.hero {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 0;
  margin: 28px 0 10px; background: var(--bg-soft);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.hero__media { display: block; position: relative; aspect-ratio: 16/10; background: #0a1219; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg,#15242f,#0a1219); }
.hero__placeholder img { width: 180px; height: auto; object-fit: contain; opacity: .55; }
.hero__content { padding: 34px 34px; display: flex; flex-direction: column; justify-content: center; }
.hero__kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero__flag {
  font-family: var(--font-head); text-transform: uppercase; font-weight: 700;
  font-size: .72rem; letter-spacing: .08em; background: var(--red); color: #fff;
  padding: 3px 9px; border-radius: 3px;
}
.hero__title {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: 2.4rem; letter-spacing: .01em; line-height: 1.02; color: var(--white);
}
.hero__title a:hover { color: var(--red); }
.hero__excerpt { color: var(--ink-soft); font-size: 1.08rem; margin: 16px 0 0; font-family: var(--font-serif); }
.hero__meta { margin-top: 20px; display: flex; gap: 14px; font-size: .8rem; color: var(--ink-faint); text-transform: capitalize; }
.hero__meta span { color: var(--red); font-weight: 600; }

/* ---------- Banner de video (YouTube) ---------- */
.video-banner {
  margin: 30px 0 10px; display: grid; grid-template-columns: 1.55fr 1fr; gap: 0;
  background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.video-banner__player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-banner__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-banner__info { padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; }
.video-banner__title { font-family: var(--font-head); text-transform: uppercase; font-weight: 700; font-size: 1.7rem; color: var(--white); letter-spacing: .01em; margin: 12px 0 0; line-height: 1.05; }
.video-banner__lead { color: var(--ink-soft); font-family: var(--font-serif); font-size: 1rem; margin: 12px 0 20px; }
.video-banner__info .btn { align-self: flex-start; }

/* Secciones y grids */
.section-block { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-bottom: 22px; }
.section-head__title {
  font-family: var(--font-head); text-transform: uppercase; font-weight: 700;
  font-size: 1.5rem; letter-spacing: .02em; color: var(--white);
  position: relative; padding-left: 14px;
}
.section-head__title::before { content:''; position:absolute; left:0; top:2px; bottom:2px; width:5px; background: var(--red); }
.section-head__more { font-family: var(--font-head); text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; color: var(--ink-faint); }
.section-head__more:hover { color: var(--red); }

.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Tarjeta */
.card { display: flex; flex-direction: column; background: var(--bg-soft); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: .18s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--bg-softer); box-shadow: var(--shadow); }
.card__media { display: block; aspect-ratio: 16/10; background: #0a1219; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg,#15242f,#0a1219); }
.card__placeholder span { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em; color: #3a4552; font-size: .8rem; }
.card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__title { font-family: var(--font-head); text-transform: uppercase; font-weight: 600; font-size: 1.12rem; line-height: 1.12; letter-spacing: .01em; }
.card__title a:hover { color: var(--red); }
.card__excerpt { color: var(--ink-soft); font-size: .9rem; margin: 0; font-family: var(--font-serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin-top: auto; display: flex; gap: 12px; font-size: .74rem; color: var(--ink-faint); padding-top: 6px; }
.card__meta span { color: var(--ink-soft); }

/* ---------- Acomodos en mosaico (por nota) ---------- */
.grid--3, .grid--4 { grid-auto-flow: row dense; }

/* DESTACADA: ocupa 2 columnas, imagen grande y titular mayor */
.card--feature { grid-column: span 2; }
.card--feature .card__media { aspect-ratio: 16/8; }
.card--feature .card__body { padding: 20px 22px 22px; }
.card--feature .card__title { font-size: 1.7rem; }
.card--feature .card__excerpt { font-size: 1rem; -webkit-line-clamp: 2; }

/* HORIZONTAL: imagen a la izquierda, texto a la derecha (ocupa 2 columnas) */
.card--horizontal { grid-column: span 2; flex-direction: row; }
.card--horizontal .card__media { width: 44%; flex-shrink: 0; aspect-ratio: auto; }
.card--horizontal .card__media img,
.card--horizontal .card__placeholder { height: 100%; }
.card--horizontal .card__body { flex: 1; justify-content: center; }
.card--horizontal .card__title { font-size: 1.25rem; }

/* SUPERPUESTO: el texto va encima de la imagen */
.card--overlay { position: relative; }
.card--overlay .card__media { aspect-ratio: 3/4; }
.card--overlay .card__body {
  position: absolute; inset: auto 0 0 0; z-index: 2; gap: 6px;
  background: linear-gradient(to top, rgba(3,7,11,.92) 12%, rgba(3,7,11,.55) 55%, rgba(3,7,11,0));
  padding: 22px 18px 16px; pointer-events: none;
}
.card--overlay .card__body a, .card--overlay .card__body time { pointer-events: auto; }
.card--overlay .card__title, .card--overlay .card__title a { color: #fff; }
.card--overlay .card__meta span, .card--overlay .card__meta { color: rgba(255,255,255,.8); }

/* SOLO TEXTO: sin imagen, titular protagonista */
.card--text { justify-content: center; padding: 6px 4px; border-left: 4px solid var(--red); }
.card--text .card__body { padding: 20px 20px 20px 22px; }
.card--text .card__title { font-size: 1.5rem; }
.card--text .card__excerpt { -webkit-line-clamp: 4; font-size: .98rem; }

@media (max-width: 900px) {
  .card--feature, .card--horizontal { grid-column: span 1; }
  .card--horizontal { flex-direction: column; }
  .card--horizontal .card__media { width: 100%; aspect-ratio: 16/10; }
}

/* ============================================================
   SECCIÓN (listado) — temas por sección + animación de pintado
   ============================================================ */
/* Contenedor a pantalla completa (full-bleed) con su propio color.
   Se remapean las variables de paleta SOLO dentro de la sección, así
   todas las tarjetas/textos adoptan el tema sin tocar la cabecera. */
.section-page {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 132px);
  padding-bottom: 54px;
  /* --- tema por defecto = identidad --- */
  --sec-bg:        #0c1720;
  --sec-accent:    #d8232a;
  --sec-ink:       #f4f6f8;
  --sec-ink-soft:  rgba(255,255,255,.72);
  --sec-ink-faint: rgba(255,255,255,.5);
  --sec-panel:     rgba(255,255,255,.055);
  --sec-panel-2:   rgba(255,255,255,.1);
  --sec-line:      rgba(255,255,255,.14);
  /* --- remapeo de la paleta global dentro de la sección --- */
  --bg:        var(--sec-bg);
  --bg-soft:   var(--sec-panel);
  --bg-softer: var(--sec-panel-2);
  --line:      var(--sec-line);
  --ink:       var(--sec-ink);
  --ink-soft:  var(--sec-ink-soft);
  --ink-faint: var(--sec-ink-faint);
  --red:       var(--sec-accent);
  background: var(--sec-bg);
  color: var(--sec-ink);
}
.section-page__inner { position: relative; z-index: 2; padding-top: 4px; }

/* Colores insignia por sección */
.theme-nacional      { --sec-bg: #0c1720; }                  /* navy identidad */
.theme-guerrero      { --sec-bg: #123a2a; }                  /* verde profundo */
.theme-tecnologia    { --sec-bg: #0a2733; }                  /* cian tecnológico */
.theme-internacional { --sec-bg: #12294d; }                  /* azul profundo */
.theme-politica      { --sec-bg: #241633; }                  /* violeta editorial */
.theme-otros         { --sec-bg: #161f29; }                  /* pizarra neutra */
.theme-nota-roja     {                                       /* rojo-negro dramático */
  --sec-bg: #1c0d10;
  --sec-accent: #e23b41;
  --sec-line: rgba(226,59,65,.28);
}
.theme-deportes {                                            /* ROJO insignia */
  --sec-bg: #b81420;
  --sec-accent: #ffffff;                                     /* detalles en blanco (insignia) */
  --sec-ink: #ffffff;
  --sec-ink-soft:  rgba(255,255,255,.82);
  --sec-ink-faint: rgba(255,255,255,.62);
  --sec-panel:   rgba(0,0,0,.18);                            /* pozos navy = detalle insignia */
  --sec-panel-2: rgba(0,0,0,.28);
  --sec-line:    rgba(255,255,255,.24);
}

/* Guerrero: fondo fotográfico (Carnaval) con capa oscura para legibilidad.
   Especificidad .section-page.theme-guerrero (0,2,0) para vencer al shorthand
   `background` de .section-page y conservar el color verde como respaldo. */
.section-page.theme-guerrero {
  background-color: #0d2b1f;                 /* respaldo si la imagen no carga */
  background-image:
    linear-gradient(180deg,
      rgba(8,26,18,.68) 0%,
      rgba(8,24,17,.80) 45%,
      rgba(7,20,14,.95) 100%),
    url('/img/guerrero-bg.jpg');
  background-repeat: no-repeat;
  background-position: center 15%;           /* mantiene al danzante a la vista */
  background-size: cover;
}
/* En pantallas grandes con puntero fino la foto queda fija (efecto telón). */
@media (min-width: 1024px) and (pointer: fine) {
  .section-page.theme-guerrero { background-attachment: fixed; }
}
/* La barra de título gana un respaldo con desenfoque para destacar sobre la foto. */
.theme-guerrero .section-title-bar {
  background: rgba(6, 20, 14, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Capa "cortina" que pinta la pantalla de arriba hacia abajo al entrar */
.section-page::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: #0c1720;                 /* tono insignia que se retira */
  clip-path: inset(100% 0 0 0);        /* estado final: oculta (reduced-motion) */
  pointer-events: none;
  animation: sectionPaint .9s cubic-bezier(.45,0,.15,1) both;
}
@keyframes sectionPaint {
  from { clip-path: inset(0 0 0 0); }        /* cubre todo con el tono insignia */
  to   { clip-path: inset(100% 0 0 0); }     /* se retira hacia abajo -> revela el color */
}
/* El contenido aparece justo cuando termina el pintado */
.section-page__inner { animation: sectionRise .55s ease .4s both; }
@keyframes sectionRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .section-page::before,
  .section-page__inner { animation: none; }
}
/* Versión estática (para la vista previa): sin cortina ni pantalla completa */
.section-page--static { min-height: 0; overflow: visible; padding-bottom: 0; }
.section-page--static::before { content: none; }
.section-page--static .section-page__inner { animation: none; }

.section-title-bar { margin: 30px 0 26px; padding: 22px 26px; background: var(--bg-soft); border-radius: var(--radius); border-left: 6px solid var(--red); }
.section-title-bar__kicker { display: inline-block; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; color: var(--red); margin-bottom: 6px; }
.section-title-bar h1 { font-family: var(--font-head); text-transform: uppercase; font-size: 2.2rem; color: var(--ink); letter-spacing: .02em; }
.section-title-bar p { margin: 6px 0 0; color: var(--ink-faint); }

/* ============================================================
   ARTÍCULO
   ============================================================ */
.article { padding: 34px 0 10px; }
.article__container { max-width: 760px; }
.article__header { margin-bottom: 24px; }
.article__title { font-family: var(--font-head); text-transform: uppercase; font-weight: 700; font-size: 2.6rem; line-height: 1.04; color: var(--white); margin: 14px 0 0; letter-spacing: .01em; }
.article__subtitle { font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink-soft); margin: 16px 0 0; line-height: 1.4; }
.article__byline { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-faint); text-transform: capitalize; }
.article__author { color: var(--red); font-weight: 600; text-transform: none; }
.article__cover { margin: 26px 0; }
.article__cover img { width: 100%; border-radius: var(--radius); }
.article__body { font-family: var(--font-serif); font-size: 1.18rem; line-height: 1.75; color: #e7ebef; }
.article__body p { margin: 0 0 1.25em; }
.article__body p:first-of-type::first-letter { font-family: var(--font-head); font-size: 3.4rem; font-weight: 700; float: left; line-height: .8; padding: 6px 10px 0 0; color: var(--red); }
.article__share { display: flex; align-items: center; gap: 12px; margin: 34px 0 10px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; }
.article__share span { color: var(--ink-faint); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; }
.article__share a { font-family: var(--font-head); text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; color: var(--ink-soft); border: 1px solid var(--line); padding: 5px 12px; border-radius: 20px; transition: .15s; }
.article__share a:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ============================================================
   ESTADOS VACÍOS
   ============================================================ */
.empty-state { text-align: center; padding: 70px 20px; }
.empty-state--tall { padding: 110px 20px; }
.empty-state img { width: 90px; opacity: .4; margin: 0 auto 20px; }
.empty-state h2 { font-family: var(--font-head); text-transform: uppercase; color: var(--white); margin-bottom: 10px; }
.empty-state p { color: var(--ink-faint); }
.empty-state a { color: var(--red); }

/* ============================================================
   PIE
   ============================================================ */
.site-footer { background: var(--bg-soft); border-top: 3px solid var(--red); margin-top: 50px; }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 40px; padding: 44px 20px; }
.site-footer__logo { width: 64px; margin-bottom: 14px; }
.site-footer__slogan { font-family: var(--font-head); text-transform: uppercase; color: var(--white); font-size: 1.05rem; letter-spacing: .02em; max-width: 240px; }
.site-footer h4 { font-family: var(--font-head); text-transform: uppercase; color: var(--white); font-size: 1rem; letter-spacing: .05em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.site-footer ul a { color: var(--ink-soft); font-size: .9rem; }
.site-footer ul a:hover { color: var(--red); }
.site-footer__about p { color: var(--ink-faint); font-size: .9rem; }
.site-footer__link { color: var(--red); font-family: var(--font-head); text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; display: block; }
.site-footer__social { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .9rem; margin: 6px 0 14px; transition: .15s; }
.site-footer__social:hover { color: var(--red); }
.site-footer__bottom { border-top: 1px solid var(--line); }
.site-footer__bottom p { color: var(--ink-faint); font-size: .8rem; padding: 16px 0; text-align: center; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-page { display: grid; place-items: center; min-height: 100vh; background: radial-gradient(circle at 50% 0%, #15242f, #0a1219); padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 38px 32px; text-align: center; box-shadow: var(--shadow); border-top: 3px solid var(--red); }
.login-card__logo { width: 78px; margin: 0 auto 12px; }
.login-card h1 { font-family: var(--font-head); text-transform: uppercase; color: var(--white); font-size: 1.7rem; letter-spacing: .04em; }
.login-card__sub { color: var(--ink-faint); font-size: .82rem; margin: 6px 0 24px; }
.login-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.login-form label { display: flex; flex-direction: column; gap: 6px; }
.login-form span { font-family: var(--font-head); text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; color: var(--ink-soft); }
.login-form input { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--ink); font-size: 1rem; font-family: var(--font-body); }
.login-form input:focus { outline: none; border-color: var(--red); }
.login-card__back { display: inline-block; margin-top: 20px; color: var(--ink-faint); font-size: .85rem; }
.login-card__back:hover { color: var(--red); }

.alert { padding: 11px 15px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.alert--error { background: var(--red-soft); border: 1px solid rgba(216,35,42,.4); color: #ff8080; }
.alert--success { background: rgba(46,160,90,.14); border: 1px solid rgba(46,160,90,.4); color: #7ddaa5; }

/* ---------- Iconos de línea (line-art, identidad visual) ---------- */
.icn { display: inline-block; flex-shrink: 0; vertical-align: -0.15em; }

/* Filtro por sección en el panel */
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.admin-filter__chip {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em;
  font-size: .76rem; padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--ink-soft); transition: .15s ease; white-space: nowrap;
}
.admin-filter__chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.admin-filter__chip.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* ============================================================
   BACKOFFICE
   ============================================================ */
.admin-body { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar { width: 250px; flex-shrink: 0; background: var(--bg-soft); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 20px; border-bottom: 1px solid var(--line); }
.admin-sidebar__brand img { width: 40px; }
.admin-sidebar__brand span { font-family: var(--font-head); text-transform: uppercase; font-weight: 700; color: var(--white); font-size: 1.05rem; line-height: 1; }
.admin-sidebar__nav { display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; flex: 1; }
.admin-sidebar__nav a { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: var(--radius-sm); color: var(--ink-soft); font-size: .92rem; font-weight: 500; transition: .12s; }
.admin-sidebar__nav a .icn { opacity: .85; }
.admin-sidebar__nav a:hover { background: var(--bg-softer); color: var(--ink); }
.admin-sidebar__nav a.is-active { background: var(--red-soft); color: var(--white); box-shadow: inset 3px 0 0 var(--red); }
.admin-sidebar__foot { padding: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.admin-sidebar__user { font-size: .82rem; color: var(--ink-faint); }
.admin-sidebar__logout { background: none; border: 1px solid var(--line); color: var(--ink-soft); padding: 8px; border-radius: var(--radius-sm); font-family: var(--font-body); cursor: pointer; font-size: .85rem; transition: .12s; }
.admin-sidebar__logout:hover { border-color: var(--red); color: #ff8080; }

.admin-main { flex: 1; padding: 28px 34px; max-width: 1100px; }
.admin-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.admin-header h1 { font-family: var(--font-head); text-transform: uppercase; color: var(--white); font-size: 1.9rem; letter-spacing: .02em; }
.admin-header__sub { color: var(--ink-faint); font-size: .9rem; margin-top: 4px; }
.admin-back { color: var(--ink-faint); font-size: .85rem; }
.admin-back:hover { color: var(--red); }

.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat__num { display: block; font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: var(--white); line-height: 1; }
.stat__label { font-size: .78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }

.table-wrap { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.admin-table th { text-align: left; font-family: var(--font-head); text-transform: uppercase; font-size: .74rem; letter-spacing: .05em; color: var(--ink-faint); padding: 14px 16px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.admin-table__title a { color: var(--ink); font-weight: 600; }
.admin-table__title a:hover { color: var(--red); }
.admin-table__date { color: var(--ink-faint); white-space: nowrap; }
.admin-table__actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: .03em; }
.pill--published { background: rgba(46,160,90,.15); color: #55c98a; border: 1px solid rgba(46,160,90,.35); }
.pill--draft { background: rgba(200,180,60,.12); color: #d8c46a; border: 1px solid rgba(200,180,60,.3); }
.pill--featured { background: var(--red-soft); color: var(--red); border: 1px solid rgba(216,35,42,.4); margin-right: 4px; }

.admin-empty { text-align: center; padding: 60px 20px; background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius); }
.admin-empty p { color: var(--ink-faint); margin-bottom: 18px; }

/* Editor */
.editor { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.editor__main { display: flex; flex-direction: column; gap: 18px; }
.editor__side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
.editor__panel { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.editor__panel h3 { font-family: var(--font-head); text-transform: uppercase; font-size: .95rem; letter-spacing: .04em; color: var(--white); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.editor__actions { margin-top: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field__label { font-family: var(--font-head); text-transform: uppercase; font-size: .74rem; letter-spacing: .05em; color: var(--ink-soft); }
.field__input { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--ink); font-size: 1rem; font-family: var(--font-body); width: 100%; resize: vertical; }
.field__input:focus { outline: none; border-color: var(--red); }
.field__input--title { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; }
.field__input--body { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.6; min-height: 340px; }
.field__hint { font-size: .78rem; color: var(--ink-faint); }
.field--check { flex-direction: row; align-items: center; gap: 10px; }
.field--check input { width: 18px; height: 18px; accent-color: var(--red); }
.field--check span { font-size: .92rem; color: var(--ink-soft); }
select.field__input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23aeb7c2' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }

.cover-preview { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); }
.cover-preview img { width: 100%; display: block; }
.cover-preview--empty { aspect-ratio: 16/10; display: grid; place-items: center; background: var(--bg); border-style: dashed; }
.cover-preview--empty span { color: var(--ink-faint); font-size: .85rem; }

.editor__state { font-size: .82rem; color: var(--ink-faint); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* ============================================================
   BUZÓN (backoffice) + badge del menú
   ============================================================ */
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: .68rem; font-weight: 700; line-height: 1;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.inbox { display: flex; flex-direction: column; gap: 14px; }
.inbox__item { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.inbox__item.is-unread { border-left: 3px solid var(--red); background: linear-gradient(90deg, var(--red-soft), var(--bg-soft) 42%); }
.inbox__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.inbox__subject { font-family: var(--font-head); text-transform: uppercase; font-size: 1.05rem; color: var(--white); letter-spacing: .01em; display: flex; align-items: center; gap: 9px; }
.inbox__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.inbox__from { font-size: .85rem; color: var(--ink-soft); margin-top: 5px; }
.inbox__from a { color: var(--red); }
.inbox__from a:hover { text-decoration: underline; }
.inbox__date { font-size: .76rem; color: var(--ink-faint); white-space: nowrap; }
.inbox__message {
  font-family: var(--font-serif); color: var(--ink); font-size: .98rem; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word;
  margin: 0 0 14px; padding: 12px 14px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.inbox__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   "¿TIENES UNA HISTORIA QUE CONTAR?" (portada)
   ============================================================ */
.story-cta {
  margin: 52px 0 22px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-top: 3px solid var(--red);
  border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); scroll-margin-top: 120px;
}
.story-cta__title { font-family: var(--font-head); text-transform: uppercase; font-weight: 700; font-size: 2rem; color: var(--white); letter-spacing: .01em; margin: 12px 0 0; line-height: 1.05; }
.story-cta__lead { color: var(--ink-soft); font-family: var(--font-serif); font-size: 1.05rem; margin: 14px 0 0; }
.story-form { display: flex; flex-direction: column; gap: 14px; }
.story-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.story-form .field { margin-bottom: 0; }
.story-form .btn { align-self: flex-start; }
.story-form__note { font-size: .76rem; color: var(--ink-faint); margin: 2px 0 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__title { font-size: 1.9rem; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer__inner { grid-template-columns: 1fr; gap: 26px; }
  .editor { grid-template-columns: 1fr; }
  .editor__side { position: static; }
}
@media (max-width: 720px) {
  .masthead__meta { display: none; }
  .brand__name { font-size: 1.3rem; }
  .brand__logo { width: 42px; height: 42px; }
  .mainnav__toggle { display: block; }
  .mainnav__links { display: none; flex-direction: column; width: 100%; }
  .mainnav__links.is-open { display: flex; }
  .mainnav__links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .article__title { font-size: 1.9rem; }
  .admin-sidebar { width: 68px; }
  .admin-sidebar__brand span, .admin-sidebar__nav a span, .admin-sidebar__user { display: none; }
  .admin-sidebar__nav a { justify-content: center; font-size: 1.2rem; }
  .admin-main { padding: 20px 16px; }
  .stat-row { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .video-banner { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .story-cta { grid-template-columns: 1fr; gap: 24px; padding: 28px 22px; }
  .story-form__row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
}

/* ============================================================
   HISTORIAS (formato Instagram) — portada
   ============================================================ */
.stories { margin: 30px 0 6px; }
.stories__track {
  display: flex; gap: 30px; overflow-x: auto; padding: 8px 4px 16px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.stories__track::-webkit-scrollbar { height: 6px; }
.stories__track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 20px; }

.story-bubble {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 84px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink);
}
/* El anillo ROJO = historia SIN ver (identidad del medio). */
.story-bubble__ring {
  position: relative;
  width: 74px; height: 74px; border-radius: 50%; padding: 3px;
  display: grid; place-items: center;
  /* Rojo de marca fijo (no se re-tematiza en las páginas de sección). */
  background: conic-gradient(from 210deg, #d8232a, #ff5a5f, #b31d23, #d8232a);
  transition: transform .15s ease, filter .15s ease;
}
.story-bubble:hover .story-bubble__ring { transform: scale(1.05); }
/* Gris = ya vista. */
.story-bubble.is-viewed .story-bubble__ring { background: #3a4654; }
.story-bubble__img {
  width: 100%; aspect-ratio: 1; height: auto; border-radius: 50%; object-fit: cover; display: block;
  border: 2px solid var(--bg); background: var(--bg-soft);
}
/* Contador de medios (varias fotos/videos en la bolita). */
.story-bubble__count {
  position: absolute; right: 2px; bottom: 2px; z-index: 2;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 20px;
  background: #d8232a; color: #fff; border: 2px solid var(--bg);
  font-size: .62rem; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.story-bubble__name {
  font-size: .74rem; color: var(--ink-soft); max-width: 84px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}
.story-bubble.is-viewed .story-bubble__name { color: var(--ink-faint); }
.story-bubble__time {
  font-size: .62rem; color: var(--ink-faint); letter-spacing: .01em; text-align: center;
}

/* ---- Visor a pantalla completa ---- */
body.stories-open { overflow: hidden; }
.stories-viewer {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: rgba(4, 8, 12, .94); backdrop-filter: blur(4px);
}
.stories-viewer.is-open { display: flex; }
.stories-viewer__stage {
  position: relative; width: min(430px, 100vw); height: min(88vh, 780px);
  background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  touch-action: none;
}
.stories-viewer__media { position: absolute; inset: 0; background: #000; }
.stories-viewer__media img,
.stories-viewer__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.stories-viewer__cred {
  position: absolute; top: 22px; left: 16px; right: 90px; z-index: 6;
  text-shadow: 0 1px 6px rgba(0,0,0,.75);
}
.stories-viewer__author {
  margin: 0; font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; font-size: .9rem;
  color: #d8232a;   /* rojo de marca */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stories-viewer__meta {
  margin: 1px 0 0; font-size: .72rem; color: rgba(255,255,255,.85); letter-spacing: .02em;
}
.stories-viewer__muted {
  position: absolute; top: 20px; right: 54px; z-index: 6;
  background: rgba(0,0,0,.4); border: 0; color: #fff; cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%; display: none; align-items: center; justify-content: center; line-height: 0;
}
.stories-viewer__muted.is-visible { display: inline-flex; }
.stories-viewer__stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 22%, transparent 55%, rgba(0,0,0,.75) 100%);
}
.stories-viewer__bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 4; display: flex; gap: 5px; }
.stories-viewer__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.34); overflow: hidden; }
.stories-viewer__bar-fill { display: block; width: 0; height: 100%; background: #fff; border-radius: 3px; }
.stories-viewer__close {
  position: absolute; top: 20px; right: 14px; z-index: 6;
  background: none; border: 0; color: #fff; cursor: pointer; opacity: .9; line-height: 0;
}
.stories-viewer__close:hover { opacity: 1; }
.stories-viewer__foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 20px; }
.stories-viewer__title {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; font-size: 1.15rem; color: #fff; margin: 0 0 6px;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.stories-viewer__caption {
  font-family: var(--font-serif); color: #fff; font-size: 1rem; line-height: 1.45;
  margin: 0 0 14px; text-shadow: 0 1px 8px rgba(0,0,0,.6);
  overflow-wrap: break-word; word-break: break-word;
  /* Red de seguridad: nunca más de 6 líneas para no salirse del rectángulo. */
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.stories-viewer__link { align-self: flex-start; }
.stories-viewer__link:empty { display: none; }
/* Zonas de toque (izq: anterior, der: siguiente). */
.stories-viewer__zone {
  position: absolute; top: 40px; bottom: 90px; width: 40%; z-index: 3;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.stories-viewer__zone--prev { left: 0; }
.stories-viewer__zone--next { right: 0; }

/* ---- Historias en el backoffice ---- */
.story-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px;
}
.story-admin-card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.story-admin-card.is-hidden { opacity: .55; }
.story-admin-card__ring {
  position: relative;
  width: 78px; height: 78px; border-radius: 50%; padding: 3px; display: grid; place-items: center;
  background: conic-gradient(from 210deg, var(--red), #ff5a5f, var(--red-dark), var(--red));
}
.story-admin-card.is-hidden .story-admin-card__ring { background: var(--line); }
.story-admin-card__ring img { width: 100%; aspect-ratio: 1; height: auto; border-radius: 50%; object-fit: cover; display: block; border: 2px solid var(--bg-soft); }
.story-admin-card__title { font-family: var(--font-head); font-size: 1rem; color: var(--white); font-weight: 600; margin: 0; }
.story-admin-card__author { font-size: .76rem; color: var(--red); font-weight: 600; margin: -4px 0 0; text-transform: uppercase; letter-spacing: .03em; }
.story-admin-card__meta { font-size: .78rem; color: var(--ink-soft); margin: 0; }
.story-admin-card__date { font-size: .72rem; color: var(--ink-faint); margin: -4px 0 0; }
.story-admin-card__pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pill--info { background: var(--bg-softer); color: var(--ink-soft); border: 1px solid var(--line); }
.story-admin-card__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 2px; }

/* Grilla de medios en el editor de historias */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 18px; }
.media-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; }
.media-card__preview { position: relative; aspect-ratio: 9/16; max-height: 220px; border-radius: var(--radius-sm); overflow: hidden; background: #000; margin-bottom: 10px; }
.media-card__preview img, .media-card__preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card__badge {
  position: absolute; top: 7px; left: 7px; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.6); color: #fff; font-size: .66rem; font-weight: 600;
  padding: 3px 7px; border-radius: 20px; letter-spacing: .03em;
}
.media-card .field { margin-bottom: 8px; }
.media-card__del span { color: #ff8080; }
.char-count { display: block; }
.char-count.is-near { color: var(--red); font-weight: 600; }

/* Backoffice de publicidad: dos campos con vista previa */
.banner-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.banner-slot { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.banner-slot__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.banner-slot__title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .02em; font-size: 1.15rem; color: var(--white); margin: 0; display: flex; align-items: center; gap: 8px; }
.banner-slot__sub { font-size: .8rem; color: var(--ink-soft); margin: 6px 0 0; }
.banner-slot__rec { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: #55c98a; margin: 8px 0 0; }
.banner-slot__rec strong { color: var(--white); }
.banner-slot__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 4px 0 8px; }

/* Marco de vista previa (imita el banner real, rojo) */
.ad-preview { position: relative; background: var(--red); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.ad-preview__tag { position: absolute; top: 6px; left: 10px; z-index: 2; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em; font-size: .58rem; color: rgba(255,255,255,.85); }
.ad-preview__media { width: 100%; overflow: hidden; border-radius: 4px; }
.ad-preview__media:empty { display: none; }
.ad-preview__media img, .ad-preview__media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-preview__empty { color: rgba(255,255,255,.92); font-size: .82rem; text-align: center; padding: 26px 16px; }
.ad-preview--side { width: 190px; margin: 0 auto; padding: 22px 10px 10px; min-height: 240px; display: block; }
.ad-preview--side .ad-preview__media { aspect-ratio: 9 / 16; }
.ad-preview--inline { width: 100%; padding: 26px 14px 14px; min-height: 110px; display: block; }
.ad-preview--inline .ad-preview__media { aspect-ratio: 4 / 1; }

.banner-form .field { margin-bottom: 12px; }

/* --- Espacio de publicidad con varias tarjetas (hasta 4 anuncios que rotan) --- */
.ad-space { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.ad-space__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ad-space__note { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--ink-soft); margin: 16px 0 0; }
.ad-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); align-items: start; }
.ad-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.ad-card--new { border-style: dashed; }
.ad-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ad-card__n { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; color: var(--ink-soft); }
.ad-card__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ad-card .ad-preview { margin-bottom: 14px; }
.ad-card .ad-preview--side { width: 100%; max-width: 190px; }
.ad-card .banner-delete { margin-top: 8px; }

@media (max-width: 760px) { .banner-slots { grid-template-columns: 1fr; } }

/* Overlay de progreso de subida */
.upload-overlay {
  position: fixed; inset: 0; z-index: 400; display: none;
  align-items: center; justify-content: center;
  background: rgba(6, 12, 18, .8); backdrop-filter: blur(3px);
}
.upload-overlay.is-active { display: flex; }
.upload-box {
  width: min(420px, 90vw); background: var(--bg-soft); border: 1px solid var(--line);
  border-top: 3px solid var(--red); border-radius: var(--radius); padding: 28px 26px;
  text-align: center; box-shadow: var(--shadow);
}
.upload-box__status { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; color: var(--white); margin: 0 0 16px; }
.upload-bar { height: 12px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.upload-bar__fill { display: block; width: 0; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--red), #ff5a5f); transition: width .15s ease; }
.upload-box__pct { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--red); margin: 12px 0 0; }
.upload-box__error { color: #ff8080; font-size: .9rem; margin: 10px 0 0; }
.upload-box .btn { margin-top: 16px; }

@media (max-width: 480px) {
  .stories-viewer__stage { width: 100vw; height: 100vh; border-radius: 0; }
}

/* ============================================================
   BANNERS DE PUBLICIDAD (rojo)
   ============================================================ */
.ad-banner {
  position: relative;
  background: var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ad-banner__label {
  position: absolute; top: 7px; left: 12px; z-index: 2;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em;
  font-size: .6rem; color: rgba(255,255,255,.85);
}
.ad-banner__close {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.28); color: #fff; line-height: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.ad-banner__close:hover { background: rgba(0,0,0,.5); }
.ad-banner__media { display: block; overflow: hidden; border-radius: var(--radius-sm); }
/* El medio llena por completo el marco (recorta lo que sobre). Los clics pasan al enlace. */
.ad-banner__media img, .ad-banner__media video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* --- Rotación de anuncios (varios por ubicación) --- */
.ad-banner__track { position: relative; }
.ad-slide { display: none; }
.ad-slide.is-active { display: block; animation: adFade .5s ease; }
@keyframes adFade { from { opacity: 0; } to { opacity: 1; } }
.ad-dots { display: flex; gap: 6px; justify-content: center; padding: 8px 0 2px; }
.ad-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.4); transition: background .2s, transform .2s;
}
.ad-dot:hover { background: rgba(255,255,255,.7); }
.ad-dot.is-active { background: #fff; transform: scale(1.25); }

/* Botón para volver a abrir (visible solo minimizado) */
.ad-banner__reopen {
  display: none; align-items: center; gap: 7px; cursor: pointer;
  background: var(--red); color: #fff; border: 0; border-radius: 20px;
  padding: 8px 15px; font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .05em; font-size: .72rem; box-shadow: var(--shadow);
}
.ad-banner__reopen:hover { background: var(--red-dark); }

/* --- Variante EN LÍNEA (debajo del video) --- */
.ad-banner--inline {
  margin: 22px 0; padding: 24px 14px 14px;
  display: block;
}
/* Banner horizontal: proporción 4:1 (recomendado 1200×300). */
.ad-banner--inline .ad-banner__media { width: 100%; aspect-ratio: 4 / 1; }

/* --- Variante COSTADO IZQUIERDO (fija, en el margen izquierdo) --- */
.ad-banner--side {
  position: fixed; left: 8px; top: 140px; z-index: 80;
  width: 150px; padding: 22px 8px 8px;
  display: flex; flex-direction: column; align-items: center;
}
/* Banner vertical: proporción 9:16 tipo historia (recomendado 1080×1920). */
.ad-banner--side .ad-banner__media { width: 100%; aspect-ratio: 9 / 16; }

/* --- Estado minimizado (solo se ve el botón de reabrir) --- */
.ad-banner.is-min {
  background: none; box-shadow: none; padding: 0; min-height: 0; width: auto;
}
.ad-banner.is-min .ad-banner__label,
.ad-banner.is-min .ad-banner__close,
.ad-banner.is-min .ad-banner__track,
.ad-banner.is-min .ad-dots,
.ad-banner.is-min .ad-banner__media { display: none; }
.ad-banner.is-min .ad-banner__reopen { display: inline-flex; }
.ad-banner--inline.is-min { justify-content: flex-start; margin: 14px 0; }
.ad-banner--side.is-min { top: 150px; }

/* En pantallas anchas se le reserva su espacio para que NO tape el contenido.
   Al minimizarlo (o en pantallas angostas) el contenido recupera el espacio. */
@media (min-width: 1201px) {
  body.has-side-ad { padding-left: 200px; transition: padding-left .2s ease; }
  body.has-side-ad.side-ad-min { padding-left: 0; }
}
/* En pantallas angostas el banner lateral fijo estorbaría el contenido */
@media (max-width: 1200px) {
  .ad-banner--side { display: none; }
}

/* ============================================================
   COMENTARIOS (en cada nota)
   ============================================================ */
.comments { max-width: 780px; margin: 46px auto 24px; }
.comments__title { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .02em; font-size: 1.5rem; color: var(--white); display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.comments__count { background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; }
.comments__empty { color: var(--ink-faint); font-family: var(--font-serif); }

.comment-form { display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 26px; }
.comment-form .field__input, .comment-reply-form .field__input { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--ink); font-family: var(--font-body); font-size: .95rem; width: 100%; resize: vertical; }
.comment-form .field__input:focus, .comment-reply-form .field__input:focus { outline: none; border-color: var(--red); }
.comment-form .btn, .comment-reply-form .btn { align-self: flex-start; }

.comment-list, .comment__replies { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
.comment { }
.comment__main { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.comment__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comment__author { font-weight: 600; color: var(--white); font-size: .95rem; }
.comment__date { font-size: .74rem; color: var(--ink-faint); }
.comment__body { font-family: var(--font-serif); color: var(--ink); line-height: 1.55; margin: 0 0 12px; white-space: pre-wrap; }
.comment__actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cvote { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-soft); border-radius: 20px; padding: 5px 12px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: .12s; }
.cvote:hover { border-color: var(--ink-faint); color: var(--ink); }
.cvote--like.is-active { background: var(--red-soft); border-color: rgba(216,35,42,.5); color: var(--red); }
.cvote--dislike.is-active { background: rgba(111,130,150,.15); border-color: rgba(111,130,150,.5); color: #9fb2c4; }
.cvote__n { font-variant-numeric: tabular-nums; }
.comment__reply-btn, .comment__del { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer; font-size: .82rem; font-weight: 600; padding: 5px 8px; border-radius: 6px; }
.comment__reply-btn { color: var(--ink-soft); }
.comment__reply-btn:hover { color: var(--red); }
.comment__del { color: var(--ink-faint); margin-left: auto; }
.comment__del:hover { color: #ff8080; }

.comment-reply-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.comment-reply-form[hidden] { display: none; }

.comment__replies { margin: 14px 0 0 22px; padding-left: 16px; border-left: 2px solid var(--line); gap: 14px; }
.comment--reply .comment__main { background: var(--bg); }
.comment--reply .comment__avatar { width: 26px; height: 26px; font-size: .82rem; }

/* ============================================================
   TRADUCTOR ES/EN (toggle + ocultar UI de Google Translate)
   ============================================================ */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.lang-switch__btn {
  background: transparent; border: 0; cursor: pointer;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em;
  font-size: .72rem; font-weight: 600; color: var(--ink-soft); padding: 4px 11px; transition: .12s;
}
.lang-switch__btn:hover { color: var(--white); }
.lang-switch__btn.is-active { background: var(--red); color: #fff; }

/* Oculta por completo la interfaz que inyecta Google Translate */
#google_translate_element { display: none !important; }
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
.goog-te-balloon-frame,
#goog-gt-tt, .goog-te-menu-frame, .goog-tooltip { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
body { top: 0 !important; }
.skiptranslate iframe { visibility: hidden !important; height: 0 !important; }

/* ============================================================
   LEER LA NOTA EN VOZ ALTA
   ============================================================ */
.read-aloud { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.read-aloud__btn { background: var(--bg-soft); border: 1px solid var(--red); color: var(--ink); }
.read-aloud__btn:hover { background: var(--red-soft); }
.read-aloud__btn .icn { color: var(--red); }
.read-aloud__ico { display: inline-flex; line-height: 0; }
.read-aloud__stop .icn { color: var(--ink-soft); }
