/* ════════════════════════════════════════
   CLINIC — 치료 안내 페이지 공통 스타일
   (spine / growth / breathing / health)
   ════════════════════════════════════════ */

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--cream);
  padding: 18px 80px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(139,111,71,0.2);
}
.breadcrumb span {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 0.06em;
}
.breadcrumb .sep { color: var(--gold-light); }
.breadcrumb .current { color: var(--brown-mid); font-weight: 700; }

/* ── 섹션 공통 ── */
.clinic-section { padding: 120px 80px; }
.clinic-section-alt { background: var(--cream); }
.clinic-section-dark { background: var(--brown-deep); color: var(--white); }

.clinic-section-number {
  font-size: 20px;
  letter-spacing: 0.3em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.clinic-section-number::after {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--gold);
}
.clinic-section-dark .clinic-section-number { color: var(--gold-light); }
.clinic-section-dark .clinic-section-number::after { background: var(--gold-light); }

.clinic-section-title {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  color: var(--brown-deep);
}
.clinic-section-dark .clinic-section-title { color: var(--white); }

.clinic-section-subtitle {
  font-size: 20px;
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.7;
}
.clinic-section-dark .clinic-section-subtitle { color: rgba(253,250,246,0.6); }

/* ── 애니메이션 — base.css에서 전역 처리 ── */

/* ── 타이핑 효과 커서 ── */
.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ══════════════════════════════════════
   SECTION 1 — 증상
   ══════════════════════════════════════ */
.symptoms-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-top: 70px;
}
.symptoms-image-wrap { position: relative; }
.symptoms-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  background: var(--cream-dark);
}
.symptoms-image-badge {
  position: absolute;
  bottom: -24px; right: -24px;
  background: var(--brown-deep);
  color: var(--cream);
  padding: 28px 32px;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  line-height: 1.7;
  max-width: 220px;
  border-radius: 2px;
}
.symptoms-image-badge strong {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 4px;
}
.symptoms-list-area { padding-top: 20px; }
.symptoms-items-wrap { margin-top: 48px; }
.symptom-group {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--cream-dark);
}
.symptom-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.symptom-group-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--brown-mid);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.symptom-group-title::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}
.symptom-items { display: flex; flex-wrap: wrap; gap: 10px; }
.symptom-tag {
  background: var(--cream);
  border: 1px solid rgba(139,111,71,0.3);
  color: var(--brown-mid);
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: all 0.2s;
  cursor: default;
}
.symptom-tag:hover { background: var(--gold); color: var(--white); border-color: var(--gold); }

/* ══════════════════════════════════════
   SECTION 2 — 통증 원인
   ══════════════════════════════════════ */
.pain-layout { margin-top: 70px; }
.pain-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 80px;
}
.pain-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--cream-dark);
}
.pain-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pain-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: none;
}
.pain-image-hover {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.pain-image-wrap:hover .pain-image-hover {
  opacity: 1;
}
.pain-image-wrap.pain-slideshow .pain-image-hover {
  transition: opacity 1.2s ease;
  opacity: 0;
}
.pain-image-wrap.pain-slideshow .pain-image-hover.is-visible {
  opacity: 1;
}
.pain-slide-indicators {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.pain-slide-dot {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.4s ease, width 0.4s ease;
}
.pain-slide-dot.is-active {
  width: 32px;
  background: var(--gold);
}
.pain-text { display: flex; flex-direction: column; justify-content: center; }
.pain-text p {
  font-size: 20px;
  line-height: 1.9;
  color: var(--brown-mid);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.pain-quote {
  border-left: 2px solid var(--gold);
  padding-left: 24px;
  margin: 28px 0;
  font-family: 'Noto Serif KR', serif;
  font-size: 23px;
  color: var(--brown-mid);
  line-height: 1.7;
  font-weight: 600;
}
.pain-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.pain-card {
  background: var(--cream);
  padding: 48px 36px;
  transition: background 0.3s;
}

@keyframes painCardAuto {
  0%, 100% { background: var(--cream); box-shadow: none; }
  10%      { background: var(--cream-dark); box-shadow: 0 16px 32px rgba(44,36,24,0.12); }
  30%      { background: var(--cream); box-shadow: none; }
}

.pain-cards.in-view .pain-card:nth-child(1) { animation: painCardAuto 6s ease-in-out 0s infinite; }
.pain-cards.in-view .pain-card:nth-child(2) { animation: painCardAuto 6s ease-in-out 2s infinite; }
.pain-cards.in-view .pain-card:nth-child(3) { animation: painCardAuto 6s ease-in-out 4s infinite; }
.pain-card-num {
  font-family: 'Noto Serif KR', serif;
  font-size: 56px;
  font-weight: 500;
  color: rgba(139,111,71,0.15);
  line-height: 1;
  margin-bottom: 20px;
}
.pain-card-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brown-mid);
  margin-bottom: 12px;
}
.pain-card-desc { font-size: 17px; line-height: 1.85; color: var(--text-sub); font-weight: 500; }

/* ══════════════════════════════════════
   SECTION 3 — 다루는 질환
   ══════════════════════════════════════ */
.disease-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 70px;
  border: 1px solid rgba(139,111,71,0.25);
  perspective: 1000px;
}
.disease-item {
  padding: 48px 32px;
  border-right: 1px solid rgba(139,111,71,0.25);
  border-bottom: 1px solid rgba(139,111,71,0.25);
  transition: background 0.3s, transform 0.15s ease-out, box-shadow 0.15s ease-out;
  cursor: default;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
}
.disease-item:nth-child(4n) { border-right: none; }
.disease-item:nth-last-child(-n+4) { border-bottom: none; }

/* 4개 아이템 전용: 2열 × 2행 */
.disease-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}
.disease-grid-4 .disease-item:nth-child(4n) { border-right: 1px solid rgba(139,111,71,0.25); }
.disease-grid-4 .disease-item:nth-child(2n) { border-right: none; }
.disease-grid-4 .disease-item:nth-last-child(-n+4) { border-bottom: 1px solid rgba(139,111,71,0.25); }
.disease-grid-4 .disease-item:nth-last-child(-n+2) { border-bottom: none; }

/* 6개 아이템 전용: 3열 × 2행 */
.disease-grid-6 {
  grid-template-columns: repeat(3, 1fr);
}
/* 우측 보더: 3번째마다 제거, 기존 4n 규칙 복원 */
.disease-grid-6 .disease-item:nth-child(4n) { border-right: 1px solid rgba(139,111,71,0.25); }
.disease-grid-6 .disease-item:nth-child(3n) { border-right: none; }
/* 하단 보더: 기존 nth-last-child(-n+4) 규칙이 1행까지 지우므로 복원 */
.disease-grid-6 .disease-item:nth-child(-n+3) { border-bottom: 1px solid rgba(139,111,71,0.25); }
/* 마지막 행 하단 보더 제거 */
.disease-grid-6 .disease-item:nth-last-child(-n+3) { border-bottom: none; }
.disease-item:hover {
  background: var(--cream);
  z-index: 2;
  border-radius: 4px;
  border-color: transparent;
  box-shadow: 0 20px 40px rgba(44,36,24,0.18), 0 0 0 1px rgba(139,111,71,0.25);
}
.disease-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 23px;
  font-weight: 700;
  color: var(--brown-mid);
  margin-bottom: 10px;
}
.disease-desc { font-size: 16px; line-height: 1.8; color: var(--text-sub); font-weight: 500; }

/* ══════════════════════════════════════
   SECTION 4 — 진단 과정
   ══════════════════════════════════════ */

/* 순차 발광 키프레임 */
@keyframes stepDotGlow {
  0%, 26%, 100% {
    box-shadow: 0 0 0 0 rgba(191,160,100,0);
    border-color: rgba(139,111,71,0.4);
    background: #342A1C; /* rgba(139,111,71,0.08)를 #2C2418 배경에 합성한 단색 */
  }
  8% {
    box-shadow: 0 0 0 8px rgba(191,160,100,0.28), 0 0 32px rgba(191,160,100,0.55);
    border-color: var(--gold-light);
    background: #453824; /* rgba(139,111,71,0.26)를 #2C2418 배경에 합성한 단색 */
  }
  16% {
    box-shadow: 0 0 0 14px rgba(191,160,100,0.1), 0 0 20px rgba(191,160,100,0.25);
    border-color: rgba(191,160,100,0.6);
    background: #392F1F; /* rgba(139,111,71,0.14)를 #2C2418 배경에 합성한 단색 */
  }
}

/* 잔물결 확산 */
@keyframes stepRipple {
  0%, 26%, 100% { transform: scale(1); opacity: 0; }
  8%             { transform: scale(1.05); opacity: 0.7; }
  22%            { transform: scale(1.6); opacity: 0; }
}

/* 제목 반짝임 */
@keyframes stepTitleGlow {
  0%, 26%, 100% { color: var(--cream); text-shadow: none; }
  8%             { color: #f0d898; text-shadow: 0 0 18px rgba(191,160,100,0.6); }
  16%            { color: var(--cream); text-shadow: none; }
}

/* 라인 위 빛 이동 */
@keyframes lineShimmer {
  0%   { background-position: -60% center; }
  100% { background-position: 160% center; }
}

.process-layout { margin-top: 70px; }
.process-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 5;
  margin-bottom: 80px;
  overflow: hidden;
  border-radius: 2px;
  background-image: url('../img/clinic/process.jpg');
  background-size: cover;
  background-position: center;
}
.process-video-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.77777777%; /* 16:9 비율 유지 */
  height: 100%;
  transform: translate(-50%, -50%);
}
.process-video-img {
  width: 100%; height: 100%;
  object-fit: cover;
  background-image: url('https://images.unsplash.com/photo-1612349317150-e413f6a5b16d?w=1920&q=80');
  background-size: cover;
  background-position: center;
}
.process-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44,36,24,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-video-text {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(22px, 3vw, 38px);
  color: var(--cream);
  font-weight: 500;
  text-align: center;
  line-height: 1.5;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 48px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 1px;
  z-index: 0;
  background: linear-gradient(
    to right,
    rgba(139,111,71,0.15) 0%,
    rgba(253,230,160,1) 50%,
    rgba(139,111,71,0.15) 100%
  );
  background-size: 80% 100%;
  animation: lineShimmer 4s linear infinite;
}

/* 3단계 치료 과정 (예: spine.html) */
.process-steps.steps-3 {
  grid-template-columns: repeat(3, 1fr);
}
.process-steps.steps-3::before {
  left: calc(16.6667% + 20px);
  right: calc(16.6667% + 20px);
}

.process-step { padding: 0 32px; text-align: center; position: relative; }
.step-dot-wrap { display: flex; justify-content: center; margin-bottom: 30px; position: relative; }
.step-dot {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: #342A1C; /* 가로선이 비쳐 보이지 않도록 불투명 단색 처리 (rgba(139,111,71,0.08)의 합성색) */
  border: 1px solid rgba(139,111,71,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: border-color 0.3s, background 0.3s;
}

/* 잔물결 링 */
.step-dot::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(191,160,100,0.7);
  animation: stepRipple 4s ease-out infinite;
  pointer-events: none;
}

/* STEP 순차 애니메이션 — 1s 간격으로 순서대로 */
.process-step:nth-child(1) .step-dot      { animation: stepDotGlow  4s ease-in-out 0s   infinite; }
.process-step:nth-child(2) .step-dot      { animation: stepDotGlow  4s ease-in-out 1s   infinite; }
.process-step:nth-child(3) .step-dot      { animation: stepDotGlow  4s ease-in-out 2s   infinite; }
.process-step:nth-child(4) .step-dot      { animation: stepDotGlow  4s ease-in-out 3s   infinite; }

.process-step:nth-child(1) .step-dot::after { animation-delay: 0s; }
.process-step:nth-child(2) .step-dot::after { animation-delay: 1s; }
.process-step:nth-child(3) .step-dot::after { animation-delay: 2s; }
.process-step:nth-child(4) .step-dot::after { animation-delay: 3s; }

.process-step:nth-child(1) .step-title   { animation: stepTitleGlow 4s ease-in-out 0s   infinite; }
.process-step:nth-child(2) .step-title   { animation: stepTitleGlow 4s ease-in-out 1s   infinite; }
.process-step:nth-child(3) .step-title   { animation: stepTitleGlow 4s ease-in-out 2s   infinite; }
.process-step:nth-child(4) .step-title   { animation: stepTitleGlow 4s ease-in-out 3s   infinite; }

/* PC: mobile 텍스트 숨김 */
/* .desc-mobile 기본 숨김은 base.css에서 전역 처리 */

.step-dot-num { font-size: 20px; letter-spacing: 0.2em; color: var(--gold-light); margin-bottom: 2px; }
.step-dot-label { font-family: 'Noto Serif KR', serif; font-size: 15px; color: var(--cream); font-weight: 700; }
.step-title { font-family: 'Noto Serif KR', serif; font-size: 20px; font-weight: 700; color: var(--cream); margin-bottom: 12px; }
.step-desc { font-size: 17px; line-height: 1.85; color: rgba(253,250,246,0.6); font-weight: 500; }

/* ── STEP 태그 (성장 진단 등) ── */
.step-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.step-tag {
  font-size: 11.5px;
  padding: 4px 13px;
  border: 1px solid rgba(184,154,106,0.35);
  color: rgba(255,255,255,0.5);
  border-radius: 20px;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}
.step-tag:hover {
  border-color: rgba(184,154,106,0.7);
  color: rgba(255,255,255,0.8);
}

/* ══════════════════════════════════════
   SECTION 5 — 추천 대상
   ══════════════════════════════════════ */
.recommend-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 100px;
  align-items: center;
  margin-top: 70px;
}
.recommend-image-stack { position: relative; }
.rec-img-main {
  width: 80%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  background: var(--cream-dark);
}
.rec-img-sub {
  position: absolute;
  bottom: -40px; right: 0;
  width: 55%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 2px;
  border: 6px solid var(--white);
  background: var(--cream-dark);
}
.recommend-list { list-style: none; }
.recommend-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.recommend-item:first-child { padding-top: 0; }
.recommend-item:last-child { border-bottom: none; }
.rec-num {
  font-family: 'Noto Serif KR', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--gold-light);
  line-height: 1;
  min-width: 36px;
  flex-shrink: 0;
  margin-top: -4px;
}
.rec-title { font-family: 'Noto Serif KR', serif; font-size: 23px; font-weight: 700; color: var(--brown-mid); margin-bottom: 6px; }
.rec-desc { font-size: 18px; line-height: 1.8; color: var(--text-sub); font-weight: 500; }

/* ══════════════════════════════════════
   CTA STRIP
   ══════════════════════════════════════ */
.cta-strip {
  background: var(--brown-deep);
  padding: 90px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}
.cta-title {
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.4;
  margin-bottom: 12px;
}
.cta-sub { font-size: 14px; color: rgba(253,250,246,0.55); font-weight: 500; }
.cta-actions { display: flex; gap: 14px; flex-shrink: 0; }
.btn-primary {
  background: var(--gold);
  color: var(--brown-deep);
  padding: 16px 36px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.2s;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); }
.btn-outline {
  background: transparent;
  color: var(--cream);
  padding: 16px 36px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid rgba(253,250,246,0.35);
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--gold-light); color: var(--gold-light); }

/* ══════════════════════════════════════
   제휴 네트워크 배지 (growth.html 전용)
   ══════════════════════════════════════ */
.partner-badge {
  padding: 64px 80px;
  background: var(--cream);
  border-top: 1px solid rgba(139, 111, 71, 0.15);
}

.partner-badge-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.partner-badge-logo {
  width: 220px;
  height: auto;
  object-fit: contain;
}

.partner-badge-text {
  font-size: 15px;
  color: var(--text-sub);
  letter-spacing: 0.02em;
}

.partner-badge-text strong {
  color: var(--brown-mid);
  font-weight: 700;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .breadcrumb { padding: 16px 24px; }
  .clinic-section { padding: 80px 24px; }
  .partner-badge { padding: 48px 24px; }
  .partner-badge-logo { width: 180px; }
  .partner-badge-text { font-size: 14px; }
  .clinic-section-title { font-size: clamp(24px, 5vw, 32px); }
  .clinic-section p { font-size: 14px; }
  .cta-strip { flex-direction: column; align-items: flex-start; padding: 60px 24px; }
  .symptoms-layout, .pain-header, .recommend-layout { grid-template-columns: 1fr; gap: 50px; }
  .symptoms-image-badge { right: 0; }
  .pain-cards { display: none; }
  .disease-grid { grid-template-columns: repeat(2, 1fr); }
  .disease-item:nth-child(4n) { border-right: 1px solid rgba(139,111,71,0.25); }
  .disease-item:nth-child(2n) { border-right: none; }
  .disease-item:nth-last-child(-n+4) { border-bottom: 1px solid rgba(139,111,71,0.25); }
  .disease-item:nth-last-child(-n+2) { border-bottom: none; }
  .process-steps { grid-template-columns: 1fr; gap: 40px; }
  .process-steps::before { display: none; }
  .recommend-image-stack { display: none; }
  .recommend-layout { display: block; }
}