/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff; /* Fondo blanco */
    overflow: hidden;
    height: 100vh;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* Fondo del mapa también blanco */
}

/* Panel de información */
.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    max-width: 320px;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.info-panel h2 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.info-panel h3 {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
    font-weight: normal;
}

.info-panel p {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.authors {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Leyenda */
.legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.legend h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: #2c3e50;
}

.legend-section {
    margin-bottom: 15px;
}

.legend-section h5 {
    font-size: 12px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 5px;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 11px;
}

.legend-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.legend-line {
    width: 30px;
    height: 3px;
    margin-right: 8px;
    flex-shrink: 0;
}

.legend-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.instructions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #7f8c8d;
}

/* Botón toggle para panel móvil */
.toggle-panel {
    position: absolute;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 1000;
    font-size: 14px;
    display: none;
    transition: all 0.3s ease;
}

.toggle-panel:hover {
    background: #ffffff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
}

/* Control de escala personalizado */
.leaflet-control-scale {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
}

/* Créditos */
.credits {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 11px;
    color: #555;
    z-index: 999;
    border: 1px solid #e0e0e0;
    backdrop-filter: blur(5px);
}

.credits a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.credits a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .info-panel {
        top: auto;
        bottom: -100%;
        right: 0;
        left: 0;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
        transition: bottom 0.3s ease;
        box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
    }

    .info-panel.active {
        bottom: 0;
    }

    .toggle-panel {
        display: block;
    }
}

/* Animación de carga */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-panel {
    animation: fadeIn 0.5s ease-out;
}