/* Mapa con puntos por proyecto ([mapa_ubicaciones]).
 * El posicionamiento de los puntos y de la tarjeta es siempre en %, para que
 * se mantengan pegados al mismo lugar de la imagen en cualquier ancho de pantalla.
 */
.mu-mapa {
  --mu-punto-bg: #fff;
  --mu-punto-borde: #0b844b;
  --mu-punto-activo: #e0295b;

  position: relative;
  width: 100%;
  line-height: 0; /* evita el hueco bajo la imagen por line-height por defecto */
}

.mu-mapa__imagen {
  display: block;
  width: 100%;
  height: auto;
}

.mu-punto {
  position: absolute;
  transform: translate(-50%, -50%);
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  line-height: 0;
  z-index: 1;
  &:focus,
  &:hover {
    background: transparent;
  }
}

.mu-punto__pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mu-punto-bg);
  border: 2px solid var(--mu-punto-borde);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  color: var(--mu-punto-borde);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

/* Aro suave alrededor del punto activo (54px de diámetro, igual al SVG de referencia). */
.mu-punto[aria-pressed="true"] .mu-punto__pin::before {
  content: "";
  position: absolute;
  inset: -13px;
  border-radius: 50%;
  border: 1.5px solid #e83375;
  opacity: 0.4;
}

.mu-punto:hover .mu-punto__pin {
  transform: scale(1.08);
}

.mu-punto[aria-pressed="true"] {
  z-index: 2;
}

.mu-punto[aria-pressed="true"] .mu-punto__pin {
  border-color: var(--mu-punto-activo);
  /* color: var(--mu-punto-activo); */
}

.mu-tarjeta {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: 222px;
  max-width: calc(100% - 24px);
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 34px 0 rgba(38, 54, 26, 0.2);
  text-decoration: none;
  line-height: normal;
}

.mu-tarjeta[hidden] {
  display: none;
}

.mu-mapa.is-editando .mu-punto {
  cursor: grab;
  touch-action: none;
}

.mu-mapa.is-editando .mu-punto.is-arrastrando {
  cursor: grabbing;
  z-index: 5;
}

.mu-mapa__vacio {
  margin: 0;
  padding: 16px;
  line-height: 1.4;
  background: #f6f6f6;
  color: #232323;
}

/* Colita que apunta hacia el punto, debajo de la tarjeta. */
.mu-tarjeta::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
  transform: translateX(-50%) rotate(45deg);
}

.mu-tarjeta__imagen {
  width: 100%;
  height: 116px;
  border-radius: 15px 15px 0 0;
  object-fit: cover;
  display: block;
  background: #eee;
}

.mu-tarjeta__texto {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
}

.mu-tarjeta__titulo {
  color: #0b844b;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Proxima Nova Semibold";
}

.mu-tarjeta__direccion {
  color: #6b6b6b;
  font-family: "Proxima Nova Regular";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 110%; /* 17.6px */
}

/* Mapa de proyectos: fondo gris y calles de un solo tono. */
.mu-mapa--capas {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 420px;
  line-height: normal;
  background: var(--mu-mapa-fondo, #f2f2f2);
}

.mu-mapa--capas .mu-mapa__leaflet {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.mu-mapa--capas .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
  background: var(--mu-mapa-fondo, #f2f2f2);
}

.mu-mapa--capas .mu-mapa__tinte {
  position: absolute;
  inset: 0;
  z-index: 450;
  pointer-events: none;
  background: var(--mu-mapa-tono, #fff);
  mix-blend-mode: multiply;
}

.mu-mapa--capas .leaflet-control-zoom,
.mu-mapa--capas .leaflet-control-attribution {
  display: none;
}

.mu-marca {
  background: transparent;
  border: none;
  overflow: visible !important;
}

.mu-marca.is-activo .mu-punto__pin {
  border-color: var(--mu-punto-activo);
  color: var(--mu-punto-activo);
  animation: mu-pin 0.35s ease;
}

.mu-marca.is-activo .mu-punto__pin::before,
.mu-marca.is-activo .mu-punto__pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 2px solid var(--mu-punto-activo, #e0295b);
  background: color-mix(in srgb, var(--mu-punto-activo, #e0295b) 18%, transparent);
  pointer-events: none;
  z-index: -1;
  animation: mu-ola 1.6s ease-out infinite;
}

.mu-marca.is-activo .mu-punto__pin::after {
  animation-delay: 0.45s;
}

@keyframes mu-ola {
  0% {
    transform: scale(0.7);
    opacity: 0.7;
  }
  100% {
    transform: scale(3.4);
    opacity: 0;
  }
}

@keyframes mu-pin {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.86);
  }
  100% {
    transform: scale(1);
  }
}

.mu-leaflet-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 34px 0 rgba(38, 54, 26, 0.2);
}

.mu-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: var(--mu-tarjeta-ancho, 222px) !important;
  line-height: normal;
}

.mu-leaflet-popup .leaflet-popup-tip {
  box-shadow: none;
}

/* Dirección de la ficha respecto al pin (Mapa de proyectos). */
.mu-leaflet-popup.mu-popup--abajo {
  margin-bottom: 0;
  margin-top: 28px;
}

.mu-leaflet-popup.mu-popup--abajo .leaflet-popup-tip-container {
  top: 0;
  margin-top: -20px;
  transform: rotate(180deg);
}

.mu-leaflet-popup.mu-popup--izquierda,
.mu-leaflet-popup.mu-popup--derecha {
  margin-bottom: 0;
}

.mu-leaflet-popup.mu-popup--izquierda .leaflet-popup-tip-container,
.mu-leaflet-popup.mu-popup--derecha .leaflet-popup-tip-container {
  width: 20px;
  height: 20px;
  bottom: auto;
  margin: 0;
  top: 50%;
  transform: translateY(-50%);
  overflow: visible;
}

/* Ficha a la izquierda del pin → punta a la derecha. */
.mu-leaflet-popup.mu-popup--izquierda .leaflet-popup-tip-container {
  left: auto;
  right: -10px;
}

.mu-leaflet-popup.mu-popup--izquierda .leaflet-popup-tip {
  margin: 0;
  width: 17px;
  height: 17px;
  transform: translate(0, 1px) rotate(45deg);
}

/* Ficha a la derecha del pin → punta a la izquierda. */
.mu-leaflet-popup.mu-popup--derecha .leaflet-popup-tip-container {
  left: -10px;
  right: auto;
}

.mu-leaflet-popup.mu-popup--derecha .leaflet-popup-tip {
  margin: 0;
  width: 17px;
  height: 17px;
  transform: translate(3px, 1px) rotate(45deg);
}

.mu-leaflet-popup .mu-tarjeta {
  position: relative;
  display: flex;
  flex-direction: column;
  left: auto;
  top: auto;
  transform: none;
  width: 100%;
  max-width: none;
  line-height: normal;
  box-shadow: none;
}

.mu-leaflet-popup .mu-tarjeta::after {
  display: none;
}

.mu-leaflet-popup .mu-tarjeta__titulo,
.mu-leaflet-popup .mu-tarjeta__direccion {
  line-height: 1.2;
}

@media (max-width: 600px) {
  .mu-punto__pin {
    width: 22px;
    height: 22px;
    border-width: 2px;
  }

  .mu-tarjeta {
    width: 220px;
  }
}
