/* ========================================
   LEAFLET MAP CUSTOM STYLES
   ======================================== */

/* Contenedor del mapa */
#map {
  height: 630px;
  width: 100%;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

/* Popup personalizado */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
  padding: 5px;
}

.leaflet-popup-content {
  margin: 15px;
  line-height: 1.6;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 14px;
}

.leaflet-popup-tip {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

/* Iconos dentro del popup */
.map-popup-content i {
  display: inline-block;
  text-align: center;
}

.map-popup-content a {
  transition: all 0.3s ease;
}

.map-popup-content a:hover {
  color: #004ECC !important;
  text-decoration: underline !important;
}

/* Botón de direcciones */
.map-popup-content a[style*="background"] {
  transition: all 0.3s ease;
}

.map-popup-content a[style*="background"]:hover {
  background: #0066FF !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 78, 204, 0.3);
}

/* Controles del mapa */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  background-color: #ffffff !important;
  color: #333 !important;
  border: 2px solid #004ECC !important;
  font-weight: bold;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background-color: #004ECC !important;
  color: white !important;
}

/* Attribution */
.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 5px;
}

.leaflet-control-attribution a {
  color: #004ECC;
  text-decoration: none;
}

/* Marker */
.leaflet-marker-icon {
  transition: transform 0.3s ease;
}

.leaflet-marker-icon:hover {
  transform: scale(1.1);
}

/* Circle */
.leaflet-interactive {
  transition: all 0.3s ease;
}

/* Popup close button */
.leaflet-popup-close-button {
  color: #333 !important;
  font-size: 20px !important;
  padding: 4px 8px !important;
}

.leaflet-popup-close-button:hover {
  color: #004ECC !important;
  background-color: rgba(0, 78, 204, 0.1) !important;
}

/* Responsive */
@media (max-width: 768px) {
  #map {
    height: 400px;
  }

  .leaflet-popup-content {
    font-size: 13px;
    margin: 12px;
  }

  .map-popup-content {
    min-width: 200px !important;
  }

  .leaflet-popup-content-wrapper {
    max-width: 280px;
  }
}

@media (max-width: 576px) {
  #map {
    height: 350px;
    border-radius: 0;
  }

  .leaflet-popup-content-wrapper {
    width: 260px;
  }

  .map-popup-content a[style*="background"] {
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
}

/* Loading animation */
.leaflet-container {
  background: #f5f5f5;
}

.leaflet-tile-container {
  transition: opacity 0.3s ease-in-out;
}