/* ============================================================
   cystitis.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); }

/* ── 01. 방광염이란 ── */
.intro-section { background: var(--white); padding-bottom: 80px; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.intro-img-box {
  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;
}
.intro-img-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.intro-img-box img[src]:not([src=""]) { display: block; }
.intro-img-box svg { width: 100%; height: 100%; padding: 20px; }
.intro-text h3 { font-size: clamp(20px,2.4vw,28px); font-weight: 800; color: var(--text-dark); margin-bottom: 18px; line-height: 1.4; }
.intro-text h3 em { color: var(--primary); font-style: normal; }
.intro-text p { color: var(--text-mid); line-height: 1.95; margin-bottom: 22px; }

/* 방광염 유형 카드 */
.type-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 8px; }
.type-card { border-radius: var(--radius); padding: 18px 16px; border: 1px solid var(--border); background: var(--bg-light); }
.type-card .type-label { font-weight: 700; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 6px; text-transform: uppercase; }
.type-card h4 { font-weight: 800; color: var(--text-dark); margin-bottom: 6px; }
.type-card p  { color: var(--text-muted); line-height: 1.6; }

/* ── 02. 증상 — 아이콘 그리드 ── */
.symptom-section { background: var(--bg-section); padding-bottom: 80px; }
.symptom-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-bottom: 32px; }
.symptom-card {
  background: var(--white); border-radius: var(--radius); padding: 28px 22px;
  text-align: center; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.symptom-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.symptom-card.alert-card { border-top-color: var(--red); }
.symptom-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.symptom-card.alert-card .symptom-icon { background: var(--red-light); }
.symptom-card h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.symptom-card p  { color: var(--text-muted); line-height: 1.7; }
.symptom-alert-bar {
  background: var(--red-light); border-left: 4px solid var(--red);
  border-radius: var(--radius); padding: 18px 26px;
}
.symptom-alert-bar .warn-title { font-weight: 700; color: var(--red); margin-bottom: 5px; }
.symptom-alert-bar p { color: #c0392b; line-height: 1.8; }

/* ── 03. 원인 — 여성 취약성 인포그래픽 ── */
.cause-section { background: var(--white); padding-bottom: 80px; }
.cause-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.cause-why-box {
  background: var(--bg-section); border-radius: var(--radius);
  padding: 36px 32px; box-shadow: var(--shadow);
}
.cause-why-box h3 { font-weight: 800; color: var(--primary); margin-bottom: 22px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.cause-why-list { display: flex; flex-direction: column; gap: 14px; }
.cause-why-item { display: flex; gap: 14px; align-items: flex-start; }
.cause-why-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.cause-why-item strong { display: block; color: var(--text-dark); margin-bottom: 3px; }
.cause-why-item span   { color: var(--text-muted); line-height: 1.65; }
.cause-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cause-card { background: var(--bg-section); border-radius: var(--radius); padding: 20px 18px; border-left: 3px solid var(--accent); }
.cause-card h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.cause-card p  { color: var(--text-muted); line-height: 1.7; }

/* ── 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(5,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-flow { display: flex; flex-direction: column; gap: 0; }
.treatment-step {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 28px; align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.treatment-step:last-child { border-bottom: none; }
.treatment-step-left { display: flex; flex-direction: column; align-items: center; gap: 0; }
.treatment-step-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 4px 14px rgba(139,58,139,0.25);
}
.treatment-step:nth-child(2) .treatment-step-circle { background: var(--accent); }
.treatment-step:nth-child(3) .treatment-step-circle { background: var(--primary-dark); }
.treatment-step:nth-child(4) .treatment-step-circle { background: #a044a0; }
.treatment-step-content h4 { font-weight: 800; color: var(--text-dark); margin-bottom: 10px; }
.treatment-step-content p { color: var(--text-mid); line-height: 1.85; margin-bottom: 12px; }
.treatment-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.treatment-pill { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; padding: 5px 14px; border-radius: 2px; }
.treatment-pill.red   { background: var(--red-light); color: var(--red); }
.treatment-pill.green { background: var(--green-light); color: var(--green); }

/* ── 06. 자가진단 ── */
.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) {
  .symptom-grid { grid-template-columns: repeat(2,1fr); }
  .diag-cards { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 900px) {
  .intro-grid, .cause-layout, .check-layout { grid-template-columns: 1fr; gap: 32px; }
  .symptom-grid { grid-template-columns: repeat(2,1fr); }
  .cause-grid { grid-template-columns: 1fr; }
  .diag-photo-main { aspect-ratio: 16/9; }
}
@media (max-width: 768px) {
  .type-cards { grid-template-columns: 1fr; }
  .symptom-grid { grid-template-columns: 1fr 1fr; }
  .treatment-step { grid-template-columns: 48px 1fr; gap: 18px; }
  .treatment-step-circle { width: 44px; height: 44px; }
  .diag-cards { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .symptom-grid { grid-template-columns: 1fr; }
  .diag-cards { grid-template-columns: 1fr; }
}
