/* Las imágenes originales se amplían con puntos específicos para cada solución. */
.solucion-imagen-abrir {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.solucion-imagen-abrir:focus-visible {
  outline: 3px solid var(--primario);
  outline-offset: -3px;
}

.solucion-imagen-lupa {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--agua-borde);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #174f44;
  pointer-events: none;
}

.solucion-imagen-dialogo {
  width: min(1200px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--agua-borde);
  border-radius: 22px;
  background: white;
  color: var(--texto);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.solucion-imagen-dialogo[open] {
  display: flex;
  flex-direction: column;
}

.solucion-imagen-dialogo::backdrop {
  background: rgba(4, 15, 13, 0.68);
}

.solucion-imagen-dialogo-encabezado {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid var(--agua-borde);
}

.solucion-imagen-dialogo-encabezado h2 {
  margin: 0;
  font-size: clamp(1.12rem, 2vw, 1.4rem);
  line-height: 1.2;
}

.solucion-imagen-dialogo-encabezado p {
  margin: 5px 0 0;
  color: var(--texto-secundario);
  font-size: 0.86rem;
}

.solucion-imagen-dialogo-cerrar {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--agua-borde);
  border-radius: 50%;
  background: #e8f6f2;
  color: #174f44;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.solucion-imagen-dialogo-escena {
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
}

.solucion-interactiva {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 31, 0.12);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(14, 54, 45, 0.16);
}

.solucion-interactiva-imagen {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.solucion-identificador {
  position: absolute;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(1, 51, 111, 0.92);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(14, 54, 45, 0.16);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}

.identificador-modem {
  top: 31%;
  left: 72%;
  transform: translate(-50%, -50%);
}

.identificador-modem-movil {
  display: none;
}

.solucion-hotspot {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  padding: 0;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #10231f;
  cursor: pointer;
  font: inherit;
  transform: translate(-50%, -50%);
}

.solucion-hotspot-punto {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #087f68;
  color: #ffffff;
  box-shadow:
    0 0 0 5px rgba(8, 127, 104, 0.2),
    0 8px 18px rgba(14, 54, 45, 0.26);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  animation: solucion-punto-pulso 2.4s ease-out infinite;
  transition: transform 0.18s ease, background 0.18s ease;
}

.solucion-hotspot-etiqueta {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #174f44;
  box-shadow: 0 8px 18px rgba(14, 54, 45, 0.16);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.solucion-hotspot:hover .solucion-hotspot-punto,
.solucion-hotspot:focus-visible .solucion-hotspot-punto,
.solucion-hotspot[aria-expanded="true"] .solucion-hotspot-punto {
  transform: scale(1.16);
  background: #045f50;
}

.solucion-hotspot:focus-visible {
  outline: 3px solid #f6a023;
  outline-offset: 4px;
  border-radius: 999px;
}

.hotspot-central { left: 50%; top: 18%; }
.hotspot-bomba { left: 29%; top: 54%; }
.hotspot-cisterna { left: 70%; top: 54%; }
.hotspot-simulacion {
  top: 22%;
  left: 89%;
  flex-direction: row-reverse;
}

.hotspot-simulacion .solucion-hotspot-punto {
  background: #146de0;
}

.solucion-hotspot {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.solucion-popover {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--agua-borde);
  border-radius: 20px;
  background: white;
  color: var(--texto);
  box-shadow: 0 20px 46px rgba(14, 54, 45, 0.24);
}

.solucion-popover.solucion-popover-simulacion {
  width: min(420px, calc(100vw - 32px));
}

.solucion-popover::backdrop {
  background: rgba(4, 15, 13, 0.3);
}

.solucion-imagen-dialogo:not([open]),
.solucion-popover:not([open]) {
  display: none;
}

.solucion-popover-cerrar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  width: 42px;
  height: 42px;
  margin: -4px -4px 10px auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--agua-borde);
  border-radius: 50%;
  background: white;
  color: #174f44;
  box-shadow: 0 6px 16px rgba(14, 54, 45, 0.14);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.solucion-popover h3 {
  max-width: calc(100% - 34px);
  margin: 0;
  color: #174f44;
  font-size: 1.22rem;
}

.solucion-popover p {
  margin: 9px 0 0;
  color: var(--texto-secundario);
  font-size: 0.96rem;
  line-height: 1.5;
}

.solucion-popover-lista-titulo {
  margin-top: 15px !important;
  color: #174f44 !important;
  font-weight: 800;
}

.solucion-popover-lista {
  margin: 7px 0 0;
  padding-left: 1.2rem;
  color: var(--texto-secundario);
  font-size: 0.94rem;
  line-height: 1.5;
}

.solucion-popover-lista li + li {
  margin-top: 7px;
}

.solucion-popover-video {
  margin-top: 14px;
}

.solucion-popover-video video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 240px);
  max-height: calc(100dvh - 240px);
  object-fit: contain;
  border-radius: 12px;
  background: #10231f;
}

@keyframes solucion-punto-pulso {
  0%, 100% {
    box-shadow:
      0 0 0 5px rgba(8, 127, 104, 0.2),
      0 8px 18px rgba(14, 54, 45, 0.26);
  }

  50% {
    box-shadow:
      0 0 0 10px rgba(8, 127, 104, 0),
      0 8px 18px rgba(14, 54, 45, 0.26);
  }
}

@media (max-width: 620px) {
  .solucion-interactiva {
    border-radius: 18px;
  }

  .solucion-hotspot {
    gap: 4px;
  }

  .solucion-hotspot-punto {
    width: 25px;
    height: 25px;
    border-width: 2px;
    box-shadow:
      0 0 0 3px rgba(8, 127, 104, 0.18),
      0 5px 12px rgba(14, 54, 45, 0.24);
    font-size: 0.64rem;
  }

  .solucion-hotspot-etiqueta {
    padding: 4px 6px;
    font-size: 0.62rem;
  }

  .solucion-identificador {
    padding: 3px 5px;
    font-size: 0.5rem;
  }

  .identificador-modem {
    top: 7%;
    left: 71%;
  }

  .identificador-modem-escritorio {
    display: none;
  }

  .identificador-modem-movil {
    display: inline;
  }

  .hotspot-central,
  .hotspot-bomba,
  .hotspot-bomba2,
  .hotspot-cisterna,
  .hotspot-tinaco {
    width: 40px;
    height: 40px;
    justify-content: center;
  }

  .hotspot-central .solucion-hotspot-punto,
  .hotspot-bomba .solucion-hotspot-punto,
  .hotspot-bomba2 .solucion-hotspot-punto,
  .hotspot-cisterna .solucion-hotspot-punto,
  .hotspot-tinaco .solucion-hotspot-punto {
    width: 18px;
    height: 18px;
    border-width: 2px;
    box-shadow:
      0 0 0 2px rgba(8, 127, 104, 0.16),
      0 3px 8px rgba(14, 54, 45, 0.2);
    font-size: 0.52rem;
    animation: none;
  }
  .solucion-imagen-dialogo-encabezado {
    gap: 10px;
    padding: 12px;
  }

  .solucion-imagen-dialogo-escena {
    padding: 8px;
  }

  .hotspot-central,
  .hotspot-bomba,
  .hotspot-bomba2,
  .hotspot-cisterna,
  .hotspot-tinaco {
    min-width: 44px;
    min-height: 44px;
  }

  .hotspot-simulacion {
    transform: translate(-85%, -50%);
  }

  .solucion-popover {
    padding: 17px;
    border-radius: 16px;
  }

  .solucion-popover p {
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .solucion-hotspot-punto {
    animation: none;
  }
}
