/* Variables y Reset */
:root {
    --bg-main: #f1f5f9;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-accent: #cbd5e1;
    --emerald-active: #10b981;
    --red-principal: #ef4444;
}

body {
    color: var(--text-main);
    font-size: 0.85rem;
    background-color: var(--bg-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* --- BUSCADOR Y SUGERENCIAS (DROPDOWN) --- */
#sugerencias {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 1050;
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-main);
    transition: all 0.2s;
}

/* Estado al pasar el mouse o navegar con flechas en el buscador */
.suggestion-item:hover, 
.suggestion-item.active {
    background-color: #f8fafc !important;
    color: var(--emerald-active) !important;
    padding-left: 20px; /* Efecto de desplazamiento */
}

/* --- LISTA DE RESULTADOS (LATERAL DERECHA) --- */
#lista-cercanos {
    border-radius: 12px;
    overflow: hidden;
}

#lista-cercanos .list-group-item {
    padding: 1.25rem;
    border-left: 4px solid transparent !important;
    transition: all 0.2s ease;
    background-color: white;
    cursor: pointer;
}

/* Hover individual para cada municipio de la lista */
#lista-cercanos .list-group-item:hover {
    background-color: #f8fafc !important;
    border-left-color: var(--emerald-active) !important;
    transform: translateX(4px);
}

/* Estilo especial para el Municipio buscado (Principal) */
.bg-principal {
    background-color: #fffafb !important; /* Fondo rojizo muy tenue */
    border-left-color: var(--red-principal) !important;
}

.bg-principal:hover {
    border-left-color: var(--red-principal) !important;
    background-color: #fef2f2 !important;
}

/* --- MAPA Y CONTENEDORES --- */
#map { 
    height: 500px; 
    width: 100%; 
    border-radius: 12px; 
    z-index: 1; 
    border: 1px solid var(--border-color);
}

/* --- COMPONENTES UI DASHBOARD --- */
.proyecto-wrapper {
    background: white;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-accent);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    cursor: pointer;
    text-decoration: none !important;
}

.proyecto-wrapper:hover {
    transform: translateY(-5px);
    border-left-color: var(--emerald-active);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Animaciones y Otros */
.dot-active {
    height: 8px; width: 8px;
    background-color: var(--emerald-active);
    border-radius: 50%;
    display: inline-block;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

#lista-cercanos .list-group-item {
    cursor: pointer;
}

/* Clase para resaltar el item activo en la lista si lo deseas */
.item-enfocado {
    background-color: #f0f9ff !important; /* Azul muy suave */
    border-left-color: #3b82f6 !important;
}

.leaflet-container {
    transition: filter 0.3s ease; /* Suaviza el filtro de intensidad que pusimos antes */
    outline: none;
}

/* Evita que los popups aparezcan y desaparezcan de golpe */
.leaflet-popup-pane {
    transition: opacity 0.2s linear;
}

