/* نقشهٔ تعاملی — داخل سکشن treatments-map، پنل #162f4e */
.treatments-map__map {
  direction: rtl;
  padding: clamp(1.2rem, 2.6vw, 1.65rem);
  border-radius: 20px;
  background: #162f4e;
  color: rgba(236, 244, 255, 0.92);
  text-align: center;
  min-width: 0;
  overflow: visible;
}

.treatments-map__map .body-map__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.85);
}

.treatments-map__map .body-map__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.28rem, 2.2vw, 1.72rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.treatments-map__map .body-map__lead {
  margin: 0 auto 1rem;
  max-width: 28rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(203, 220, 245, 0.88);
}

.body-map__stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: min(28vh, 270px);
  padding: 0.15rem 0 0;
}

/* شکل تصویر LTR — ارتفاع نصف (عرض متناسب حفظ نسبت) */
.treatments-map__map .body-map__figure {
  position: relative;
  direction: ltr;
  width: 50%;
  max-width: 50%;
  margin: 0 auto;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.35));
}

.body-map__figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: bottom;
  user-select: none;
  pointer-events: none;
}

.body-map__hotspot {
  position: absolute;
  z-index: 2;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(122, 186, 255, 0.12);
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 50%;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.body-map__hotspot:hover,
.body-map__hotspot:focus-visible {
  background: rgba(147, 214, 255, 0.28);
  box-shadow:
    0 0 0 2px rgba(186, 230, 253, 0.45),
    0 0 28px rgba(56, 189, 248, 0.35);
  z-index: 4;
}

.body-map__hotspot:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.85),
    0 0 32px rgba(56, 189, 248, 0.45);
}

/* نبض ظریف */
.body-map__pulse {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.35);
  pointer-events: none;
  animation: body-map-pulse 2.8s ease-in-out infinite;
  opacity: 0.65;
}

@keyframes body-map-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.85;
  }
}

.body-map__hotspot:hover .body-map__pulse,
.body-map__hotspot:focus-visible .body-map__pulse {
  animation-play-state: paused;
  opacity: 0.22;
}

/* مختصات تقریبی نسبت به men.png (۳۷۹×۷۵۳) */
.body-map__hotspot--brain,
.body-map__hotspot--head {
  left: 50%;
  top: 8.5%;
  width: 26%;
  height: 11%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--hair {
  left: 50%;
  top: 6.5%;
  width: 28%;
  height: 8%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--skin {
  left: 50%;
  top: 18.5%;
  width: 22%;
  height: 9%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--heart {
  left: 50%;
  top: 30.5%;
  width: 20%;
  height: 11%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--wrist-l {
  left: 24%;
  top: 36.5%;
  width: 12%;
  height: 7%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--wrist-r {
  left: 76%;
  top: 36.5%;
  width: 12%;
  height: 7%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--ankle-l {
  left: 41%;
  top: 90%;
  width: 11%;
  height: 6.5%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--ankle-r {
  left: 59%;
  top: 90%;
  width: 11%;
  height: 6.5%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--pelvis {
  left: 50%;
  top: 48%;
  width: 22%;
  height: 9%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--urology {
  left: 50%;
  top: 56%;
  width: 20%;
  height: 8%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--ortho {
  left: 50%;
  top: 74%;
  width: 28%;
  height: 10%;
  transform: translate(-50%, -50%);
}

.body-map__hotspot--wound {
  left: 26%;
  top: 40%;
  width: 12%;
  height: 7%;
  transform: translate(-50%, -50%);
}

/* ستون فقرات / کمر (همان دسته ارتوپدی) */
.body-map__hotspot--spine {
  left: 50%;
  top: 33%;
  width: 14%;
  height: 14%;
  transform: translate(-50%, -50%);
}

/* راهنمای زیر موس */
.body-map__cursor-tip {
  position: fixed;
  z-index: 9999;
  max-width: min(280px, 72vw);
  padding: 0.55rem 0.75rem 0.6rem;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 248, 255, 0.97) 100%);
  border: 1px solid rgba(124, 43, 232, 0.2);
  box-shadow:
    0 14px 36px rgba(8, 20, 48, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(12px, 12px) scale(0.96);
  transition:
    opacity 0.18s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.18s ease;
  direction: rtl;
  text-align: right;
}

.body-map__cursor-tip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(12px, 12px) scale(1);
}

.body-map__cursor-tip-title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #162f4e;
  line-height: 1.35;
}

.body-map__cursor-tip-list {
  margin: 0;
  padding: 0 1rem 0 0;
  list-style: disc;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #3a4a62;
}

.body-map__cursor-tip-list li + li {
  margin-top: 0.12rem;
}

.body-map__stage:has(.body-map__hotspot:hover) .body-map__cloud,
.body-map__stage:has(.body-map__hotspot:focus-visible) .body-map__cloud {
  opacity: 0;
}

.body-map__hotspot.is-active .body-map__pulse {
  animation-play-state: paused;
  opacity: 0.45;
}

.body-map__hotspot.is-active .body-map__cloud {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ابر گفتار */
.body-map__cloud {
  position: absolute;
  top: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) scale(0.88);
  transform-origin: center center;
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 5;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.3));
}

.body-map__cloud--east {
  left: calc(100% + 14px);
}

.body-map__cloud--west {
  right: calc(100% + 14px);
}

.body-map__hotspot:hover .body-map__cloud,
.body-map__hotspot:focus-visible .body-map__cloud {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.body-map__cloud-inner {
  position: relative;
  display: block;
  padding: 0.62rem 1rem 0.65rem;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 249, 255, 0.96) 100%);
  color: #162f4e;
  font-size: clamp(0.86rem, 2.1vw, 0.98rem);
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  direction: rtl;
  border: 1px solid rgba(22, 47, 78, 0.08);
}

.body-map__cloud-inner::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
}

/* دُم به سمت بدن: ابر سمت راست (شرق) — دُم چپ ابر */
.body-map__cloud--east .body-map__cloud-inner::after {
  left: -8px;
  transform: translateY(-50%);
  border-width: 8px 10px 8px 0;
  border-color: transparent rgba(255, 255, 255, 0.98) transparent transparent;
}

/* ابر سمت چپ — دُم راست ابر */
.body-map__cloud--west .body-map__cloud-inner::after {
  right: -8px;
  transform: translateY(-50%);
  border-width: 8px 0 8px 10px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.98);
}

/* لایهٔ درخشش پشت ابر هنگام باز شدن */
.body-map__hotspot:hover .body-map__cloud-inner,
.body-map__hotspot:focus-visible .body-map__cloud-inner {
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

@media (max-width: 900px) {
  .treatments-map__map {
    padding-inline: clamp(0.65rem, 2.5vw, 1rem);
    border-radius: 16px;
  }

  .body-map__stage {
    min-height: min(42vh, 360px);
    width: 100%;
  }

  .treatments-map__map .body-map__figure {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .body-map__cloud-inner {
    white-space: normal;
    max-width: 42vw;
    text-align: right;
  }

  .body-map__cloud--east {
    left: calc(100% + 6px);
  }

  .body-map__cloud--west {
    right: calc(100% + 6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .body-map__pulse {
    animation: none;
    opacity: 0.35;
  }

  .body-map__cloud {
    transition: opacity 0.2s ease;
  }

  .body-map__hotspot:hover .body-map__cloud,
  .body-map__hotspot:focus-visible .body-map__cloud {
    transform: translateY(-50%) scale(1);
  }
}

@media print {
  .body-map__hotspot {
    display: none;
  }
}
