/* ===== 文章頁共用樣式 — 樹林現代診所 ===== */
/* 由 article-*.html 共用，需搭配 styles.css 一起載入（本檔使用其中的 CSS 變數） */

.article-page { background: var(--white); }
.article-layout { max-width: 780px; margin: 0 auto; }

/* ===== 文章 Header ===== */
.article-header { margin-bottom: 2.5rem; }
.article-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.article-cat-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  background: var(--green-pale); color: var(--green-deep); padding: 0.25rem 0.7rem;
}
.article-title {
  font-family: var(--serif); font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700; color: var(--green-deep); line-height: 1.4; margin-bottom: 1.25rem;
}
.article-meta {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--gray-text);
  padding-bottom: 1.5rem; border-bottom: 1px solid rgba(26,74,58,0.1);
}
.article-meta-item { display: flex; align-items: center; gap: 0.4rem; }
.article-meta-item i { color: var(--green-mid); font-size: 0.9rem; }

/* ===== 特色圖片 ===== */
.article-featured-img {
  width: 100%; max-height: 420px; object-fit: cover;
  margin-bottom: 2.5rem; display: block;
}

/* ===== 文章本文 ===== */
.article-body { font-size: 1.15rem; line-height: 2; color: var(--text-dark); }
.article-body h2 {
  font-family: var(--serif); font-size: 1.55rem; font-weight: 700;
  color: var(--green-deep); margin: 2.5rem 0 1rem;
  padding-left: 0.75rem; border-left: 3px solid var(--gold);
}
.article-body h3 {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 700;
  color: var(--green-deep); margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.25rem; font-weight: 300; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: 0.5rem; font-weight: 300; }
.article-body strong { font-weight: 500; color: var(--text-dark); }
.article-body em { font-style: normal; color: var(--green-deep); font-weight: 500; }

/* 文章內圖片 */
.article-body img { max-width: 100%; height: auto; display: block; margin: 1.5rem 0; }
.article-body figure { margin: 1.75rem 0; }
.article-body figcaption {
  font-size: 0.82rem; color: var(--gray-text); text-align: center; margin-top: 0.5rem;
}

/* ===== 提示框 / 警告框 ===== */
.article-body .tip-box {
  background: var(--green-pale); border-left: 3px solid var(--green-mid);
  padding: 1.25rem 1.5rem; margin: 1.75rem 0; border-radius: 0 4px 4px 0;
}
.article-body .tip-box p { margin-bottom: 0; }
.article-body .warning-box {
  background: #fff8e1; border-left: 3px solid #f59e0b;
  padding: 1.25rem 1.5rem; margin: 1.75rem 0; border-radius: 0 4px 4px 0;
}
.article-body .warning-box p { margin-bottom: 0; }
.article-body .warning-box p + p { margin-top: 0.9rem; }

/* ===== 步驟清單 ===== */
.step-list { list-style: none; padding-left: 0; counter-reset: step-counter; }
.step-list li {
  counter-increment: step-counter; margin-bottom: 0.75rem; font-weight: 300;
  display: flex; align-items: flex-start; gap: 0.75rem;
}
.step-list li::before {
  content: counter(step-counter);
  background: var(--green-deep); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0; margin-top: 0.15rem;
}
/* 避免「記錄副作用」這類短標籤在編號圓圈旁被硬生生斷行 */
.step-list li strong { white-space: nowrap; }

/* ===== 卡片格線 ===== */
/* organ / indication / finding / test 是同一個元件的不同語意命名 */
.organ-grid, .indication-grid, .finding-grid, .test-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem; margin: 1.5rem 0;
}
.test-grid { grid-template-columns: repeat(2, 1fr); }
.organ-card, .indication-card, .finding-card, .test-card {
  background: var(--gray-light); padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--green-light);
}
.organ-card .organ-name, .indication-card .indication-name,
.finding-card .finding-name, .test-card .test-name {
  font-family: var(--serif); font-size: 1rem; font-weight: 700;
  color: var(--green-deep); margin-bottom: 0.35rem;
}
.organ-card p, .indication-card p, .finding-card p, .test-card p {
  font-size: 0.88rem; color: var(--gray-text); margin-bottom: 0; line-height: 1.7;
}
/* finding 卡片字級較大 */
.finding-card .finding-name { font-size: 1.2rem; }
.finding-card p { font-size: 1rem; line-height: 1.8; }

/* ===== 比較表格 ===== */
.compare-table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem;
}
.compare-table th {
  background: var(--green-deep); color: #fff;
  padding: 0.65rem 1rem; text-align: left; font-weight: 600;
}
.compare-table td {
  padding: 0.65rem 1rem; border-bottom: 1px solid rgba(26,74,58,0.1);
  font-weight: 300; vertical-align: top;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--gray-light); }

/* ===== 文章底部 ===== */
.article-footer {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid rgba(26,74,58,0.1);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.article-author { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; color: var(--gray-text); }
.article-author strong { color: var(--green-deep); font-size: 1rem; display: block; margin-bottom: 2px; }
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green-pale); display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700; color: var(--green-deep); flex-shrink: 0;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .article-body h2 { font-size: 1.35rem; }
  .article-meta { gap: 0.75rem; }
  .organ-grid, .indication-grid, .finding-grid, .test-grid { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.82rem; }
  .compare-table th, .compare-table td { padding: 0.5rem 0.65rem; }
}
