#map {
    width: 100%;
    height: 300px;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #ccc;
}



/* Modal */
#modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

#modal h2 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #007bff;
}

#modal p {
    margin: 8px 0;
    font-size: 0.95rem;
}

#modalClose {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#modalClose:hover {
    background-color: #0056b3;
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

/* Animación del modal */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

body.dark-mode #modal {
    background-color: #343a40;
    color: #f8f9fa;
}

body.dark-mode #modal h2 {
    color: #007bff;
}

body.dark-mode #modalClose {
    background-color: #007bff;
}

body.dark-mode #modalClose:hover {
    background-color: #0056b3;
}

body.dark-mode #overlay {
    background-color: rgba(0, 0, 0, 0.6);
}

body.dark-mode .leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}