/* ============================================================
   oab.css — 과민성방광 페이지 전용
   공통 스타일: common.css 참조
   ============================================================ */

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

/* ── 그라디언트 오버라이드 ── */
.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); }
.symptom-photo-badge { background: rgba(139,58,139,0.88); }

/* ── 01. 과민성방광이란 ── */
.intro-section { background: var(--white); padding-bottom: 80px; }

/* 통계 강조 카드 */
.stat-highlight { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 48px; }
.stat-hi-card {
  background: var(--bg-section); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
}
.stat-hi-card .stat-num { font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.stat-hi-card .stat-unit { font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.stat-hi-card .stat-desc { color: var(--text-muted); line-height: 1.55; }

/* OAB 정의 박스 */
.oab-define {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.oab-define-img {
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  box-shadow: 0 12px 48px rgba(139,58,139,0.10);
  position: relative; background: var(--bg-section);
  display: flex; align-items: center; justify-content: center;
}
.oab-define-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.oab-define-img img[src]:not([src=""]) { display: block; }
.oab-define-img svg { width: 100%; height: 100%; padding: 20px; }
.oab-define-text h3 { font-size: clamp(20px,2.4vw,28px); font-weight: 800; color: var(--text-dark); margin-bottom: 18px; line-height: 1.4; }
.oab-define-text h3 em { color: var(--primary); font-style: normal; }
.oab-define-text p { color: var(--text-mid); line-height: 1.95; margin-bottom: 18px; }

/* ── 02. 증상 — 2컬럼 비교 카드 ── */
.symptom-section { background: var(--bg-section); padding-bottom: 80px; }
.symptom-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.symptom-col { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.symptom-col-head { padding: 22px 26px 18px; border-bottom: 1px solid var(--border); }
.symptom-col-head .col-badge { display: inline-block; font-weight: 700; letter-spacing: 2px; padding: 4px 12px; border-radius: 2px; margin-bottom: 8px; }
.symptom-col.core .col-badge  { background: var(--primary-light); color: var(--primary); }
.symptom-col.assoc .col-badge { background: var(--accent-light); color: #8b2a75; }
.symptom-col-head h3 { font-weight: 800; color: var(--text-dark); }
.symptom-col-body { padding: 20px 26px 26px; }
.symptom-item-list { display: flex; flex-direction: column; gap: 12px; }
.symptom-item-row { display: flex; gap: 14px; align-items: flex-start; }
.symptom-item-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.symptom-col.core  .symptom-item-dot { background: var(--primary); }
.symptom-col.assoc .symptom-item-dot { background: var(--accent); }
.symptom-item-row strong { display: block; color: var(--text-dark); margin-bottom: 3px; }
.symptom-item-row span   { color: var(--text-muted); line-height: 1.65; }

/* OAB 영향 바 */
.oab-impact { margin-top: 32px; }
.oab-impact h3 { font-weight: 800; color: var(--text-dark); margin-bottom: 20px; }
.impact-bars { display: flex; flex-direction: column; gap: 12px; }
.impact-bar-row { display: grid; grid-template-columns: 160px 1fr 48px; gap: 14px; align-items: center; }
.impact-bar-label { font-weight: 600; color: var(--text-mid); }
.impact-bar-track { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.impact-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 5px; }
.impact-bar-pct { font-weight: 700; color: var(--primary); text-align: right; }

/* ── 03. 원인 — 테이블 형식 ── */
.cause-section { background: var(--white); padding-bottom: 80px; }
.cause-table-wrap { overflow-x: auto; margin-bottom: 32px; }
.cause-table { width: 100%; border-collapse: collapse; }
.cause-table th { background: var(--primary); color: #fff; padding: 14px 20px; text-align: left; font-weight: 700; }
.cause-table th:first-child { border-radius: 4px 0 0 0; }
.cause-table th:last-child  { border-radius: 0 4px 0 0; }
.cause-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--text-mid); line-height: 1.65; vertical-align: top; }
.cause-table tr:last-child td { border-bottom: none; }
.cause-table tr:nth-child(even) td { background: var(--bg-light); }
.cause-table td:first-child { font-weight: 700; color: var(--text-dark); white-space: nowrap; }
.cause-pill { display: inline-block; font-weight: 700; padding: 3px 10px; border-radius: 2px; }
.cause-pill.high { background: var(--primary-light); color: var(--primary); }
.cause-pill.mid  { background: var(--accent-light); color: #8b2a75; }

/* ── 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. 치료 — 단계별 피라미드 ── */
.treatment-section { background: var(--white); padding-bottom: 80px; }
.treatment-pyramid { display: flex; flex-direction: column; gap: 20px; }
.pyramid-step {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.pyramid-step-head {
  display: flex; align-items: center; gap: 20px;
  padding: 22px 28px; cursor: pointer; transition: background 0.2s;
}
.pyramid-step:nth-child(1) .pyramid-step-head { background: var(--primary-light); }
.pyramid-step:nth-child(2) .pyramid-step-head { background: var(--accent-light); }
.pyramid-step:nth-child(3) .pyramid-step-head { background: #fdf0fb; }
.pyramid-step-num {
  width: 44px; height: 44px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pyramid-step:nth-child(1) .pyramid-step-num { background: var(--primary); }
.pyramid-step:nth-child(2) .pyramid-step-num { background: var(--accent); }
.pyramid-step:nth-child(3) .pyramid-step-num { background: #a044a0; }
.pyramid-step-head-text { flex: 1; }
.pyramid-step-head-text strong { display: block; font-weight: 800; color: var(--text-dark); margin-bottom: 3px; }
.pyramid-step-head-text span { color: var(--text-muted); }
.pyramid-step-arrow { color: var(--primary); transition: transform 0.3s; }
.pyramid-step.open .pyramid-step-arrow { transform: rotate(180deg); }
.pyramid-step-body { display: none; padding: 24px 28px 28px; background: var(--white); border-top: 1px solid var(--border); }
.pyramid-step.open .pyramid-step-body { display: block; }
.pyramid-step-body p { color: var(--text-mid); line-height: 1.9; margin-bottom: 16px; }
.pyramid-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pyramid-pill { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; padding: 5px 14px; border-radius: 2px; }

/* ── 06. 자가진단 (OAB-V8 기반) ── */
.check-section { background: var(--bg-section); 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(--white); 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) {
  .stat-highlight { grid-template-columns: repeat(2,1fr); }
  .diag-cards { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .oab-define, .symptom-compare, .check-layout { grid-template-columns: 1fr; gap: 24px; }
  .diag-photo-main { aspect-ratio: 16/9; }
  .impact-bar-row { grid-template-columns: 120px 1fr 40px; }
}
@media (max-width: 768px) {
  .stat-highlight { grid-template-columns: 1fr 1fr; }
  .diag-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stat-highlight { grid-template-columns: 1fr; }
  .diag-cards { grid-template-columns: 1fr; }
  .impact-bar-row { grid-template-columns: 100px 1fr 36px; }
}
