/* === 背景與文章區塊 === */
body.single,
body.single-post {
  background: #f5f5f5;
}
body.single .site-main,
body.single .entry-content,
body.single .page-content,
body.single .post,
body.single .content-area {
  background: #fff;
  max-width: 1000px;
  margin: 0 auto !important;
  padding: 64px 48px;
  font-size: 18px;
  line-height: 1.75;
  color: #1a1a1a;
  font-family: "Segoe UI", "Noto Sans TC", "Helvetica Neue", sans-serif;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* === H1~H4 標題樣式 === */
body.single h1,
body.single .entry-title {
  font-size: 2.4em;
  font-weight: 800;
  margin-bottom: 0.8em;
  color: #0f172a;
}
body.single h2 {
  font-size: 1.8em;
  font-weight: 700;
  margin: 2.5em 0 1em;
  color: #125aa4;
  border-bottom: 2px solid #f9ddc0;
  padding-bottom: 0.3em;
}
body.single h3 {
  font-size: 1.5em;
  font-weight: 600;
  margin: 2em 0 1em;
  color: #1878DB;
}
body.single h4 {
  font-size: 1.2em;
  font-weight: 600;
  margin: 1.5em 0 1em;
  color: #1A82ED;
}

/* === FAQ 通用樣式（非 Rank Math）=== */
body.single .faq {
  margin: 2em 0;
}
body.single .faq-question {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 0.4em;
  color: #334155;
}
body.single .faq-answer {
  color: #555;
  margin-bottom: 1.5em;
  line-height: 1.6;
}

/* === 目錄區塊 === */
body.single .table-of-contents {
  background: #f1f5f9;
  padding: 1em 1.5em;
  margin: 2em 0;
  border-left: 4px solid #3b82f6;
  border-radius: 6px;
}
body.single .table-of-contents h2 {
  margin-top: 0;
  font-size: 1.2em;
  color: #1d4ed8;
}
body.single .table-of-contents ul {
  list-style: none;
  padding-left: 0;
}

/* === FAQ 卡片設計（手刻）=== */
body.single .faq-box {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 24px 20px;
  margin-bottom: 2em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
body.single .faq-box h4 {
  color: #f97316;
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 0.6em;
}
body.single .faq-box p {
  color: #333;
  line-height: 1.7;
  margin-bottom: 0.6em;
}

/* === 手機版排版優化：提高閱讀區寬度 === */
@media (max-width: 768px) {
  body.single .site-main,
  body.single .entry-content,
  body.single .page-content {
    width: 95% !important;
    max-width: none;
    padding: 32px 20px !important;
    font-size: 17px;
  }
}

/* === Rank Math FAQ Block 樣式（藍色卡片風格）=== */
body.single #rank-math-faq .rank-math-list-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 6px solid #1878DB;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  margin-bottom: 1.5em;
}

body.single #rank-math-faq .rank-math-question {
  color: #1878DB;
  font-size: 1.3em;
  font-weight: 700;
  margin: 0 0 0.4em 0;
}

body.single #rank-math-faq .rank-math-answer p {
  color: #334155;
  font-size: 1em;
  line-height: 1.7;
  margin-bottom: 0;
}

/* === 超連結樣式強化（含 hover）=== */
body.single a {
  color: #2563eb;
  text-decoration: underline;
  transition: all 0.2s ease-in-out;
}

body.single a:hover {
  color: #FF575A;
  font-weight: bold;
  text-decoration: none;
}

/* === 單篇文章內圖片置中顯示樣式 === */
body.single .entry-content img,
body.single .post img,
body.single .page-content img {
  display: block;
  margin: 2em auto; /* 上下留白，左右自動置中 */
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

body.single .post-thumbnail img {
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
