/* سکشن واحد: کارت‌های درمان + نقشهٔ آناتومی */
.treatments-map {
  direction: rtl;
  padding: clamp(2rem, 4vw, 3.2rem) var(--header-pad-x, 1.25rem) clamp(2.4rem, 5vw, 3.6rem);
  background: #f5f5f7;
}

.treatments-map__container {
  max-width: 1240px;
  margin: 0 auto;
}

.treatments-map__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.9rem, 2.8vw, 2.45rem);
  line-height: 1.15;
  font-weight: 800;
  color: #111218;
}

.treatments-map__intro {
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  max-width: 46rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #4a5060;
}

/* نیمهٔ راست = درمان‌ها | نیمهٔ چپ = نقشه (RTL: ستون اول راست) */
.treatments-map__split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: stretch;
}

.treatments-map__cards,
.treatments-map__map {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.treatments-map__cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.treatments-map__stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  width: 100%;
  direction: rtl;
}

.treatment-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #d7d8dc;
  border-radius: 0 16px 0 0;
  background: #fff;
  padding: 0.48rem 0.62rem 0.52rem;
  cursor: default;
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.treatment-card__number {
  margin: 0 0 0.22rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1;
  font-weight: 800;
  color: #101114;
}

.treatment-card__label {
  margin: 0;
  padding-top: 0.32rem;
  border-top: 1px solid #d8d9dd;
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 600;
  color: #242830;
}

.treatment-card__items {
  margin: 0.38rem 0 0;
  padding: 0 0.75rem 0 0;
  list-style: disc;
  font-size: 0.78rem;
  line-height: 1.42;
  color: #3a4050;
}

.treatment-card__items li + li {
  margin-top: 0.1rem;
}

/* انتخاب از نقشهٔ بدن — هایلایت بنفش */
.treatment-card.is-map-lead {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-color: #7c2be8;
  background: linear-gradient(145deg, #ffffff 0%, #f6f0ff 48%, #eef4ff 100%);
  box-shadow:
    0 14px 40px rgba(124, 43, 232, 0.2),
    0 0 0 2px rgba(124, 43, 232, 0.14);
  border-radius: 0 18px 0 12px;
}

.treatment-card.is-map-lead::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #7c2be8 0%, #3b6ee8 100%);
  border-radius: 0 18px 18px 0;
  pointer-events: none;
}

.treatment-card.is-map-lead::after {
  content: '';
  position: absolute;
  inset: -40% auto auto -30%;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, rgba(124, 43, 232, 0.1) 0%, transparent 68%);
  pointer-events: none;
}

.treatment-card.is-map-lead .treatment-card__number {
  color: #5a1faa;
}

.treatment-card.is-map-lead .treatment-card__label {
  border-top-color: rgba(124, 43, 232, 0.22);
  color: #1a1240;
}

.treatments__more,
.treatments-map__more {
  margin-top: 0.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  color: #101114;
  cursor: pointer;
}

.treatments__arrow {
  color: #7c2be8;
  transition: transform 0.2s ease;
}

.treatments__more:hover .treatments__arrow,
.treatments__more:focus-visible .treatments__arrow,
.treatments-map__more:hover .treatments__arrow,
.treatments-map__more:focus-visible .treatments__arrow {
  transform: translateX(-4px);
}

.treatments__more:focus-visible,
.treatments-map__more:focus-visible {
  outline: 2px solid #7c2be8;
  outline-offset: 3px;
  border-radius: 4px;
}

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

  .treatments-map__split {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
  }

  /* بالا: نقشهٔ بدن | پایین: کارت‌های درمان */
  .treatments-map__map {
    order: -1;
    width: 100%;
    max-width: 100%;
  }

  .treatments-map__cards {
    order: 1;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .treatments-map__stack {
    grid-template-columns: 1fr;
  }
}
