/* Colores de los tipos de manzana */

:root {
    --tipo-sin: #262626;
    --tipo-hab: #5b6475;
    --tipo-mixta: #febe00;
    --tipo-comercial: #ff001b;
    --tipo-esp: #00befe;
}

.c-hab {
    color: #9aa4b8;
}

.c-mixta {
    color: var(--tipo-mixta);
}

.c-comercial {
    color: #ff4d5e;
}

.firma {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.95rem;
    color: var(--texto-tenue);
    margin-top: 1.5rem;
}

/* Cifras principales */

.cifra {
    height: 100%;
    border-top: 2px solid var(--borde);
    padding-top: 1rem;
}

.cifra-num {
    font-family: "Outfit", sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.cifra-txt {
    font-size: 0.95rem;
    color: var(--texto-suave);
    margin: 0;
}

/* Texto del reportaje */

.relato {
    max-width: 44rem;
    margin: 3.5rem 0 2rem 0;
}

.relato h2 {
    margin-bottom: 1.25rem;
}

.relato p {
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
}

/* Gráficas */

.grafica {
    margin: 0 0 3rem 0;
}

.grafica-titulo {
    font-family: "Outfit", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.grafica-sub {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.95rem;
    color: var(--texto-tenue);
    margin-bottom: 1rem;
}

.muestra {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-right: 0.3rem;
    vertical-align: -1px;
}

.lienzo {
    width: 100%;
}

.lienzo svg {
    display: block;
    overflow: visible;
}

.lienzo text,
.mini text {
    font-family: "Roboto Condensed", sans-serif;
    fill: var(--texto-tenue);
    font-size: 12px;
}

.eje .domain {
    display: none;
}

.eje line {
    stroke: #262626;
}

.anotacion {
    fill: white !important;
    font-size: 13px !important;
}

.leyenda-linea {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    margin-top: 0.75rem;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.9rem;
    color: var(--texto-suave);
}

/* Múltiplos pequeños */

.mini {
    border-top: 1px solid var(--borde);
    padding-top: 0.75rem;
}

.mini-titulo {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.95rem;
    color: var(--texto-suave);
    margin-bottom: 0.25rem;
}

.mini-valores {
    font-family: "Outfit", sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mini-valores .flecha {
    color: var(--texto-tenue);
    font-weight: 300;
    margin: 0 0.3rem;
}

/* Mapa */

.mapa-marco {
    position: relative;
    border: 1px solid var(--borde);
    border-radius: 12px;
    overflow: hidden;
    background: #050505;
}

.leyenda-mapa {
    position: absolute;
    left: 16px;
    bottom: 14px;
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--borde);
    pointer-events: none;
}

.nota {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.9rem;
    color: var(--texto-tenue);
}

/* Tabla */

.tabla-contenedor {
    overflow-x: auto;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.tabla th {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
    color: var(--texto-tenue);
    border-bottom: 1px solid var(--borde);
    padding: 0.6rem 0.75rem;
    text-align: left;
}

.tabla td {
    border-bottom: 1px solid #1a1a1a;
    padding: 0.7rem 0.75rem;
    vertical-align: top;
    color: var(--texto-suave);
}

.tabla td:first-child {
    color: white;
    font-family: "Outfit", sans-serif;
    font-weight: 600;
}

.tabla .lugar {
    color: white;
}

.tabla .num {
    text-align: right;
    white-space: nowrap;
}

.tabla .barra-ha {
    display: inline-block;
    height: 8px;
    border-radius: 4px;
    background: var(--color-rojo);
    margin-right: 0.5rem;
    vertical-align: 1px;
}

.tabla .desconocida {
    color: var(--color-amarillo);
}

/* Metodología */

.metodologia {
    max-width: 44rem;
    border-top: 1px solid var(--borde);
    margin-top: 4rem;
    padding-top: 2rem;
}

.metodologia ul {
    padding-left: 1.1rem;
}

.metodologia li {
    color: var(--texto-suave);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.metodologia strong {
    color: white;
    font-weight: 500;
}

/* Tooltip */

.tooltip-pirah {
    position: fixed;
    z-index: 1000;
    max-width: 260px;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    background: #111111;
    border: 1px solid var(--borde);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color: white;
    font-size: 0.85rem;
    line-height: 1.45;
    pointer-events: none;
}

.tooltip-pirah strong {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.tooltip-pirah .tt-dato {
    color: var(--texto-suave);
}

@media (max-width: 576px) {
    .leyenda-mapa {
        position: static;
        border: none;
        border-top: 1px solid var(--borde);
        border-radius: 0;
        background: transparent;
    }

    .relato p {
        font-size: 1.05rem;
    }

    .tabla th:nth-child(3),
    .tabla td:nth-child(3) {
        display: none;
    }

    .tabla .barra-ha {
        display: none;
    }

}

.leyenda-mapa p {
    margin: 0.15rem 0;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.85rem;
    color: var(--texto-suave);
}

/* Explorador de actividades */

.explorador {
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 1.75rem;
    background: var(--fondo-tarjeta);
}

.ficha {
    border-top: 2px solid var(--borde);
    padding-top: 0.75rem;
}

.ficha-num {
    font-family: "Outfit", sans-serif;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.ficha-txt {
    font-size: 0.9rem;
    color: var(--texto-suave);
    margin: 0;
}

.lista-lugares {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: var(--texto-suave);
}

.lista-lugares li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #1a1a1a;
}

.lista-lugares strong {
    color: white;
    font-weight: 500;
}

@media (max-width: 576px) {
    .explorador {
        padding: 1.25rem 1rem;
    }
}

/* Mapas MapLibre */

.mapa {
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 420px;
    background: #0e0e0e;
}

.leyenda-titulo {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.35rem !important;
    color: white !important;
}

.leyenda-mapa .muestra {
    margin-right: 0.4rem;
}

.muestra.linea {
    height: 0;
    width: 18px;
    border-top: 2px dashed white;
    border-radius: 0;
    vertical-align: middle;
}

.maplibregl-popup-content {
    background: #0a0a0a;
    color: white;
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    font-family: "Inter", sans-serif;
    font-size: 0.85rem;
}

.maplibregl-popup-content strong {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: #0a0a0a;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: #0a0a0a;
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: #0a0a0a;
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: #0a0a0a;
}

.maplibregl-ctrl-attrib {
    background: rgba(10, 10, 10, 0.7) !important;
    color: #999;
}

.maplibregl-ctrl-attrib a {
    color: #bbb;
}

.maplibregl-ctrl-attrib-button {
    filter: invert(1);
}

/* Atlas de zonas */

.atlas {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.atlas-panel {
    margin: 0;
}

.atlas-panel canvas {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--borde);
    border-radius: 12px;
    background: #0b0b0b;
}

.atlas-titulo {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    margin: 0.6rem 0 0.1rem 0;
}

.atlas-lugar,
.atlas-dato {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.9rem;
    color: var(--texto-suave);
    margin: 0;
}

.atlas-dato {
    color: var(--texto-tenue);
}

/* Buscador de zonas */

#mapa-zonas {
    aspect-ratio: 4 / 3;
}

/* En escritorio la ficha mide lo mismo que el mapa y la lista se desplaza
   por dentro. */
@media (min-width: 992px) {
    #mapa-zonas {
        aspect-ratio: auto;
        height: 540px;
    }

    #ficha-actividad {
        display: flex;
        flex-direction: column;
        height: 540px;
    }

    #ficha-actividad .lista-zonas {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        margin-bottom: 0;
        padding-right: 0.5rem;
        scrollbar-width: thin;
        scrollbar-color: #3a3a3a transparent;
        border-top: 1px solid #1a1a1a;
    }
}

.lista-zonas li {
    cursor: pointer;
}

.lista-zonas li:hover strong,
.lista-zonas li:focus-visible strong {
    color: var(--tipo-esp);
}

.lista-zonas .veces {
    color: var(--texto-tenue);
}

@media (max-width: 991px) {
    .atlas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .mapa {
        aspect-ratio: auto;
        height: 65vh;
        min-height: 360px;
    }

    #mapa-zonas {
        aspect-ratio: auto;
        height: 60vh;
    }

    .atlas {
        grid-template-columns: minmax(0, 1fr);
    }
}
