/* ============================================================
   PORTADA MODERNA — capa visual 2026-11-03
   Patrón "hero + rejilla" de los portales de noticias actuales:
   titular principal arriba, noticias primero en tarjetas,
   bandas de sección con acento dorado. Solo afecta a la portada
   (este archivo se enlaza únicamente desde index.html).
   ============================================================ */

/* Token propio de la portada (DESIGN-la-victoria.md): el rojo --live se
   reserva SOLO para #vivo / última hora. En esta capa aún no existe un
   selector para #vivo, así que por ahora el token solo se define. */
:root{--live:#c31833}

/* Barra de secciones: pastillas fijas bajo el encabezado */
.pm-chips{position:sticky;top:0;z-index:60;display:flex;gap:8px;overflow-x:auto;
  padding:12px 4px;margin:0 0 8px;scrollbar-width:none;
  background:color-mix(in srgb,var(--bg,#faf9f5) 88%,transparent);
  backdrop-filter:blur(8px)}
.pm-chips::-webkit-scrollbar{display:none}
.pm-chips a{flex:0 0 auto;text-decoration:none;font-weight:600;font-size:.85rem;
  color:var(--deep,#103b2b);background:var(--paper,#fff);
  border:1px solid #e3ddcb;border-radius:999px;padding:8px 12px;
  box-shadow:0 1px 3px rgba(16,59,43,.08)}
.pm-chips a:active,.pm-chips a:hover{border-color:var(--gold,#d9a441);
  background:#fdf6e0}
h2[id],div[id$="-titulo"]{scroll-margin-top:64px}

/* Héroe: panel verde profundo con titular grande */
.hero{border-radius:22px;padding:32px 24px;margin-top:8px;color:#fff;
  background:linear-gradient(135deg,var(--deep,#103b2b) 0%,var(--green,#174d39) 62%,#1f6a4c 100%);
  box-shadow:0 14px 34px rgba(16,59,43,.28)}
.hero h1,.hero h2{color:#fff;font-size:clamp(2rem,6vw,3.2rem);line-height:1.05;margin:.1em 0 .3em}
.hero p{color:#e9f2ec}
.hero a{color:#ffd97a}

/* "Hoy en La Victoria": tarjeta con acento dorado */
.hoy{border:1px solid #e7e0c9;border-left:6px solid var(--gold,#d9a441);
  border-radius:16px;background:var(--paper,#fff);
  box-shadow:0 6px 18px rgba(16,59,43,.07);padding:16px}

/* Cabeceras de sección modernas */
.section-head{margin:32px 0 12px;padding-top:16px;
  border-top:3px solid var(--green,#174d39);
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.section-head h2{font-size:clamp(1.3rem,3.4vw,1.75rem);margin:0;line-height:1.15}
.section-head h2::before{content:"";display:inline-block;width:10px;height:10px;
  border-radius:3px;background:var(--gold,#d9a441);margin-right:8px}
.section-head a{font-weight:700;font-size:.88rem;text-decoration:none;
  color:var(--green,#174d39);border:1.5px solid var(--green,#174d39);
  padding:4px 12px;border-radius:999px;white-space:nowrap}
.section-head a:hover{background:var(--green,#174d39);color:#fff}

/* Rejilla de tarjetas (patrón tarjetas de Google News / Apple News) */
.pulso-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(265px,1fr));gap:14px}
.pulso-grid>*{background:var(--paper,#fff);border:1px solid #e8e2cf;border-radius:14px;
  padding:16px 16px;box-shadow:0 3px 10px rgba(16,59,43,.06);
  transition:transform .15s ease,box-shadow .15s ease}
.pulso-grid>*:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(16,59,43,.12)}
.pulso-grid img{border-radius:10px;width:100%;aspect-ratio:16/10;object-fit:cover}

/* La primera noticia manda: tarjeta destacada a doble ancho */
@media(min-width:900px){
  #portada-noticias>*:first-child{grid-column:span 2}
  #portada-noticias>*:first-child h3{font-size:1.5rem;line-height:1.25}
}

/* Videos a todo ancho en rejilla */
#portada-videos{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
#portada-videos>*{background:var(--paper,#fff);border:1px solid #e8e2cf;
  border-radius:14px;padding:12px;box-shadow:0 3px 10px rgba(16,59,43,.06)}

/* Bloques finales (descubre, fechas, comunidad): banda suave */
.discover{background:#f3efe1;border:1px solid #e7e0c9;border-radius:18px;padding:24px}
.stats-bar,.join-band{border-radius:18px}

/* Ritmo vertical general de la portada */
.section{margin-bottom:8px}
.quick-grid{margin-top:12px}

/* ============================================================
   CAPA MODERNA: Animaciones, Carrusel de Fotos y Ticker Vivo
   ============================================================ */
@keyframes lvHeroGlow{
  0%,100%{background-position:0% 50%}
  50%{background-position:100% 50%}
}
@keyframes lvFadeUp{
  from{opacity:0;transform:translateY(14px)}
  to{opacity:1;transform:none}
}
@keyframes lvTicker{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}

.hero{
  position:relative;
  overflow:hidden;
  background:linear-gradient(125deg,var(--deep,#103b2b) 0%,var(--green,#174d39) 48%,#237a57 78%,#164b37 100%);
  background-size:200% 200%;
  animation:lvHeroGlow 14s ease infinite;
}
.hero::after{
  content:"";
  position:absolute;
  inset:-40% -20% auto auto;
  width:380px;
  height:380px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(217,164,65,.24) 0%,transparent 70%);
  pointer-events:none;
}
.hero>*{position:relative;z-index:1;animation:lvFadeUp .55s cubic-bezier(.22,1,.36,1) both}
.hero>*:nth-child(2){animation-delay:.08s}
.hero>*:nth-child(3){animation-delay:.16s}
.hero>*:nth-child(4){animation-delay:.22s}

.pm-chips a{transition:transform .18s ease,background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
.pm-chips a:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(16,59,43,.14)}

/* Cinta de noticias / avisos en vivo */
.lv-ticker{
  display:flex;
  align-items:center;
  gap:10px;
  margin:10px 0 4px;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid var(--line,#e3ddcb);
  background:var(--paper,#fff);
  overflow:hidden;
  box-shadow:0 2px 8px rgba(16,59,43,.05);
}
.lv-ticker-badge{
  flex:none;
  padding:3px 10px;
  border-radius:999px;
  background:var(--green,#174d39);
  color:#fff;
  font-size:.75rem;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.lv-ticker-viewport{flex:1;overflow:hidden;white-space:nowrap}
.lv-ticker-track{display:inline-flex;gap:28px;animation:lvTicker 34s linear infinite}
.lv-ticker:hover .lv-ticker-track,.lv-ticker:focus-within .lv-ticker-track{animation-play-state:paused}
.lv-ticker-track a{color:var(--ink,#111);text-decoration:none;font-size:.88rem;font-weight:600}
.lv-ticker-track a:hover{color:var(--green,#174d39);text-decoration:underline}

/* Carrusel de fotos interactivo */
.lv-carousel{
  position:relative;
  margin:16px 0 22px;
  border-radius:20px;
  overflow:hidden;
  border:1px solid var(--line,#e3ddcb);
  background:#0e261d;
  box-shadow:0 14px 32px rgba(16,59,43,.18);
}
.lv-carousel-track{
  display:flex;
  transition:transform .55s cubic-bezier(.22,1,.36,1);
  will-change:transform;
}
.lv-carousel-slide{
  flex:0 0 100%;
  position:relative;
  margin:0;
  aspect-ratio:16/9;
  max-height:440px;
  overflow:hidden;
}
.lv-carousel-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform 5s ease;
  cursor:zoom-in;
}
.lv-carousel-slide.is-active img{transform:scale(1.04)}
.lv-carousel-caption{
  position:absolute;
  inset:auto 0 0 0;
  padding:28px 20px 18px;
  background:linear-gradient(to top,rgba(8,26,19,.88) 0%,rgba(8,26,19,.45) 60%,transparent 100%);
  color:#fff;
}
.lv-carousel-caption h3{margin:0 0 4px;font-size:clamp(1.05rem,2.4vw,1.45rem);color:#fff}
.lv-carousel-caption p{margin:0;font-size:.85rem;color:#dcebe3}
.lv-carousel-caption a{color:#ffd97a;font-weight:700;text-decoration:none;margin-left:8px}
.lv-carousel-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:4;
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(16,59,43,.68);
  backdrop-filter:blur(6px);
  color:#fff;
  font-size:1.35rem;
  line-height:1;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:background .18s ease,transform .18s ease;
}
.lv-carousel-btn:hover{background:rgba(16,59,43,.92);transform:translateY(-50%) scale(1.06)}
.lv-carousel-prev{left:12px}
.lv-carousel-next{right:12px}
.lv-carousel-controls{
  position:absolute;
  right:14px;
  bottom:14px;
  z-index:4;
  display:flex;
  align-items:center;
  gap:8px;
}
.lv-carousel-dots{display:flex;gap:6px;align-items:center;padding:5px 10px;border-radius:999px;background:rgba(8,26,19,.58);backdrop-filter:blur(6px)}
.lv-carousel-dot{
  width:8px;height:8px;padding:0;border:0;border-radius:999px;
  background:rgba(255,255,255,.45);cursor:pointer;transition:width .2s ease,background .2s ease;
}
.lv-carousel-dot[aria-selected="true"]{width:22px;background:#ffd97a}
.lv-carousel-play{
  padding:4px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.35);
  background:rgba(8,26,19,.62);color:#fff;font:inherit;font-size:.78rem;font-weight:700;cursor:pointer;
}

@media(prefers-reduced-motion:reduce){
  .hero,.hero>*,.lv-ticker-track,.lv-carousel-track,.lv-carousel-slide img{animation:none!important;transition:none!important}
}
