/* ══════════════════════════════════════════
   咖啡日常 · 星巴克風格樣式表
   深森林綠 + 暖金色 + 米白紙質感
   ══════════════════════════════════════════ */

/* ── CSS 變數（主題色 + 字體）──
   這些變數的「值」集中在 site.config.js（theme.colors / theme.fontVars），
   建構時會自動注入頁面 <head> 的 :root。換主題請改 site.config.js，不要改這裡。
   下方所有 var(--sb-forest) 等用法維持不變。 */

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: var(--sans);
  color: var(--sb-ink);
  background: var(--sb-cream);
  line-height: 1.85;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sb-green); text-decoration: none; }

/* ══════════════════════════════════════════
   導覽列
   ══════════════════════════════════════════ */
.site-nav {
  background: var(--sb-forest);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: stretch;
  padding: 0 32px; height: 64px;
  /* overflow: hidden 已移除 — nav-cats 內部自行處理 overflow，
     移除後搜尋結果下拉選單才能正確顯示在 nav 外側 */
}
.brand {
  font-family: var(--display);
  font-size: 1.5rem; font-weight: 600; font-style: italic;
  color: #fff; letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  flex-shrink: 0;    /* 品牌名永遠不壓縮 */
  padding-right: 48px;  /* ↑ 增加品牌與分類間距 */
}
.brand:hover { color: rgba(255,255,255,.85); }
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sb-gold);
  box-shadow: 0 0 0 3px rgba(203,162,88,.3);
  flex-shrink: 0;
}
.nav-back {
  font-size: .8rem; color: rgba(255,255,255,.6);
  letter-spacing: 1px; text-decoration: none;
  transition: color .2s;
}
.nav-back:hover { color: var(--sb-gold); }

/* ══════════════════════════════════════════
   首頁 Hero — 背景照片版型
   ══════════════════════════════════════════ */
.home-hero {
  color: #fff;
  padding: 40px 32px;
  text-align: center;
  position: relative; overflow: hidden;
  height: 540px;              /* 品牌 Hero：比文章頁高，給品牌名稱更多呼吸空間 */
  display: flex; align-items: center; justify-content: center;
}

/* 背景照片層 */
.home-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-color: var(--sb-forest); /* 無照片時的備用底色 */
}
.home-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
/* 預留框狀態 */
.home-hero-bg .hero-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: rgba(255,255,255,.18);
  font-size: .7rem; letter-spacing: 2.5px; text-transform: uppercase;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.02) 0px, rgba(255,255,255,.02) 1px,
    transparent 1px, transparent 12px
  );
}
.home-hero-bg .hero-ph svg { opacity: .2; }

/* 深色遮罩層：全面壓暗底圖 */
.home-hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: rgba(10,24,18,.18);
  pointer-events: none;
}
/* 文字區漸層聚焦 */
.home-hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%,
      rgba(0,0,0,.45) 0%, transparent 75%),
    linear-gradient(to bottom,
      rgba(0,0,0,.25) 0%, transparent 30%,
      transparent 70%, rgba(0,0,0,.3) 100%);
  pointer-events: none;
}

.home-hero-inner {
  position: relative; z-index: 3;   /* 高於 ::before 與 ::after */
  max-width: 640px; margin: 0 auto;
  animation: fadeUp .9s ease both;
}
.home-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--sb-gold); font-weight: 500; margin-bottom: 20px;
}
.home-hero-eyebrow::before, .home-hero-eyebrow::after {
  content: ''; width: 24px; height: 1px; background: var(--sb-gold); opacity: .6;
}
/* ── 品牌 Hero：品牌名 / 副標語 / 英文小標 ── */
.home-brand-name {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 600; color: #fff;
  letter-spacing: .03em; line-height: 1.1;
  margin: 0 0 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,.6), 0 1px 4px rgba(0,0,0,.8);
}
.home-tagline {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #fff; font-weight: 400;
  letter-spacing: .06em; line-height: 1.7;
  margin: 0 0 18px;
  text-shadow: 0 1px 10px rgba(0,0,0,.65), 0 1px 3px rgba(0,0,0,.8);
  opacity: .95;
}
.home-hero-en {
  font-family: var(--display);
  font-size: .82rem; letter-spacing: 7px;
  text-transform: uppercase; color: var(--sb-gold);
  opacity: .88; margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* home-hero h1 已從 HTML 移除，保留 CSS 供相容 */
.home-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 600; font-style: italic;
  color: #fff; letter-spacing: 1px;
  margin-bottom: 16px; line-height: 1.15;
}
.home-hero h1 em { opacity: .7; font-size: .65em; }
.home-hero-sub {
  font-family: var(--display);
  font-size: 1.55rem;
  font-style: italic;
  color: #fff;                              /* 實白，提升可讀性 */
  font-weight: 400; letter-spacing: .3px;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.75);
}

/* ══════════════════════════════════════════
   品牌說明區（兩欄交錯圖文）
   ══════════════════════════════════════════ */
.brand-intro {
  background: var(--sb-cream);          /* 與頁面大背景一致，無色差 */
  overflow: hidden;
}
.brand-intro-deco-top {
  max-width: 900px; margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--sb-gold) 35%, var(--sb-gold) 65%, transparent 100%);
  opacity: .5;
}
.brand-intro-row {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 3fr;   /* 圖約 40%、文約 60% */
  gap: 44px; padding: 56px 32px;
  align-items: center;
}
.brand-intro-row--flip { grid-template-columns: 3fr 2fr; }  /* 右圖左文 */
.brand-intro-text p {
  font-family: var(--serif);
  font-size: 1.02rem; line-height: 1.95;
  color: var(--sb-ink); margin: 0 0 22px;
}
.brand-intro-text p:last-child { margin-bottom: 0; }
.brand-intro-photo { position: relative; }
.brand-intro-photo img {
  width: 100%; height: 240px;
  object-fit: cover; border-radius: 6px;
  display: block;
  box-shadow: 0 16px 44px -18px rgba(30,57,50,.30);
}
.brand-intro-photo::after {
  content: '';
  position: absolute; inset: 11px -11px -11px 11px;
  border: 1px solid rgba(203,162,88,.30);
  border-radius: 6px; z-index: -1;
  pointer-events: none;
}
.brand-intro-divider {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 0 32px;
}
.brand-intro-divider::before,
.brand-intro-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(203,162,88,.45), transparent);
}
.brand-intro-divider span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sb-gold); opacity: .65; flex-shrink: 0;
}
.brand-hl {
  font-family: var(--display), 'Noto Serif TC', serif;
  font-style: italic;
}

/* ══════════════════════════════════════════
   區塊開場（kicker + 標題 + 引導語）— 分類區與最新文章區共用
   ══════════════════════════════════════════ */
.sec-kicker {
  display: flex; align-items: center; gap: 10px;
  color: var(--sb-gold); font-family: var(--sans);
  font-size: 13px; letter-spacing: .18em; margin: 0 0 8px;
}
.sec-kicker::before {
  content: ''; height: 1px; flex: 0 0 28px;
  background: repeating-linear-gradient(90deg, var(--sb-gold) 0 3px, transparent 3px 7px);
}
.sec-kicker--center { justify-content: center; }
.sec-kicker--center::after {
  content: ''; height: 1px; flex: 0 0 28px;
  background: repeating-linear-gradient(90deg, var(--sb-gold) 0 3px, transparent 3px 7px);
}
.sec-title {
  font-family: var(--serif); color: var(--sb-forest);
  font-size: 26px; font-weight: 700; margin: 0; letter-spacing: .04em;
}
.sec-title--center { text-align: center; }
.sec-sub {
  text-align: center; color: var(--sb-text-soft); font-weight: 500;
  font-size: 15px; margin: 6px 0 28px; line-height: 1.7;
}

/* ══════════════════════════════════════════
   分類導覽卡片（圖示 + 箭頭）
   ══════════════════════════════════════════ */
.cat-nav-section {
  background: var(--sb-cream);
  max-width: 1060px; margin: 0 auto;
  padding: 48px 32px 8px;
}
.cat-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.cat-nav-card {
  position: relative;
  background: var(--sb-warm-white);
  border: 1px solid var(--sb-border);
  border-radius: 14px;
  padding: 20px 18px 18px;
  text-decoration: none; color: inherit;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; gap: 12px;
}
.cat-nav-card:hover {
  box-shadow: 0 8px 22px rgba(30,57,50,.12);
  transform: translateY(-4px);
  border-color: var(--sb-gold);
}
.cat-nav-ic {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(203,162,88,.16); color: var(--sb-gold);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  transition: background .2s ease, color .2s ease;
}
.cat-nav-card:hover .cat-nav-ic { background: var(--sb-forest); color: #e7d2ac; }
.cat-nav-name {
  font-family: var(--serif);
  font-size: 17px; font-weight: 500;
  color: var(--sb-forest); margin: 0; letter-spacing: .02em;
}
.cat-nav-desc {
  font-size: 12px; color: var(--sb-text-soft); font-weight: 500;
  line-height: 1.6; margin: 0; min-height: 32px;
}
.cat-nav-arrow {
  align-self: flex-end; color: #cdc6ba; font-size: 17px;
  transition: color .2s ease, transform .2s ease;
}
.cat-nav-card:hover .cat-nav-arrow { color: var(--sb-gold); transform: translateX(3px); }

/* ══════════════════════════════════════════
   首頁主體：分類篩選 + 文章卡
   ══════════════════════════════════════════ */
.home-main {
  max-width: 1060px; margin: 0 auto;
  padding: 36px 32px 80px;
  animation: fadeUp 1s ease .12s both;
}

/* 分類區塊：預設隱藏，只有點分類連結時才顯示對應分類 */
.cat-section { display: none; margin-bottom: 52px; }
.cat-heading {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 700;
  color: var(--sb-forest); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--sb-border);
}
.cat-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sb-gold); flex-shrink: 0;
}

/* ── 最新文章區開場：左標題 + 右「看全部文章」── */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin: 0 0 28px; flex-wrap: wrap; gap: 12px;
}
.sec-more {
  color: var(--sb-gold); font-family: var(--sans);
  font-size: 14px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .18s ease;
}
.sec-more:hover { gap: 10px; }

/* 文章卡片網格（新版：tag + 標題 + 摘要 + 頁尾箭頭） */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.news-card {
  position: relative;
  background: var(--sb-warm-white);
  border: 1px solid var(--sb-border);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex; flex-direction: column;
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.news-card:hover {
  transform: translateY(-4px); border-color: var(--sb-gold);
  box-shadow: 0 8px 22px rgba(30,57,50,.12);
}
/* 左側金色細條，hover 才顯現 */
.news-card::before {
  content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px;
  border-radius: 3px; background: var(--sb-gold);
  opacity: 0; transition: opacity .18s ease;
}
.news-card:hover::before { opacity: 1; }
.news-tag {
  color: var(--sb-gold); font-size: 12px; letter-spacing: .06em; margin: 0 0 10px;
}
.news-h {
  font-family: var(--serif); color: var(--sb-forest);
  font-size: 18px; font-weight: 500; line-height: 1.5; margin: 0 0 10px;
}
.news-excerpt {
  color: var(--sb-text-soft); font-weight: 500; font-size: 13px; line-height: 1.7; margin: 0 0 18px;
  /* 只顯示前 3 行，超過以省略號截斷 */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid #efeae0;
}
.news-date { color: var(--sb-text-soft); font-weight: 500; font-size: 12px; }
.news-arrow {
  color: #cdc6ba; font-size: 16px;
  transition: color .18s ease, transform .18s ease;
}
.news-card:hover .news-arrow { color: var(--sb-gold); transform: translateX(3px); }

/* ══════════════════════════════════════════
   文章頁 Hero — 背景照片版型
   ══════════════════════════════════════════ */
.hero {
  color: #fff;
  padding: 40px 32px;        /* ← 與 home-hero 完全相同 */
  text-align: center;
  position: relative; overflow: hidden;
  height: 400px;             /* ← 與 home-hero 完全相同的「固定」高度 */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* 背景照片層 */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-color: var(--sb-forest); /* 無照片時的備用底色 */
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
/* 預留框狀態 */
.hero-bg .hero-ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: rgba(255,255,255,.18);
  font-size: .7rem; letter-spacing: 2.5px; text-transform: uppercase;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.02) 0px, rgba(255,255,255,.02) 1px,
    transparent 1px, transparent 12px
  );
}
.hero-bg .hero-ph svg { opacity: .2; }

/* 深色遮罩層：全面壓暗底圖 */
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: rgba(10,24,18,.18);   /* 深黑綠，47% 不透明 */
  pointer-events: none;
}
/* 文字區漸層聚焦：中央偏深，往邊緣漸透 */
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%,
      rgba(0,0,0,.45) 0%, transparent 75%),
    linear-gradient(to bottom,
      rgba(0,0,0,.25) 0%, transparent 30%,
      transparent 70%, rgba(0,0,0,.3) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative; z-index: 3;   /* 高於 ::before(1) 與 ::after(1) */
  max-width: 700px; margin: 0 auto;
  animation: fadeUp .9s ease both;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .72rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--sb-gold); font-weight: 500; margin-bottom: 18px;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: ''; width: 24px; height: 1px; background: var(--sb-gold); opacity: .6;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 700; line-height: 1.3;
  color: #fff; letter-spacing: .3px; margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.7);
}
.hero-sub {
  font-family: var(--display);
  font-size: 1.3rem; font-style: italic;
  color: #fff;                          /* 實白，不再半透明 */
  line-height: 1.6; margin-bottom: 18px;
  text-shadow: 0 1px 8px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.75);
}
.hero-meta {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: .78rem; color: rgba(255,255,255,.5);
  letter-spacing: 1px; margin-bottom: 8px;
}
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--sb-gold); }
.hero-author {
  font-size: .82rem; color: rgba(212,233,226,.7); letter-spacing: 1.5px;
}
.hero-author strong { color: var(--sb-gold); font-weight: 400; }

/* .hero-photo 已由 .hero-bg 全幅背景取代，保留定義供相容 */
.hero-photo { display: none; }
.photo-placeholder { display: none; }
.photo-caption { display: none; }

/* ══════════════════════════════════════════
   文章主體
   ══════════════════════════════════════════ */
/* ── 麵包屑導覽（全站共用，文章頁 + 首頁分類篩選）── */
.breadcrumb {
  /* 版型 */
  max-width: 780px; margin: 0 auto;
  padding: 28px 32px 0;
  /* 單列排版，不換行 */
  display: flex; align-items: center; flex-wrap: nowrap;
  overflow: hidden;                      /* 防止撐開父容器 */
  /* 字型 — 統一 14px */
  font-family: var(--sans); font-size: 14px; font-weight: 400;
  color: #888; letter-spacing: .3px; line-height: 1.5;
}
/* 首頁麵包屑：僅覆寫寬度與 padding，其餘繼承 .breadcrumb */
#home-breadcrumb {
  max-width: 1060px; padding: 28px 32px 0;
}
.breadcrumb a {
  color: #888; text-decoration: none;
  white-space: nowrap;                   /* 「首頁」「分類」固定不折行 */
  flex-shrink: 0;
  transition: color .18s;
}
.breadcrumb a:hover { color: var(--sb-green); text-decoration: underline; }
.breadcrumb .bc-sep {
  margin: 0 6px; color: #bbb; font-size: 14px;
  flex-shrink: 0; user-select: none;
}
.breadcrumb [aria-current="page"] {
  color: #555; font-weight: 500;
  /* 長標題單行截斷 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;                          /* flex 子元素縮短的必要條件 */
}

.article-wrap {
  max-width: 780px; margin: 0 auto;
  padding: 72px 32px 60px;
  animation: fadeUp 1s ease .15s both;
}
.article-lead {
  font-family: var(--serif);
  font-size: 1.18rem; line-height: 2;
  color: var(--sb-forest); font-weight: 400;
  margin-bottom: 52px; padding-bottom: 40px;
  border-bottom: 1px solid var(--sb-border);
}

/* H2 */
article h2 {
  font-family: var(--serif);
  font-size: 1.8rem; font-weight: 700;   /* ↑ 1.55 → 1.8 */
  color: var(--sb-forest);
  margin: 56px 0 18px; letter-spacing: .3px;
  display: flex; align-items: center; gap: 14px;
}
article h2::before {
  content: '';
  display: inline-block; width: 32px; height: 2px;
  background: var(--sb-green); flex-shrink: 0;
}

/* H3 */
article h3 {
  font-family: var(--serif);
  font-size: 1.3rem; font-weight: 600;   /* ↑ 1.1 → 1.3 */
  color: var(--sb-forest); margin: 32px 0 10px;
}

/* 內文：文字加深 */
article p { margin: 0 0 20px; color: #111; font-weight: 400; font-size: var(--body-text-size); line-height: 1.95; }
article strong {
  font-weight: 700;                       /* Noto Sans TC 700 現已正確載入 */
  color: var(--sb-forest);
  font-synthesis: none;                  /* 禁止假粗體，確保使用真實 700 字重 */
  -webkit-font-smoothing: antialiased;
}

/* 清單 */
article ul, article ol {
  padding-left: 1.6rem; margin: 0 0 20px;
}
article li { margin-bottom: 8px; font-size: 1.03rem; color: #111; font-weight: 400; line-height: 1.9; }

/* 表格 */
article table {
  width: 100%; border-collapse: collapse;
  margin: 20px 0 28px; font-size: .9rem;
}
article th {
  background: var(--sb-forest); color: #fff;
  padding: 10px 16px; text-align: left;
  font-family: var(--serif); font-weight: 600;
}
article td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--sb-border);
  font-weight: 400;
  color: #111;
  font-size: .97rem;
}
article tr:nth-child(even) td { background: rgba(212,233,226,.2); }

/* ── 提示框 ── */
.tip {
  background: var(--sb-light-green);
  border-left: 4px solid var(--sb-green);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px; margin: 32px 0;
}
.tip-label {
  font-size: .68rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--sb-green); font-weight: 500; margin-bottom: 8px;
}
.tip p { margin: 0; font-size: .94rem; color: var(--sb-forest); }

/* ── 卡片網格 ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px; margin: 28px 0 36px;
}
.card {
  background: var(--sb-warm-white);
  border: 1px solid var(--sb-border);
  border-radius: 8px;
  padding: 22px 16px; text-align: center;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sb-shadow); }
.card-ico { font-size: 1.8rem; margin-bottom: 10px; }
.card-name {
  font-family: var(--serif); font-weight: 600;
  color: var(--sb-forest); font-size: .96rem; margin-bottom: 6px;
}
.card-desc { font-size: .78rem; color: var(--sb-muted); line-height: 1.6; }

/* ── 引言區塊 ── */
.pullquote {
  margin: 44px 0; padding: 36px 40px;
  border-top: 1px solid var(--sb-gold);
  border-bottom: 1px solid var(--sb-gold);
  text-align: center;
}
.pullquote p {
  font-family: var(--display);
  font-size: 1.5rem; font-style: italic;
  color: var(--sb-forest); line-height: 1.65; margin: 0;
}

/* ── FAQ ── */
.faq { margin-top: 16px; }
.faq details {
  background: var(--sb-warm-white);
  border: 1px solid var(--sb-border);
  border-radius: 8px;
  margin-bottom: 10px; overflow: hidden;
  transition: box-shadow .2s;
}
.faq details[open] { box-shadow: var(--sb-shadow); }
.faq summary {
  cursor: pointer; padding: 18px 22px;
  font-family: var(--serif); font-weight: 600;
  color: var(--sb-forest); font-size: .98rem;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; color: var(--sb-green);
  font-size: 1.4rem; font-weight: 300;
  transition: transform .28s; flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans {
  padding: 0 22px 22px; color: #1c1c1c;
  font-weight: 400; font-size: 1rem; line-height: 1.95;
}

/* ── 結尾 CTA ── */
.closing {
  background: var(--sb-forest);
  border-radius: 12px; margin-top: 64px;
  padding: 52px 40px; text-align: center;
  box-shadow: var(--sb-shadow);
  position: relative; overflow: hidden;
}
.closing::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 120%, rgba(0,112,74,.4) 0%, transparent 70%);
  pointer-events: none;
}
.closing-inner { position: relative; z-index: 1; }
.closing h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.65rem; color: #fff;
  margin-bottom: 14px; letter-spacing: .3px;
}
.closing h2::before { display: none; } /* 覆蓋 article h2::before */
.closing p { color: rgba(212,233,226,.85); max-width: 440px; margin: 0 auto 28px; font-size: .97rem; }
.btn {
  display: inline-block;
  background: var(--sb-green); color: #fff;
  text-decoration: none; padding: 14px 36px;
  border-radius: 50px; font-size: .88rem; letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 500;
  transition: background .25s, transform .25s;
  box-shadow: 0 8px 24px -8px rgba(0,112,74,.6);
}
.btn:hover { background: #00a862; transform: translateY(-2px); color: #fff; }

/* ── 延伸閱讀 ── */
.related {
  max-width: 780px; margin: 0 auto;
  padding: 48px 32px 0;
  border-top: 1px solid var(--sb-border);
}
.related-label {
  font-size: 1.6rem;           /* ↑↑ 明顯放大（原 1.15rem） */
  font-family: var(--serif); font-weight: 700;
  color: var(--sb-forest);
  margin-bottom: 26px;
  display: flex; align-items: center; gap: 12px;
}
.related-label::before {       /* 左側金色橫線，與 h2 風格一致 */
  content: '';
  display: inline-block; width: 28px; height: 2px;
  background: var(--sb-gold); flex-shrink: 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding-bottom: 48px;
}
.related-card {
  background: var(--sb-warm-white);
  border: 1px solid var(--sb-border);
  border-radius: 8px; overflow: hidden;
  text-decoration: none; transition: box-shadow .2s;
}
.related-card:hover { box-shadow: var(--sb-shadow); }
.related-thumb {
  height: 80px; background: var(--sb-light-green);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--sb-green); font-weight: 500;
}
.related-body { padding: 18px 20px 20px; }
/* 卡片標題：.related-body span 的 specificity(0,1,1) 高於 .related-title(0,1,0)，
   這條才是真正生效的規則，因此字級直接改在這裡 */
/* .related-body span 是實際勝出的規則（specificity 0,1,1 高於 .related-title 0,1,0）
   字級沿用內文段落 var(--body-text-size)，與 article p 完全一致 */
.related-body span {
  font-family: var(--sans); font-weight: 400;
  color: #111; font-size: var(--body-text-size); line-height: 1.95;
  display: block; margin-bottom: 0;
}
/* 同步 .related-title 本身，避免日後 HTML 結構改動時失準 */
.related-title { font-size: var(--body-text-size); }

/* ══════════════════════════════════════════
   Footer
   ══════════════════════════════════════════ */
footer {
  background: var(--sb-forest);
  color: rgba(212,233,226,.5);
  text-align: center;
  padding: 36px 24px;
  font-size: .75rem; letter-spacing: 1.5px;
  margin-top: 60px;
}
footer strong {
  color: var(--sb-gold); font-weight: 400;
  font-family: var(--display), 'Noto Serif TC', serif;
  font-style: italic;
}

/* ══════════════════════════════════════════
   動畫
   ══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════
   RWD
   ══════════════════════════════════════════ */
/* 平板：分類 3 欄、文章 2 欄 */
@media (max-width: 980px) {
  .cat-nav-inner { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  /* 手機：改用 auto 高度 + 下限，避免長標題在固定高度下被裁切 */
  .home-hero { padding: 44px 20px 40px; height: auto; min-height: 400px; }
  .news-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 20px 40px; height: auto; min-height: 320px; }
  /* 品牌說明區：單欄堆疊，照片一律在文字上方 */
  .brand-intro-row,
  .brand-intro-row--flip { grid-template-columns: 1fr; gap: 24px; padding: 40px 20px; }
  .brand-intro-row--flip .brand-intro-photo { order: -1; }
  .brand-intro-photo::after { display: none; }
  .brand-intro-photo img { height: 200px; }
  .cat-nav-section { padding: 36px 20px 0; }
  .cat-nav-inner { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .sec-title { font-size: 22px; }
  .home-main { padding: 28px 20px 70px; }
  .breadcrumb, #home-breadcrumb { padding: 20px 20px 0; }
  .article-wrap { padding: 48px 20px 40px; }
  .pullquote { padding: 28px 20px; }
  .pullquote p { font-size: 1.2rem; }
  .closing { padding: 40px 24px; }
  .nav-inner { padding: 0 20px; }
  article h2 { font-size: 1.3rem; }
  /* 手機縮小內文：改寫共用變數，讓 article p 與 .related-title 同步縮小、保持一致 */
  :root { --body-text-size: 1rem; }
}

/* ══════════════════════════════════════════
   導覽列分類（與品牌同一列，右側，可橫向捲動）
   ══════════════════════════════════════════ */
.nav-cats {
  display: flex; align-items: stretch;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;        /* 佔滿品牌與搜尋之間的空間 */
  /* 不設 justify-content，分類從左排起，搜尋固定在右 */
}
.nav-cats::-webkit-scrollbar { display: none; }

.nav-cat {
  display: flex; align-items: center;
  height: 64px; padding: 0 13px;
  font-family: var(--sans); font-size: .86rem;   /* ↑ 加大 */
  font-weight: 400; letter-spacing: .8px;
  text-transform: none;                          /* 去掉全大寫，中文更易讀 */
  color: rgba(255,255,255,.78);                  /* ↑ 加深，提升對比 */
  white-space: nowrap; text-decoration: none;
  flex-shrink: 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  box-sizing: border-box;
}
.nav-cat:hover  { color: rgba(255,255,255,.92); }
.nav-cat.active { color: var(--sb-gold); border-bottom-color: var(--sb-gold); }

/* 漢堡按鈕：桌機隱藏，手機顯示 */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  flex-shrink: 0;
  width: 40px; height: 40px;
  margin-left: auto;
  padding: 9px 8px;
  flex-direction: column; justify-content: center; gap: 5px;
  align-self: center;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px;
  background: #fff; border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════════════════════
   兩欄版面：主內容 + 側邊欄
   ══════════════════════════════════════════ */
.site-layout {
  max-width: 1160px; margin: 0 auto;
  padding: 0 32px;
  display: flex; gap: 44px; align-items: flex-start;
}
.site-main { flex: 1; min-width: 0; }

/* 首頁內容區（取代 .home-main 的 max-width 與 centering）*/
.home-content { padding: 52px 0 80px; animation: fadeUp 1s ease .12s both; }
.home-content .home-filter { margin-bottom: 40px; }

/* 文章頁的 article-wrap / related 在兩欄內不自行置中 */
.site-layout .article-wrap { max-width: none; padding-left: 0; padding-right: 0; }
.site-layout .related      { max-width: none; padding-left: 0; padding-right: 0; }

/* ── 側邊欄本體 ── */
.sidebar {
  width: 256px; flex-shrink: 0;
  position: sticky; top: 76px;
  padding-top: 52px;
}

.sb-block {
  background: var(--sb-warm-white);
  border: 1px solid var(--sb-border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.sb-label {
  font-size: .62rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--sb-gold); font-weight: 500; margin-bottom: 12px;
}

/* 搜尋框 */
.sb-search input {
  width: 100%; border: 1px solid var(--sb-border); border-radius: 6px;
  padding: 9px 12px; font-family: var(--sans); font-size: .88rem;
  font-weight: 300; color: var(--sb-ink); background: var(--sb-cream);
  outline: none; transition: border-color .2s; box-sizing: border-box;
}
.sb-search input:focus { border-color: var(--sb-green); }
.sb-search input::placeholder { color: var(--sb-muted); opacity: .8; }

/* 搜尋結果 */
.sb-results {
  margin-top: 6px; list-style: none;
  border: 1px solid var(--sb-border); border-radius: 6px;
  overflow: hidden; background: var(--sb-warm-white);
  box-shadow: var(--sb-shadow);
}
.sb-results a {
  display: block; padding: 10px 14px;
  font-family: var(--serif); font-size: .9rem; font-weight: 600;
  color: var(--sb-forest); text-decoration: none;
  border-bottom: 1px solid var(--sb-border);
  transition: background .15s;
}
.sb-results li:last-child a { border-bottom: none; }
.sb-results a:hover { background: var(--sb-light-green); }
.sb-results a span {
  display: block; font-size: .7rem; color: var(--sb-muted);
  font-family: var(--sans); font-weight: 400; margin-top: 2px;
}
.sb-no-result { padding: 10px 14px; font-size: .84rem; color: var(--sb-muted); font-style: italic; }

/* 分類標籤 */
.sb-cats { display: flex; flex-wrap: wrap; gap: 7px; }
.sb-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 50px;
  border: 1px solid var(--sb-border);
  font-family: var(--sans); font-size: .78rem; font-weight: 400;
  color: var(--sb-muted); background: var(--sb-cream);
  cursor: pointer; text-decoration: none; transition: all .2s;
}
.sb-tag:hover  { border-color: var(--sb-green); color: var(--sb-green); }
.sb-tag.active { background: var(--sb-forest); color: #fff; border-color: var(--sb-forest); }
.sb-tag em { font-style: normal; font-size: .68rem; opacity: .65; }

/* ══════════════════════════════════════════
   延伸閱讀：縮圖版卡片
   ══════════════════════════════════════════ */
/* 無圖時：純色分類標籤（fallback） */
.related-thumb {
  height: 72px; background: var(--sb-light-green);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: var(--body-text-size); font-weight: 400;
  letter-spacing: normal; text-transform: none;
  color: var(--sb-green);
}
/* 有圖時：縮圖容器 */
.related-thumb--img {
  position: relative; height: 120px;
  background: var(--sb-forest); overflow: hidden;
  display: block;                /* 取代 flex，讓 img 自然填滿 */
}
.related-thumb--img img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform .35s ease;
}
.related-card:hover .related-thumb--img img {
  transform: scale(1.04);        /* hover 微縮放，增添質感 */
}
/* 分類角標：浮在縮圖左下角 */
.related-cat-badge {
  position: absolute; bottom: 8px; left: 10px;
  background: rgba(10,24,18,.72);
  color: var(--sb-gold);
  font-family: var(--sans); font-size: .68rem;
  font-weight: 500; letter-spacing: 1.5px;
  padding: 3px 8px; border-radius: 3px;
  pointer-events: none;
}

/* ══════════════════════════════════════════
   導覽列搜尋框（與分類同一列，最右側）
   ══════════════════════════════════════════ */
.nav-search-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex; align-items: center;
  margin-left: 10px;
}
.nav-search-wrap input {
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  padding: 6px 14px 6px 32px;
  font-family: var(--sans); font-size: .82rem; font-weight: 300;
  color: #fff; outline: none;
  width: 148px;
  transition: width .28s ease, background .2s, border-color .2s;
}
.nav-search-wrap input:focus {
  width: 210px;
  background: rgba(255,255,255,.18);
  border-color: rgba(203,162,88,.55);
}
.nav-search-wrap input::placeholder { color: rgba(255,255,255,.45); }

/* 搜尋圖示（放大鏡輪廓） */
.nav-search-wrap::before {
  content: '';
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; pointer-events: none;
  border: 1.5px solid rgba(255,255,255,.45);
  border-radius: 50%;
  box-shadow: 3px 3px 0 -1px rgba(255,255,255,.3);
}

/* 搜尋結果下拉 */
.nav-search-results {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px; background: var(--sb-warm-white);
  border: 1px solid var(--sb-border); border-radius: 8px;
  list-style: none; overflow: hidden;
  box-shadow: var(--sb-shadow); z-index: 300;
}
.nav-search-results a {
  display: block; padding: 11px 16px;
  font-family: var(--serif); font-size: .95rem; font-weight: 600;
  color: var(--sb-forest); text-decoration: none;
  border-bottom: 1px solid var(--sb-border);
  transition: background .15s;
}
.nav-search-results li:last-child a { border-bottom: none; }
.nav-search-results a:hover { background: var(--sb-light-green); }
.nav-search-results a span {
  display: block; font-size: .72rem; color: var(--sb-muted);
  font-family: var(--sans); font-weight: 400; margin-top: 2px;
}
.nav-sr-empty { padding: 12px 16px; font-size: .88rem; color: var(--sb-muted); font-style: italic; }

/* ══════════════════════════════════════════
   RWD：手機版導覽列 — 漢堡選單（≤ 760px）
   桌機維持原狀；窄螢幕分類收進可展開的下拉選單
   ══════════════════════════════════════════ */
@media (max-width: 760px) {
  /* 顯示漢堡、品牌靠左、搜尋固定右側 */
  .nav-toggle { display: flex; }
  .brand { padding-right: 0; margin-right: auto; }

  /* nav-cats 變成從表頭下方展開的全寬下拉面板 */
  .nav-cats {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--sb-forest);
    overflow: hidden;
    max-height: 0;                 /* 收合 */
    border-top: 0 solid var(--sb-border);
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
    transition: max-height .3s ease;
    z-index: 99;
  }
  .nav-cats.open {
    max-height: 70vh;              /* 展開：足夠顯示全部分類 */
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav-cat {
    height: auto; padding: 14px 24px;
    font-size: .95rem; letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    border-left: 3px solid transparent;
  }
  .nav-cat.active {
    border-bottom-color: rgba(255,255,255,.06);
    border-left-color: var(--sb-gold);
    background: rgba(0,0,0,.18);
  }

  /* 搜尋框：保持在表頭右側、漢堡左方 */
  .nav-search-wrap { margin-left: 0; margin-right: 8px; order: 2; }
  .nav-toggle { order: 3; }
  .nav-search-wrap input       { width: 130px; font-size: .8rem; }
  .nav-search-wrap input:focus { width: 170px; }
  .nav-search-results          { width: 260px; right: 0; }
}

@media (max-width: 460px) {
  .nav-inner { padding: 0 14px; }
  .brand     { font-size: 1.15rem; }
  /* 搜尋框縮成圓形圖示，點擊展開 */
  .nav-search-wrap input        { width: 36px; padding: 6px; border-radius: 50%; }
  .nav-search-wrap input:focus  { width: 150px; padding: 6px 10px 6px 26px; border-radius: 20px; }
  .nav-search-wrap input::placeholder { opacity: 0; }
  .nav-search-wrap input:focus::placeholder { opacity: .45; }
  .nav-search-results { width: 230px; right: 0; }
}
