/* ==========================================================
   M-DEENO Complex Page — 단지별 분담금 리스크 분석 페이지
   ========================================================== */

/* ── 리스크 배지 ───────────────────────────────────────── */
.complex-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  margin-top: 12px;
}

.complex-risk-grade {
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.complex-risk-label {
  font-size: 0.9375rem;
}

.complex-risk-R1 {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.complex-risk-R2 {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.complex-risk-R3 {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fde68a;
}

.complex-risk-R4 {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ── 핵심 지표 카드 ───────────────────────────────────── */
.complex-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px 0 32px;
}

.complex-metric-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.complex-metric-highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.complex-metric-label {
  display: block;
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 4px;
  font-weight: 500;
}

.complex-metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.complex-metric-small {
  font-size: 1.125rem;
}

/* ── CTA 박스 ─────────────────────────────────────────── */
.complex-cta-box {
  text-align: center;
  margin: 32px 0;
}

.complex-cta-btn {
  display: inline-block;
  background: #1e40af;
  color: #ffffff !important;
  padding: 16px 32px;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
  min-height: 52px;
  line-height: 1.4;
}

.complex-cta-btn:hover {
  background: #1e3a8a;
  text-decoration: none;
}

/* ── 테이블 스타일 ──────────────────────────────────────── */
.complex-page .post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9375rem;
}

.complex-page .post-content th,
.complex-page .post-content td {
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  text-align: center;
  word-break: keep-all;
}

.complex-page .post-content th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
}

.complex-page .post-content tr:nth-child(even) {
  background: #f9fafb;
}

/* ── 면책 문구 ──────────────────────────────────────────── */
.complex-disclaimer {
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.6;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  margin-top: 24px;
}

/* ── 관련 단지 ──────────────────────────────────────────── */
.complex-related {
  margin-top: 40px;
  padding: 24px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.complex-related h3 {
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: 16px;
  color: #111827;
}

.complex-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.complex-related li {
  margin-bottom: 8px;
}

.complex-related a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #111827;
  font-weight: 500;
  transition: background 0.2s;
}

.complex-related a:hover {
  background: #ffffff;
}

.complex-related-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.complex-related-ratio {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-left: auto;
}

/* ── blockquote (면책) ────────────────────────────────── */
.complex-page .post-content blockquote {
  border-left: 3px solid #d1d5db;
  margin: 16px 0;
  padding: 12px 16px;
  background: #f9fafb;
  font-size: 0.875rem;
  color: #4b5563;
}

/* ── H2 스타일 ─────────────────────────────────────────── */
.complex-page .post-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
  color: #111827;
}

/* ── 모바일 반응형 (375px 기준) ────────────────────────── */
@media (max-width: 480px) {
  .complex-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .complex-metric-card {
    padding: 12px 8px;
  }

  .complex-metric-value {
    font-size: 1.25rem;
  }

  .complex-metric-small {
    font-size: 1rem;
  }

  .complex-cta-btn {
    display: block;
    padding: 16px 24px;
    font-size: 1rem;
  }

  .complex-page .post-content table {
    font-size: 0.875rem;
  }

  .complex-page .post-content th,
  .complex-page .post-content td {
    padding: 8px 6px;
  }

  .complex-risk-badge {
    padding: 6px 12px;
  }

  .complex-risk-grade {
    font-size: 1.125rem;
  }

  .complex-related {
    padding: 16px;
  }
}
