/* Noviembre Azul — páginas de ediciones (listado y detalle) */
.ed-list-head { padding-block: var(--s-8) var(--s-5); }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-6); padding-bottom: var(--s-9); }
.edition-card--grid { flex: none; display: block; transition: transform .25s var(--ease); }
.edition-card--grid:hover { transform: translateY(-4px); }

.ed-meta { font-family: var(--font-hand); font-size: 1.3rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7FD0F5; margin: 0 0 var(--s-3); }
.ed-jump, .ed-years { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.ed-jump a, .ed-years a {
  display: inline-flex; align-items: center; min-height: 44px; padding: .4rem 1.1rem; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.4); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
}
.ed-jump a:hover { background: rgba(255,255,255,.14); }
.ed-years a { border-color: var(--navy-700); color: var(--navy-700); font-family: var(--font-head); font-size: 1.3rem; }
.ed-years a:hover { background: var(--cyan-100); }

.ed-block { margin-top: var(--s-7); }
.ed-block h3 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan-700); border-bottom: 2px solid var(--border); padding-bottom: var(--s-2); }
.ed-empty { color: var(--muted); font-style: italic; padding: var(--s-4) var(--s-5); background: rgba(10,120,174,.06); border: 1.5px dashed var(--border); border-radius: var(--radius); margin: 0; }
.ed-stat { font-size: 1.1rem; margin: 0; }
.ed-stat strong { font-family: var(--font-head); font-weight: 400; font-size: 2.4rem; color: var(--navy-700); margin-right: .3rem; }

/* Organizadores / colaboradores */
.ed-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-4); }
.ed-people li > a, .ed-people li > div { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--ink); height: 100%; }
.ed-people li > a:hover { border-color: #B7D8EE; box-shadow: var(--shadow-sm); }
.ed-people img, .ed-people-mark { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: var(--cyan-50); }
.ed-people-mark { display: grid; place-items: center; font-family: var(--font-head); font-size: 1.6rem; color: var(--navy-700); }
.ed-people strong, .ed-people small { display: block; line-height: 1.3; }
.ed-people small { color: var(--muted); }

/* Ganadores */
.ed-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-5); }
.ed-cat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-5); }
.ed-cat h4 { font-size: 1.05rem; color: var(--navy-700); margin-bottom: var(--s-3); }
.ed-rama + .ed-rama { margin-top: var(--s-4); }
.ed-rama h5 { margin: 0 0 var(--s-2); font-family: var(--font-hand); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan-700); }
.ed-rama ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.ed-rama li { display: flex; align-items: center; gap: var(--s-3); }
.ed-rama img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ed-puesto { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: .9rem; background: var(--cyan-100); color: var(--navy-900); }
.ed-medal--1 .ed-puesto { background: #F6C945; }
.ed-medal--2 .ed-puesto { background: #D4DCE4; }
.ed-medal--3 .ed-puesto { background: #E0A872; }
.ed-nombre { flex: 1; font-weight: 600; }
.ed-tiempo { font-variant-numeric: tabular-nums; color: var(--muted); }

/* Galería y videos */
.ed-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-3); }
.ed-gallery a { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.ed-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.ed-gallery a:hover img { transform: scale(1.05); }
.ed-videos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-5); }
.ed-video-frame { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--navy-900); }
.ed-video-frame iframe, .ed-video-frame video { width: 100%; height: 100%; border: 0; display: block; }
.ed-videos p { margin: var(--s-2) 0 0; font-weight: 600; }

/* Visor de fotos */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(6,20,40,.92); display: grid; place-items: center; padding: var(--s-5); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.lightbox img { max-height: 80vh; width: auto; margin-inline: auto; border-radius: var(--radius); }
.lightbox figcaption { color: #C9DDF0; margin-top: var(--s-3); }
.lightbox-close { position: absolute; top: var(--s-4); right: var(--s-4); width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--navy-900); font-size: 1.8rem; line-height: 1; cursor: pointer; }

/* Ganadores: podio 3D animado (la imagen es el fondo; el texto es HTML real) */
.podio { position: relative; margin-top: var(--s-5); padding: var(--s-5); border-radius: var(--radius-lg); color: #fff; box-shadow: var(--shadow-md); overflow: hidden;
  background: linear-gradient(180deg, var(--navy-900), #08203F); }
.podio-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1rem; text-align: center; margin-bottom: var(--s-4); min-height: 3.4rem; }
.podio-cat { font-family: var(--font-head); font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.1; letter-spacing: .02em; }
.podio-rama { font-family: var(--font-hand); font-weight: 700; font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .95rem; border-radius: 999px; color: var(--navy-900); background: var(--orange-500); }
.podio-rama--damas { background: var(--cyan-500); }
.podio-stage { position: relative; container-type: inline-size; aspect-ratio: 2560 / 1086; border-radius: var(--radius); overflow: hidden; }
.podio-img { display: block; width: 100%; height: 100%; object-fit: cover; }

.podio-plate { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--navy-900); padding-inline: .5cqw; }
.podio-plate[hidden] { display: none; }
.podio-name { font-family: var(--font-ui); font-weight: 800; line-height: 1.1; text-wrap: balance; }
.podio-time { font-family: var(--font-ui); font-weight: 700; color: var(--navy-700); font-variant-numeric: tabular-nums; margin-top: .35cqw; font-size: 0.94cqw; }
.podio-plate--2 { left: 28.10%; width: 13.80%; top: 77%;   height: 12.5%; }
.podio-plate--1 { left: 42.95%; width: 13.42%; top: 66.5%;   height: 22.5%; }
.podio-plate--3 { left: 57.40%; width: 16.00%; top: 79.5%;   height: 10.5%; }
.podio-plate--1 .podio-name { font-size: 1.42cqw; }
.podio-plate--1 .podio-time { font-size: 1.12cqw; }
.podio-plate--2 .podio-name { font-size: 1.16cqw; }
.podio-plate--3 .podio-name { font-size: 0.9cqw; }
.podio-plate--3 .podio-time { font-size: 0.8cqw; margin-top: .05cqw; }

/* Entradas: el 3.º sube primero, luego el 2.º y al final el 1.º */
.podio.is-in .podio-head { animation: podio-head .55s var(--ease) both; }
.podio.is-in .podio-plate { animation: podio-rise .65s var(--ease) both; }
.podio.is-in .podio-plate--3 { animation-delay: .15s; }
.podio.is-in .podio-plate--2 { animation-delay: .45s; }
.podio.is-in .podio-plate--1 { animation-delay: .8s; }
.podio.is-in .podio-list li { animation: podio-rise .5s var(--ease) both; }
.podio.is-in .podio-list li:nth-child(1) { animation-delay: .5s; }
.podio.is-in .podio-list li:nth-child(2) { animation-delay: .3s; }
.podio.is-in .podio-list li:nth-child(3) { animation-delay: .1s; }
@keyframes podio-head { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes podio-rise { from { opacity: 0; transform: translateY(45%) scale(.92); } to { opacity: 1; transform: none; } }

/* Lista (solo en pantallas donde el texto no cabe sobre los escalones) */
.podio-list { display: none; list-style: none; margin: var(--s-4) 0 0; padding: 0; gap: var(--s-2); }
.podio-list li { display: flex; align-items: center; gap: var(--s-3); padding: .55rem .75rem; border-radius: 12px; background: rgba(255,255,255,.08); }
.podio-list .ed-nombre { color: #fff; }
.podio-list .ed-tiempo { color: #C9DDF0; }
@media (max-width: 979px) { .podio-plate { display: none; } .podio-list { display: grid; } .podio { padding: var(--s-4); } }

/* Controles */
.podio-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem; margin-top: var(--s-4); }
.podio-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.45); background: rgba(255,255,255,.08); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background-color .2s; }
.podio-btn:hover { background: rgba(255,255,255,.22); }
.podio-btn--pause { font-size: .8rem; }
.podio-btn:focus-visible, .podio-dot:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.podio-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.podio-dot { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.podio-dot i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.4); transition: transform .2s, background-color .2s; }
.podio-dot[aria-current] i { background: var(--orange-500); transform: scale(1.4); }
.podio-bar { height: 3px; margin-top: var(--s-4); border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.podio-bar i { display: block; width: 0; height: 100%; background: var(--orange-500); }
@keyframes podio-bar { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .podio.is-in .podio-head, .podio.is-in .podio-plate, .podio.is-in .podio-list li { animation: none; }
}

/* Podio a todo el ancho de la pantalla */
.podio { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; padding-inline: 0; padding-block: var(--s-5); }
.podio-stage { border-radius: 0; }
.podio-head, .podio-controls, .podio-list { padding-inline: var(--s-4); }
body { overflow-x: clip; }

/* Categoría y rama dentro de la imagen, sobre los trofeos */
.podio-stage .podio-head { position: absolute; left: 0; right: 0; top: 11%; margin: 0; min-height: 0; padding-inline: var(--s-4); z-index: 2; pointer-events: none; text-shadow: 0 2px 14px rgba(5,20,50,.85); }
.podio-stage .podio-cat { font-size: clamp(1.1rem, 3.2cqw, 3rem); }
.podio-stage .podio-rama { font-size: clamp(.65rem, 1.2cqw, 1.1rem); text-shadow: none; }
.podio { padding-block: 0 var(--s-5); }

/* "Quienes lo hicieron posible": sección clara, como Galería */
.ed-thanks { padding-bottom: var(--s-6); }
.ed-thanks .section-head { margin-bottom: 0; }

/* Organizadores y aliados: versión oscura (como "Aliados" del inicio) */
.ed-allies { --allies-bg: var(--navy-900); padding-block: clamp(3.5rem, 8vw, 6.5rem); container-type: inline-size; }
/* El texto sigue la alineación del contenedor; la línea ocupa todo el ancho con 20px a cada lado */
.ed-group { position: relative; padding-top: var(--s-3); scroll-margin-top: 6rem; }
.ed-group::before { content: ""; position: absolute; top: 0; left: calc(50% - 50cqw + 20px); width: calc(100cqw - 40px); height: 1px; background: rgba(247,246,235,.3); }
.ed-group + .ed-group { margin-top: clamp(1.5rem, 4vw, 2.75rem); }
.ed-group:last-child .ed-group-label { margin-bottom: var(--s-4); }
.ed-marquee { margin-top: var(--s-2); }
.ed-group-label { margin: 0 0 var(--s-5); font-family: "Figtree", var(--font-ui); font-style: italic; font-weight: 900; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; letter-spacing: -.03em; text-transform: none; color: var(--allies-cream); border: 0; padding: 0; }
.ed-logos { list-style: none; margin: 0; padding: 0 0 var(--s-5); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-6) clamp(2rem, 5vw, 4.5rem); }
.ed-logos a { display: block; text-decoration: none; color: inherit; transition: opacity .2s; }
.ed-logos img { display: block; height: 140px; width: auto; max-width: min(100%, 360px); object-fit: contain; opacity: .92;
  filter: brightness(0) invert(1) drop-shadow(0 0 0 rgba(79,179,232,0)); transition: filter .35s ease, opacity .35s ease; }
/* Resplandor azul al pasar el cursor o enfocar */
.ed-logos li:hover img, .ed-logos a:focus-visible img { opacity: 1; filter: brightness(0) invert(1) drop-shadow(0 0 14px rgba(79,179,232,.95)) drop-shadow(0 0 32px rgba(27,111,184,.8)); }
/* Aparición escalonada al entrar en pantalla (solo con JS activo) */
.ed-logos.js-reveal li { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 160ms); }
.ed-logos.js-reveal.is-in li { opacity: 1; transform: none; }
.ed-logos-name { font-family: "Figtree", var(--font-ui); font-style: italic; font-weight: 900; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.03em; color: var(--allies-cream); }
.ed-logos-empty { margin: 0; padding-bottom: var(--s-5); color: rgba(247,246,235,.55); font-style: italic; }

/* ==========================================================================
   Galería — bento moderno (paneles redondeados; los videos cobran vida)
   ========================================================================== */
/* Pared pintada: azul del proyecto + manchado de rodillo (ruido grueso) + grano fino + focos de luz arriba */
.wall-section { --allies-cream: #F7F6EB; color: #F7F6EB; overflow: hidden; padding-block: clamp(1.25rem, 3vh, 2.25rem); position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  /* Fondo oscuro cuadriculado: retícula tenue + luz suave + viñeteado */
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 56px 56px,
    radial-gradient(70% 60% at 50% 38%, rgba(60,110,190,.22), transparent 75%),
    radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0,0,0,.45)),
    #0A1A36; }
/* Decoración gráfica: aro grande y cuadritos de color */
.wall-section::before { content: ""; position: absolute; z-index: -1; pointer-events: none; left: -13vw; top: 6%; width: 44vw; aspect-ratio: 1; border-radius: 50%;
  border: clamp(22px, 3.2vw, 50px) solid rgba(255,255,255,.065); }
.wall-section::after { content: ""; position: absolute; z-index: -1; pointer-events: none; left: 7%; bottom: 15%; width: 16px; height: 16px; background: #F5821F;
  box-shadow: 150px 26px 0 -3px var(--cyan-500), 62vw -52vh 0 -2px rgba(255,255,255,.55), 83vw 4px 0 0 rgba(255,255,255,.12); }
.wall-section > .container { max-width: none; width: 100%; padding-inline: 20px; flex: 1; display: flex; flex-direction: column; }
.wall-lead, .wall-empty { max-width: 56ch; margin: 0 0 clamp(.9rem, 2vh, 1.5rem); color: rgba(247,246,235,.72); font-size: .95rem; }
.wall-empty { font-style: italic; }

.wall-stage { flex: 1; display: flex; flex-direction: column; }
.wall[hidden] { display: none; }
.wall { list-style: none; margin: 0; padding: 0; flex: none; height: clamp(300px, calc(100svh - 270px), 640px); display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(6, 1fr); gap: clamp(32px, 6vw, 104px); padding-inline: clamp(1rem, 6vw, 7rem); }

/* Bloques de tamaño variado pero alineados (columnas × filas) */

/* Cuadrícula fija de 12×6 para 4 cuadros: sin huecos */
.wall > .frame:nth-child(1) { grid-column: 1/6; grid-row: 1/7; }
.wall > .frame:nth-child(2) { grid-column: 6/10; grid-row: 1/4; }
.wall > .frame:nth-child(3) { grid-column: 10/13; grid-row: 1/7; }
.wall > .frame:nth-child(4) { grid-column: 6/10; grid-row: 4/7; }
.frame { position: relative; border-radius: 0; background: #fff; isolation: isolate;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 1px 2px 2px rgba(0,0,0,.4), 4px 10px 14px -3px rgba(0,0,0,.55), 12px 24px 30px -8px rgba(0,0,0,.6);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease); animation: wall-in-l .9s var(--ease) .55s backwards; }
.frame:hover, .frame:focus-within { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(0,0,0,.35), 2px 4px 4px rgba(0,0,0,.3), 10px 22px 24px -6px rgba(0,0,0,.4), 24px 44px 46px -12px rgba(0,0,0,.45); }
.frame-in { position: absolute; inset: clamp(6px, .9vw, 14px); overflow: hidden; border-radius: 0; background: #0b1c33; }
.frame-in::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 0 14px rgba(0,0,0,.18); }
.frame a { cursor: zoom-in; }
.frame a, .frame-live { display: block; width: 100%; height: 100%; overflow: hidden; background: #0b1c33; }
.frame img, .frame-live video, .frame-live iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.frame img { transition: transform .8s var(--ease); }
.frame:hover img { transform: scale(1.06); }
.frame a:focus-visible { outline: 3px solid var(--cyan-500); outline-offset: -3px; }

/* Video con vida: en bucle, con insignia "En vivo" y borde cian; el iframe no recibe clics (los toma el botón) */
.wall > .frame:nth-child(2) { animation-name: wall-in-t; animation-delay: .7s; }
.wall > .frame:nth-child(3) { animation-name: wall-in-r; animation-delay: .85s; }
.wall > .frame:nth-child(4) { animation-name: wall-in-b; animation-delay: 1s; }
.frame--video { box-shadow: 0 0 0 1.5px var(--cyan-500), 1px 2px 2px rgba(0,0,0,.35), 4px 8px 10px -3px rgba(0,0,0,.35), 10px 18px 22px -8px rgba(0,0,0,.4); }
.frame--video .frame-live iframe { pointer-events: none; transform: scale(1.35); }
.frame-open { position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; cursor: pointer; display: grid; place-items: start start; padding: .75rem; color: #fff; }
.frame-open span { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgba(11,42,82,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 0 0 1px rgba(255,255,255,.25); transition: background .2s; }
.frame-open span::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; background: var(--cyan-500); box-shadow: 0 0 0 0 rgba(26,163,224,.7); animation: wall-live 1.8s infinite; }
.frame-open:hover span, .frame-open:focus-visible span { background: var(--cyan-500); color: var(--navy-900); }
.frame-open:hover span::before, .frame-open:focus-visible span::before { background: var(--navy-900); }

@keyframes wall-in-l { from { opacity: 0; transform: translateX(-90px); } }
@keyframes wall-in-t { from { opacity: 0; transform: translateY(-80px); } }
@keyframes wall-in-r { from { opacity: 0; transform: translateX(90px); } }
@keyframes wall-in-b { from { opacity: 0; transform: translateY(80px); } }
@keyframes wall-live { 70% { box-shadow: 0 0 0 .45rem rgba(26,163,224,0); } 100% { box-shadow: 0 0 0 0 rgba(26,163,224,0); } }

.lb-media { width: min(1000px, 92vw); aspect-ratio: 16/9; }
.lb-media[hidden], .lightbox img[hidden] { display: none !important; }
.lb-media iframe, .lb-media video { width: 100%; height: 100%; border: 0; border-radius: var(--radius); background: #000; }

@media (max-width: 720px) {
  .wall-section { min-height: 0; }
  .wall { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; grid-auto-rows: 34vw; height: auto; }
  .wall > .frame:nth-child(n) { grid-column: auto; grid-row: auto; }
  .wall > .frame:nth-child(3n+1) { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) { .frame, .frame img { animation: none; transition: none; } .frame-open span::before { animation: none; } }
@media (prefers-reduced-motion: reduce) { .ed-logos.js-reveal li { opacity: 1; transform: none; transition: none; } .ed-logos img { transition: none; } }

/* Cambio de pared */
.wall-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; padding-top: clamp(.6rem, 1.6vh, 1.1rem); }
.wall-nav { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0; cursor: pointer; background: #fff; color: var(--navy-900); font-size: 1.5rem; line-height: 1; display: grid; place-items: center; padding-bottom: .15rem; box-shadow: 0 4px 10px -2px rgba(0,0,0,.5); transition: transform .2s, background .2s; }
.wall-nav:hover, .wall-nav:focus-visible { background: var(--cyan-500); transform: scale(1.08); }
.wall-dots { display: flex; gap: .5rem; }
.wall-dot { width: .7rem; height: .7rem; padding: 0; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.28); transition: background .2s, transform .2s; }
.wall-dot[aria-current="true"] { background: #F7F6EB; transform: scale(1.3); }

/* ==========================================================================
   Dinamismo estilo "presentación": barrido de color, acentos que se dibujan,
   zoom lento y reproducción automática con barra de progreso
   ========================================================================== */
.wall-stage { position: relative; }
.wall:not([hidden]) .frame img { animation: wall-kb 11s ease-in-out 1.2s infinite alternate; }
@keyframes wall-kb { to { scale: 1.09; } }

/* Esquinas de acento que se trazan al llegar la foto */
.frame::before, .frame::after { content: ""; position: absolute; z-index: 4; pointer-events: none; width: clamp(22px, 3vw, 44px); height: clamp(22px, 3vw, 44px); opacity: 0; }
.frame::before { left: -10px; top: -10px; border-top: 4px solid var(--cyan-500); border-left: 4px solid var(--cyan-500); transform-origin: 0 0; }
.frame::after { right: -10px; bottom: -10px; border-bottom: 4px solid #F5821F; border-right: 4px solid #F5821F; transform-origin: 100% 100%; }
.wall:not([hidden]) .frame::before { animation: wall-draw .55s var(--ease) 1.45s forwards; }
.wall:not([hidden]) .frame::after { animation: wall-draw .55s var(--ease) 1.6s forwards; }
.wall > .frame:nth-child(even)::before { border-color: #F5821F; }
.wall > .frame:nth-child(even)::after { border-color: var(--cyan-500); }
@keyframes wall-draw { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }

/* Barrido de color entre paredes */
.wall-wipe { position: absolute; inset: -6px -40px; z-index: 20; pointer-events: none; transform: translateX(-104%);
  background: linear-gradient(90deg, #F5821F 0 2.2%, var(--cyan-500) 2.2% 4.4%, #F7F6EB 4.4% 100%); }
.wall-wipe:not(.run) { visibility: hidden; }
.wall-wipe.run { animation: wall-wipe 1.05s cubic-bezier(.7,0,.25,1) both; }
@keyframes wall-wipe { 0% { transform: translateX(-104%); } 45%, 55% { transform: translateX(0); } 100% { transform: translateX(104%); } }

/* Controles: pausa, contador y barra de progreso */
.wall-pager { position: relative; }
.wall-count { font: 700 .85rem/1 var(--font-ui); letter-spacing: .08em; color: #F7F6EB; min-width: 4.2rem; text-align: center; }
.wall-play { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); background: transparent; color: #fff; cursor: pointer; font-size: .8rem; display: grid; place-items: center; transition: background .2s, color .2s; }
.wall-play:hover, .wall-play:focus-visible { background: #fff; color: var(--navy-900); }
.wall-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255,255,255,.14); overflow: hidden; border-radius: 2px; }
.wall-progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--cyan-500), #F5821F); }
.wall-progress i.run { animation: wall-prog var(--wall-t, 7s) linear forwards; }
.wall-pager.is-paused .wall-progress i.run { animation-play-state: paused; }
@keyframes wall-prog { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .wall:not([hidden]) .frame img, .wall:not([hidden]) .frame::before, .wall:not([hidden]) .frame::after { animation: none; }
  .frame::before, .frame::after { opacity: 1; }
  .wall-wipe.run { animation: none; }
}

/* Chispas 3D (canvas): detrás de las fotos, sin interceptar clics */
.wall-sparks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Encabezado claro de la galería (arriba de la pared oscura) */
.wall-head { background: #fff; color: var(--navy-900); padding-block: clamp(2.25rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem); }
.wall-title { font-family: var(--font-head); font-style: normal; font-weight: 400; text-transform: uppercase; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.05; letter-spacing: .01em; color: var(--navy-900); margin: 0 0 var(--s-3); }
.wall-head .wall-lead { margin: 0; color: var(--muted); font-size: 1.2rem; max-width: 62ch; }
.wall-section > .container { padding-top: clamp(.75rem, 2vh, 1.5rem); }

/* Miniatura de video en la pared: el poster se ve mientras carga el clip corto */
.frame-live { background-size: cover; background-position: center; }

/* Icono de reloj junto a los tiempos */
.podio-time:not(:empty)::before,
.ed-tiempo::before {
  content: ''; display: inline-block; width: 1em; height: 1em; margin-right: .3em; vertical-align: -.14em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 2M9.5 2h5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 2M9.5 2h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Reproductor de YouTube sin marca */
.yt { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; border-radius: inherit; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.yt-hit { position: absolute; inset: 0; cursor: pointer; }
.yt-btn { position: absolute; inset: 0; margin: auto; width: 4.25rem; height: 4.25rem; border-radius: 50%; border: 0; cursor: pointer; background: rgba(18,64,122,.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") center/55% no-repeat; box-shadow: 0 0 0 4px rgba(255,255,255,.35); transition: transform .2s, opacity .2s; }
.yt-btn:hover { transform: scale(1.08); }
.yt--playing .yt-thumb, .yt--playing .yt-btn { opacity: 0; pointer-events: none; }
.yt:not(.yt--playing) iframe + .yt-thumb { opacity: 1; }
.yt:not(.yt--playing) .yt-hit { pointer-events: none; }

/* Flechas laterales de la galería */
.wall-side { position: absolute; top: 50%; z-index: 5; width: 3rem; height: 3rem; margin-top: -1.5rem; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); cursor: pointer; background: rgba(18,64,122,.85); color: #fff; font-size: 1.9rem; line-height: 1; display: grid; place-items: center; padding: 0 0 .15rem; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: background .2s, transform .2s; }
.wall-side:hover, .wall-side:focus-visible { background: var(--cyan-500); transform: scale(1.1); }
.wall-side--prev { left: .5rem; }
.wall-side--next { right: .5rem; }
@media (max-width: 720px) { .wall-side { display: none; } .wall-pager { margin-top: 1.25rem; padding-top: 1rem; } }
.wall-stage { touch-action: pan-y; }
