/* PIPE TECH — full-bleed world map; markers locked to map stage */

.pt-world-map-section {
  --pt-map-blue: var(--pt-blue, #1a4f9c);
  --pt-map-navy: var(--pt-navy, #3a3a3a);
  --pt-map-muted: #5A5A5A;
  --pt-map-line: var(--pt-blue, #1a4f9c);
  --pt-map-ratio: 1400 / 720;
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 72px);
  background: #fff;
  overflow: visible;
  box-sizing: border-box;
}

.pt-world-map-section__intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
  padding: 0 24px;
}

.pt-world-map-section__eyebrow {
  display: block;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pt-map-blue);
  margin-bottom: 14px;
}

.pt-world-map-section__title {
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 800;
  color: var(--pt-map-navy);
  margin: 0 0 14px;
  line-height: 1.12;
}

.pt-world-map-section__lead {
  margin: 0 auto;
  max-width: 640px;
  color: var(--pt-map-muted);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.6;
}

.pt-world-map {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  padding: 0;
  margin: 0;
}

/*
 * ONE stage = map graphic + markers + lines + callouts.
 * Width is capped by viewport height so ultrawide never creates
 * a box wider than the letterboxed image (which broke % markers).
 */
.pt-world-map__stage {
  position: relative;
  width: min(100%, calc(92vh * 1400 / 720), 2400px);
  aspect-ratio: var(--pt-map-ratio);
  height: auto;
  margin: 0 auto;
  overflow: visible;
  background: #fff;
}

.pt-world-map__base {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  user-select: none;
  pointer-events: none;
  z-index: 1;
}

.pt-world-map__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 3;
}

.pt-map-line {
  fill: none;
  stroke: var(--pt-map-line);
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.pt-map-line.is-drawn {
  opacity: 1;
  transition:
    opacity 0.12s ease,
    stroke-dashoffset 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.pt-map-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%) scale(0.35);
  opacity: 0;
  cursor: pointer;
  z-index: 4;
  transition:
    opacity 0.45s ease var(--pt-map-delay, 0ms),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--pt-map-delay, 0ms);
}

.pt-world-map.is-visible .pt-map-marker {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pt-map-marker__dot {
  display: block;
  width: 16px;
  height: 16px;
  margin: 3px;
  border-radius: 50%;
  background: var(--pt-map-blue);
  box-shadow: 0 0 0 4px #fff, 0 4px 12px rgba(26, 79, 156, 0.45);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}

.pt-map-marker__pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid var(--pt-map-blue);
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

.pt-world-map.is-visible .pt-map-marker__pulse {
  animation: pt-map-pulse 2.4s ease-out var(--pt-map-delay, 0ms) infinite;
}

.pt-map-marker:hover .pt-map-marker__dot,
.pt-map-marker:focus-visible .pt-map-marker__dot,
.pt-map-marker.is-open .pt-map-marker__dot {
  transform: scale(1.2);
}

.pt-map-marker--hq {
  width: 48px;
  height: 48px;
  z-index: 8;
}

.pt-map-marker--hq::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 3px var(--pt-map-blue),
    0 8px 22px rgba(28, 36, 48, 0.22);
  z-index: 0;
}

.pt-map-marker__logo {
  display: block;
  width: 36px;
  height: 36px;
  margin: 6px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 1px #fff);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.pt-map-marker--hq:hover .pt-map-marker__logo,
.pt-map-marker--hq:focus-visible .pt-map-marker__logo,
.pt-map-marker--hq.is-open .pt-map-marker__logo {
  transform: scale(1.08);
}

.pt-map-marker--hq .pt-map-marker__pulse {
  inset: -14px;
  border-width: 2px;
  border-color: var(--pt-map-blue);
}

.pt-map-marker--hq .pt-map-marker__pulse--outer {
  inset: -22px;
  border-width: 1.5px;
  opacity: 0;
  animation: none;
}

.pt-world-map.is-visible .pt-map-marker--hq .pt-map-marker__pulse {
  animation: pt-map-pulse-hq 2.2s ease-out infinite;
}

.pt-world-map.is-visible .pt-map-marker--hq .pt-map-marker__pulse--outer {
  animation: pt-map-pulse-hq 2.2s ease-out 0.55s infinite;
}

.pt-map-marker__label {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--pt-map-navy);
  padding: 0.35rem 0.55rem;
  border-radius: 2px;
  box-shadow: 0 6px 16px rgba(28, 36, 48, 0.2);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.45s ease 0.35s;
}

.pt-map-marker__label::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 10px;
  height: 10px;
  background: var(--pt-map-navy);
  transform: translateX(-50%) rotate(45deg);
}

.pt-world-map.is-visible .pt-map-marker__label {
  opacity: 1;
}

.pt-map-callout--hq {
  border-left-width: 4px;
  min-width: 190px;
  box-shadow: 0 14px 36px rgba(28, 36, 48, 0.16);
}

.pt-map-callout--hq .pt-map-callout__region {
  font-size: 13px;
}

.pt-world-map__legend-item--hq {
  font-weight: 700;
  color: var(--pt-map-navy);
}

.pt-world-map__legend-item--hq .pt-world-map__legend-logo {
  width: 20px;
  height: 20px;
}

@keyframes pt-map-pulse-hq {
  0% {
    opacity: 0.65;
    transform: scale(0.55);
  }
  70% {
    opacity: 0;
    transform: scale(1.85);
  }
  100% {
    opacity: 0;
    transform: scale(1.85);
  }
}

.pt-map-marker:focus-visible {
  outline: 2px solid var(--pt-map-blue);
  outline-offset: 4px;
  border-radius: 50%;
}

.pt-map-marker--hq:focus-visible {
  border-radius: 50%;
  outline-offset: 6px;
}

.pt-map-callout {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  z-index: 6;
  min-width: 180px;
  max-width: 260px;
  padding: 12px 14px;
  background: #fff;
  color: var(--pt-map-navy);
  border: 1px solid #d4d4d4;
  border-left: 3px solid var(--pt-map-blue);
  border-radius: 2px;
  box-shadow: 0 10px 28px rgba(20, 35, 64, 0.12);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(8px) scale(0.96);
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.pt-map-callout.is-shown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) translateY(0) scale(1);
}

.pt-map-callout[data-anchor="left"] {
  transform: translate(0, -50%) translateX(-8px) scale(0.96);
}

.pt-map-callout[data-anchor="left"].is-shown {
  transform: translate(0, -50%) translateX(0) scale(1);
}

.pt-map-callout[data-anchor="right"] {
  transform: translate(-100%, -50%) translateX(8px) scale(0.96);
}

.pt-map-callout[data-anchor="right"].is-shown {
  transform: translate(-100%, -50%) translateX(0) scale(1);
}

.pt-map-callout[data-anchor="top"] {
  transform: translate(-50%, 0) translateY(-8px) scale(0.96);
}

.pt-map-callout[data-anchor="top"].is-shown {
  transform: translate(-50%, 0) translateY(0) scale(1);
}

.pt-map-callout[data-anchor="bottom"] {
  transform: translate(-50%, -100%) translateY(8px) scale(0.96);
}

.pt-map-callout[data-anchor="bottom"].is-shown {
  transform: translate(-50%, -100%) translateY(0) scale(1);
}

.pt-map-callout__region {
  display: block;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-map-blue);
  margin-bottom: 4px;
}

.pt-map-callout__detail {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: var(--pt-map-navy);
}

.pt-map-callout__why {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--pt-map-muted);
}

.pt-world-map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin-top: 20px;
  padding: 0 24px;
  color: var(--pt-map-muted);
  font-size: 14px;
}

.pt-world-map__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pt-world-map__legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pt-map-blue);
  flex: 0 0 auto;
}

.pt-world-map__legend-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}

@keyframes pt-map-pulse {
  0% {
    opacity: 0.55;
    transform: scale(0.55);
  }
  70% {
    opacity: 0;
    transform: scale(1.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@media (max-width: 767px) {
  .pt-world-map-section {
    padding: 40px 0 28px;
  }

  .pt-world-map-section__intro {
    margin-bottom: 20px;
    padding: 0 16px;
  }

  .pt-world-map__stage {
    width: min(calc(100% - 16px), calc(70vh * 1400 / 720));
  }

  .pt-map-marker {
    width: 18px;
    height: 18px;
  }

  .pt-map-marker__dot {
    width: 12px;
    height: 12px;
  }

  .pt-map-marker--hq {
    width: 40px;
    height: 40px;
  }

  .pt-map-marker__logo {
    width: 28px;
    height: 28px;
    margin: 6px;
  }

  .pt-map-marker__label {
    font-size: 10px;
    padding: 0.28rem 0.45rem;
  }

  .pt-map-callout {
    min-width: 140px;
    max-width: min(240px, 78vw);
    padding: 10px 12px;
  }

  .pt-map-callout__detail {
    font-size: 13px;
  }

  .pt-map-callout__why {
    font-size: 11px;
  }

  .pt-world-map__legend {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pt-map-marker {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: none;
  }

  .pt-world-map.is-visible .pt-map-marker__pulse,
  .pt-map-marker__pulse {
    animation: none !important;
    opacity: 0 !important;
  }

  .pt-map-line,
  .pt-map-line.is-drawn,
  .pt-map-callout {
    transition: none !important;
  }

  .pt-map-callout.is-shown {
    transform: translate(-50%, -50%);
  }

  .pt-map-callout[data-anchor="left"].is-shown {
    transform: translate(0, -50%);
  }

  .pt-map-callout[data-anchor="right"].is-shown {
    transform: translate(-100%, -50%);
  }

  .pt-map-callout[data-anchor="top"].is-shown {
    transform: translate(-50%, 0);
  }

  .pt-map-callout[data-anchor="bottom"].is-shown {
    transform: translate(-50%, -100%);
  }
}

.elementor-widget-shortcode:has(.pt-world-map-section),
.elementor-element:has(.pt-world-map-section),
.elementor-widget-container:has(.pt-world-map-section) {
  overflow: visible !important;
}
