:root {
  --rojo: #c8102e;
  --rojo-oscuro: #9e0c24;
  --plomo: #5b6168;
  --plomo-claro: #e7e8ea;
  --plomo-fondo: #f5f5f6;
  --blanco: #ffffff;
  --radio: 14px;
  --sombra: 0 6px 20px rgba(40, 44, 50, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blanco);
  color: var(--plomo);
  font-family: "Poppins", "Gotham", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Cabecera */
.cabecera {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--rojo);
}
.logo { width: 52px; height: 52px; object-fit: contain; flex: none; }
.cabecera h1 {
  margin: 0; color: var(--rojo);
  font-size: clamp(1.15rem, 5vw, 1.8rem); font-weight: 800; letter-spacing: -.01em; line-height: 1.15;
}
.lema { margin: 0; color: var(--plomo); font-size: .85rem; font-weight: 500; }

main { max-width: 980px; margin: 0 auto; padding: 0 16px 32px; }
.bloque { padding-top: 24px; scroll-margin-top: 90px; }
.titulo-seccion {
  margin: 0 0 14px; color: var(--rojo); font-size: 1.25rem; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
}
.titulo-seccion::after { content: ""; flex: 1; height: 2px; background: var(--plomo-claro); }
.titulo-item { margin: 12px 0 6px; color: var(--rojo); font-size: 1.05rem; font-weight: 600; }
.titulo-item:empty { display: none; }
.vacio {
  margin: 0; padding: 18px; border: 2px dashed var(--plomo-claro); border-radius: var(--radio);
  color: var(--plomo); font-size: .9rem; text-align: center;
}

/* Video principal */
.marco-video {
  position: relative; border-radius: var(--radio); overflow: hidden;
  background: #111; box-shadow: var(--sombra);
}
.marco-video video { display: block; width: 100%; max-height: 78vh; background: #111; }
.btn-sonido {
  position: absolute; top: 12px; right: 12px;
  border: 0; border-radius: 999px; padding: 8px 14px;
  background: var(--rojo); color: #fff; font: 600 .85rem "Poppins", sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3); cursor: pointer;
}
.btn-sonido[hidden] { display: none; }

/* Botones de compartir */
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acciones.centro { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 2px solid var(--plomo-claro); background: #fff; color: var(--plomo);
  font: 600 .85rem "Poppins", sans-serif; text-decoration: none; cursor: pointer;
}
.btn:active { transform: scale(.97); }
.btn.principal { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.btn.principal:hover { background: var(--rojo-oscuro); }
.btn.wa { border-color: #25d366; color: #128c4b; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Otros videos */
.lista-videos { display: grid; gap: 18px; }
.lista-videos video { width: 100%; border-radius: var(--radio); background: #111; }

/* Galería */
.galeria { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .galeria { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.foto {
  position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
  aspect-ratio: 1; background: var(--plomo-fondo); cursor: zoom-in; scroll-margin-top: 90px;
}
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.foto:hover img { transform: scale(1.04); }
.foto.resaltada { outline: 3px solid var(--rojo); outline-offset: 2px; }

/* PDF */
.lista-pdf { display: grid; gap: 12px; }
.pdf {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px; border: 2px solid var(--plomo-claro); border-left: 6px solid var(--rojo);
  border-radius: var(--radio); background: #fff; scroll-margin-top: 90px;
}
.pdf.resaltada { border-color: var(--rojo); }
.pdf-icono {
  flex: none; width: 46px; height: 56px; border-radius: 6px;
  background: var(--rojo); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .8rem;
}
.pdf-cuerpo { flex: 1; min-width: 0; }
.pdf h3 { margin: 0; color: var(--rojo); font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.pdf p { margin: 2px 0 0; font-size: .85rem; }
.pdf .acciones { margin-top: 8px; }

/* Visor de fotos */
.visor {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 12px 16px; background: rgba(255, 255, 255, .98);
}
.visor[hidden] { display: none; }
.visor figure { margin: 0; max-width: 100%; text-align: center; }
.visor img { max-width: 100%; max-height: 68vh; border-radius: 10px; box-shadow: var(--sombra); }
.visor figcaption { margin-top: 10px; color: var(--rojo); font-weight: 600; }
.visor-cerrar {
  position: absolute; top: 10px; right: 12px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--plomo-claro); color: var(--plomo);
  font-size: 1.2rem; cursor: pointer;
}
.visor-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: #fff; color: var(--rojo); font-size: 2rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.visor-nav.prev { left: 6px; }
.visor-nav.next { right: 6px; }

/* Pie */
.pie {
  margin-top: 24px; padding: 28px 16px 40px; text-align: center;
  border-top: 3px solid var(--rojo); background: var(--plomo-fondo);
}
.pie p { margin: 8px 0 0; color: var(--rojo); }
.logo-pie { width: 64px; height: 64px; object-fit: contain; }

/* Aviso */
.aviso {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
  transition: transform .25s, opacity .25s;
  padding: 10px 18px; border-radius: 999px; background: var(--plomo); color: #fff;
  font-size: .9rem; font-weight: 500; max-width: calc(100% - 32px);
}
.aviso.ver { transform: translate(-50%, 0); opacity: 1; }

/* El caso */
.intro { margin: 0 0 12px; color: #2e3237; }
.ficha {
  display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 0;
  margin: 0 0 14px; border: 2px solid var(--plomo-claro); border-radius: var(--radio); overflow: hidden;
}
.ficha dt, .ficha dd { margin: 0; padding: 9px 12px; border-top: 1px solid var(--plomo-claro); font-size: .9rem; }
.ficha dt { background: var(--plomo-fondo); color: var(--rojo); font-weight: 600; }
.ficha dd { color: #2e3237; overflow-wrap: anywhere; }
.ficha dt:first-of-type, .ficha dt:first-of-type + dd { border-top: 0; }
.nota { color: var(--plomo); font-size: .8rem; }
.aclaracion {
  margin: 0 0 12px; padding: 12px 14px; border-left: 5px solid var(--plomo);
  background: var(--plomo-fondo); border-radius: 8px; font-size: .88rem;
}

.privacidad { font-size: .75rem; color: var(--plomo) !important; }

.candidato { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.candidato img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 3px solid var(--rojo); flex: none; }
.candidato figcaption { color: var(--rojo); font-weight: 700; line-height: 1.3; }
.candidato figcaption span { color: var(--plomo); font-weight: 500; font-size: .85rem; }

/* Titular grande */
.titular { background: var(--rojo); color: #fff; text-align: center; padding: 22px 16px 20px; }
.titular p { margin: 0; }
.titular-pre { font-size: clamp(1rem, 4vw, 1.4rem); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.titular-grande { font-size: clamp(2.3rem, 11vw, 5rem); font-weight: 800; line-height: 1.02; letter-spacing: -.01em; }
.titular-sub { margin-top: 8px !important; font-size: clamp(.85rem, 3.2vw, 1rem); opacity: .95; }

/* Video primero + botón de sonido grande */
.contenedor { max-width: 980px; margin: 0 auto; padding: 0 16px 24px; }
.contenedor .bloque-video { padding-top: 16px; }
.btn-sonido {
  top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 22px; border: 3px solid #fff; border-radius: 18px;
  font: 800 1rem/1.25 "Poppins", sans-serif; text-align: center; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  animation: latido 1.4s ease-in-out infinite;
}
.btn-sonido .ico { font-size: 2rem; line-height: 1; }
@keyframes latido { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .btn-sonido { animation: none; } }
