/* ===========================================================
   劉柏毅醫師 — 品牌色彩升級
   午夜藍（Midnight Navy）＋香檳金（Champagne Gold）＋白色
   中文字體：思源黑體 / 英文：Montserrat
   v=20250817
   =========================================================== */

:root {  --gray-600: #5a6a8a;

  /* Midnight Navy 系列 */
  --navy: #1B2952;
  --navy-900: #0f1c35;   /* 最深（主背景、大標） */
  --navy-800: #1a2744;   /* 深藍（品牌色） */
  --navy-700: #243460;   /* 中深藍 */
  --navy-100: #e8eaf2;   /* 淡化背景（卡片、分隔） */
  --navy-50:  #f4f5fa;   /* 最淺背景 */

  /* Champagne Gold 系列 */
  --gold-600: #f5d77a;   /* 金色（主點綴） */
  --gold-500: #d4a853;   /* 香檳金（亮） */
  --gold-400: #e2bc7a;   /* 淺金 */
  --gold-100: #faf4e8;   /* 極淡金背景 */

  /* 文字層級 */
  --ink-900: #0f1c35;    /* 主文字（= navy-900） */
  --ink-700: #2c3a5a;    /* 次要文字 */
  --ink-500: #5a6a8a;    /* 輔助文字 */
  --ink-300: #5a6a8a;    /* 弱化文字 */

  /* 陰影 */
  --shadow-sm:  0 1px 3px rgba(15, 28, 53, 0.08);
  --shadow-md:  0 8px 24px rgba(15, 28, 53, 0.10);
  --shadow-lg:  0 20px 48px rgba(15, 28, 53, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  /* 字體：思源黑體 + Montserrat */
  --font-serif: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;

  --maxw: 1120px;
  /* 補齊未定義變數（2026-11-05） */
  --gray-100: #f4f5fa;
  --gray-200: #e8eaf2;
  --gray-500: #5a6a8a;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-700);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-800); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--gold-600); }
footer a { color: rgba(255,255,255,0.8); }
footer a:hover { color: #fff; }

h1, h2, h3, h4 {
  font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 0 0 0.5em 0;
}
h1 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: clamp(2rem, 4vw, 2.75rem); }
h2 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em 0; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 頂部導覽列 ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 2rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; font-size: 0.82rem; }
.brand-text strong { font-weight: 700; color: var(--navy); font-size: 1rem; white-space: nowrap; }
.brand-text em { font-style: normal; color: var(--gray-500); font-size: 0.78rem; white-space: nowrap; }
.primary-nav { display: flex; gap: 0; }
.primary-nav a { padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500; color: var(--navy); border-radius: 4px; transition: background 0.2s; }
.primary-nav a:hover { background: var(--gray-100); color: var(--navy); }
.primary-nav a.active { background: var(--navy); color: #fff !important; }
.primary-nav a.cta-btn { background: var(--gold-600); color: var(--white); font-weight: 600; }
.primary-nav a.cta-btn:hover { background: var(--gold-400); }
.primary-nav a.cta-btn.active { background: var(--navy); }

/* ---- Hero ---- */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(26, 39, 68, 0.07), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(255, 255, 255, 0.8), transparent 60%),
    #ffffff;
  border-bottom: 1px solid var(--navy-100);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: start;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: #6b4a0a;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}
.hero h1 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; margin-top: 0;
  color: var(--ink-900);
  position: relative;
}
.hero h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
  margin-top: 18px;
  border-radius: 2px;
}
.lead {
  font-size: 1.08rem;
  color: var(--ink-700);
  margin-bottom: 28px;
  line-height: 1.85;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--navy-800);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--navy-700); color: #ffffff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn-ghost:hover { background: var(--navy-50); color: var(--navy-800); }

.meta-row {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  font-size: 0.92rem;
  color: var(--gray-600);
}
.meta-row li { position: relative; padding-left: 0; }
.meta-row li span { color: var(--ink-300); margin-right: 6px; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif; }

/* Hero 照片區（時尚簡約） */
.hero-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hero-photo-frame {
  width: 300px;
  height: 360px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 28, 53, 0.15), 0 4px 16px rgba(15, 28, 53, 0.08);
  position: relative;
}
.hero-photo-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--navy-800);
  z-index: 1;
}
.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--navy-800);
  border-radius: 100px;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-sm);
}
.badge-icon { font-size: 1.1rem; }

/* ---- Sections ---- */
.section { padding: 88px 0; }
.section-alt {
  background: var(--navy-50);
  border-top: 1px solid var(--navy-100);
  border-bottom: 1px solid var(--navy-100);
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head.align-left { text-align: left; margin-left: 0; }
.section-head h2 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; margin-top: 0; }
.section-head h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold-600);
  margin: 16px auto 0;
  border-radius: 2px;
}
.section-head.align-left h2::after { margin-left: 0; }
.section-sub { color: var(--gray-600); font-size: 1.02rem; }

/* 專長卡片網格 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}
.feature-card {
  background: #ffffff;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--gold-600);
  transition: height 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
}
.feature-card:hover::before { height: 100%; }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--gold-100);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
}
.feature-card h3 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: 1.18rem; margin-bottom: 8px; }
.feature-card p { color: var(--gray-600); margin: 0; font-size: 0.95rem; line-height: 1.7; }

/* 學經歷時間軸 */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-left: 2px solid var(--navy-100);
  margin-left: 8px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 22px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold-600);
  box-shadow: 0 0 0 4px #ffffff;
}
.t-time {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--gold-600);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}
.t-body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  font-weight: 600;
  color: var(--ink-900);
  font-size: 1.02rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip {
  display: inline-block;
  padding: 8px 16px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 100px;
  font-size: 0.88rem;
  color: var(--ink-700);
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}
.chip:hover {
  background: var(--gold-100);
  border-color: var(--gold-500);
  color: var(--navy-800);
}

/* CTA Band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #ffffff;
  padding: 56px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #ffffff; margin: 0 0 8px 0; font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; }
.cta-band p { margin: 0; opacity: 0.88; }
.cta-band .btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
}
.cta-band .btn-primary:hover { background: var(--gold-400); color: var(--navy-900); }

/* ---- Page Hero (sub pages) ---- */
.page-hero {
  padding: 80px 0 56px;
  background: var(--navy);
  color: var(--white);
}
.page-hero .eyebrow { color: var(--gold-600); }
.page-hero h1 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; color: var(--white); }
.page-hero h1::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  background: var(--gold-600);
  margin-top: 18px;
  border-radius: 2px;
}
.page-hero .lead { color: rgba(255,255,255,0.85); max-width: 720px; }

/* ---- News / Articles grid ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}
.news-card {
  background: #ffffff;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
}
.news-link {
  display: block;
  padding: 28px 28px 24px;
  color: var(--ink-700);
}
.news-link:hover { color: var(--ink-700); }
.news-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gold-600);
  background: var(--gold-100);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}
.new-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-600);
  background: var(--gold-100);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif;
  vertical-align: baseline;
  margin-left: 8px;
}
.news-card h2 {
  font-size: 1.18rem;
  line-height: 1.5;
  margin: 0 0 12px 0;
  color: var(--ink-900);
  transition: color 0.18s ease;
  font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif;
}
.news-card:hover h2 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; color: var(--gold-600); }
.news-card p {
  font-size: 0.94rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0 0 18px 0;
}
.news-meta {
  font-size: 0.78rem;
  color: var(--ink-300);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.news-more {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-800);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}

/* ---- Schedule ---- */
.schedule-card {
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}
.schedule-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}
.schedule-table { width: 100%; }
.sched-row {
  display: grid;
  grid-template-columns: 110px repeat(5, 1fr);
  border-top: 1px solid var(--navy-100);
}
.sched-row:first-of-type { border-top: 0; }
.sched-head {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  font-weight: 700;
  color: var(--ink-900);
  border-top: 0;
  border-bottom: 2px solid var(--gold-600);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.sched-head > div { padding: 12px 8px; text-align: center; }
.sched-head > div:first-child { text-align: left; color: var(--gold-600); }
.sched-time {
  padding: 18px 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  color: var(--ink-900);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.4;
}
.sched-time span {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--gray-600);
  margin-top: 4px;
}
.sched-cell {
  display: grid;
  place-items: center;
  color: var(--ink-300);
  font-size: 1.1rem;
}
.sched-cell.on {
  color: var(--gold-600);
  font-weight: 700;
}
.sched-cell.on::before {
  content: "✔";
  display: inline-block;
  background: var(--gold-100);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--gold-600);
  border: 1px solid var(--gold-400);
}
.schedule-legend {
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
}
.schedule-legend .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold-600);
  display: inline-block;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.info-card {
  background: #ffffff;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.info-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}
.info-card h3 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: 1.18rem; margin: 0 0 12px 0; }
.info-card p { margin: 0 0 8px 0; color: var(--ink-700); }
.info-card .muted { color: var(--gray-600); font-size: 0.92rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-800);
  border-top: 1px solid var(--navy-800);
  padding: 32px 0;
  color: #fff;
}
.footer-top {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand {
  flex: 1 1 200px;
  min-width: 0;
}
.footer-brand img {
  display: block;
}
.footer-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 8px 0 4px;
}
.footer-tagline {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
}
.footer-col {
  flex: 1 1 150px;
  min-width: 0;
}
.footer-col h4 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; font-size: 0.82rem;
  font-weight: 700;
  color: #ccd2e0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li {
  margin-bottom: 6px;
}
.footer-col a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: #fff;
}
.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-copy {
  font-size: 0.78rem;
  color: #bcc3d4;
  margin: 0;
}
.footer-meta { color: #aeb6c8; font-size: 0.82rem; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .primary-nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .primary-nav a { white-space: nowrap; font-size: 0.88rem; padding: 6px 10px; color: var(--navy); }
  .hero, .page-hero { padding: 56px 0 40px; }
  .section { padding: 56px 0; }
  .sched-row { grid-template-columns: 80px repeat(5, 1fr); }
  .sched-time { font-size: 0.92rem; padding: 12px 6px; }
  .sched-time span { font-size: 0.7rem; }
  .schedule-card { padding: 20px 16px; }
  .sched-cell.on::before { width: 26px; height: 26px; font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .sched-row { grid-template-columns: 70px repeat(5, 1fr); font-size: 0.85rem; }
  .sched-head > div { padding: 8px 2px; font-size: 0.85rem; }
}

/* ---- Subtle entrance animation ---- */
@media (prefers-reduced-motion: no-preference) {
  .feature-card, .news-card, .timeline li { opacity: 1; transform: translateY(8px); animation: fadeUp 0.6s ease forwards; }
  .feature-card:nth-child(1) { animation-delay: 0.05s; }
  .feature-card:nth-child(2) { animation-delay: 0.10s; }
  .feature-card:nth-child(3) { animation-delay: 0.15s; }
  .feature-card:nth-child(4) { animation-delay: 0.20s; }
  .feature-card:nth-child(5) { animation-delay: 0.25s; }
  .feature-card:nth-child(6) { animation-delay: 0.30s; }
  .feature-card:nth-child(7) { animation-delay: 0.35s; }
  .news-card:nth-child(1) { animation-delay: 0.05s; }
  .news-card:nth-child(2) { animation-delay: 0.10s; }
  .news-card:nth-child(3) { animation-delay: 0.15s; }
  .news-card:nth-child(4) { animation-delay: 0.20s; }
  .news-card:nth-child(5) { animation-delay: 0.25s; }
  .news-card:nth-child(6) { animation-delay: 0.30s; }
  .timeline li { animation-delay: 0.1s; }
  .timeline li:nth-child(2) { animation-delay: 0.15s; }
  .timeline li:nth-child(3) { animation-delay: 0.20s; }
  .timeline li:nth-child(4) { animation-delay: 0.25s; }
  .timeline li:nth-child(5) { animation-delay: 0.30s; }
  @keyframes fadeUp { to { transform: translateY(0); } }
}

/* 麵包屑導航 */
.breadcrumb { margin: 0 auto; padding: 1rem 1.5rem; max-width: 1200px; font-size: 0.85rem; color: #5a6a8a; }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; list-style: none; padding: 0; margin: 0; }
.breadcrumb-list li { display: inline-flex; align-items: center; }
.breadcrumb-list li:not(:last-child)::after { content: ''; }
.breadcrumb-list a { color: #1B2952; text-decoration: underline; text-underline-offset: 0.2em; padding: 0.25rem 0; transition: color 0.2s; }
.breadcrumb-list a:hover { color: #8e6a1d; text-decoration: underline; }
.breadcrumb-list .breadcrumb-sep { padding: 0 0.5rem; color: #c8c8c8; margin: 0 0.25rem; }
.breadcrumb-list > li:last-child > span { color: #5a6a8a; }
@media (max-width: 640px) {
  .breadcrumb { padding: 0.75rem 1rem; font-size: 0.8rem; }
  .breadcrumb-list .breadcrumb-sep { padding: 0 0.25rem; }
}

/* 文章目錄 */
.toc { margin: 2rem auto; }
.toc ol li { padding: 0.25rem 0; }
.toc a { color: #1a2744; }
.toc a:hover { color: #8e6a1d; text-decoration: underline; }
.toc strong { color: #1a2744; }

/* 讓 H2 錨點跳轉時不被 header 遮擋 */
.article-body h2[id],
.article-content h2[id],
.section h2[id] {
  scroll-margin-top: 100px;
}

/* Hub 快速導覽卡片 */
.hub-quick-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin: 2rem 0; }
.hub-nav-card { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; background: var(--white); border: 1.5px solid var(--gray-200); border-radius: 12px; text-decoration: none; color: inherit; transition: all 0.25s; }
.hub-nav-card:hover { border-color: var(--gold); background: #fff8f0; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.hub-nav-icon { font-size: 2rem; flex-shrink: 0; }
.hub-nav-text { display: flex; flex-direction: column; gap: 0.25rem; }
.hub-nav-text strong { color: var(--navy); font-size: 1.05rem; font-weight: 700; }
.hub-nav-text em { color: var(--gray-600); font-size: 0.85rem; font-style: normal; line-height: 1.5; }

/* 文章正文內文內連結加底線：無法僅靠顏色辨識段落中的連結（WCAG 1.4.1） */
.article-body a,
.article-content a,
.article-body p a,
.article-content p a,
.article-body li a,
.article-content li a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 其他容器內的文內連結同樣加底線（WCAG 1.4.1） */
.author-box a,
.map-address a,
.info-card a,
.clinic-content a,
.clinic-info a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 769px) and (max-width: 1100px) {
  .primary-nav {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c8ccd8 transparent;
  }
  .primary-nav::-webkit-scrollbar { height: 4px; }
  .primary-nav::-webkit-scrollbar-thumb { background: #c8ccd8; border-radius: 2px; }
  .primary-nav::-webkit-scrollbar-track { background: transparent; }
  .primary-nav a { white-space: nowrap; flex: 0 0 auto; }
}

/* 沒有漢堡按鈕的頁面：手機版把導覽列改回橫排可捲動，而不是整個隱藏 */
@media (max-width: 768px) {
  .site-header:not(:has(.nav-toggle)) .primary-nav {
    display: flex !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    background: transparent !important;
    border-bottom: 0 !important;
    flex-direction: row !important;
    padding: 0 !important;
    z-index: auto !important;
    width: auto !important;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-header:not(:has(.nav-toggle)) .primary-nav::-webkit-scrollbar { display: none; }
  .site-header:not(:has(.nav-toggle)) .primary-nav a { white-space: nowrap; flex: 0 0 auto; }
}

/* ============================================================
   Nav responsive fix (2026-10-27)
   平板/手機不再整頁橫向溢出；沒有漢堡按鈕的頁面改用可橫捲的導覽列。
   ============================================================ */
@media (min-width: 769px) and (max-width: 1100px) {
  .primary-nav {
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c8ccd8 transparent;
  }
  .primary-nav::-webkit-scrollbar { height: 4px; }
  .primary-nav::-webkit-scrollbar-thumb { background: #c8ccd8; border-radius: 2px; }
  .primary-nav::-webkit-scrollbar-track { background: transparent; }
  .primary-nav a { white-space: nowrap; flex: 0 0 auto; }
}

/* 沒有漢堡按鈕的頁面：手機版把導覽列改回橫排可捲動，而不是整個隱藏 */
@media (max-width: 768px) {
  .site-header:not(:has(.nav-toggle)) .nav-wrap {
    flex-wrap: wrap;
    height: auto;
    min-height: 68px;
    row-gap: 6px;
    padding-bottom: 6px;
  }
  .site-header:not(:has(.nav-toggle)) .primary-nav {
    display: flex !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    background: transparent !important;
    border-bottom: 0 !important;
    flex-direction: row !important;
    padding: 0 !important;
    z-index: auto !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-header:not(:has(.nav-toggle)) .primary-nav::-webkit-scrollbar { display: none; }
  .site-header:not(:has(.nav-toggle)) .primary-nav a { white-space: nowrap; flex: 0 0 auto; }
}

/* ============================================================
   文章頁 hero 標題統一置中（2026-10-31）
   劉醫師指示：「衛教文章裡的文章標題，有的置中有的靠左，請一致置中」
   原本 55 篇文章分成兩種：6 頁 text-align:center、49 頁靠左。
   注意：頁面專屬 CSS 在主 CSS 之後載入，同 specificity 會勝出，
   因此這裡用較高 specificity（雙 class + 元素）確保覆蓋。
   ============================================================ */
body .article-hero,
body .hub-hero,
body .page-hero {
  text-align: center;
}
body .article-hero .container,
body .hub-hero .container,
body .page-hero .container {
  text-align: center;
}
body .article-hero h1,
body .hub-hero h1,
body .page-hero h1 {font-family: 'NotoSerifTC-Sub', 'Noto Serif TC', 'Songti TC', serif; text-align: center;
  margin-left: auto;
  margin-right: auto;
}
/* eyebrow / 分類標籤 / meta 一併置中 */
body .article-hero .eyebrow,
body .article-hero .article-eyebrow,
body .article-hero .article-category,
body .article-hero .tag,
body .hub-hero .eyebrow,
body .page-hero .eyebrow {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  display: block;
  width: fit-content;
}
body .article-hero .article-meta,
body .article-hero .meta,
body .hub-hero .article-meta,
body .page-hero .article-meta {
  justify-content: center;
  text-align: center;
}
/* 麵包屑保持靠左（不隨 hero 標題置中） */
body .article-hero .breadcrumb,
body .article-hero .breadcrumb-list,
body .hub-hero .breadcrumb,
body .hub-hero .breadcrumb-list,
body .page-hero .breadcrumb,
body .page-hero .breadcrumb-list {
  text-align: left;
}
body .article-hero .breadcrumb-list,
body .hub-hero .breadcrumb-list,
body .page-hero .breadcrumb-list {
  justify-content: flex-start;
}
/* 副標 / lead 置中但保留行長度限制（維持易讀） */
body .article-hero .lead,
body .article-hero .article-subtitle,
body .article-hero .subtitle,
body .hub-hero .lead,
body .hub-hero .subtitle,
body .page-hero .lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* 文章頁 hero 標題容器寬度統一（2026-10-31，全站視覺一致） */
body .article-hero .container,
body .hub-hero .container,
body .page-hero .container {
  max-width: 760px;
}
