/* Responsive, isolated map. Coordinates are always relative to the full image. */
.expo-map {
  --expo-map-ratio: 1344 / 768;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--expo-map-ratio);
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #ece9df;
}

.expo-map,
.expo-map * {
  box-sizing: border-box;
}

.expo-map__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: center center !important;
  border: 0;
  user-select: none;
  -webkit-user-drag: none;
}

/* Keep every point in the same percentage position on all screen sizes. */
.expo-map__point {
  position: absolute !important;
  left: var(--expo-map-x, 50%);
  top: var(--expo-map-y, 50%);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(14px, 1.5vw, 20px);
  height: clamp(14px, 1.5vw, 20px);
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 0;
  border: clamp(2px, .22vw, 3px) solid #a3a778;
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  color: #433d35;
  font: 500 clamp(10px, .9vw, 13px)/1.15 Montserrat, Arial, sans-serif;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transform: translate(-50%, -50%) !important;
  transform-origin: center;
  transition: box-shadow .2s ease, background-color .2s ease;
  touch-action: manipulation;
}

/* Larger invisible touch target without changing the visible point. */
.expo-map__point::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
}

.expo-map__point:hover,
.expo-map__point:focus-visible,
.expo-map__point[aria-expanded="true"] {
  z-index: 12;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(163, 167, 120, .24), 0 4px 14px rgba(51, 51, 51, .28);
  outline: none;
}

.expo-map__point--label {
  width: auto;
  height: clamp(24px, 2.25vw, 30px);
  max-width: min(170px, 28vw);
  padding: 0 clamp(7px, .9vw, 10px);
  border-radius: 999px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expo-map__popup {
  position: fixed;
  z-index: 2147483000;
  width: min(300px, calc(100vw - 24px));
  margin: 0;
  padding: 16px 44px 16px 16px;
  border: 1px solid rgba(163, 167, 120, .45);
  border-radius: 14px;
  background: #fff;
  color: #433d35;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.expo-map__popup[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.expo-map__popup-title {
  margin: 0 0 8px;
  color: #433d35;
  font: 600 20px/1.25 Montserrat, Arial, sans-serif;
}

.expo-map__popup-text {
  margin: 0;
  color: #666;
  font: 400 15px/1.45 Montserrat, Arial, sans-serif;
}

.expo-map__popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f0e8;
  color: #433d35;
  font: 400 22px/28px Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  appearance: none;
}

.expo-map__popup-close:hover,
.expo-map__popup-close:focus-visible {
  background: #e7e3d7;
  outline: 2px solid #a3a778;
  outline-offset: 2px;
}

/* Desktop: center the proportional map inside the right hero column. */
@media (min-width: 992px) {
  .hero-wrapper .col-lg-8 {
    display: flex;
    align-items: center;
    min-height: 670px;
  }

  .hero-wrapper .expo-map {
    flex: 0 0 100%;
  }
}

@media (max-width: 991.98px) {
  .hero-wrapper .expo-map {
    width: 100% !important;
    max-width: 100%;
  }

  .expo-map__point--label {
    max-width: 30vw;
  }
}

@media (max-width: 575.98px) {
  .expo-map__point {
    width: 14px;
    height: 14px;
    border-width: 2px;
  }

  .expo-map__point--label {
    width: auto;
    height: 22px;
    max-width: 31vw;
    padding-inline: 6px;
    font-size: 9px;
  }

  .expo-map__popup {
    width: calc(100vw - 20px);
    padding: 14px 42px 14px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .expo-map__point,
  .expo-map__popup {
    transition: none;
  }
}
