/* ============================================================
   정신질환 정보 페이지 전용 스타일 (sub-info.css)
   ============================================================ */

/* ── 패널별 색상 변수 ── */
#panel-depression { --di-accent: #3a7bd5; --di-accent-bg: #eff6ff; --di-accent-text: #1e3a5f; }
#panel-anxiety    { --di-accent: #d97706; --di-accent-bg: #fffbeb; --di-accent-text: #78350f; }
#panel-schizo     { --di-accent: #7c3aed; --di-accent-bg: #f5f3ff; --di-accent-text: #3b0764; }
#panel-bipolar    { --di-accent: #0d9488; --di-accent-bg: #f0fdfa; --di-accent-text: #064e3b; }
#panel-ocd        { --di-accent: #e11d48; --di-accent-bg: #fff1f2; --di-accent-text: #881337; }
#panel-insomnia   { --di-accent: #4f46e5; --di-accent-bg: #eef2ff; --di-accent-text: #1e1b4b; }

/* ══════════════════════════════════
   히어로 블록
   ══════════════════════════════════ */
.di-hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 36px;
  align-items: center;
  background: linear-gradient(145deg, #f8faff 0%, #f0f5ff 100%);
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 48px;
  border: 1px solid rgba(58,123,213,0.10);
  position: relative;
  overflow: hidden;
}
.di-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: 220px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(58,123,213,0.04);
  pointer-events: none;
}

.di-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--di-accent, #3a7bd5);
  color: #fff;
  margin-bottom: 12px;
}

.di-hero-name {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  margin: 0 0 8px;
  letter-spacing: .5px;
}

.di-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px;
  line-height: 1.35;
  letter-spacing: -.5px;
  word-break: keep-all;
}

.di-hero-desc {
  font-size: 15px;
  color: #475569;
  line-height: 1.75;
  margin: 0 0 22px;
  word-break: keep-all;
}

.di-hero-stats {
  display: flex;
  gap: 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.07);
  max-width: 380px;
}
.di-stat {
  flex: 1;
  padding: 11px 12px;
  text-align: center;
  background: rgba(255,255,255,0.85);
  border-right: 1px solid rgba(0,0,0,0.06);
}
.di-stat:last-child { border-right: none; }
.di-stat dt {
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.di-stat dd {
  font-size: 16px;
  font-weight: 800;
  color: var(--di-accent, #3a7bd5);
  margin: 0;
  letter-spacing: -.3px;
}

/* ── 이미지 플레이스홀더 ── */
.di-hero-img { margin: 0; }
.di-img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--di-accent, #3a7bd5);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}
.di-img-placeholder i {
  font-size: 52px;
  color: rgba(255,255,255,0.85);
  position: relative;
  z-index: 1;
}
.di-img-hint {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.60);
  text-align: center;
  padding: 0 16px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
.di-img-placeholder::before {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.di-img-placeholder::after {
  content: '';
  position: absolute;
  top: -25px; left: -25px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

/* ══════════════════════════════════
   섹션 공통
   ══════════════════════════════════ */
.di-section { margin-bottom: 44px; }

.di-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 20px;
  letter-spacing: -.3px;
}
.di-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--di-accent, #3a7bd5);
  color: #fff;
  font-size: 15px;
  flex-shrink: 0;
}
.di-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #e2e8f0, transparent);
}

.di-lead {
  font-size: 15px;
  color: #475569;
  line-height: 1.8;
  margin: 0 0 16px;
  word-break: keep-all;
  text-indent: 1em;          /* 단락 들여쓰기 */
}

/* ── 들여쓰기 / 내어쓰기 블록 ── */
.di-indent-block {
  padding-left: 20px;
  border-left: 3px solid var(--di-accent-bg, #eff6ff);
  margin: 12px 0;
}
.di-hanging-note {
  padding-left: 1.6em;
  text-indent: -1.6em;       /* 내어쓰기: 첫 줄 돌출 */
  font-size: 14px;
  color: #64748b;
  line-height: 1.75;
  margin: 4px 0;
  word-break: keep-all;
}

/* ══════════════════════════════════
   콜아웃 박스
   ══════════════════════════════════ */
.di-callout {
  align-items: flex-start;
  background: var(--di-accent-bg, #eff6ff);
  border: 1px solid #dde5f0;
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 15px;
  color: var(--di-accent-text, #1e3a5f);
  line-height: 1.75;
  margin: 16px 0;
  word-break: keep-all;
}
.di-callout-icon {
  font-size: 20px;
  color: var(--di-accent, #3a7bd5);
  flex-shrink: 0;
  margin-top: 2px;
}
.di-callout--danger {
  background: #fff1f2;
  border-color: rgba(225,29,72,0.20);
  color: #881337;
  align-items: center;
}
.di-callout--danger .di-callout-icon { color: #e11d48; margin-top: 0; }

/* ══════════════════════════════════
   원인 카드 그리드
   ══════════════════════════════════ */
.di-cause-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.di-cause-card {
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.di-cause-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: var(--di-accent, #3a7bd5);
}
.di-cause-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--di-accent-bg, #eff6ff);
  color: var(--di-accent, #3a7bd5);
  flex-shrink: 0;
}
.di-cause-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.di-cause-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* ══════════════════════════════════
   표
   ══════════════════════════════════ */
.di-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  -webkit-overflow-scrolling: touch;
}
.di-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 420px;
}
.di-table caption {
  font-size: 11.5px;
  font-weight: 600;
  color: #6b7280;
  padding: 8px 16px;
  text-align: left;
  letter-spacing: .3px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  caption-side: top;
}
.di-table th {
  background: var(--di-accent-bg, #eff6ff);
  color: var(--di-accent-text, #1e3a5f);
  font-weight: 700;
  padding: 11px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.di-table td {
  padding: 11px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  line-height: 1.65;
  vertical-align: top;
  word-break: keep-all;
}
.di-table tr:last-child td { border-bottom: none; }
.di-table tr:hover td { background: #f8fafc; }

/* ══════════════════════════════════
   증상 체크리스트
   ══════════════════════════════════ */
.di-symptom-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.di-symptom-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14.5px;
  color: #334155;
  line-height: 1.6;
  transition: border-color .15s;
  word-break: keep-all;
}
.di-symptom-item:hover {
  border-color: var(--di-accent, #3a7bd5);
}
.di-symptom-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--di-accent, #3a7bd5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

/* 번호별 색상 시퀀스 — 항목 구분 시인성 향상 (9개 단위 반복) */
.di-symptom-list .di-symptom-item:nth-child(9n+1) .di-symptom-num { background: #3a7bd5; }
.di-symptom-list .di-symptom-item:nth-child(9n+2) .di-symptom-num { background: #16a34a; }
.di-symptom-list .di-symptom-item:nth-child(9n+3) .di-symptom-num { background: #f59e0b; }
.di-symptom-list .di-symptom-item:nth-child(9n+4) .di-symptom-num { background: #8b5cf6; }
.di-symptom-list .di-symptom-item:nth-child(9n+5) .di-symptom-num { background: #ec4899; }
.di-symptom-list .di-symptom-item:nth-child(9n+6) .di-symptom-num { background: #06b6d4; }
.di-symptom-list .di-symptom-item:nth-child(9n+7) .di-symptom-num { background: #f97316; }
.di-symptom-list .di-symptom-item:nth-child(9n+8) .di-symptom-num { background: #14b8a6; }
.di-symptom-list .di-symptom-item:nth-child(9n)   .di-symptom-num { background: #6366f1; }

.di-symptom-group { margin-bottom: 16px; }
.di-symptom-group-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  margin: 0 0 10px;
}
.di-symptom-group-label--pos { background: rgba(16,185,129,0.10); color: #065f46; }
.di-symptom-group-label--neg { background: rgba(99,102,241,0.10); color: #3730a3; }
.di-symptom-group-label--manic { background: rgba(245,158,11,0.12); color: #78350f; }
.di-symptom-group-label--dep   { background: rgba(100,116,139,0.10); color: #334155; }

/* ══════════════════════════════════
   치료 단계 타임라인
   ══════════════════════════════════ */
.di-treatment-list {
  list-style: none;
  padding: 0 0 0 4px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.di-treatment-list::before {
  content: '';
  position: absolute;
  left: 16px; top: 33px; bottom: 22px;
  width: 1px;
  background: #eee;
  border-radius: 2px;
}
.di-treatment-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 14px 0;
  position: relative;
}
.di-treatment-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--di-accent, #3a7bd5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  letter-spacing: .3px;
  margin-top: 10px;
}
.di-treatment-body { flex: 1; padding-top: 8px; }
.di-treatment-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
}
.di-treatment-desc {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.65;
  margin: 0;
  word-break: keep-all;
}

/* ══════════════════════════════════
   Q&A
   ══════════════════════════════════ */
.di-qa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.di-qa-item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}
.di-qa-q {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--di-accent-bg, #eff6ff);
  padding: 15px 18px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--di-accent-text, #1e3a5f);
  line-height: 1.6;
  margin: 0;
  word-break: keep-all;
}
.di-qa-a {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  padding: 15px 18px;
  font-size: 14px;
  color: #334155;
  line-height: 1.75;
  margin: 0;
  border-top: 1px solid #e8edf5;
  word-break: keep-all;
}
.di-qa-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--di-accent, #3a7bd5);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.di-qa-badge--a {
  background: #e2e8f0;
  color: #64748b;
}

/* ══════════════════════════════════
   긴급 연락처 CTA
   ══════════════════════════════════ */
.di-emergency {
  background: linear-gradient(135deg, #fff1f2 0%, #fef2f2 100%);
  border: 1px solid rgba(225,29,72,0.15);
  border-radius: 16px;
  padding: 22px 24px;
  margin-top: 4px;
}
.di-emergency-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #881337;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.di-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.di-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: -.2px;
  white-space: nowrap;
  transition: transform .18s, box-shadow .18s;
}
.di-cta-btn:hover { transform: translateY(-2px); }
.di-cta-btn--danger {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff !important;
  box-shadow: 0 3px 12px rgba(225,29,72,0.28);
}
.di-cta-btn--danger:hover { box-shadow: 0 5px 18px rgba(225,29,72,0.40); }
.di-cta-btn--blue {
  background: linear-gradient(135deg, #3a7bd5, #2563eb);
  color: #fff !important;
  box-shadow: 0 3px 12px rgba(58,123,213,0.28);
}
.di-cta-btn--blue:hover { box-shadow: 0 5px 18px rgba(58,123,213,0.40); }

/* ══════════════════════════════════
   반응형
   ══════════════════════════════════ */
@media (max-width: 1024px) {
  .di-cause-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .di-hero { grid-template-columns: 1fr; padding: 28px 24px; gap: 0; }
  .di-hero-img { display: none; }
  .di-hero-stats { max-width: 100%; }
}
@media (max-width: 767px) {
  .di-hero { padding: 20px; margin-bottom: 32px; }
  .di-hero-title { font-size: 22px; }
  .di-hero-stats { flex-wrap: wrap; }
  .di-stat { min-width: 50%; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .di-section { margin-bottom: 32px; }
  .di-section-title { font-size: 16px; }
  .di-section-icon { width: 30px; height: 30px; font-size: 13px; }
  .di-emergency { padding: 16px 14px; }
  .di-treatment-list::before { display: none; }
  .di-table { min-width: 360px; }
}
@media (max-width: 479px) {
  .di-cause-grid { grid-template-columns: 1fr; gap: 10px; }
  .di-hero-stats .di-stat { min-width: 100%; }
  .di-cta { flex-direction: column; }
  .di-cta-btn { justify-content: center; }
}
