/* =========================================================
   巨擎升學教育中心｜升學專欄 blog.css（搭配 style.css）
   ========================================================= */

.post-container { max-width: 820px; }

/* ---------- 頁首區 ---------- */
.post-hero {
  color: #fff; padding: 28px 0 36px; position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 60%, #0f4fa8 100%);
}
.post-hero::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 45%; height: 6px; background: var(--stripes);
}
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: rgba(255, 255, 255, .75); margin-bottom: 16px; }
.breadcrumb a { color: rgba(255, 255, 255, .9); }
.post-cat {
  display: inline-block; margin: 0 0 10px; padding: 2px 12px; border-radius: var(--radius-pill);
  background: var(--yellow); color: var(--navy); font-size: .85rem; font-weight: 900;
}
.post-title { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 900; line-height: 1.3; letter-spacing: .02em; margin-bottom: 12px; }
.post-meta, .post-lead { margin: 0; color: rgba(255, 255, 255, .85); font-size: .92rem; }
.post-lead { font-size: 1rem; max-width: 40em; }

/* ---------- 摘要、目錄 ---------- */
.post-summary, .post-toc {
  margin: 28px 0 0; padding: 20px 22px; border-radius: var(--radius);
}
.post-summary { background: var(--blue-50); border-left: 6px solid var(--blue); }
.post-toc { background: var(--bg-alt); border: 1px solid var(--border); }
.post-summary h2, .post-toc h2 { font-size: 1.05rem; font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.post-summary ul, .post-toc ol { padding-left: 1.3em; }
.post-summary li, .post-toc li { margin: 4px 0; }
.post-toc a { color: var(--ink); text-decoration: none; font-weight: 500; }
.post-toc a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- 內文 ---------- */
.post-body { padding: 8px 0 0; font-size: 1.05rem; line-height: 1.9; }
.post-body h2 {
  margin: 44px 0 16px; padding-left: 14px; border-left: 6px solid var(--orange);
  font-size: clamp(1.3rem, 4.5vw, 1.6rem); font-weight: 900; color: var(--navy);
  scroll-margin-top: calc(var(--header-h-small) + 16px);
}
.post-body h3 { margin: 28px 0 10px; font-size: 1.15rem; font-weight: 900; color: var(--navy-700); }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.post-body li { margin: 6px 0; }
.post-body strong { color: var(--navy); background: linear-gradient(transparent 62%, rgba(255, 201, 40, .45) 62%); }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: .95rem; line-height: 1.6; }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-wrap thead th { background: var(--navy); color: #fff; font-weight: 700; white-space: nowrap; }
.table-wrap tbody th { background: var(--bg-alt); color: var(--navy); font-weight: 700; white-space: nowrap; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }

.callout {
  margin: 0 0 1.4em; padding: 14px 18px; border-radius: var(--radius-sm);
  background: #fff7e8; border: 1px solid #ffe0b0; border-left: 6px solid var(--orange);
}
.callout p { margin: 0 0 .5em; }
.callout p:last-child { margin: 0; }

/* ---------- 常見問題、來源 ---------- */
.post-faq, .post-sources, .post-related { margin-top: 48px; }
.post-faq h2, .post-sources h2, .post-related h2, .blog-cat-title {
  font-size: 1.4rem; font-weight: 900; color: var(--navy); margin-bottom: 16px;
}
.post-faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: #fff; }
.post-faq summary {
  cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; color: var(--navy); position: relative; list-style: none;
}
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--orange); font-weight: 900;
}
.post-faq details[open] summary::after { content: "−"; }
.post-faq details p { margin: 0; padding: 0 16px 16px; color: var(--ink-soft); }
.post-sources ul { padding-left: 1.3em; font-size: .95rem; }
.post-note { margin-top: 10px; font-size: .88rem; color: var(--muted); }

/* ---------- CTA ---------- */
.post-cta {
  margin-top: 48px; padding: 28px 24px; border-radius: var(--radius); text-align: center;
  background: linear-gradient(160deg, var(--navy), var(--navy-700)); color: #fff;
}
.post-cta h2 { font-size: 1.4rem; font-weight: 900; margin-bottom: 8px; }
.post-cta p { color: rgba(255, 255, 255, .85); }
.post-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.blog-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.blog-chips a {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 700; text-decoration: none;
}
.blog-chips a:hover { background: rgba(255, 255, 255, .22); }
.blog-chips span { background: var(--yellow); color: var(--navy); border-radius: var(--radius-pill); padding: 0 8px; font-size: .8rem; }
.blog-cat-title { scroll-margin-top: calc(var(--header-h-small) + 16px); }

/* ---------- 文章卡片 ---------- */
.blog-cat { margin-top: 36px; }
.post-grid { list-style: none; display: grid; gap: 16px; }
.post-card a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.post-card a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue); }
.post-card-cat { font-size: .8rem; font-weight: 900; color: var(--orange-600); }
.post-card-title { font-size: 1.12rem; font-weight: 900; color: var(--navy); line-height: 1.45; }
.post-card-desc { font-size: .92rem; color: var(--ink-soft); line-height: 1.7; }
.post-card time { margin-top: auto; font-size: .82rem; color: var(--muted); }

.blog-page main { padding-bottom: 64px; }

/* 首頁的升學專欄區塊 */
#blog .post-grid { gap: 16px; }
.blog-more { margin: 28px 0 0; text-align: center; }

@media (min-width: 768px) {
  .post-hero { padding: 40px 0 48px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  #blog .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-cta { padding: 36px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card a:hover { transform: none; }
}
