/* ============================================================
   rib-compare-20261203.css
   肋骨骨折中心頁：保守治療 vs 手術固定 對照模組
   （表格 + 白話摘要 + 回診警訊）
   2026-12-03
   ============================================================ */

.rib-compare {
  margin: 2.5rem 0;
}

/* ---------- 白話摘要 ---------- */
.rib-compare-summary {
  background: var(--off-white, #f8f9fc);
  border: 1px solid var(--gray-200, #e2e6f0);
  border-left: 4px solid var(--navy, #1a3a5c);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.rib-compare-summary-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy, #1a3a5c);
  margin: 0 0 0.75rem;
}

.rib-compare-summary p {
  margin: 0 0 0.75rem;
  line-height: 1.8;
  color: var(--gray-700, #4a5568);
}

.rib-compare-summary p:last-child {
  margin-bottom: 0;
}

.rib-compare-summary strong {
  color: var(--navy, #1a3a5c);
}

/* ---------- 對照表 ---------- */
/* 捲動與固定第一欄沿用全站共用的 .mt-scroll（mobile-table-scroll-20261203.css），
   本檔只負責對照表專屬的配色與標題欄。 */
.rib-compare .mt-scroll {
  margin-bottom: 0.4rem;
}

.rib-compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.7;
}

.rib-compare-table th,
.rib-compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--gray-200, #e2e6f0);
}

.rib-compare-table thead th {
  background: var(--navy, #1a3a5c);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.rib-compare-table tbody tr:nth-child(even) {
  background: var(--off-white, #f8f9fc);
}

/* 表頭 */
.rib-compare-table thead th {
  background: var(--navy, #1a3a5c);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

/* tbody 的 row-header（項目名稱）：深色字 + 淺底，確保對比度。
   需覆蓋 .mt-scroll th / .mt-scroll th:first-child 的白字規則，
   故用同等或更高的特異性寫在該檔之後載入。 */
.rib-compare-table tbody th,
.rib-compare-table tbody td:first-child,
.mt-scroll .rib-compare-table tbody th:first-child,
.mt-scroll .rib-compare-table tbody td:first-child {
  font-weight: 700;
  color: var(--navy, #1a3a5c);
  background: #fff;
  white-space: nowrap;
}

.rib-compare-table tbody tr:nth-child(even) th,
.rib-compare-table tbody tr:nth-child(even) td:first-child {
  background: var(--off-white, #f8f9fc);
}

.rib-compare-scroll-hint {
  font-size: 0.85rem;
  color: var(--gray-600, #6b7280);
  margin: 0 0 1.5rem;
}

/* ---------- 回診警訊 ---------- */
.rib-compare-alert {
  background: #fff8f0;
  border: 1px solid #f0c896;
  border-left: 4px solid #c05621;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}

.rib-compare-alert-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #9c4221;
  margin: 0 0 0.75rem;
}

.rib-compare-alert ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.rib-compare-alert li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  color: var(--gray-700, #4a5568);
}

.rib-compare-alert li:last-child {
  margin-bottom: 0;
}

.rib-compare-alert p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-600, #6b7280);
  line-height: 1.7;
}

/* ---------- 手機版 ---------- */
@media (max-width: 768px) {
  .rib-compare {
    margin: 2rem 0;
  }

  .rib-compare-summary {
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
  }

  .rib-compare-summary-title {
    font-size: 1.05rem;
  }

  .rib-compare-table {
    min-width: 520px;
    font-size: 1rem;
  }
  .rib-compare-table th,
  .rib-compare-table td {
    padding: 0.7rem 0.75rem;
  }

  .rib-compare-scroll-hint {
    display: block;
  }

  .rib-compare-alert {
    padding: 1rem 1.15rem;
  }
}
