/* ============================================================
   incontinence.css — 요실금 페이지 전용
   공통 스타일: common.css 참조
   ============================================================ */

/* ── 컬러 오버라이드 (로즈퍼플) ── */
:root {
  --primary:        #8b3a8b;
  --primary-dark:   #6b2a6b;
  --primary-light:  #f7eef7;
  --accent:         #c45faa;
  --accent-light:   #fce8f7;
  --border:         #e8d0e8;
  --bg-light:       #fdf5fd;
  --bg-section:     #faf0fa;
  --shadow:         0 8px 32px rgba(139,58,139,0.10);
  --shadow-lg:      0 20px 56px rgba(139,58,139,0.14);
  /* 수술 컬러 */
  --tvt:            #8b3a8b;
  --tot:            #c45faa;
}

/* ── 그라디언트 오버라이드 ── */
.hero-section { background: linear-gradient(135deg, #4a1a4a 0%, #8b3a8b 55%, #c45faa 100%); }
.hero-overlay {
  background: linear-gradient(
    105deg, rgba(74,26,74,0.92) 0%, rgba(139,58,139,0.70) 42%,
    rgba(139,58,139,0.18) 75%, transparent 100%
  );
}
.cta-section { background: linear-gradient(135deg, #4a1a4a 0%, #8b3a8b 100%); }
.diag-photo-badge { background: rgba(139,58,139,0.88); }

/* ── 01. 요실금이란 + 유형 비교 ── */
.intro-section { background: var(--white); padding-bottom: 80px; }

/* 유형 비교 카드 3개 */
.type-compare { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 48px; }
.type-compare-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.type-compare-card:hover { transform: translateY(-4px); }
.type-compare-card-head { padding: 22px 22px 16px; }
.type-compare-card.stress  .type-compare-card-head { background: var(--primary-light); border-bottom: 3px solid var(--primary); }
.type-compare-card.urgency .type-compare-card-head { background: var(--accent-light); border-bottom: 3px solid var(--accent); }
.type-compare-card.mixed   .type-compare-card-head { background: #fdf0fb; border-bottom: 3px solid #a044a0; }
.type-compare-card-head .type-tag { font-weight: 700; letter-spacing: 2px; margin-bottom: 8px; display: block; }
.type-compare-card.stress  .type-tag { color: var(--primary); }
.type-compare-card.urgency .type-tag { color: #8b2a75; }
.type-compare-card.mixed   .type-tag { color: #6b1a6b; }
.type-compare-card-head h4 { font-weight: 800; color: var(--text-dark); margin-bottom: 5px; }
.type-compare-card-head p  { color: var(--text-muted); }
.type-compare-card-body { background: var(--white); padding: 18px 22px 22px; }
.type-compare-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.type-compare-row:last-child { border-bottom: none; }
.type-compare-row span:first-child { color: var(--text-muted); font-weight: 600; }
.type-compare-row span:last-child  { color: var(--text-dark); font-weight: 600; text-align: right; }

/* ── 02. 증상 — 유형별 탭 ── */
.symptom-section { background: var(--bg-section); padding-bottom: 80px; }
.symptom-tabs { display: flex; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 32px; }
.symptom-tab { flex: 1; padding: 16px 18px; border: none; background: transparent; font-weight: 600; color: var(--text-muted); cursor: pointer; font-family: inherit; border-right: 1px solid var(--border); transition: all 0.2s; }
.symptom-tab:last-child { border-right: none; }
.symptom-tab.active { background: var(--primary); color: #fff; }
.symptom-tab:not(.active):hover { background: var(--primary-light); color: var(--primary); }
.symptom-panel { display: none; }
.symptom-panel.active { display: block; }
.symptom-panel-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.symptom-panel-img {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  box-shadow: var(--shadow); position: relative; background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
}
.symptom-panel-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.symptom-panel-img img[src]:not([src=""]) { display: block; }
.symptom-panel-content h3 { font-size: clamp(18px,2.2vw,24px); font-weight: 800; color: var(--text-dark); margin-bottom: 14px; line-height: 1.4; }
.symptom-panel-content p  { color: var(--text-mid); line-height: 1.9; margin-bottom: 16px; }
.symptom-list { display: flex; flex-direction: column; gap: 10px; }
.symptom-list-item { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border-radius: var(--radius); padding: 14px 18px; border-left: 3px solid var(--accent); }
.symptom-list-item strong { display: block; color: var(--text-dark); margin-bottom: 3px; }
.symptom-list-item span   { color: var(--text-muted); line-height: 1.65; }

/* ── 03. 원인 카드 ── */
.cause-section { background: var(--white); padding-bottom: 80px; }
.cause-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.cause-card { background: var(--bg-section); border-radius: var(--radius); padding: 26px 22px; border-top: 3px solid var(--primary); box-shadow: var(--shadow); }
.cause-card-num { font-weight: 700; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px; }
.cause-card h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.cause-card p  { color: var(--text-mid); line-height: 1.75; }

/* ── 04. 진단 ── */
.diagnosis-section { background: var(--bg-section); padding-bottom: 80px; }
.diag-photo-wrap { margin-bottom: 28px; }
.diag-photo-main {
  width: 100%; aspect-ratio: 21/9; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 16px 56px rgba(139,58,139,0.15);
  position: relative; background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
}
.diag-photo-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.diag-photo-main img.active-img { opacity: 1; }
.diag-photo-badge {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  backdrop-filter: blur(10px); padding: 18px 32px; color: #fff;
  display: flex; align-items: baseline; gap: 18px;
}
.diag-photo-badge strong { font-weight: 700; white-space: nowrap; }
.diag-photo-badge span   { opacity: 0.8; }
.diag-photo-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-muted); width: 100%; height: 100%; padding: 32px; }
.diag-photo-placeholder .ph-box { width: 56px; height: 56px; border: 1.5px dashed var(--border); border-radius: 2px; }
.diag-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.diag-card { background: var(--white); border-radius: var(--radius); padding: 22px 20px; border-top: 3px solid var(--accent); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.diag-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.diag-card.active { border-top-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow); }
.diag-card-num { font-weight: 700; letter-spacing: 2px; color: var(--accent); margin-bottom: 10px; }
.diag-card.active .diag-card-num { color: var(--primary); }
.diag-card h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 10px; line-height: 1.35; }
.diag-card p  { color: var(--text-muted); line-height: 1.7; }

/* ── 05. 치료 — 수술 히어로 (TVT/TOT) ── */
.treatment-section { background: var(--white); padding-bottom: 80px; }
.op-hero {
  position: relative; width: 100%; min-height: 480px;
  border-radius: var(--radius); overflow: hidden; margin-bottom: 48px;
  box-shadow: 0 24px 64px rgba(139,58,139,0.18);
}
.op-hero.tvt-bg {
  background: linear-gradient(135deg, #4a1a4a 0%, #8b3a8b 55%, #c45faa 100%);
}
.op-hero.tot-bg {
  background: linear-gradient(135deg, #5a1a3a 0%, #a0306a 55%, #d46090 100%);
}
.op-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; opacity: 0; transition: opacity 0.35s; }
.op-hero-img.loaded { opacity: 1; }
.op-hero-overlay { position: absolute; inset: 0; }
.tvt-bg .op-hero-overlay {
  background: linear-gradient(110deg, rgba(74,26,74,0.92) 0%, rgba(139,58,139,0.65) 44%, rgba(139,58,139,0.15) 72%, transparent 100%);
}
.tot-bg .op-hero-overlay {
  background: linear-gradient(110deg, rgba(90,26,58,0.92) 0%, rgba(160,48,106,0.65) 44%, rgba(160,48,106,0.15) 72%, transparent 100%);
}
.op-hero-content { position: relative; z-index: 2; padding: 56px 64px; max-width: 640px; color: #fff; }
.op-kicker { font-weight: 700; letter-spacing: 4px; color: rgba(255,255,255,0.55); text-transform: uppercase; margin-bottom: 14px; }
.op-hero-content h3 { font-size: clamp(24px,3.2vw,38px); font-weight: 900; line-height: 1.22; margin-bottom: 18px; }
.op-hero-content h3 em { font-style: normal; color: #ffd4f0; }
.op-hero-content p { opacity: 0.88; line-height: 1.85; margin-bottom: 28px; }
.op-points { display: flex; flex-wrap: wrap; gap: 10px; }
.op-point { border: 1px solid rgba(255,255,255,0.28); color: rgba(255,255,255,0.9); font-weight: 600; padding: 8px 18px; border-radius: 2px; }
.op-callouts { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; z-index: 3; }
.op-callout { background: rgba(255,255,255,0.96); border-radius: var(--radius); padding: 16px 22px; min-width: 190px; box-shadow: 0 6px 20px rgba(0,0,0,0.16); }
.op-callout strong { display: block; color: var(--primary-dark); margin-bottom: 4px; }
.op-callout span   { color: var(--text-muted); }

/* 비수술 치료 카드 */
.non-op-section { background: var(--bg-section); padding-bottom: 80px; }
.non-op-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.non-op-card { background: var(--white); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); border-top: 3px solid var(--accent); }
.non-op-card-num { font-weight: 700; letter-spacing: 2px; color: var(--accent); margin-bottom: 8px; }
.non-op-card h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.non-op-card p  { color: var(--text-mid); line-height: 1.75; }

/* ── 06. 자가진단 ── */
.check-section { background: #f7f7f7; padding-bottom: 80px; }
.check-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.check-group h3 { font-weight: 800; color: var(--text-dark); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.check-group.red h3 { border-color: var(--red); }
.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-item { display: flex; align-items: flex-start; gap: 12px; background: var(--bg-section); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; user-select: none; border: 1px solid var(--border); transition: border-color 0.2s; }
.check-item:hover { border-color: var(--accent); }
.check-item.checked { border-color: var(--primary); background: var(--primary-light); }
.check-item.checked-alert { border-color: var(--red); background: var(--red-light); }
.check-box { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 2px; flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.check-item.checked .check-box { background: var(--primary); border-color: var(--primary); }
.check-item.checked-alert .check-box { background: var(--red); border-color: var(--red); }
.check-box::after { content: ''; display: none; width: 5px; height: 9px; border: 2px solid #fff; border-top: none; border-left: none; transform: rotate(45deg) translate(-1px,-1px); }
.check-item.checked .check-box::after,
.check-item.checked-alert .check-box::after { display: block; }
.check-item span { color: var(--text-mid); line-height: 1.65; }
.check-result { margin-top: 18px; padding: 16px 20px; border-radius: var(--radius); font-weight: 600; display: none; }
.check-result.show   { display: block; }
.check-result.normal { background: var(--green-light); color: var(--green); }
.check-result.caution{ background: var(--orange-light); color: var(--orange); }
.check-result.urgent { background: var(--red-light); color: var(--red); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── 반응형 ── */
@media (max-width: 1100px) {
  .op-callouts { display: none; }
  .diag-cards { grid-template-columns: repeat(2,1fr); }
  .non-op-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .type-compare { grid-template-columns: 1fr; }
  .symptom-panel-layout, .check-layout { grid-template-columns: 1fr; gap: 24px; }
  .cause-grid { grid-template-columns: 1fr 1fr; }
  .diag-photo-main { aspect-ratio: 16/9; }
  .op-hero-content { padding: 40px 32px; }
}
@media (max-width: 768px) {
  .type-compare { grid-template-columns: 1fr; }
  .cause-grid { grid-template-columns: 1fr; }
  .non-op-grid { grid-template-columns: 1fr; }
  .symptom-tabs { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .diag-cards { grid-template-columns: 1fr; }
}
