/* ── sub-stats.css ── */

/* ── 리드 텍스트 ── */
.st-lead {
  font-size: 0.98rem;
  color: #334455;
  line-height: 1.78;
  margin-bottom: 36px;
  padding: 18px 22px;
  background: #f5f8ff;
  border-left: 4px solid var(--color-primary, #3A7BD5);
  border-radius: 0 12px 12px 0;
}

/* ── 섹션 공통 ── */
.st-section {
  margin-bottom: 52px;
}

.st-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  position: relative;
}

.st-section-head::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary, #3A7BD5) 0%, transparent 55%);
}

.st-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--color-primary, #3A7BD5);
  color: #fff;
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
}

.st-section-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a2a4a;
}

/* ── 통계 카드 그리드 ── */
.st-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.st-card {
  background: #fff;
  border: 1px solid #e4eaf8;
  border-radius: 16px;
  padding: 24px 20px 22px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(15, 30, 80, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.st-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary, #3A7BD5), #5b9be8);
}

.st-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(58, 123, 213, 0.13);
}

.st-card-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
  line-height: 1;
}

.st-card-label {
  font-size: 0.83rem;
  color: #667788;
  margin: 0 0 8px;
  font-weight: 500;
  line-height: 1.4;
}

.st-card-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary, #3A7BD5);
  line-height: 1;
  margin: 0 0 8px;
}

.st-card-unit {
  font-size: 1rem;
  font-weight: 600;
  color: #8899aa;
}

.st-card-desc {
  font-size: 0.77rem;
  color: #8899aa;
  margin: 0;
  line-height: 1.48;
}

/* ── 출처 텍스트 ── */
.st-source {
  font-size: 0.79rem;
  color: #99aabb;
  margin-top: 14px;
  text-align: right;
}

/* ── 데이터 테이블 ── */
.st-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(15, 30, 80, 0.07);
}

.st-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}

.st-table caption {
  caption-side: top;
  padding: 12px 18px;
  font-size: 0.82rem;
  color: #778899;
  text-align: left;
  background: #f8faff;
  border-bottom: 1px solid #e8eef8;
}

.st-table thead tr {
  background: linear-gradient(90deg, #2c5fbd 0%, #3A7BD5 60%, #5b9be8 100%);
}

.st-table thead th {
  padding: 12px 14px;
  color: #fff;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  font-size: 0.85rem;
}

.st-table thead th:first-child {
  text-align: left;
}

.st-table tbody tr {
  border-bottom: 1px solid #eef2f8;
  transition: background 0.12s;
}

.st-table tbody tr:hover {
  background: #f7faff;
}

.st-table tbody tr:last-child {
  background: #eff6ff;
}

.st-table tbody th,
.st-table tbody td {
  padding: 11px 14px;
  text-align: center;
  color: #2c3e6b;
  font-size: 0.88rem;
}

.st-table tbody th {
  text-align: left;
  font-weight: 500;
}

.st-table .st-highlight {
  color: var(--color-primary, #3A7BD5);
  font-weight: 700;
}

/* 첫번째 표(구군별 현황)의 모든 셀(th/td) 줄바꿈 방지 */
.st-table:not(.st-trend-table) th,
.st-table:not(.st-trend-table) td { white-space: nowrap; }

/* ── 추이 테이블 특화 ── */
.st-trend-table thead th:first-child {
  text-align: left;
}

.st-trend-table tbody th {
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 안내 박스 ── */
.st-infobox {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #1e3a5f;
  line-height: 1.7;
}

.st-infobox-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--color-primary, #3A7BD5);
}

/* ── 반응형 ── */
@media (max-width: 768px) {
  .st-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .st-cards-grid { grid-template-columns: 1fr 1fr; }
  .st-card-value { font-size: 1.7rem; }
  .st-card-emoji { font-size: 1.6rem; }
}
