﻿/* ==========================================================================
   ONDE ENCONTRAR - ESTILOS
   ========================================================================== */
.onde-wrapper {
    padding: 40px 0;
    background-color: #062b20;
    position: relative;
    min-height: calc(100vh - 12vh - 6vh);
    overflow: hidden;
    z-index: 1;
}

    .onde-wrapper::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background-image: url('/images/trama-aceitunas.png');
        background-size: cover;
        background-position: center;
        filter: grayscale(1) invert(1);
        mix-blend-mode: screen;
        opacity: 0.12;
    }

.onde-header {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

    .onde-header h2 {
        color: #ffffff;
        font-size: 2rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin: 0;
    }

.divider-gold {
    width: 45px;
    height: 3px;
    background: var(--dourado-azeite, #B5985A);
    margin: 12px auto;
}

.select-custom {
    border-color: var(--dourado-azeite, #B5985A);
    background-color: #ffffff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 25px;
    max-width: 320px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.content-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
    position: relative;
    z-index: 2;
    padding: 0 15px;
}

.map-col {
    flex: 1 1 500px;
    min-height: 450px;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-col {
    flex: 1 1 350px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.map-box svg {
    max-width: 100%;
    max-height: 100%;
    height: auto;
}

    /* CORRECCIÓN 2: BORDE DEL MAPA MÁS LIMPIO */
    .map-box svg path {
        cursor: pointer;
        transition: all 0.3s ease;
        stroke: #ffffff !important; /* Blanco limpio en lugar del oscuro feo */
        stroke-width: 1px !important;
        fill: var(--verde-acento) !important;
    }

        .map-box svg path:hover {
            fill: var(--verde-floresta-profunda, #0A3A2C) !important;
        }

        .map-box svg path.active {
            fill: var(--dourado-azeite) !important;
            stroke-width: 1.5px !important;
        }

#points, #label_points, #points_1_, #labels, #label_points_1_ {
    display: none;
}

.info-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#msg-inicial {
    text-align: center;
    padding: 60px 0;
    color: var(--verde-acento);
}

    #msg-inicial i {
        font-size: 3.5rem;
    }

    #msg-inicial h5 {
        margin-top: 15px;
        color: #6c757d;
        font-size: 0.95rem;
        font-weight: 600;
    }

#resultados {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#uf-nombre-completo {
    font-size: 1.5rem;
    color: var(--verde-floresta-profunda);
    font-weight: 800;
    margin-bottom: 5px;
}

.small-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--dourado-azeite);
    font-weight: 700;
    letter-spacing: 1px;
}

#lista-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 20px;
}

.dist-card {
    padding: 18px;
    border-radius: 12px;
    background: #f9f7f2;
    margin-bottom: 12px;
    border-left: 4px solid var(--dourado-azeite);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}

    .dist-card:hover {
        transform: translateX(4px);
    }

    .dist-card h6 {
        font-size: 1.05rem;
        margin-bottom: 8px;
        color: var(--verde-floresta-profunda);
        font-weight: 700;
    }

    .dist-card p {
        font-size: 0.85rem;
        margin-bottom: 6px;
        line-height: 1.4;
    }

.icon-data {
    color: var(--dourado-azeite);
    margin-right: 6px;
}

#lista-container::-webkit-scrollbar {
    width: 4px;
}

#lista-container::-webkit-scrollbar-thumb {
    background: var(--dourado-azeite);
    border-radius: 10px;
}

/* ==========================================================================
   RESPONSIVE ONDE ENCONTRAR
   ========================================================================== */
@media (max-width: 991px) {
    .onde-wrapper {
        padding: 30px 0;
    }

    .content-row {
        gap: 20px;
    }

    .map-col {
        min-height: 360px;
    }
}

@media (max-width: 768px) {
    .onde-header h2 {
        font-size: 1.6rem;
    }

    .content-row {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .map-col,
    .info-col {
        width: 100%;
        max-width: 100%;
    }

    /* CORRECCIÓN 1: ELIMINAMOS EL ESPACIO INFERIOR DEL MAPA */
    .map-col {
        flex: none; /* Evitamos que el flex force al contenedor a crecer */
        min-height: 0;
        height: auto; /* Que abrace su contenido */
        padding: 15px;
        background: white;
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 12px 30px rgba(0,0,0,0.25);
        border-radius: 16px;
    }

    .map-box {
        height: auto !important; /* Anulamos la clase de Bootstrap h-100 que estaba en el HTML y generaba el hueco */
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .map-box svg {
            max-height: 300px;
            width: 100%;
            display: block;
        }

    .info-col {
        min-height: auto;
        padding: 20px;
    }

    #lista-container {
        max-height: 320px;
    }
}
