/* Pagina Dove siamo — mappa “olografica” + pin (dark / light) */

/* Mappa raster/SVG: gradiente è nel file SVG; qui solo luminosità e alone multi-strato */
.hologram-map {
  opacity: 1;
  filter: brightness(1.08) contrast(1.05) drop-shadow(0 0 22px rgba(0, 210, 255, 0.55))
    drop-shadow(0 0 48px rgba(0, 140, 200, 0.35)) drop-shadow(0 0 90px rgba(0, 80, 120, 0.2));
}

html.light .hologram-map {
  filter: brightness(0.97) contrast(1.08) drop-shadow(0 0 18px rgba(14, 165, 233, 0.28))
    drop-shadow(0 4px 14px rgba(15, 23, 42, 0.1));
}

/* ─── Contenitore mappa più grande (niente tetto 28rem) ─── */
.locations-map-wrap {
  position: relative;
  width: 100%;
  max-width: min(100%, 52rem);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .locations-map-wrap {
    max-width: none;
    width: 100%;
  }
}

/*
 * Nessun “contenitore scheda” dietro l’Italia: solo silhouette + pin sullo sfondo della pagina.
 * (Le keyframes ss-hero-glow* restano nel file per eventuale ripristino del frame premium.)
 */
.locations-map-hero {
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  animation: none;
}

html.light .locations-map-hero {
  background: transparent;
  border: none;
  box-shadow: none;
  animation: none;
}

.locations-map-hero__bloom,
.locations-map-hero__scan {
  display: none;
}

@keyframes ss-hero-glow {
  0% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.35),
      0 24px 64px rgba(0, 0, 0, 0.45),
      0 0 28px rgba(0, 210, 255, 0.08);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.35),
      0 28px 72px rgba(0, 0, 0, 0.5),
      0 0 42px rgba(0, 210, 255, 0.18);
  }
}

@keyframes ss-hero-glow-light {
  0% {
    box-shadow:
      0 0 0 1px rgba(148, 163, 184, 0.22),
      0 18px 44px rgba(15, 23, 42, 0.07),
      0 0 18px rgba(14, 165, 233, 0.05);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(148, 163, 184, 0.28),
      0 22px 52px rgba(15, 23, 42, 0.09),
      0 0 28px rgba(14, 165, 233, 0.1);
  }
}

/* Macchie luminose dietro la mappa */
.locations-map-hero__bloom {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}


.locations-map-hero__bloom::after,
.locations-map-hero__bloom::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
  animation: ss-map-bloom 8s ease-in-out infinite alternate;
}

.locations-map-hero__bloom::before {
  width: 55%;
  height: 45%;
  top: -8%;
  right: -5%;
  background: rgba(0, 210, 255, 0.22);
}

.locations-map-hero__bloom::after {
  width: 45%;
  height: 40%;
  bottom: 5%;
  left: -8%;
  background: rgba(249, 115, 22, 0.12);
  animation-delay: -2.5s;
}

html.light .locations-map-hero__bloom::before {
  background: rgba(14, 165, 233, 0.18);
  opacity: 0.65;
}

html.light .locations-map-hero__bloom::after {
  background: rgba(251, 146, 60, 0.12);
}

@keyframes ss-map-bloom {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.45;
  }
  100% {
    transform: scale(1.08) translate(2%, -2%);
    opacity: 0.7;
  }
}

/* Scanline sottilissima (ologramma) */
.locations-map-hero__scan {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  opacity: 0.12;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 210, 255, 0.06) 2px,
    rgba(0, 210, 255, 0.06) 3px
  );
  mix-blend-mode: overlay;
}

html.light .locations-map-hero__scan {
  opacity: 0.06;
}

/*
 * Stage: solo rapporto geografico ufficiale (viewBox SVG = bbox lon/lat con stessa scala su X e Y).
 * Sfondo trasparente: niente secondo riquadro chiaro — si vede solo l’Italia + glow dell’hero.
 */
.locations-map-stage {
  position: relative;
  isolation: isolate;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1000 / 880;
  border-radius: clamp(0.85rem, 1.5vw, 1.15rem);
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

html.light .locations-map-stage {
  background: transparent;
  box-shadow: none;
}

.locations-map-stage .hologram-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Silhouette ancorata a destra nel box aspect-ratio (colonna marketing a sinistra) */
  object-position: right center;
}

.map-pin {
  position: absolute;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
}

/* Alone multi-strato attorno al cluster (oltre alle classi Tailwind sul core) */
.locations-map-stage .map-pin > .relative {
  width: 1.375rem;
  height: 1.375rem;
  filter: drop-shadow(0 0 5px rgba(0, 210, 255, 1)) drop-shadow(0 0 16px rgba(0, 210, 255, 0.72))
    drop-shadow(0 0 36px rgba(0, 210, 255, 0.45)) drop-shadow(0 0 56px rgba(0, 140, 200, 0.22));
}

html.light .locations-map-stage .map-pin > .relative {
  filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.9)) drop-shadow(0 0 18px rgba(14, 165, 233, 0.55))
    drop-shadow(0 0 34px rgba(14, 165, 233, 0.28));
}

.locations-map-stage .map-pin--hq > .relative {
  width: 1.5rem;
  height: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 1)) drop-shadow(0 0 18px rgba(249, 115, 22, 0.75))
    drop-shadow(0 0 40px rgba(249, 115, 22, 0.48)) drop-shadow(0 0 64px rgba(234, 88, 12, 0.22));
}

html.light .locations-map-stage .map-pin--hq > .relative {
  filter: drop-shadow(0 0 7px rgba(234, 88, 12, 0.95)) drop-shadow(0 0 20px rgba(251, 146, 60, 0.55))
    drop-shadow(0 0 42px rgba(251, 146, 60, 0.28));
}

.map-pin:focus-visible {
  outline: 2px solid #00d2ff;
  outline-offset: 3px;
  border-radius: 9999px;
}

.map-pin--hq:focus-visible {
  outline-color: #f97316;
}

.map-pin__core {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 9999px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 14px rgba(0, 210, 255, 0.95), 0 0 28px rgba(0, 210, 255, 0.55),
    0 0 48px rgba(0, 210, 255, 0.28);
}

.map-pin--hq .map-pin__core {
  width: 1.4rem;
  height: 1.4rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 16px rgba(249, 115, 22, 0.98), 0 0 32px rgba(249, 115, 22, 0.6),
    0 0 52px rgba(249, 115, 22, 0.32);
}

.map-pin__radar {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  animation: locations-pin-ping 2.35s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  z-index: 0;
  opacity: 0.92;
}

.map-pin--hq .map-pin__radar {
  animation-delay: 0.35s;
}

@keyframes locations-pin-ping {
  0% {
    transform: scale(0.88);
    opacity: 0.78;
  }
  70%,
  100% {
    transform: scale(3.35);
    opacity: 0;
  }
}

.map-pin__tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-bottom: 0.5rem;
  transform: translateX(-50%);
  z-index: 30;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.map-pin:hover .map-pin__tooltip,
.map-pin:focus-visible .map-pin__tooltip,
.map-pin.is-open .map-pin__tooltip {
  opacity: 1;
  visibility: visible;
}

@media (hover: none) {
  .map-pin:hover .map-pin__tooltip {
    opacity: 0;
    visibility: hidden;
  }

  .map-pin.is-open .map-pin__tooltip {
    opacity: 1;
    visibility: visible;
  }
}

/* Card città (button): reset minimo + stato attivo da click */
button.locations-city-card {
  appearance: none;
  font: inherit;
}

.locations-city-card:focus-visible {
  outline: 2px solid #00d2ff;
  outline-offset: 2px;
  border-radius: 1rem;
}

html.light .locations-city-card:focus-visible {
  outline-color: #0ea5e9;
}

.locations-city-card--active {
  border-color: rgba(0, 210, 255, 0.72) !important;
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.42), 0 12px 40px rgba(0, 210, 255, 0.14);
}

html.light .locations-city-card--active:not([data-city='palermo']) {
  border-color: rgba(14, 165, 233, 0.65) !important;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.32), 0 12px 36px rgba(14, 165, 233, 0.12);
}

.locations-city-card--active[data-city='palermo'] {
  border-color: rgba(249, 115, 22, 0.88) !important;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.48), 0 12px 40px rgba(249, 115, 22, 0.16);
}

html.light .locations-city-card--active[data-city='palermo'] {
  border-color: rgba(234, 88, 12, 0.82) !important;
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.42), 0 12px 36px rgba(251, 146, 60, 0.14);
}

/* Evidenziazione temporanea del pin quando si seleziona la città dalla lista */
@keyframes map-pin-card-wrap-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.58);
  }
}

@keyframes map-pin-card-core-glow {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  40% {
    transform: scale(1.48);
    filter: brightness(1.45) drop-shadow(0 0 22px rgba(0, 210, 255, 1)) drop-shadow(0 0 40px rgba(0, 210, 255, 0.75));
  }
  70% {
    transform: scale(1.18);
    filter: brightness(1.22) drop-shadow(0 0 12px rgba(0, 210, 255, 0.88));
  }
}

.map-pin--hq.map-pin--card-pulse .map-pin__core {
  animation-name: map-pin-card-core-glow-hq;
}

@keyframes map-pin-card-core-glow-hq {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  40% {
    transform: scale(1.48);
    filter: brightness(1.48) drop-shadow(0 0 24px rgba(249, 115, 22, 1)) drop-shadow(0 0 44px rgba(249, 115, 22, 0.72));
  }
  70% {
    transform: scale(1.18);
    filter: brightness(1.22) drop-shadow(0 0 14px rgba(249, 115, 22, 0.88));
  }
}

.map-pin.map-pin--card-pulse > .relative {
  animation: map-pin-card-wrap-pulse 0.44s ease-in-out 3;
  transform-origin: center;
}

.map-pin.map-pin--card-pulse .map-pin__core {
  animation: map-pin-card-core-glow 0.44s ease-in-out 3;
}

.map-pin.map-pin--card-pulse .map-pin__radar {
  animation: map-pin-radar-burst 1.05s cubic-bezier(0.22, 1, 0.36, 1) 2;
}

@media (max-width: 1023px) {
  .locations-map-network-status {
    display: none !important;
  }
}

@keyframes map-pin-radar-burst {
  0% {
    transform: scale(1);
    opacity: 0.82;
  }
  100% {
    transform: scale(3.55);
    opacity: 0;
  }
}
