/* Un espíritu recorre América Latina · estilos propios (lo común está en ../css/pieza.css). */

:root {
    --mg-texto: #ff5cbf;
    --pol: #febe00;
}

.rel { color: var(--mg-texto); font-weight: 500; }
.pol { color: var(--pol); font-weight: 500; }

/* ---------------------------------------------------------------- recorrido a pantalla completa */
/* el sitio pone body en flex de fila para un solo contenedor; aquí hay tres bloques apilados */
body { flex-direction: column; }
.contenedor { width: 100%; }

.recorrido {
    width: 100%;
    position: relative;
    margin: 3rem 0;
}

.recorrido-mapa {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #000;
}

.mapa-lienzo,
.mapa-etiquetas {
    position: absolute;
    inset: 0;
    display: block;
}

.mapa-etiquetas { pointer-events: none; overflow: visible; }

.recorrido-pasos {
    position: relative;
    margin-top: -100vh;
    margin-top: -100svh;
    pointer-events: none;
}

.paso {
    min-height: 110vh;
    display: flex;
    align-items: center;
    padding: 0 clamp(16px, 4vw, 56px);
}

.paso:first-child { min-height: 100vh; }
.paso-final { min-height: 100vh; }
.recorrido-pasos { padding-bottom: 25vh; }
.mapa-etiquetas .oculto { display: none; }

.tarjeta-paso {
    pointer-events: auto;
    width: min(28rem, 100%);
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid var(--borde, #2f2f2f);
    border-radius: 6px;
    padding: 1.4rem 1.5rem 1.2rem;
    backdrop-filter: blur(3px);
}

.tarjeta-paso h2 {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1.2;
    margin: 0 0 0.8rem;
}

.tarjeta-paso p {
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 300;
    margin: 0 0 0.75rem;
}

.paso-lugar {
    font-family: "Roboto Condensed", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem !important;
    color: var(--mg-texto);
    margin-bottom: 0.4rem !important;
}

.paso-nota {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.85rem !important;
    color: var(--texto-tenue, rgba(255, 255, 255, 0.55));
}

.paso-foto { margin: 1rem 0 0; }

.paso-foto img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 15rem;
    object-fit: cover;
    border-radius: 4px;
    filter: grayscale(0.15);
}

.paso-foto figcaption {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--texto-tenue, rgba(255, 255, 255, 0.55));
    margin-top: 0.4rem;
}

.paso-foto figcaption a { color: inherit; }

/* leyenda y localizador */
.mapa-leyenda {
    position: absolute;
    right: 16px;
    top: 16px;
    display: flex;
    gap: 1rem;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.8rem;
    color: var(--texto-suave, rgba(255, 255, 255, 0.7));
}

.mapa-leyenda i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.35rem;
    vertical-align: -1px;
}

.mapa-leyenda span { display: inline-flex; align-items: center; gap: 0.35rem; }
.mapa-leyenda svg { display: block; }

.localizador {
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #2f2f2f;
    border-radius: 4px;
}

.l-pais { fill: #3a3a3a; stroke: none; }
.l-marco { fill: rgba(255, 92, 191, 0.12); stroke: var(--mg-texto); stroke-width: 1; }

/* ---------------------------------------------------------------- capa de etiquetas del mapa (px de pantalla) */
.e-capitales rect { fill: #6a6a6a; }

.e-capitales text {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 12px;
    fill: #7a7a7a;
}

.mapa-etiquetas text {
    paint-order: stroke;
    stroke: #000;
    stroke-width: 4px;
    stroke-linejoin: round;
}

.m-nombre text { text-anchor: middle; }

.m-nombre-pais {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    letter-spacing: 0.18em;
    fill: #4a4a4a;
    stroke-width: 0 !important;
}

.m-nombre-dato {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 14px;
    fill: #8e4775;
    display: none;
}

.m-nombre.activo .m-nombre-pais { fill: #b0b0b0; }
.m-nombre.activo .m-nombre-dato { display: inline; fill: var(--mg-texto); font-size: 16px; }

.a-punto { fill: #be017f; fill-opacity: 0.9; stroke: var(--mg-texto); stroke-width: 1.2; }
.a-sin { fill: #4a4a4a; stroke: #9a9a9a; stroke-width: 1.2; }
.a-ancla { fill: none; stroke: #bdbdbd; stroke-width: 1; }
.a-lugar { fill: #fff; }
.a-pista { fill: #3a3a3a; }
.a-voto { fill: var(--pol); }
.a-guia { fill: none; stroke: #8a8a8a; stroke-width: 0.8; }

.a-nombre { font-family: "Outfit", sans-serif; font-weight: 600; font-size: 16px; fill: #fff; }
.a-rel { font-family: "Roboto Condensed", sans-serif; font-size: 13.5px; fill: var(--mg-texto); }
.a-pol { font-family: "Roboto Condensed", sans-serif; font-size: 13.5px; fill: var(--pol); }

/* ---------------------------------------------------------------- móvil */
@media (max-width: 767px) {
    .paso {
        align-items: flex-start;
        min-height: 0;
        padding-top: 55vh;
        padding-bottom: 45vh;
    }

    .paso:first-child, .paso-final { min-height: 0; }

    .tarjeta-paso {
        width: 100%;
        background: rgba(8, 8, 8, 0.94);
        padding: 1.1rem 1.1rem 0.9rem;
    }

    .tarjeta-paso h2 { font-size: 1.25rem; }
    .tarjeta-paso p { font-size: 0.95rem; }
    .paso-foto img { max-height: 8rem; }
    .localizador { display: none; }
    .mapa-leyenda { left: 16px; right: auto; font-size: 0.72rem; gap: 0.7rem; }
}


/* ---------------------------------------------------------------- gráfica final por país */
.paises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.25rem 1rem;
}

.pais-panel { min-width: 0; }

.pais-panel h3 {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0 0.15rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.pais-panel h3 span {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 400;
    color: var(--mg-texto);
    font-variant-numeric: tabular-nums;
}

.pais-panel svg { display: block; width: 100%; height: auto; overflow: visible; }
.pais-panel .eje text { font-size: 10px; }

.leyenda-linea .ley-censo, .leyenda-linea .ley-lb {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35rem;
}

.ley-lb { width: 18px; height: 3px; background: #be017f; border-radius: 2px; }
.ley-censo { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #000; box-shadow: 0 0 0 1px #fff; }
.a-sep { fill: #8a8a8a; }
