/* Estilos para el mapa dinámico */
#map-container {
    height: 400px;
    width: 100%;
    z-index: 1;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.custom-marker .marker-icon {
    position: relative;
    text-align: center;
}

.custom-marker .marker-count {
    position: absolute;
    top: -12px; /* Encima del marcador */
    right: -6px; /* Alineado a la derecha */
    background: #ff0000;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
    border: 1.5px solid #000;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: none; /* Sin transformación para posicionamiento exacto */
}

.map-popup {
    font-family: 'Arial', sans-serif;
    background: #1a1a1a;
    color: #ffd700;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Eliminar fondo blanco del popup */
.leaflet-popup-content-wrapper {
    background: transparent;
    box-shadow: none;
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.leaflet-popup-tip-container {
    display: none;
}

.map-popup h3 {
    margin: 0 0 10px;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.map-popup p {
    margin: 5px 0;
    font-size: 14px;
}

.map-popup-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.map-popup-buttons button {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.map-popup-buttons button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.5);
}

.map-popup-buttons button:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    #map-container {
        height: 300px;
    }

    .map-popup {
        max-width: 200px;
    }

    .map-popup h3 {
        font-size: 14px;
    }

    .map-popup p {
        font-size: 12px;
    }

    .map-popup-buttons button {
        font-size: 10px;
        padding: 4px 8px;
    }
}