/* Hello Pomelo – Interactive Agencies Map Block */

.agencies-map-section {
  overflow: hidden;
  background: #fff;
}

.hp-agencies__inner {
  display: flex;
  width: min(100%, 1280px);
  margin-inline: auto;
  flex-direction: column;
  gap: 1px;
}

.hp-agencies__header {
  display: flex;
  width: 100%;
  height: 207px;
  padding: 16px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.hp-agencies__label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(17, 24, 33, 0.4);
  font-family: "Fustat", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.hp-agencies__label img {
  display: block;
  width: 15px;
  height: 15px;
}

.hp-agencies__title {
  margin: 0;
  color: var(--secondary-blue-900, #111821);
  font-family: "Archia", sans-serif;
  font-size: clamp(40px, 3.9vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: center;
  text-wrap: balance;
}

.hp-agencies__body {
  display: grid;
  width: 100%;
  height: 541px;
  grid-template-columns: 344px minmax(0, 1fr);
  align-items: stretch;
    border-radius: var(--border-radius-rounded, 8px);
    background: var(--greyscale-grey-200, #CDCDCD);

}

.hp-agencies__stats-column {
  min-width: 0;
  padding: 1px;
  border-radius: 8px;
}

.hp-agencies__stats {
  display: flex;
  height: 539px;
  flex-direction: column;
  gap: 1px;
}

.hp-stat {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1 1 0;
  padding: 16px;
  align-items: flex-start;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 33, 0.18);
  border-top-color: rgba(17, 24, 33, 0.1);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.hp-stat__content {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
}

.hp-stat__label {
  color: rgba(17, 24, 33, 0.4);
  font-family: "Fustat", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.hp-stat__value {
  color: var(--primary-pink-500, #d9306b) !important;
  font-family: "Archia", sans-serif;
  font-size: 40px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
}

.hp-stat__icon {
  position: absolute;
  z-index: 1;
  top: -30px;
  left: 108px;
  display: block;
  width: 277px;
  height: 277px;
  object-fit: contain;
  opacity: 0.55;
}

.hp-stat:nth-child(2) .hp-stat__icon,
.hp-stat:nth-child(3) .hp-stat__icon {
  top: -36px;
  left: 100px;
  width: 301px;
  height: 301px;
}

.hp-agencies__map-column {
  position: relative;
  min-width: 0;
  padding: 1px 1px 1px 0;
  border-radius: 8px;
  background: var(--greyscale-grey-50, #f8f7f6);
}

.hp-agencies__map {
  position: relative;
  width: 100%;
  height: 539px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 33, 0.18);
  border-radius: 8px;
  background: var(--greyscale-grey-50, #f8f7f6);
  box-sizing: border-box;
}

.hp-agencies__map-svg {
  position: absolute;
  top: -105px;
  right: -1px;
  display: block;
  width: 619px;
  max-width: none;
  height: 748px;
  pointer-events: auto;
  user-select: none;
}

.hp-agencies__map-svg > image {
  pointer-events: none;
}

.hp-pin {
  cursor: pointer;
  pointer-events: all;
}

.hp-pin:focus-visible .hp-pin__dot {
  outline: none;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #d9306b);
}

.hp-pin__touch {
  pointer-events: all;
}

.hp-pin__dot {
  fill: var(--secondary-blue-900, #111821);
  stroke: transparent;
  stroke-width: 2;
  transition: fill 180ms ease, stroke 180ms ease, transform 180ms ease, filter 180ms ease;
  transform: scale(0.8);
  transform-box: fill-box;
  transform-origin: center;
}

.hp-pin:hover .hp-pin__dot {
  transform: scale(1);
}

.hp-pin--active .hp-pin__dot {
  fill: var(--primary-pink-500, #d9306b);
  stroke: #fff;
  transform: scale(1.4);
  filter: drop-shadow(0 2px 4px rgba(217, 48, 107, 0.35));
}

.hp-pin__ring {
  fill: none;
  stroke: var(--primary-pink-500, #d9306b);
  stroke-width: 2;
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
}

.hp-pin--active .hp-pin__ring {
  animation: hp-agency-pulse 1.8s ease-out infinite;
}

@keyframes hp-agency-pulse {
  0% {
    opacity: 0.65;
    transform: scale(0.65);
  }
  70%, 100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

.hp-agency-card {
  position: absolute;
  z-index: 20;
  top: var(--hp-card-center-y, 50%);
  right: auto;
  left: var(--hp-card-left, 24px);
  display: flex;
  width: 407px;
  height: 220px;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-50% + 12px)) scale(0.98);
  transition: opacity 240ms ease, transform 240ms ease;
}

.hp-agency-card--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.hp-agency-card__img-wrap {
  position: relative;
  width: 118px;
  height: 220px;
  flex: 0 0 118px;
  overflow: hidden;
  border-radius: 8px;
}

.hp-agency-card__img-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(rgba(17, 24, 33, 0.4), rgba(17, 24, 33, 0.4));
}

.hp-agency-card__img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-agency-card__body {
  display: flex;
  min-width: 0;
  height: 100%;
  flex: 1 1 auto;
  padding: 16px;
  flex-direction: column;
  box-sizing: border-box;
}

.hp-agency-card__name {
  margin: 0 0 8px;
  color: var(--secondary-blue-900, #111821);
  font-family: "Fustat", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.hp-agency-card__address,
.hp-agency-card__hours {
  margin: 0;
  color: rgba(17, 24, 33, 0.4);
  font-family: "Fustat", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
}

.hp-agency-card__hours {
  margin-top: 8px;
}

.hp-agency-card__actions {
  display: flex;
  width: 100%;
  margin-top: auto;
  flex-direction: column;
  gap: 8px;
}

.hp-agency-card__actions .btn--primary,
.hp-agency-card__actions .btn--secondary {
  display: flex;
  width: 100%;
  height: 48px;
  padding: 12px 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  box-sizing: border-box;
  font-family: "Fustat", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  pointer-events: auto;
  transition: background-color 180ms ease, color 180ms ease;
}

.hp-agency-card__actions .btn--primary {
  background: var(--primary-pink-500, #d9306b);
  color: #fff;
}

.hp-agency-card__actions .btn--primary:hover {
  background: #bd2258;
}

.hp-agency-card__actions .btn--secondary {
  background: var(--greyscale-grey-50, #f8f7f6);
  color: var(--secondary-blue-900, #111821);
}

.hp-agency-card__actions .btn--secondary:hover {
  background: #efedeb;
}

.hp-agencies__cards-mobile {
  display: none;
}

@media (max-width: 1100px) {
  .hp-agencies__body {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .hp-agencies__body {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .hp-agency-card {
    left: var(--hp-card-left, 16px);
    width: min(407px, calc(100% - 32px));
  }
}

@media (max-width: 768px) {
  .hp-agencies__header {
    height: auto;
    min-height: 150px;
    padding: 16px 0 24px;
    align-items: flex-start;
  }

  .hp-agencies__title {
    font-size: clamp(32px, 10vw, 44px);
    text-align: left;
  }

  .hp-agencies__body {
    display: flex;
    height: auto;
    flex-direction: column;
    gap: 16px;
  }

  .hp-agencies__map-column {
    order: 1;
    padding: 0;
    background: transparent;
  }

  .hp-agencies__map {
    height: 420px;
  }

  .hp-agencies__map-svg {
    top: -72px;
    right: 50%;
    width: 465px;
    height: 561px;
    transform: translateX(50%);
  }

  .hp-agencies__stats-column {
    order: 2;
    padding: 0;
  }

  .hp-agencies__stats {
    height: auto;
  }

  .hp-stat {
    min-height: 150px;
    flex-basis: auto;
  }

  .hp-agencies__cards-mobile {
    position: relative;
    z-index: 4;
    display: flex;
    width: calc(100% - 24px);
    margin: -96px auto 0;
  }

  .hp-agencies__cards-mobile .hp-agency-card {
    position: static;
    display: none;
    width: 100%;
    height: auto;
    min-height: 220px;
    opacity: 1;
    transform: none;
  }

  .hp-agencies__cards-mobile .hp-agency-card--visible {
    display: flex;
  }

  .hp-agencies__cards-mobile .hp-agency-card__body {
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  .hp-agencies__map {
    height: 360px;
  }

  .hp-agencies__cards-mobile {
    width: calc(100% - 16px);
    margin-top: -72px;
  }

  .hp-agencies__cards-mobile .hp-agency-card {
    flex-direction: column;
  }

  .hp-agencies__cards-mobile .hp-agency-card__img-wrap {
    width: 100%;
    height: 150px;
    flex-basis: 150px;
  }

  .hp-agency-card__address,
  .hp-agency-card__hours {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-pin--active .hp-pin__ring {
    animation: none;
    opacity: 0.45;
  }

  .hp-agency-card {
    transition: none;
  }
}
