/* The map image and all markers share the same aspect ratio. */
.hero-map {
  container-type: inline-size;
  width: min(100%, 610px);
  min-width: 0;
  align-self: center;
  justify-self: center;
  color: #302c29;
}
.hero-map__stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1106 / 845;
  overflow: hidden;
  overflow: clip;
  border-radius: 12px;
  background: #e8d8c3;
}
.hero-map__surface {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
}
.hero-map.is-interactive .hero-map__stage {
  cursor: grab;
  touch-action: none;
}
.hero-map.is-interactive .hero-map__surface { will-change: transform; }
.hero-map.is-dragging .hero-map__stage { cursor: grabbing; }
.hero-map.is-dragging .hero-map__surface { user-select: none; }
.hero-map__stage:focus-visible {
  outline: 2px solid #820000;
  outline-offset: 3px;
}
.hero-map__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}
.hero-map__markers { position: absolute; inset: 0; }
.hero-map__location {
  position: absolute;
  left: var(--marker-x);
  top: var(--marker-y);
  width: 0;
  height: 0;
  z-index: 1;
  transform: scale(var(--marker-scale, 1));
  transform-origin: 0 0;
}
.hero-map__location:hover,
.hero-map__location:focus-within { z-index: 4; }
.hero-map__marker {
  position: absolute;
  left: -22px;
  bottom: -8px;
  width: 44px;
  height: 44px;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}
.hero-map__marker::before,
.hero-map__marker::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.hero-map__marker::before {
  width: 25px;
  height: 32px;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  background: #fe0000;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.4 0 0 5.3 0 12c0 3.3 1.2 5.9 3.1 8.6l8 10.8a1.1 1.1 0 0 0 1.8 0l8-10.8c1.9-2.7 3.1-5.3 3.1-8.6C24 5.3 18.6 0 12 0zm0 5.7a6.3 6.3 0 1 1 0 12.6 6.3 6.3 0 0 1 0-12.6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.4 0 0 5.3 0 12c0 3.3 1.2 5.9 3.1 8.6l8 10.8a1.1 1.1 0 0 0 1.8 0l8-10.8c1.9-2.7 3.1-5.3 3.1-8.6C24 5.3 18.6 0 12 0zm0 5.7a6.3 6.3 0 1 1 0 12.6 6.3 6.3 0 0 1 0-12.6z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform-origin: center bottom;
  transition: transform .22s ease, background .22s ease;
}
.hero-map__marker::after {
  width: 30px;
  height: 22px;
  left: 50%;
  bottom: -11px;
  translate: -50% 0;
  border-radius: 50%;
  border: 1.5px solid #fe0000;
  opacity: 0;
  animation: oil-map-pulse 1.95s ease-out var(--pulse-delay, 0s) 2 paused;
}
.hero-map.is-visible .hero-map__marker::after { animation-play-state: running; }
.hero-map.is-dragging .hero-map__marker::after { animation-play-state: paused; }
.hero-map__location:hover .hero-map__marker::before,
.hero-map__location:focus-within .hero-map__marker::before {
  transform: translateX(-50%) scale(1.15);
}
.hero-map__location:hover .hero-map__marker::after,
.hero-map__location:focus-within .hero-map__marker::after {
  animation: none;
  opacity: .55;
}
.hero-map__marker:focus-visible,
.hero-map__label-link:focus-visible,
.hero-map__secondary:focus-visible,
.hero-map__credit:focus-visible {
  outline: 2px solid #820000;
  outline-offset: 3px;
}
.hero-map__marker-label {
  position: absolute;
  left: var(--label-left);
  top: var(--label-top);
  width: max-content;
  max-width: var(--label-width, 150px);
  z-index: 2;
  padding: 3px 5px;
  border-radius: 4px;
  background: #f6e0c8e8;
  color: #302c29;
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.16;
  transition: background .2s ease, box-shadow .2s ease;
}
.hero-map__location:hover .hero-map__marker-label,
.hero-map__location:focus-within .hero-map__marker-label {
  background: #fff5ea;
  box-shadow: 0 3px 12px #73493226;
}
.hero-map__label-link,
.hero-map__secondary {
  display: block;
  color: inherit;
  text-decoration: none;
}
.hero-map__label-link strong,
.hero-map__label-link span { display: block; }
.hero-map__label-link span,
.hero-map__secondary { color: #77443b; }
.hero-map__label-link span::after,
.hero-map__secondary::after { content: ' →'; color: #980b16; white-space: nowrap; }
.hero-map__label-link:hover,
.hero-map__secondary:hover { color: #b00000; }
.hero-map__secondary {
  margin-top: 3px;
  padding-block: 6px;
  border-top: 1px solid #cfae98;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-map__location[data-location-id="kommunalnaya-16a"] { --label-left: 23px; --label-top: -35px; }
.hero-map__location[data-location-id="kommunalnaya-16b"] { --label-left: -155px; --label-top: -25px; }
.hero-map__location[data-location-id="kommunalnaya-6"] { --label-left: 23px; --label-top: -20px; }
.hero-map__location[data-location-id="industrial-6"] { --label-left: -150px; --label-top: -43px; }
.hero-map__location[data-location-id="industrial-1"] { --label-left: -145px; --label-top: -8px; }
.hero-map__credit {
  display: block;
  width: fit-content;
  margin: 4px 0 0 5%;
  color: #514039;
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
}
.hero-map__credit:hover { color: #970000; }
@keyframes oil-map-pulse {
  0%, 20% { opacity: .32; transform: scale(.72); }
  68%, 100% { opacity: 0; transform: scale(1.65); }
}
@media (max-width: 620px) {
  .hero-map {
    width: calc(100% + 12px);
    margin-top: 20px;
  }
}
@container (max-width: 445px) {
  .hero-map__marker { left: -19px; width: 38px; height: 32px; }
  .hero-map__marker::before { width: 18px; height: 19px; }
  .hero-map__marker-label { --label-width: 126px; }
  .hero-map__location[data-location-id="kommunalnaya-16a"] { --label-left: 25px; --label-top: -16px; }
  .hero-map__location[data-location-id="kommunalnaya-16b"] { --label-left: -32cqw; --label-top: -6px; --label-width: min(38cqw, 125px); }
  .hero-map__location[data-location-id="kommunalnaya-6"] { --label-left: -18cqw; --label-top: 4px; }
  .hero-map__location[data-location-id="industrial-6"] .hero-map__marker-label {
    right: -19cqw;
    bottom: 23px;
    top: auto;
    left: auto;
    max-width: min(43cqw, 142px);
  }
  .hero-map__location[data-location-id="industrial-1"] .hero-map__marker-label {
    right: 14px;
    top: -15px;
    left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-map__marker::after { animation: none; opacity: .18; }
  .hero-map__marker::before,
  .hero-map__marker-label { transition: none; }
}
