/* =========================================================
   Semana Santa Baeza — hoja de estilos única
   Mobile-first · morado nazareno y oro
   ========================================================= */

/* Fuentes servidas desde la propia web (sin enviar datos a Google) */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fuentes/cinzel-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fuentes/cinzel-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fuentes/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fuentes/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fuentes/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fuentes/montserrat-latin-700-normal.woff2') format('woff2'); }

:root {
    --fondo:        #170a1f;
    --morado-900:   #2a0f37;
    --morado-700:   #45195c;
    --morado-500:   #6b2d8c;
    --oro:          #d4af37;
    --oro-claro:    #f0d98a;
    --texto:        #f6f1f8;
    --texto-suave:  #cbbcd5;
    --superficie:   rgba(255, 255, 255, .06);
    --superficie-2: rgba(255, 255, 255, .10);
    --borde:        rgba(240, 217, 138, .18);
    --rojo-directo: #e53935;

    --radio:    18px;
    --radio-sm: 12px;
    --sombra:   0 10px 30px rgba(0, 0, 0, .35);
    --sombra-lg: 0 18px 50px rgba(0, 0, 0, .5);

    --fuente-titulo: 'Cinzel', Georgia, 'Times New Roman', serif;
    --fuente-texto:  'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --ancho:          1100px;
    --ancho-estrecho: 760px;
    --hueco:          clamp(16px, 4vw, 28px);

    --curva: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--fuente-texto);
    font-size: clamp(15px, 1.4vw + 10px, 17px);
    line-height: 1.55;
    color: var(--texto);
    background: var(--fondo);
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Fondo fijo (funciona también en iOS, a diferencia de background-attachment: fixed) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(107, 45, 140, .55), transparent 60%),
        linear-gradient(180deg, rgba(23, 10, 31, .78), rgba(23, 10, 31, .96) 70%),
        url('../assets/img/fondo.webp') center / cover no-repeat;
}

#app { min-height: 100dvh; display: flex; flex-direction: column; }
#contenido { flex: 1; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 6px; }

.saltar {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    padding: 10px 16px; border-radius: var(--radio-sm);
    background: var(--oro); color: var(--morado-900); font-weight: 700;
}
.saltar:focus { top: 12px; }

/* ---------- Navegación por formularios POST ---------- */
/* Cada enlace interno es <form class="nav"><button>…</button></form>.
   display: contents hace que el formulario no altere la maquetación. */
.nav { display: contents; }
:where(.nav) > button {
    margin: 0; border: 0; background: none; padding: 0;
    font: inherit; color: inherit; text-align: inherit;
    -webkit-tap-highlight-color: transparent;
}
.nav > .dia, .nav > .cofradia { width: 100%; text-align: left; }
.nav > .dia { text-align: center; }

/* Indicador de carga al navegar */
html.navegando body { cursor: progress; }
html.navegando #app { opacity: .55; transition: opacity .2s .1s; }
html.navegando body::after {
    content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
    background: linear-gradient(90deg, transparent, var(--oro), transparent);
    background-size: 50% 100%; background-repeat: no-repeat;
    animation: cargando 1s linear infinite;
}
@keyframes cargando { from { background-position: -50% 0; } to { background-position: 150% 0; } }
html.recuperando #app { visibility: hidden; }
#contenido:focus { outline: none; }

/* ---------- Contenedores ---------- */
.contenedor {
    width: min(100% - 2 * var(--hueco), var(--ancho));
    margin-inline: auto;
    padding-block: var(--hueco) calc(var(--hueco) * 2);
}
.contenedor--estrecho { width: min(100% - 2 * var(--hueco), var(--ancho-estrecho)); }

.seccion + .seccion { margin-top: calc(var(--hueco) * 1.5); }
.seccion__cabecera { margin-bottom: 18px; }

/* ---------- Tipografía ---------- */
.titulo {
    font-family: var(--fuente-titulo);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw + .6rem, 2.4rem);
    line-height: 1.15;
    letter-spacing: .02em;
    color: var(--texto);
}
.subtitulo { color: var(--texto-suave); margin-top: 6px; }
.vacio {
    padding: 28px; text-align: center; color: var(--texto-suave);
    background: var(--superficie); border: 1px dashed var(--borde); border-radius: var(--radio);
}

/* ---------- Barra superior ---------- */
.barra {
    position: sticky; top: 0; z-index: 50;
    padding-top: env(safe-area-inset-top);
    background: rgba(23, 10, 31, .72);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--borde);
}
.barra__interior {
    width: min(100% - 2 * var(--hueco), var(--ancho));
    margin-inline: auto;
    height: 58px;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
}
.barra__marca {
    justify-self: center;
    display: flex; align-items: center; gap: 10px;
    font-family: var(--fuente-titulo);
    font-size: 1rem; letter-spacing: .04em; white-space: nowrap;
}
.barra__marca strong { color: var(--oro); }
.barra__marca img { width: 28px; height: 28px; border-radius: 50%; }
.barra__boton, .barra__hueco { width: 44px; height: 44px; }
.barra__boton {
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--superficie);
    border: 1px solid var(--borde);
    transition: background .2s, transform .2s var(--curva);
}
.barra__boton:hover { background: var(--superficie-2); }
.barra__boton:active { transform: scale(.94); }
.barra__boton svg { width: 22px; height: 22px; }

.punto-directo {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    background: var(--rojo-directo);
    box-shadow: 0 0 0 0 rgba(229, 57, 53, .7);
    animation: latido 1.8s infinite;
}
.barra__boton--directo .punto-directo { width: 12px; height: 12px; }

/* ---------- Botones ---------- */
.boton {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 22px;
    border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; letter-spacing: .01em;
    transition: transform .2s var(--curva), background .2s, color .2s, box-shadow .2s;
}
.boton svg { width: 20px; height: 20px; }
.boton:active { transform: scale(.97); }
.boton--oro {
    background: linear-gradient(180deg, var(--oro-claro), var(--oro));
    color: var(--morado-900);
    box-shadow: 0 6px 20px rgba(212, 175, 55, .28);
}
.boton--oro:hover { box-shadow: 0 8px 28px rgba(212, 175, 55, .45); }
.boton--fantasma { background: var(--superficie); border-color: var(--borde); }
.boton--fantasma:hover { background: var(--superficie-2); }
.boton--grande { min-height: 56px; padding-inline: 34px; font-size: 1.1rem; }
.boton--ancho { display: flex; width: 100%; margin-top: calc(var(--hueco) * 1.2); }
.boton--ancho .boton { width: 100%; }

/* ---------- Inicio ---------- */


.dias {
    list-style: none; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.dias > li, .cofradias > li { animation: aparecer .5s var(--curva) both; animation-delay: calc(var(--i, 0) * 45ms); }

.dia {
    position: relative;
    height: 100%;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
    padding: 18px 12px 16px;
    border-radius: var(--radio);
    background: var(--superficie);
    border: 1px solid var(--borde);
    transition: transform .25s var(--curva), background .25s, border-color .25s, box-shadow .25s;
}
.dia:hover { transform: translateY(-3px); background: var(--superficie-2); border-color: rgba(240, 217, 138, .45); box-shadow: var(--sombra); }
.dia__icono { width: 72px; height: 72px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); transition: transform .3s var(--curva); }
.dia:hover .dia__icono { transform: scale(1.08) rotate(-3deg); }
.dia__nombre { font-family: var(--fuente-titulo); font-weight: 700; font-size: 1rem; line-height: 1.2; }
.dia__meta { font-size: .8rem; color: var(--texto-suave); }
.dia--hoy { border-color: var(--oro); background: linear-gradient(180deg, rgba(212, 175, 55, .18), var(--superficie)); }
.dia__hoy {
    position: absolute; top: 10px; right: 10px;
    padding: 2px 9px; border-radius: 999px;
    background: var(--oro); color: var(--morado-900);
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}


/* Imágenes del lateral del inicio (o su hueco «Próximamente») */
.lateral img { width: 100%; border-radius: var(--radio); border: 1px solid var(--borde); box-shadow: var(--sombra); }
.lateral--vertical img { max-width: 460px; margin-inline: auto; }
.lateral--hueco {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    border-radius: var(--radio); border: 1px dashed rgba(240, 217, 138, .3);
    background: radial-gradient(80% 80% at 50% 40%, rgba(107, 45, 140, .25), transparent 70%), var(--superficie);
    color: var(--texto-suave); font-family: var(--fuente-titulo); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
}
.lateral--hueco img { width: 56px; height: 56px; border: 0; box-shadow: none; border-radius: 50%; opacity: .55; }
.lateral--apaisada.lateral--hueco { aspect-ratio: 3 / 1; }
.lateral--vertical.lateral--hueco { aspect-ratio: 2 / 3; max-height: 520px; width: 100%; max-width: 460px; margin-inline: auto; }

.llamador-antiguo img {
    width: 100%;
    border-radius: var(--radio);
    border: 1px solid var(--borde);
    box-shadow: var(--sombra);
}
.inicio-cuerpo { display: grid; gap: calc(var(--hueco) * 1.5); }
.destacados { display: grid; gap: 16px; align-content: start; }

.directo {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radio);
    background: linear-gradient(135deg, #b71c1c, #7f1238 70%, var(--morado-700));
    box-shadow: var(--sombra);
    transition: transform .25s var(--curva), box-shadow .25s;
}
.directo:hover { transform: translateY(-2px); box-shadow: var(--sombra-lg); }
.directo img { width: 52px; height: 52px; flex-shrink: 0; }
.directo__texto { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.directo__etiqueta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; opacity: .9;
}
.directo__etiqueta .punto-directo { background: #fff; animation-name: latido-blanco; }
.directo strong { font-size: 1.15rem; }
.directo small { opacity: .85; font-size: .85rem; }
.directo__flecha { width: 26px; height: 26px; flex-shrink: 0; }

.cartel img {
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
    border-radius: var(--radio);
    box-shadow: var(--sombra-lg);
}

/* ---------- Listado de un día ---------- */
.cabecera-dia { display: flex; align-items: center; gap: 18px; margin-bottom: calc(var(--hueco) * 1.2); }
.cabecera-dia__icono {
    width: 84px; height: 84px; flex-shrink: 0;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .45));
}
.cabecera-dia__fecha { color: var(--oro); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; }

.cofradias {
    list-style: none; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 12px;
}
.cofradia {
    height: 100%;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 14px 10px 10px;
    border-radius: var(--radio);
    background: var(--superficie);
    border: 1px solid var(--borde);
    border-left: 4px solid var(--acento, var(--oro));
    transition: transform .25s var(--curva), background .25s, box-shadow .25s;
}
.cofradia:hover { transform: translateY(-2px); background: var(--superficie-2); box-shadow: var(--sombra); }
.cofradia__imagen {
    width: 84px; height: 84px; flex-shrink: 0;
    border-radius: 14px; overflow: hidden;
    background: rgba(255, 255, 255, .9);
}
.cofradia__imagen img { width: 100%; height: 100%; object-fit: cover; }
.cofradia__texto { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cofradia__apodo { font-family: var(--fuente-titulo); font-weight: 700; font-size: 1.05rem; line-height: 1.2; color: var(--oro-claro); }
.cofradia__nombre {
    font-size: .85rem; color: var(--texto-suave); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cofradia__flecha { width: 20px; height: 20px; flex-shrink: 0; opacity: .6; }

.navegacion-dias {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: calc(var(--hueco) * 1.5);
}
.navegacion-dias .boton { font-size: .9rem; }

/* ---------- Ficha de cofradía ---------- */
.ficha-cabecera {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
    padding: 24px 18px;
    margin-bottom: 16px;
    border-radius: var(--radio);
    background:
        radial-gradient(100% 120% at 50% 0%, color-mix(in srgb, var(--acento) 30%, transparent), transparent 70%),
        var(--superficie);
    border: 1px solid var(--borde);
    border-top: 4px solid var(--acento, var(--oro));
}
.ficha-cabecera__medalla {
    width: 120px; height: 120px; object-fit: cover;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--oro);
    box-shadow: var(--sombra);
}
.ficha-cabecera__apodo { font-family: var(--fuente-titulo); font-weight: 700; font-size: clamp(1.5rem, 4vw + .5rem, 2.2rem); line-height: 1.15; color: var(--oro-claro); }
.ficha-cabecera__nombre { font-family: var(--fuente-texto); font-weight: 500; font-size: 1rem; line-height: 1.45; color: var(--texto-suave); max-width: 52ch; margin-inline: auto; margin-top: 6px; }
.ficha-cabecera__apodo + .ficha-cabecera__nombre { margin-top: 4px; }

.chip {
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .25); border: 1px solid var(--borde);
    font-size: .8rem; font-weight: 600;
    margin-bottom: 6px;
}
.chip img { width: 20px; height: 20px; }

.panel {
    padding: 18px;
    border-radius: var(--radio);
    background: var(--superficie);
    border: 1px solid var(--borde);
}
.panel + .panel { margin-top: 12px; }
.panel__titulo {
    font-family: var(--fuente-titulo); font-size: .85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em;
    color: var(--oro);
    margin-bottom: 12px;
}
.panel__texto { color: var(--texto); line-height: 1.75; }

.horario { list-style: none; padding: 0; display: grid; gap: 4px; position: relative; }
.horario__paso {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-areas: "icono etiqueta" "icono valor";
    column-gap: 14px;
    align-items: center;
    padding: 8px 0;
}
.horario__paso + .horario__paso::before {
    content: ""; position: absolute; left: 19px; top: -8px; height: 16px; width: 2px;
    background: var(--borde);
}
.horario__icono {
    grid-area: icono;
    width: 40px; height: 40px; display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(212, 175, 55, .14); color: var(--oro);
}
.horario__icono svg { width: 20px; height: 20px; }
.horario__etiqueta { grid-area: etiqueta; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--texto-suave); }
.horario__valor { grid-area: valor; font-size: 1rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.horario__valor b, .horario__valor strong { color: var(--oro-claro); font-size: 1.1em; }
.panel__texto b, .panel__texto strong { color: var(--oro-claro); }

.galeria {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(70%, 1fr);
    gap: 10px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: thin; scrollbar-color: var(--oro) transparent;
}
@media (min-width: 560px) { .galeria { grid-auto-columns: 1fr; } }
.galeria__item {
    padding: 0; border: 0; background: none;
    border-radius: var(--radio-sm); overflow: hidden;
    scroll-snap-align: start;
    aspect-ratio: 4 / 3;
}
.galeria__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--curva); }
.galeria__item:hover img { transform: scale(1.04); }

.visor {
    padding: 0; border: 0; background: transparent;
    max-width: 96vw; max-height: 92dvh;
    margin: auto;
}
.visor::backdrop { background: rgba(10, 4, 14, .88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.visor img { max-width: 96vw; max-height: 92dvh; border-radius: var(--radio-sm); }
.visor__cerrar {
    position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px;
    width: 46px; height: 46px; display: grid; place-items: center;
    border-radius: 50%; border: 1px solid var(--borde);
    background: rgba(23, 10, 31, .8);
}
.visor__cerrar svg { width: 22px; height: 22px; }

/* ---------- Mapa del recorrido ---------- */
.mapa {
    position: relative;
    height: clamp(320px, 55vh, 480px);
    border-radius: var(--radio-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--borde);
    isolation: isolate;          /* las capas de Leaflet no tapan la barra superior */
}
.mapa__estado[hidden] { display: none; }
.mapa__estado { position: absolute; inset: 0; display: grid; place-items: center; color: var(--texto-suave); padding: 20px; text-align: center; }
.mapa--error { height: auto; min-height: 80px; }
.mapa--error .mapa__estado { position: static; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.mapa__reintentar { min-height: 40px; padding: 8px 18px; font-size: .9rem; }
.mapa__leyenda { list-style: none; padding: 0; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; color: var(--texto-suave); }
.mapa__leyenda li { display: inline-flex; align-items: center; gap: 8px; }
.mapa__leyenda .mapa-punto { width: 22px; height: 22px; font-size: .7rem; }
.mapa__aviso { margin-top: 8px; font-size: .8rem; color: var(--texto-suave); opacity: .85; }
.mapa-linea { width: 26px; height: 5px; border-radius: 3px; background: var(--oro); box-shadow: 0 0 0 2px rgba(42, 15, 55, .55); }
.mapa-punto {
    width: 30px; height: 30px; display: grid; place-items: center;
    border-radius: 50%; border: 3px solid #fff;
    font: 700 .8rem/1 var(--fuente-texto); color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.mapa-punto--salida  { background: #2e7d32; }
.mapa-punto--tribuna { background: var(--oro); color: var(--morado-900); }
.mapa .leaflet-control-attribution { font-size: 10px; }
.mapa .leaflet-control-zoom a { color: var(--morado-900); }

/* ---------- Aviso / error ---------- */
.aviso { text-align: center; padding: 40px 20px; display: grid; gap: 16px; justify-items: center; }
.aviso__titulo { font-family: var(--fuente-titulo); font-size: 2rem; color: var(--oro); }

/* ---------- Pie ---------- */
.pie {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 28px var(--hueco) calc(28px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--borde);
    background: rgba(10, 4, 14, .45);
    text-align: center;
}
.pie > img { width: 200px; opacity: .9; }
.pie > .pie__logo { width: 110px; height: auto; opacity: 1; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .4)); }
.pie__texto { font-size: .8rem; color: var(--texto-suave); }
.pie__credito { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--texto-suave); }
.pie__credito img { width: 64px; opacity: .85; }

/* ---------- Bienvenida (capa superpuesta al inicio) ---------- */
.bienvenida { display: none; }
html.con-bienvenida body { overflow: hidden; }
html.con-bienvenida .bienvenida {
    display: grid; place-items: center;
    position: fixed; inset: 0; z-index: 300;
    overflow-y: auto;
    background:
        radial-gradient(70% 55% at 50% 40%, rgba(107, 45, 140, .45), transparent 70%),
        linear-gradient(180deg, rgba(23, 10, 31, .6), rgba(23, 10, 31, .95)),
        url('../assets/img/fondo-corona.webp') center / cover no-repeat,
        var(--fondo);
    transition: opacity .45s ease, visibility .45s;
}
.bienvenida--saliendo { opacity: 0; visibility: hidden; }
.splash__contenido {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 18px;
    padding: calc(24px + env(safe-area-inset-top)) 24px 32px;
}
.splash__corona {
    width: min(68vw, 300px);
    filter: drop-shadow(0 12px 40px rgba(212, 175, 55, .35));
    animation: aparecer 1s var(--curva) both, flotar 5s ease-in-out 1s infinite;
}
.splash__titulo { display: flex; flex-direction: column; font-family: var(--fuente-titulo); line-height: 1.1; animation: aparecer 1s var(--curva) .35s both; }
.splash__titulo span { font-size: clamp(1rem, 3vw, 1.3rem); letter-spacing: .3em; text-transform: uppercase; color: var(--texto-suave); }
.splash__titulo strong { font-size: clamp(2.2rem, 9vw, 3.6rem); color: var(--oro-claro); text-shadow: 0 4px 24px rgba(0, 0, 0, .6); }
.splash__entrar { animation: aparecer 1s var(--curva) .7s both; }
.splash__progreso { width: 160px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; animation: aparecer 1s var(--curva) .9s both; }
.splash__progreso span { display: block; height: 100%; background: var(--oro); transform: scaleX(0); transform-origin: left; transition: transform 6s linear; }
.splash__credito { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--texto-suave); animation: aparecer 1s var(--curva) 1.1s both; }
.splash__credito img { width: 80px; }

/* ---------- Sobre la Semana Santa y preguntas frecuentes ---------- */
.sobre { margin-top: calc(var(--hueco) * 2); padding-top: calc(var(--hueco) * 1.5); border-top: 1px solid var(--borde); }
.sobre > p { color: var(--texto-suave); max-width: 75ch; margin-top: 10px; }
.sobre strong { color: var(--texto); font-weight: 600; }
.titulo .antetitulo { display: block; margin-bottom: 4px; font-family: var(--fuente-texto); }
.faq { margin-top: 20px; display: grid; gap: 8px; max-width: 820px; }
.faq__titulo { font-family: var(--fuente-titulo); font-size: 1rem; color: var(--oro-claro); margin-bottom: 4px; }
.faq__item { border-radius: var(--radio-sm); background: var(--superficie); border: 1px solid var(--borde); }
.faq__item summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; color: var(--oro); font-size: 1.2rem; line-height: 1; }
.faq__item[open] summary::after { content: "–"; }
.faq__item p { padding: 0 16px 14px; color: var(--texto-suave); }

/* Medallas (escudos con transparencia): sin recorte circular */
.ficha-cabecera__medalla--escudo { border-radius: 0; border: 0; background: none; box-shadow: none; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); }

/* ---------- Información de la cofradía ---------- */
.info-cofradia { margin-top: 12px; }
.ficha-cabecera + .info-cofradia { margin-top: 0; }
.info-cofradia__datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 18px; margin-top: 14px; }
.info-cofradia__datos dt { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-suave); }
.info-cofradia__datos dd { margin: 2px 0 0; color: var(--texto); }
.info-cofradia__ancho { grid-column: 1 / -1; }
.info-cofradia__datos ul { margin: 4px 0 0; padding-left: 18px; }
.info-cofradia__datos li { color: var(--texto-suave); margin-bottom: 2px; }
.info-pasos { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.info-pasos li { color: var(--texto); }
.info-pasos strong { display: block; font-weight: 600; }
.info-pasos span { display: block; font-size: .85rem; color: var(--texto-suave); }
.info-cofradia__redes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.info-cofradia__redes a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--borde); background: var(--superficie); font-size: .85rem; font-weight: 600; color: var(--oro-claro); }
.info-cofradia__redes a:hover { background: var(--superficie-2); }
.info-cofradia__nota { margin-top: 12px; font-size: .75rem; color: var(--texto-suave); font-style: italic; }
.info-cofradia__fuente { margin-top: 14px; font-size: .75rem; color: var(--texto-suave); }
.info-cofradia__fuente a, .enlace-oro { color: var(--oro-claro); text-decoration: underline; text-underline-offset: 2px; }
.aviso-pendiente { border-style: dashed; margin-bottom: 12px; }
.cofradia__imagen--pendiente { background: var(--superficie-2); display: grid; place-items: center; }
.cofradia__imagen--pendiente img { width: 60%; height: auto; object-fit: contain; opacity: .7; }
.panel + .info-cofradia, .info-cofradia + .panel, .info-cofradia + .previa { margin-top: 12px; }

/* ---------- Tribuna en directo ---------- */
.directo-video { position: relative; margin-top: 16px; aspect-ratio: 16 / 9; border-radius: var(--radio); overflow: hidden; background: #000; border: 1px solid var(--borde); box-shadow: var(--sombra-lg); }
.directo-video video { width: 100%; height: 100%; display: block; background: #000; }
.directo-video__estado { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; background: rgba(23, 10, 31, .88); color: var(--texto-suave); }
.directo-video__estado[hidden] { display: none; }
.directo-video__credito { margin-top: 10px; font-size: .8rem; color: var(--texto-suave); }
.directo-video__credito a { color: var(--oro-claro); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Migas de pan ---------- */
.migas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .8rem; color: var(--texto-suave); margin-bottom: 14px; }
.migas a { color: var(--oro-claro); text-decoration: underline; text-decoration-color: rgba(240, 217, 138, .35); text-underline-offset: 3px; }
.migas a:hover { text-decoration-color: currentColor; }
.migas [aria-current] { color: var(--texto); font-weight: 600; }
.titulo__lugar { font-size: .55em; color: var(--texto-suave); font-weight: 500; letter-spacing: .04em; }

/* ---------- Guía de cofradías (texto para buscadores y visitantes) ---------- */
.antetitulo { color: var(--oro); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 4px; }
.titulo--secundario { font-size: clamp(1.25rem, 2vw + .7rem, 1.7rem); }
.guia { margin-top: calc(var(--hueco) * 2); padding-top: calc(var(--hueco) * 1.5); border-top: 1px solid var(--borde); }
.guia__intro { color: var(--texto-suave); max-width: 75ch; margin: 10px 0 20px; }
.guia__dias { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.guia__dia { padding: 14px 16px; border-radius: var(--radio); background: var(--superficie); border: 1px solid var(--borde); }
.guia__dia h3 { font-family: var(--fuente-titulo); font-size: 1rem; color: var(--oro-claro); margin-bottom: 6px; }
.guia__enlace-dia:hover { text-decoration: underline; text-underline-offset: 3px; }
.guia__dia h3 small { font-family: var(--fuente-texto); font-size: .75rem; color: var(--texto-suave); font-weight: 500; margin-left: 6px; }
.guia__dia ul { list-style: none; padding: 0; }
.guia__cofradia {
    width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    padding: 6px 0; border-bottom: 1px dashed rgba(240, 217, 138, .12); cursor: pointer;
    font-size: .9rem; text-align: left;
}
.guia__dia li:last-child .guia__cofradia { border-bottom: 0; }
.guia__cofradia:hover span { color: var(--oro-claro); text-decoration: underline; text-underline-offset: 3px; }
.guia__cofradia small { color: var(--texto-suave); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Previa (antes de la apertura) ---------- */
.previa {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
    padding: 22px 18px;
    border-radius: var(--radio);
    background: radial-gradient(90% 120% at 50% 0%, rgba(107, 45, 140, .5), transparent 70%), var(--superficie);
    border: 1px solid var(--borde);
}
.previa--portada { margin-bottom: calc(var(--hueco) * 1.5); padding: 28px 18px 24px; }
.previa__corona { width: min(46vw, 190px); filter: drop-shadow(0 10px 30px rgba(212, 175, 55, .35)); animation: aparecer .8s var(--curva) both, flotar 5s ease-in-out 1s infinite; }
.previa__titulo { display: flex; flex-direction: column; font-family: var(--fuente-titulo); line-height: 1.1; }
.previa__titulo span { font-size: clamp(.9rem, 2.6vw, 1.1rem); letter-spacing: .3em; text-transform: uppercase; color: var(--texto-suave); font-weight: 500; }
.previa__titulo strong { font-size: clamp(2rem, 8vw, 3.2rem); color: var(--oro-claro); }
.previa__antetitulo { font-family: var(--fuente-titulo); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--oro-claro); }
.previa__aviso { color: var(--texto-suave); font-size: .95rem; max-width: 46ch; }
.previa__aviso strong { color: var(--oro-claro); font-weight: 600; }
.cuenta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 420px; }
.cuenta div { padding: 12px 4px 10px; border-radius: 16px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(240, 217, 138, .25); }
.cuenta b { display: block; font-family: var(--fuente-titulo); font-size: clamp(1.5rem, 6.5vw, 2.3rem); color: var(--oro-claro); line-height: 1; font-variant-numeric: tabular-nums; }
.cuenta small { display: block; margin-top: 6px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-suave); }
.ficha-cabecera + .previa { margin-top: 0; }

/* ---------- Banner de cookies ---------- */
.cookies {
    position: fixed; z-index: 400;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: 560px; margin-inline: auto;
    padding: 18px 18px 16px;
    border-radius: var(--radio);
    background: rgba(30, 12, 40, .97);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(240, 217, 138, .35);
    box-shadow: var(--sombra-lg);
    animation: aparecer .4s var(--curva) both;
}
.cookies[hidden] { display: none; }
.cookies__titulo { font-family: var(--fuente-titulo); font-size: 1rem; color: var(--oro-claro); margin-bottom: 6px; }
.cookies__texto { font-size: .85rem; color: var(--texto-suave); line-height: 1.55; }
.cookies__texto a { color: var(--oro-claro); text-decoration: underline; text-underline-offset: 2px; }
.cookies__botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
/* Los dos botones con el mismo peso visual (criterio de la AEPD) */
.cookies__botones .boton { min-height: 46px; padding: 10px 14px; font-size: .95rem; background: var(--superficie-2); border-color: rgba(240, 217, 138, .45); color: var(--texto); box-shadow: none; }
.cookies__botones .boton:hover { background: rgba(240, 217, 138, .18); }
html.con-bienvenida .cookies { display: none; }

.pie__enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: .75rem; }
.pie__enlaces a, .pie__enlaces button { color: var(--texto-suave); text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.pie__enlaces a:hover, .pie__enlaces button:hover { color: var(--oro-claro); }

/* Mapa pendiente de consentimiento */
.mapa__permiso { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; }
.mapa__permiso p { font-size: .9rem; color: var(--texto-suave); max-width: 40ch; margin: 0 auto 14px; }

/* Página de texto legal */
.legal h1 { margin-bottom: 14px; }
.legal h2 { font-family: var(--fuente-titulo); font-size: 1.05rem; color: var(--oro-claro); margin: 22px 0 8px; }
.legal p, .legal li { color: var(--texto-suave); line-height: 1.7; }
.legal ul { padding-left: 20px; }
.lista-cookies { list-style: none; padding: 0 !important; display: grid; gap: 10px; margin-top: 8px; }
.lista-cookies li { padding: 12px 14px; border-radius: var(--radio-sm); background: var(--superficie); border: 1px solid var(--borde); font-size: .88rem; }
.lista-cookies code { font-family: ui-monospace, Consolas, monospace; color: var(--oro-claro); font-size: .9rem; }
.lista-cookies .etiquetas { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.lista-cookies .etiquetas span { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--borde); font-size: .72rem; color: var(--texto); }

/* ---------- Escritorio ---------- */
@media (min-width: 720px) {
    .dias { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
    .dia__icono { width: 76px; height: 76px; }
    .destacados { grid-template-columns: 1fr 1fr; align-items: start; }
    .ficha-cabecera { flex-direction: row; text-align: left; padding: 26px; }
    .ficha-cabecera__nombre { margin-inline: 0; }
    .ficha-cabecera__medalla { width: 140px; height: 140px; }
    .panel { padding: 22px 24px; }
}

@media (min-width: 980px) {
    .inicio-cuerpo { grid-template-columns: 1fr 340px; align-items: start; }
    .destacados { grid-template-columns: 1fr; position: sticky; top: 80px; }
    .dias { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Animaciones ---------- */
@keyframes aparecer { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes flotar { 50% { transform: translateY(-8px); } }
@keyframes latido {
    0%   { box-shadow: 0 0 0 0 rgba(229, 57, 53, .7); }
    70%  { box-shadow: 0 0 0 10px rgba(229, 57, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}
@keyframes latido-blanco {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
    70%  { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
