
/* ══════════════════════════════
   MAP
══════════════════════════════ */
.map-section {padding-top: 10vw;}
.map-outer-warapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -14vw;
    left: 10vw;
}
.map-inside-wrapper {
    position: relative;
}
.map-inside-wrapper > svg {
    width: 100%;
    height: auto;
}

/* ============================
   STATE / REGION SHAPES
============================ */
.map-state {
  stroke: #646C81;
  stroke-width: 1.44564;
  cursor: pointer;
  transition: fill 0.25s ease, opacity 0.25s ease;
  touch-action: manipulation; /* first-tap click on mobile, no hover-first/zoom-delay quirk */
}

.map-state:hover {
  fill: #ED1C24 !important;
}

.map-state.active {
  fill: #ED1C24 !important;
}

.map-state.active:hover {
  fill: #ED1C24 !important;
}
.map-state.hover-linked {
      fill: #ED1C24 !important;
}

/* Dim other states once one is active */
.map-outer-warapper.has-active .map-state:not(.active) {
  opacity: 0.55;
}

/* Dim other pins while a card is open — still hoverable / clickable */
.map-outer-warapper.has-open-card .map-state:not(.hover-linked):not(.active) {
  opacity: 0.55;
}
.map-outer-warapper.has-open-card .map-item:not(.card-open) .map-hover {
  opacity: 0.38;
  animation-play-state: paused;
}
.map-outer-warapper.has-open-card .map-item:not(.card-open):hover .map-hover,
.map-outer-warapper.has-open-card .map-item.linked-hover:not(.card-open) .map-hover {
  opacity: 0.9;
  animation-play-state: running;
}

.circle-img { position: absolute; left: auto; top: auto; z-index: 0;}

/* Idle breathing pulse — starts once the GSAP scroll-reveal (scale/opacity
   on .circle-img itself, see contactus-script.js) finishes, so this only
   ever animates the <img>'s own transform, never fighting GSAP's. */
@keyframes circlePulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50%      { transform: scale(1.045); opacity: 1; }
}

.circle-img-idle img {
  animation: circlePulse 5s ease-in-out infinite;
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: reduce) {
  .circle-img-idle img {
    animation: none;
  }
}

/* ============================
   PIN + LINE + LABEL (map-item)
============================ */
.map-item .map-hover {fill: #ED1C24;cursor: pointer;transition: fill 0.25s ease, r 0.2s ease; stroke: #ED1C2480; stroke-width: 14;
   animation: mapPulse 1.8s ease-out infinite; touch-action: manipulation; pointer-events: none;}
.map-item .map-hit {fill: transparent; stroke: none; cursor: pointer; pointer-events: all;}
.map-hover::after { content: "";}
@keyframes mapPulse {
  0% {stroke-width: 0; stroke-opacity: 0.8;}
  70% { stroke-width: 14;stroke-opacity: 0.25;}
  100% {stroke-width: 20;stroke-opacity: 0;}
}
.map-item:hover .map-hover,
.map-item .map-hover:hover {fill: #231F20 !important;r: 6.5;}
.map-item.linked-hover .map-hover {fill: #231F20 !important;r: 6.5;}
.map-item.active .map-hover, .map-item.linked-active .map-hover {fill: #231F20 !important;r: 6.5;}

/* Guaranteed-visible dot whenever its card is open — the state fill and
   the dot's resting fill are both #ED1C24, so without this the dot can
   camouflage into a hover-linked/active state region. Only touches
   fill/r (not stroke/stroke-width) so it doesn't fight the mapPulse
   ring animation running on those same properties. */
.map-item.has-info-card.card-open .map-hover {
  fill: #231F20 !important;
  r: 6.5;
}
.map-item .map-line {opacity: 0;stroke: #000015;stroke-width: 1;fill: none;stroke-dasharray: 4 2;pointer-events: none;transition: opacity 0.2s ease;}
.map-item .map-label-group {opacity: 0;pointer-events: none;transition: opacity 0.2s ease;}
.map-item .map-label-bg {fill: #ED1C24;}
.map-item .map-label {fill: #ffffff;font-size: 0.75rem;font-family: sans-serif;}
.map-item:hover .map-line, .map-item:hover .map-label-group { opacity: 1;}
.map-item.linked-hover .map-line,
.map-item.linked-hover .map-label-group,
.map-item.linked-active .map-line,
.map-item.linked-active .map-label-group,
.map-item.active .map-line,
.map-item.active .map-label-group {
  opacity: 1;
}

/* Pins that have a rich info card use that instead of the small dashed-line label */
.map-item.has-info-card .map-line,
.map-item.has-info-card .map-label-group {
  opacity: 0 !important;
}

/* ============================
   HOVER / TAP INFO CARD
   (location + company + address + contact details)
============================ */
.map-info-card {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  width: 280px;
  max-width: calc(100% - 24px);
  border-radius: 12px;
  overflow: visible;
  background: var(--color-white, #fff);
  box-shadow: 0 18px 40px rgba(35, 31, 32, 0.18), 0 4px 10px rgba(35, 31, 32, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.map-info-card.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.map-info-card.is-visible::before {
  content: "";
  position: absolute;
  pointer-events: auto;
}
.map-info-card.is-visible.is-side-right::before {
  top: 0;
  right: 100%;
  width: 44px;
  height: 100%;
}
.map-info-card.is-visible.is-side-left::before {
  top: 0;
  left: 100%;
  width: 44px;
  height: 100%;
}
.map-info-card.is-visible.is-above::before {
  left: 0;
  top: 100%;
  width: 100%;
  height: 44px;
}
.map-info-card.is-visible.is-below::before {
  left: 0;
  bottom: 100%;
  width: 100%;
  height: 44px;
}

.map-info-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-secondary, #ED1C24);
  padding: 10px 10px 10px 14px;
  border-radius: 12px 12px 0 0;
}

.map-info-pin-icon {
  flex: none;
}

.map-info-title {
  color: var(--color-white, #fff);
  font-size: var(--text-small, 0.875rem);
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.map-info-close {
  appearance: none;
  background: none;
  border: none;
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  padding: 0;
}
.map-info-close:hover,
.map-info-close:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}
.map-info-close svg {
  width: 12px;
  height: 12px;
}

.map-info-body {
  padding: 14px 16px 16px;
  border-radius: 0 0 12px 12px;
}

.map-info-company {
  color: var(--color-primary, #231F20);
  font-size: var(--text-small, 0.875rem);
  font-weight: 700;
  margin: 0 0 4px;
}

.map-info-address {
  font-size: 0.8125rem;
  line-height: 1.55;
  margin: 0;
}

.map-info-contact-label {
  color: var(--color-primary, #231F20);
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 12px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line, rgba(28, 25, 24, 0.1));
}

.map-info-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.map-info-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-info-contact-row img {
  flex: none;
  width: 14px;
  height: 14px;
}

.map-info-contact-row a {
  color: var(--color-primary, #231F20);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-decoration: none;
  word-break: break-word;
}

.map-info-contact-row a:hover {
  color: var(--color-secondary, #ED1C24);
}


/* 125% zoom */
@media screen and (min-width: 1025px) and (-webkit-min-device-pixel-ratio:1.25),screen and (min-width:1025px) and (min-resolution:120dpi) {
.map-inside-wrapper {max-width: 40vw;}
.map-outer-warapper {margin-top: -18vw;left: 15vw;}
.circle-img { max-width: 55vw;}
}

/* 150% zoom */
@media screen and (min-width: 1025px) and (-webkit-min-device-pixel-ratio:1.5),screen and (min-width:1025px) and (min-resolution:144dpi) {

   
}

@media (min-width: 1200px) and (max-width: 1366px) {
.map-inside-wrapper {max-width: 40vw;}
.map-title-section {max-width: 580px;}
.circle-img { max-width: 55vw;}
.map-outer-warapper {margin-top: -23vw;left: 15vw;}

}


@media (max-width: 992px) {
  .map-outer-warapper {margin-top: 6vw; left:0;}

  /* Center info card over the map on tablet/mobile — open/close from center */
  .map-info-card.is-mobile-centered {
    left: 50% !important;
    top: 50% !important;
    right: auto;
    bottom: auto;
    width: min(280px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    /* Keep -50%/-50% always so open doesn't slide from the right */
    transform: translate(-50%, -50%) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }
  .map-info-card.is-mobile-centered.is-visible {
    transform: translate(-50%, -50%) scale(1);
  }
  .map-info-card.is-mobile-centered.is-visible::before {
    display: none;
  }
}


@media (max-width: 480px) {
  .map-info-card {
    width: 220px;
  }
  .map-info-card.is-mobile-centered {
    width: min(260px, calc(100% - 32px));
  }
}