/* =========================================================================
   Novedades (novedades.html) y cada novedad (novedad.html). Hojas que flotan
   en el encabezado, filtros con píldora, tarjetas con cabecera de degradé
   según el tipo, y el encabezado editorial de la novedad con su texto.
   Lo que se mueve, sólo sin "reducir movimiento"; sin JS todo se ve.
   ========================================================================= */

/* ---------- Encabezado: hojas apiladas ---------- */
.hojas { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.hoja { position: absolute; inset: 12% 18%; border-radius: 10px; background: #fff; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .55); }
.hoja--3 { background: var(--azul-200); transform: rotate(-14deg) translate3d(-10%, 6%, 0); opacity: .7; }
.hoja--2 { background: var(--cobre-200); transform: rotate(9deg) translate3d(8%, 2%, 0); opacity: .9; }
.hoja--1 { display: flex; flex-direction: column; gap: 7%; padding: 11% 12%; transform: rotate(-3deg); }
.hoja--1 i { display: block; height: 5%; border-radius: 99px; background: var(--azul-100); }
.hoja--1 .hoja-tit { height: 9%; width: 80%; background: var(--azul-700); }
.hoja--1 .hoja-foto { height: 30%; border-radius: 6px; background: linear-gradient(135deg, var(--cobre), var(--oro) 50%, var(--glaciar)); }
.hoja--1 .corta { width: 60%; }
@media (prefers-reduced-motion: no-preference) {
  .hoja--1 { animation: hoja-flota 6s ease-in-out infinite; }
  .hoja--2 { animation: hoja-flota-2 7s ease-in-out infinite; }
  .hoja--3 { animation: hoja-flota-3 8s ease-in-out infinite; }
}
@keyframes hoja-flota { 50% { transform: rotate(-1deg) translate3d(0, -6%, 0); } }
@keyframes hoja-flota-2 { 50% { transform: rotate(13deg) translate3d(12%, -2%, 0); } }
@keyframes hoja-flota-3 { 50% { transform: rotate(-18deg) translate3d(-14%, 8%, 0); } }

/* ---------- Filtros ---------- */
.indice--filtros .chips { margin: .6rem 0; }

/* ---------- Tarjetas ---------- */
.noticia--viva { padding: 0; overflow: hidden; border-radius: var(--r-xl); }
.noticia--viva > :not(.noticia-media) { margin-inline: 1.35rem; }
.noticia--viva > :last-child { margin-bottom: 1.35rem; }
.noticia--viva .noticia-media { margin: 0 0 1.1rem; border-radius: 0; }
/* Sin foto: una cabecera de degradé con el ícono del tipo (dibujo, no una foto de nada). */
.noticia-media--degrade { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 16 / 7; color: rgba(255, 255, 255, .92); }
.noticia-media--degrade::before { content: ""; position: absolute; inset: -30%; background: var(--fondo-tipo); transition: transform 1200ms var(--ease-salida); }
.noticia-media--degrade::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='120' viewBox='0 0 300 120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.16'%3E%3Cpath d='M0 30C60 10 110 50 170 30S260 10 300 30'/%3E%3Cpath d='M0 60C60 40 110 80 170 60S260 40 300 60'/%3E%3Cpath d='M0 90C60 70 110 110 170 90S260 70 300 90'/%3E%3C/g%3E%3C/svg%3E") center / 300px 120px;
}
.noticia-media--degrade svg { position: relative; z-index: 1; width: 46px; height: 46px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .25)); transition: transform 700ms var(--ease-resorte); }
.noticia--viva:hover .noticia-media--degrade::before { transform: scale(1.12) rotate(4deg); }
.noticia--viva:hover .noticia-media--degrade svg { transform: scale(1.12) rotate(-6deg); }
.noticia--noticia { --fondo-tipo: radial-gradient(60% 80% at 80% 20%, rgba(233, 183, 122, .55), transparent 60%), linear-gradient(135deg, var(--azul-600), var(--azul-900)); }
.noticia--capacitacion { --fondo-tipo: radial-gradient(60% 80% at 20% 20%, rgba(143, 211, 232, .6), transparent 60%), linear-gradient(135deg, var(--azul-500), var(--azul-800)); }
.noticia--evento { --fondo-tipo: radial-gradient(60% 80% at 80% 80%, rgba(143, 211, 232, .5), transparent 60%), linear-gradient(135deg, var(--cobre-700), var(--azul-800)); }
.noticia--normativa { --fondo-tipo: radial-gradient(60% 80% at 20% 80%, rgba(233, 183, 122, .45), transparent 60%), linear-gradient(135deg, var(--azul-800), var(--azul-950)); }
/* Toda la tarjeta lleva a la novedad (el enlace es el título). */
.noticia--viva h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.noticia--viva h3 a:focus-visible { outline: none; box-shadow: none; }
.noticia--viva:has(h3 a:focus-visible) { outline: 2.5px solid var(--cobre); outline-offset: 3px; }
.noticia-leer { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--azul-600); }
.noticia-leer span { transition: transform 300ms var(--ease-salida); }
.noticia--viva:hover .noticia-leer span { transform: translateX(4px); }
.noticia--viva .cuenta { margin-top: 0; margin-bottom: .9rem; align-self: flex-start; }

/* ---------- La novedad: encabezado editorial ---------- */
.page-head--editorial { padding: clamp(2.5rem, 1.2rem + 5vw, 5.5rem) 0 clamp(2.5rem, 1.2rem + 4vw, 4.5rem); }
.editorial-fondo {
  position: absolute; z-index: -1; right: -2vw; bottom: -.18em; pointer-events: none; user-select: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-style: italic; line-height: 1; letter-spacing: -.04em;
  font-size: clamp(5rem, 16vw, 15rem); color: transparent; -webkit-text-stroke: 1.5px rgba(143, 211, 232, .2);
}
.page-head--editorial h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.8rem); line-height: 1.04; letter-spacing: -.03em; margin-bottom: .8rem; }
.editorial-linea { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; margin: 0 0 1rem; font-size: .9rem; color: var(--azul-200); }
@media (max-width: 480px) { .editorial-linea { font-size: .82rem; gap: .35rem .7rem; } }
.editorial-linea .tag { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.editorial-linea .tag--cobre { background: var(--cobre-700); box-shadow: none; }
.editorial-lectura { display: inline-flex; align-items: center; gap: .35rem; }
.editorial-lectura::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cobre-300); }
.page-head--editorial .novedad-bajada { margin: 0; font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); line-height: 1.55; color: var(--azul-100); max-width: 60ch; }
.page-head--editorial .cuenta { margin-top: 1.25rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
@media (prefers-reduced-motion: no-preference) {
  .editorial-fondo { animation: editorial-entra 1400ms var(--ease-salida) both; }
}
@keyframes editorial-entra { from { opacity: 0; transform: translate3d(8%, 0, 0); } }

/* ---------- La novedad: el texto ---------- */
.seccion--editorial { padding-top: clamp(2rem, 1rem + 3vw, 3.5rem); }
.seccion--editorial .novedad-detalle { font-size: 1.1rem; line-height: 1.75; }
.seccion--editorial .novedad-foto { margin: calc(-1 * clamp(4rem, 2rem + 5vw, 6.5rem)) 0 2rem; position: relative; z-index: 2; }
.seccion--editorial .novedad-foto img { border-radius: var(--r-xl); box-shadow: var(--s-4); }
/* Letra capitular, sólo si el primer párrafo da para dos renglones (novedades.js pone la clase). */
.seccion--editorial .novedad-texto > p.capitular::first-letter {
  float: left; margin: .1em .1em 0 0; font-family: var(--font-display); font-weight: 700; font-size: 3.05em; line-height: .9; color: var(--cobre-700);
}
.seccion--editorial .novedad-texto ul { padding-left: 0; list-style: none; }
.seccion--editorial .novedad-texto li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.seccion--editorial .novedad-texto li::before { content: ""; position: absolute; left: .2rem; top: .7em; width: .55rem; height: .55rem; border-radius: 2px; background: linear-gradient(135deg, var(--cobre), var(--oro)); transform: rotate(45deg); }
.seccion--editorial .remate-datos { padding: 1.1rem 1.25rem; border-radius: var(--r-lg); background: var(--blanco); border: 1px solid var(--linea); box-shadow: var(--s-2); font-size: .98rem; }
.page-head--editorial.con-foto { padding-bottom: clamp(5rem, 3rem + 6vw, 8rem); }
