/* sub0201 - 診察から治療完了までの流れ（タイムライン） */

.p0201-flow {
  width: 100%;
  background-color: #ffffff;
  padding: 56px 0 64px;
}

.p0201-flow__inner {
  position: relative;
  box-sizing: border-box;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.p0201-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* 중앙 세로 라인 : 스크롤에 따라 위에서 아래로 그려진다 (GSAP scrub)
   top / height 는 JS 가 첫 번째 ~ 마지막 번호 원의 중심에 맞춰 계산한다 */
.p0201-steps__line {
  display: none;
  position: absolute;
  top: 0;
  height: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background-color: #dadada;
  transform: scaleY(0);
  transform-origin: top center;
  z-index: 0;
}

.p0201-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "media media"
    "num   text";
  align-items: center;
  column-gap: 14px;
  row-gap: 16px;
}

.p0201-step__media {
  grid-area: media;
  display: flex;
  justify-content: center;
}

.p0201-step__media img {
  display: block;
  max-width: 100%;
  height: auto;
}

.p0201-step__num {
  grid-area: num;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  border: 1px solid #d5d5d5;
  border-radius: 9999px;
  background-color: #ffffff;
  font-family: "Manrope", "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #333333;
}

.p0201-step__text {
  grid-area: text;
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
  color: #333333;
}

/* 모바일에서는 강제 줄바꿈을 해제한다 */
.p0201-step__text br {
  display: none;
}

@media (min-width: 768px) {
  .p0201-flow {
    padding: 90px 0 80px;
  }

  .p0201-steps {
    gap: 80px;
  }

  .p0201-steps__line {
    display: block;
  }

  /* [이미지 | 번호 | 텍스트] 3 컬럼 — 번호 열이 컨테이너 중앙에 오도록 좌우 1fr 대칭 */
  .p0201-step {
    grid-template-columns: 1fr 64px 1fr;
    grid-template-areas: "media num text";
    column-gap: 40px;
    row-gap: 0;
  }

  .p0201-step__media {
    justify-content: flex-end;
    padding-right: 32px;
  }

  .p0201-step__num {
    width: 63px;
    height: 63px;
    font-size: 22px;
  }

  .p0201-step__text {
    font-size: 18px;
    line-height: 2.08;
  }

  .p0201-step__text br {
    display: inline;
  }
}

@media (min-width: 1280px) {
  .p0201-flow {
    padding: 150px 0 68px;
  }

  .p0201-steps {
    gap: 120px;
  }

  .p0201-step__text {
    font-size: 24px;
  }
}

/* 모션을 줄이는 설정에서는 라인을 처음부터 표시한다 */
@media (prefers-reduced-motion: reduce) {
  .p0201-steps__line {
    transform: scaleY(1);
  }
}
