/* ================================================================
   blog.css — 文章分類頁 + 單篇文章
   設計語言對齊站台（品牌色、卡片、排版）
================================================================ */

/* 麵包屑 / archive banner 樣式已移至全域 style.css */
.gc-archive-list { padding: 48px 0 64px; }
.gc-archive-empty { text-align: center; color: var(--gc-gray-dark); padding: 48px 0; }

/* ── 文章卡片網格（分類頁 / 相關文章共用）─────────────── */
.gc-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.gc-post-card {
  background: #fff;
  border: 1px solid var(--gc-surface);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: transform var(--gc-ease), box-shadow var(--gc-ease);
}
.gc-post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.1); }
.gc-post-card-link { display: flex; flex-direction: column; height: 100%; }

.gc-post-thumb { overflow: hidden; line-height: 0; }
.gc-post-thumb img {
  width: 100%; height: auto;
  aspect-ratio: 1200 / 720;
  object-fit: cover;
  transition: transform .35s ease;
}
.gc-post-card:hover .gc-post-thumb img { transform: scale(1.05); }
.gc-post-thumb-placeholder { width: 100%; aspect-ratio: 1200/720; background: linear-gradient(135deg, var(--gc-surface), #D8E0EA); }

.gc-post-info { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
/* 多分類徽章容器：自動換行，避免跑版 */
.gc-post-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gc-post-cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--gc-blue);
  background: rgba(0,69,128,.08);
  padding: 3px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.gc-post-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gc-post-card:hover .gc-post-card-title { color: var(--gc-blue); }
.gc-post-excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: var(--gc-gray-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.gc-post-date { font-size: 13px; color: var(--gc-gray-light); margin-top: auto; }

/* ── 分頁 ─────────────────────────────────────────── */
.gc-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.gc-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--gc-surface);
  background: #fff;
  color: var(--gc-text);
  font-size: 15px;
  font-weight: 500;
  transition: background var(--gc-ease), color var(--gc-ease), border-color var(--gc-ease);
}
.gc-pagination .page-numbers:hover { border-color: var(--gc-blue); color: var(--gc-blue); }
.gc-pagination .page-numbers.current {
  background: var(--gc-blue);
  border-color: var(--gc-blue);
  color: #fff;
}
.gc-pagination .dots { border: none; background: transparent; }

/* ================================================================
   單篇文章
================================================================ */
.gc-single-inner { max-width: 820px; margin-inline: auto; }

/* 文章頭 */
.gc-single-head { padding: 36px 0 24px; }
/* 單頁多分類徽章容器：自動換行 */
.gc-single-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.gc-single-cat {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--gc-blue);
  padding: 5px 16px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background var(--gc-ease);
}
.gc-single-cat:hover { background: var(--gc-blue-bright); }
.gc-single-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.45;
  color: var(--gc-text);
  letter-spacing: .5px;
  margin-bottom: 16px;
}
.gc-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--gc-gray-dark);
}
.gc-single-readtime { position: relative; padding-left: 18px; }
.gc-single-readtime::before { content: '·'; position: absolute; left: 4px; }

/* 特色圖 */
.gc-single-featured { margin: 8px 0 32px; }
.gc-single-featured img {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  border-radius: 16px;
  aspect-ratio: 1200 / 720;
  object-fit: cover;
}

/* 內文排版 */
.gc-single-body { padding-bottom: 48px; }
.gc-single-content {
  font-size: 17px;
  line-height: 2;
  color: #2d2f2d;
}
.gc-single-content > * + * { margin-top: 1.1em; }
.gc-single-content p { margin: 0 0 1.1em; }
.gc-single-content a { color: var(--gc-blue); text-decoration: underline; text-underline-offset: 2px; }
.gc-single-content a:hover { color: var(--gc-blue-bright); }

.gc-single-content h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--gc-text);
  margin: 1.8em 0 .8em;
  padding: 10px 0 10px 16px;
  border-left: 6px solid var(--gc-blue);
}
.gc-single-content h3 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gc-blue);
  margin: 1.6em 0 .6em;
  padding-left: 12px;
  border-left: 4px solid var(--gc-yellow);
}
.gc-single-content h4 { font-size: 18px; font-weight: 600; color: var(--gc-text); margin: 1.4em 0 .5em; }
.gc-single-content ul,
.gc-single-content ol { margin: 0 0 1.1em; padding-left: 1.5em; }
.gc-single-content ul li { list-style: disc; margin-bottom: .4em; }
.gc-single-content ol li { list-style: decimal; margin-bottom: .4em; }
.gc-single-content img { border-radius: 12px; margin: 1.2em auto; max-width: 100%; height: auto; }
.gc-single-content figure { max-width: 100%; margin-inline: auto; }
.gc-single-content figure img { display: block; }
.gc-single-content blockquote {
  border-left: 4px solid var(--gc-blue);
  background: var(--gc-surface);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  color: var(--gc-gray-dark);
  margin: 1.4em 0;
}
.gc-single-content strong { font-weight: 700; color: var(--gc-text); }
.gc-single-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.gc-single-content th,
.gc-single-content td { border: 1px solid var(--gc-pale, #CFD2D3); padding: 10px 14px; text-align: left; }
.gc-single-content th { background: var(--gc-surface); font-weight: 600; }

/* ez-toc 目錄美化 */
.gc-single-content #ez-toc-container,
.gc-single-body .ez-toc-v2_0_77 {
  background: var(--gc-surface);
  border: 1px solid var(--gc-pale, #CFD2D3);
  border-radius: 12px;
  padding: 18px 22px;
}

/* 標籤 */
.gc-single-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--gc-surface); }
.gc-tag-label { font-size: 14px; color: var(--gc-gray-dark); }
.gc-single-tags a, .gc-single-tags .gc-tag a {
  display: inline-block;
  font-size: 13px;
  color: var(--gc-blue);
  background: rgba(0,69,128,.07);
  padding: 4px 14px;
  border-radius: 100px;
  transition: background var(--gc-ease);
}
.gc-single-tags a:hover { background: rgba(0,69,128,.15); }

/* CTA */
.gc-single-cta {
  background: linear-gradient(135deg, var(--gc-blue) 0%, var(--gc-blue-bright) 100%);
  padding: 56px 0;
  text-align: center;
  color: #fff;
}
.gc-single-cta-title { font-size: clamp(22px, 3vw, 28px); font-weight: 700; color: #fff; margin-bottom: 10px; }
.gc-single-cta p { color: rgba(255,255,255,.85); margin-bottom: 24px; }
.gc-single-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.gc-single-cta .gc-btn--white { background: #fff; }
.gc-single-cta .gc-btn--white:hover { background: var(--gc-yellow); }

/* 上下篇導覽 */
.gc-single-nav { padding: 40px 0; }
.gc-single-nav-inner { display: flex; justify-content: space-between; gap: 16px; max-width: 820px; margin-inline: auto; }
.gc-single-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 48%;
  padding: 16px 20px;
  border: 1px solid var(--gc-surface);
  border-radius: 12px;
  transition: border-color var(--gc-ease), background var(--gc-ease);
}
.gc-single-nav-link:hover { border-color: var(--gc-blue); background: var(--gc-surface); }
.gc-single-nav-next { text-align: right; margin-left: auto; }
.gc-single-nav-dir { font-size: 13px; color: var(--gc-gray-dark); }
.gc-single-nav-t {
  font-size: 15px; font-weight: 600; color: var(--gc-text);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

/* 相關文章 */
.gc-related { padding: 56px 0 72px; background: var(--gc-surface); }

/* ── RWD ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gc-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .gc-posts-grid { grid-template-columns: 1fr; }
  .gc-archive-head { padding: 28px 0; }
  .gc-archive-list { padding: 32px 0 48px; }
  .gc-single-content { font-size: 16px; }
  .gc-single-content h2 { font-size: 22px; }
  .gc-single-content h3 { font-size: 19px; }
  .gc-single-nav-inner { flex-direction: column; }
  .gc-single-nav-link { max-width: 100%; }
  .gc-single-nav-next { text-align: left; }
}
