/* =====================================================================
   carteles-festivales.css — Cartel de festivales por género (elDiario.es)
   ===================================================================== */


:root {
    --fuente: 'Sanomat-regular', sans-serif;
    --fuente-titular: 'Bebas Neue', var(--fuente); /* nombres de festival */
    --fuente-cartel: 'Encode Sans', sans-serif;    /* nombres de artista */
    --texto: #1a1a1a;
}

/* ---- Bloques de título / fuente (plantilla elDiario) ---- */
/* El CSS del artículo mete text-align:center por herencia -> lo forzamos a
   left en los bloques raíz; lo que quiera ir centrado lo declara aparte. */
.titulo-fest {
    font-family: var(--fuente);
    color: var(--texto);
    margin: 32px 0 12px;
    text-align: left;
}
.titulo-fest h2 { font-size: 24px; font-weight: 700; line-height: 1.2; margin: 4px 0 8px; }
.titulo-fest p  { font-size: 15px; font-weight: 400; line-height: 1.45; margin: 0; color: #333; }

.fuente-fest {
    font-family: var(--fuente);
    font-size: 12px;
    color: #888;
    margin: 8px 0 40px;
    text-align: left;
}

[id^="cont-"] { font-family: var(--fuente); text-align: left; }

/* ---- Botones de filtro por género ---- */
#button-select-genero-fest {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 40px;
    text-align: center;
}
.btn-genero-fest {
    max-width: 200px;
    height: 30px;
    padding: 0 14px;
    color: #fff;
    font-family: var(--fuente-cartel);
    font-size: 14px;
    text-transform: uppercase;
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    opacity: 0.35;                 /* apagados por defecto; el activo va a 1 */
    transition: opacity 0.2s;
}
.btn-todos-fest    { border: 2px solid #686868; background: #686868; }
.btn-hombres-fest  { border: 2px solid #008837; background: #008837; }
.btn-mujeres-fest  { border: 2px solid #7b3294; background: #7b3294; }
.btn-genero-activo-fest { opacity: 1; }

/* ---- Rejilla de festivales (masonry con multicolumna) ---- */
/* Cada columna apila las tarjetas PEGADAS: si una es más alta, la de abajo
   sube y no se alinea con la de al lado (efecto masonry). El nº de columnas
   responde al ancho del EMBED con container queries, como los mini-mapas de
   incendios: <600px -> 1 columna, 600-899 -> 2, >=900 (escritorio ~1000) -> 3. */
#graf-cartel-fest { container-type: inline-size; }

.graficofestivales-fest {
    columns: 1;
    column-gap: 20px;
    margin: 0.4rem;
    font-family: var(--fuente);
    text-align: left;
}
@container (min-width: 600px) { .graficofestivales-fest { columns: 2; } }
@container (min-width: 900px) { .graficofestivales-fest { columns: 3; } }

.festivales-fest {
    box-sizing: border-box;
    break-inside: avoid;                 /* que una tarjeta no se parta entre columnas */
    -webkit-column-break-inside: avoid;
    width: 100%;                         /* ocupa el ancho de su columna */
    margin: 0 0 20px;                    /* separación vertical entre tarjetas */
    border: 1px dashed #111;
    padding: 10px;
    height: fit-content;
}

.nombrefestival-fest {
    display: inline;
    align-items: center;
    font-family: var(--fuente-titular);
    font-weight: 500;
    font-size: 60px;
    line-height: 54px;
    margin-top: 5px;
    text-transform: uppercase;
}
.logo-fest { height: 45px; margin-left: 5px; }

.legend_festival-fest {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-family: var(--fuente-titular);
    font-weight: 400;
    font-size: 18px;
    line-height: 20px;
}
.legend_gender_festival-fest {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px;
    border: 1px solid #e5e5e5;
}
.legend-pct-fest { font-size: 28px; }

/* ---- Días y rejilla de artistas ---- */
.divs_dias_festival-fest {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 12px;
}
.detalle_dia_festival-fest { display: flex; flex-direction: row; padding: 5px 0; }
.listado_artistas-fest {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    cursor: pointer;
}
.square-artista-fest {
    font-family: var(--fuente-cartel);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1px 4px;
    line-height: 120%;
    border-radius: 9px;
    transition: opacity 0.25s;     /* suaviza el filtro por género */
}

/* ---- Tooltip único ---- */
#tooltip-fest {
    position: absolute;
    z-index: 10;
    visibility: hidden;
    pointer-events: none;          /* CLAVE: si no, parpadea al robar el hover */
    width: 180px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: 0 2px 2px 0 #ccc;
    padding: 8px;
    font-family: var(--fuente-cartel);
    font-size: 12px;
    line-height: 1.5;
    color: var(--texto);
}
.tt-title-fest {
    display: block;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid #c5c5c5;
    margin-bottom: 5px;
    text-align: left;
}
.tt-meta-fest { display: block; font-size: 12px; text-align: left; }

/* ---- Spinner de carga ---- */
.cargando-fest {
    position: absolute;
    inset: 0;
    min-height: 200px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: opacity 0.5s ease;
}
.cargando-spinner-fest {
    width: 50px;
    height: 50px;
    border: 4px solid #c5c5c5;
    border-top: 4px solid #686868;
    border-radius: 50%;
    animation: girar-fest 1s linear infinite;
}
@keyframes girar-fest {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================================================================
   Scrollytelling (dos capas de imagen que se funden en 7 pasos)
   ===================================================================== */
#cont-scroll-fest { margin-bottom: 100px; }   /* aire al terminar el scroll */
#scroll-fest { position: relative; }
.scrolly-fest { position: relative; background: #fff; }

.figure-fest {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    background: #fff;
    transform: translate3d(0, 0, 0);
}
#zoom-fest {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}
.img-scroll-fest {
    position: absolute;
    max-height: 100%;
    width: 100%;
    object-fit: contain;
    transition: opacity 2s ease;   /* la fundida entre capas */
}

.article-fest {
    position: relative;
    margin: 0 auto;
    width: 100%;
    z-index: 1;
    font-family: var(--fuente);
}
.step-fest {
    width: 300px;
    margin: 0 auto 800px;          /* separación grande = un paso por pantalla */
    padding: 15px 20px;
    background: #fff;
    color: #000;
    text-align: left;
    border-radius: 4px;
    box-shadow: 4px 8px 16px 0 rgba(0, 0, 0, 0.1);
}
.step-fest:last-child { margin-bottom: 0; }
.parrafostep-fest { display: block; text-align: left; font-size: 16px; line-height: 1.2; }

/* Flecha "haz scroll" */
.contenedor-scroll-arrow-fest { display: flex; flex-direction: column; justify-content: center; }
.arrow-scroll-wrap-fest {
    z-index: 1;
    width: 50px;
    height: 50px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px 0 #333;
    display: flex;
    justify-content: center;
    align-items: center;
}
.arrow-scroll-fest {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 15px 0 15px;
    border-color: #000 transparent transparent transparent;
}
.scroll-hint-fest { text-align: center; font-family: var(--fuente); margin-top: 10px; }

@media only screen and (min-width: 600px) {
    .scrolly-fest { display: flex; }
    .article-fest { width: 75%; margin-top: 800px; margin-bottom: 800px; }
    .step-fest { width: 400px; }
    .parrafostep-fest { font-size:  23px; line-height: 1.1; }
}

/* ---- Responsive (rejilla) ---- */
@media (max-width: 600px) {
    .titulo-fest h2 { font-size: 20px; }
    .nombrefestival-fest { font-size: 48px; line-height: 42px; }
    .graficofestivales-fest { column-gap: 20px; }
}
