<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
}

.map-container {
  margin: 10px;
  position: relative;
  display: inline-block;
}

.map-container img {
  max-width: 100%;
  display: block;
  justify-content: center;
  align-items: center;
  z-index: -20;
}

/* Pin container */
.box {
  width: 8%;
  height: 8%;
  position: absolute;
  z-index: 10;
  pointer-events: none; /* wrapper never triggers */
}

/* PIN ONLY */
.pin-inner {
  width: 100%;
  height: 100%;
  background-image: url(/images/map-pin.png);
  background-size: contain;
  background-repeat: no-repeat;
  position: relative;
  cursor: pointer;
  pointer-events: auto;
  z-index: 20;
}

/* Bounce when JS allows it */
.pin-inner.active {
  animation: pinBounce 1s infinite;
}

/* Tooltip ONLY when pin is active */
.pin-inner.active + .pin-text {
  opacity: 1;
  /* transform: translate(-50%, -50%) translateY(10px); */
}

/* Tooltip NEVER captures hover */
.pin-text {
  pointer-events: none;
  opacity: 0;

  font-family: Arial, sans-serif;
  font-size: 0.8em;
  color: white;
  background-color: black;
  border-radius: 15px;
  margin: 0px ;
  padding: 0px 10px;

  position: absolute;
  top: 40%;
  left: 100%;
  transform: translate(-65px, -20px);
  white-space: nowrap;
  text-shadow: 1px 1px 1px #000;
  z-index: 2000;
  
  transition: opacity 0.3s ease, transform 0.3s ease; /* animate */
}

.pin-text p {
  padding: 5px 0;
  margin: 0;
  font-weight: bold;
}

/* When the screen size is small move the tool tip */
@media (max-width: 768px) {
  .pin-text {
    top: -40%;
    left: 95%;
  }
}

.box:hover > .pin-text {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(10); /* slide up to position */
}

/* Signal pulse behind tooltip */
.pin-inner::before {
  content: "";
  position: absolute;
  top: 39%;
  left: 16.5%;
  width: 40%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8); /* semi-transparent cyan signal */
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.6;
  z-index: -5;
  animation: pulseSignal 1.5s ease-out infinite;
}

/* Shadow under pin */
.box::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 28px;
  height: 10px;
  border-radius: 50%;
  left: 24%;
  top: 100%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.35);
  filter: blur(1px);
  pointer-events: none;
  animation: shadowPulse 2s ease-in-out infinite;
}

/* Pin bounce animation */
@keyframes pinBounce {
  0%, 100% { 
    transform: translateY(0);
  }
  50% { 
    transform: translateY(-6px);
  }
}

/* Pulse animation */
@keyframes pulseSignal {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.3;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

@keyframes shadowPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.4; }
}

