/* =========================================================
   全慧文理短期補習班 — style.css
   Mobile-first；斷點 768px（平板）、1024px（桌機）
   ========================================================= */

:root {
  /* 品牌色（取自招牌與 DM） */
  --c-royal: #1A3FA8;      /* 寶藍：標題 */
  --c-royal-dark: #122d7a;
  --c-red: #E3262E;        /* 全慧紅：品牌字 */
  --c-red-dark: #b81a21;
  --c-sky: #BDE6F7;        /* 天空藍：底色區塊 */
  --c-sky-soft: #e8f6fc;
  --c-yellow: #FFE34D;     /* 亮黃：重點標示 */
  --c-orange: #FF8A1F;     /* 橘：CTA、時間軸 */
  --c-orange-dark: #e06f06;
  --c-line: #06C755;       /* LINE 綠 */
  --c-line-dark: #05a647;
  --c-fb: #1877F2;

  /* 中性色 */
  --c-white: #ffffff;
  --c-bg: #ffffff;
  --c-ink: #1f2a44;
  --c-ink-soft: #4a5672;
  --c-muted: #6b7690;
  --c-border: #dbe4f0;

  /* 字型、尺寸 */
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 6px rgba(26, 63, 168, .08);
  --shadow: 0 8px 24px rgba(26, 63, 168, .12);
  --shadow-lg: 0 16px 40px rgba(26, 63, 168, .18);
  --header-h: 64px;
  --gutter: 16px;
  --container: 1160px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-ink);
  background: var(--c-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, video, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--c-royal); }
button { font: inherit; color: inherit; cursor: pointer; }
mark { background: none; color: inherit; }
b { font-weight: 700; }
[hidden] { display: none !important; }

.icon { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: middle; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--c-royal); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--c-orange); outline-offset: 3px; border-radius: 4px; }

.brand-red { color: var(--c-red); }
.br-sm { display: inline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .6em 1.4em;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 1rem; line-height: 1.3; text-decoration: none;
  background: var(--c-orange); color: #fff;
  box-shadow: 0 4px 0 var(--c-orange-dark);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 7px 0 var(--c-orange-dark), 0 12px 20px rgba(0,0,0,.12); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--c-orange-dark); }
.btn-line { background: var(--c-line); box-shadow: 0 4px 0 var(--c-line-dark); }
.btn-line:hover { box-shadow: 0 7px 0 var(--c-line-dark), 0 12px 20px rgba(0,0,0,.12); }
.btn-line:active { box-shadow: 0 2px 0 var(--c-line-dark); }
.btn-fb { background: var(--c-fb); box-shadow: 0 4px 0 #0f5bc4; }
.btn-fb:hover { box-shadow: 0 7px 0 #0f5bc4, 0 12px 20px rgba(0,0,0,.12); }
.btn-ghost {
  background: #fff; color: var(--c-royal); border-color: var(--c-royal);
  box-shadow: 0 4px 0 var(--c-royal);
}
.btn-ghost:hover { box-shadow: 0 7px 0 var(--c-royal), 0 12px 20px rgba(0,0,0,.1); }
.btn-ghost:active { box-shadow: 0 2px 0 var(--c-royal); }
.btn-sm { min-height: 40px; padding: .4em 1.1em; font-size: .9375rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  transition: box-shadow .3s, background-color .3s;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(26, 63, 168, .14); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  transition: height .3s var(--ease);
}
.site-header.is-scrolled .header-inner { height: 54px; }

.logo { display: flex; align-items: baseline; gap: .5em; text-decoration: none; color: var(--c-royal); }
.logo-mark {
  font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: .02em;
  color: var(--c-red);
  /* 仿招牌：白邊＋深紅立體陰影 */
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 var(--c-red-dark);
  transition: font-size .3s var(--ease);
}
.site-header.is-scrolled .logo-mark { font-size: 1.65rem; }
.logo-sub { font-size: .875rem; font-weight: 700; color: var(--c-royal); letter-spacing: .08em; white-space: nowrap; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px; margin-right: -8px;
  background: none; border: 0; border-radius: var(--radius-sm);
}
.nav-toggle-bar {
  display: block; height: 3px; border-radius: 3px; background: var(--c-royal);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff;
  box-shadow: 0 12px 24px rgba(26, 63, 168, .14);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
}
.site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .25s var(--ease); }
.site-nav ul { padding: 8px var(--gutter) 16px; }
.site-nav a {
  display: block; padding: 12px 8px;
  font-weight: 700; font-size: 1.0625rem; color: var(--c-ink); text-decoration: none;
  border-bottom: 1px solid var(--c-border);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a.is-active { color: var(--c-red); }

/* ---------- Section commons ---------- */
.section { padding-block: 64px; position: relative; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-kicker {
  display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .16em;
  color: var(--c-orange); margin-bottom: 6px;
}
.section-title {
  font-size: clamp(1.625rem, 5.4vw, 2.5rem); font-weight: 900; line-height: 1.35;
  color: var(--c-royal);
}
.section-lead { margin-top: 12px; color: var(--c-ink-soft); max-width: 40em; margin-inline: auto; }
.section-lead span { display: block; }
.sub-title {
  font-size: 1.25rem; font-weight: 900; color: var(--c-royal); margin-bottom: 14px;
  display: flex; align-items: center; gap: .5em;
}
.sub-title::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--c-orange); }

/* 進場淡入（只有 JS 啟用時才隱藏） */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 227, 77, .45) 0, rgba(255, 227, 77, 0) 40%),
    linear-gradient(180deg, var(--c-sky) 0%, var(--c-sky-soft) 100%);
  padding-block: 20px 56px;
  overflow: hidden;
}
.hero-inner { display: grid; gap: 28px; }
.hero-media { order: -1; }
.hero-eyebrow {
  display: inline-block; font-size: .875rem; font-weight: 700; color: var(--c-royal);
  background: #fff; border-radius: var(--radius-pill); padding: 2px 14px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.hero-title { font-weight: 900; line-height: 1.25; color: var(--c-royal); font-size: clamp(2.25rem, 10vw, 3.75rem); letter-spacing: .02em; }
.hero-title-line { display: block; }
.hero-title mark {
  background: linear-gradient(transparent 58%, var(--c-yellow) 58%, var(--c-yellow) 92%, transparent 92%);
  padding-inline: .06em;
}
.hero-sub { margin-top: 16px; font-size: 1.0625rem; font-weight: 500; color: var(--c-ink); }
.hero-sub span { display: block; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-chips li {
  font-size: .875rem; font-weight: 700; color: var(--c-royal);
  background: rgba(255, 255, 255, .8); border: 1.5px solid var(--c-royal);
  border-radius: var(--radius-pill); padding: 2px 12px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-cta .btn { flex: 1 1 180px; }

.video-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1b45;
  box-shadow: var(--shadow-lg);
  border: 4px solid #fff;
  aspect-ratio: 1252 / 720;
}
.promo-video { width: 100%; height: 100%; object-fit: cover; }
.video-controls {
  position: absolute; right: 10px; bottom: 10px;
  display: flex; gap: 8px;
}
.video-btn {
  display: inline-flex; align-items: center; gap: .4em;
  min-height: 40px; min-width: 40px; padding: 0 12px;
  border: 0; border-radius: var(--radius-pill);
  background: rgba(13, 27, 69, .72); color: #fff;
  font-size: .875rem; font-weight: 700;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background-color .2s, transform .2s var(--ease);
}
.video-btn:hover { background: var(--c-red); transform: translateY(-2px); }
.video-btn-sound { background: var(--c-red); }
.video-btn-sound[aria-pressed="true"] { background: rgba(13, 27, 69, .72); }

/* ---------- About ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-card {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 20px 12px;
  background: #fff; border: 2px solid var(--c-sky); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-royal); }
.service-grid li:last-child { grid-column: 1 / -1; }
.service-icon {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-sky-soft); color: var(--c-royal);
}
.service-grid li:nth-child(5n+1) .service-icon { background: #ffe9d6; color: var(--c-orange-dark); }
.service-grid li:nth-child(5n+2) .service-icon { background: #fff6c2; color: #a37a00; }
.service-grid li:nth-child(5n+3) .service-icon { background: #ffe1e2; color: var(--c-red); }
.service-icon svg { width: 32px; height: 32px; }
.service-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.5; color: var(--c-ink); }

.about-split { display: grid; gap: 32px; margin-top: 44px; align-items: center; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud li {
  padding: 6px 16px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: .9375rem;
  background: var(--c-sky-soft); color: var(--c-royal);
}
.tag-cloud li:nth-child(3n+1) { background: var(--c-royal); color: #fff; font-size: 1.0625rem; }
.tag-cloud li:nth-child(3n+2) { background: var(--c-yellow); color: var(--c-ink); }
.partner-note {
  margin-top: 24px; padding: 16px 18px;
  border-left: 6px solid var(--c-royal); border-radius: var(--radius-sm);
  background: var(--c-sky-soft); font-size: .9375rem; color: var(--c-ink-soft);
}
.partner-note strong { color: var(--c-royal); font-size: 1.0625rem; }
.partner-note .en { font-size: .8125rem; color: var(--c-muted); font-style: italic; margin-left: .3em; }

.about-photo { max-width: 420px; margin-inline: auto; width: 100%; }
.about-photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 35%; width: 100%; }
.about-photo figcaption, .dm-figure figcaption { margin-top: 10px; font-size: .875rem; color: var(--c-muted); text-align: center; }

.zoomable {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  position: relative; cursor: zoom-in;
}
.zoomable img { transition: transform .5s var(--ease); }
.zoomable:hover img { transform: scale(1.04); }
.zoomable::after {
  content: "＋ 放大"; position: absolute; right: 10px; bottom: 10px;
  background: rgba(13, 27, 69, .72); color: #fff; font-size: .8125rem; font-weight: 700;
  padding: 2px 10px; border-radius: var(--radius-pill);
}

/* ---------- Courses ---------- */
.section-courses { background: var(--c-sky-soft); }

.timeline { display: grid; gap: 12px; margin-bottom: 28px; counter-reset: stage; }
.stage-btn {
  --stage-bg: var(--c-orange); --stage-fg: #fff;
  position: relative; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: 84px; padding: 12px 52px 22px 64px;
  border: 0; text-align: left;
  background: var(--stage-bg); color: var(--stage-fg);
  /* 手機：向下箭頭色塊 */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  opacity: .62; filter: saturate(.8);
  transition: opacity .25s, filter .25s, transform .25s var(--ease);
}
.stage-btn::before {
  counter-increment: stage; content: counter(stage);
  position: absolute; left: 16px; top: 50%; transform: translateY(-62%);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--stage-bg-text, var(--c-ink)); font-weight: 900; font-size: 1.125rem;
}
.stage-btn[data-color="orange"] { --stage-bg: var(--c-orange); --stage-bg-text: var(--c-orange-dark); }
.stage-btn[data-color="yellow"] { --stage-bg: var(--c-yellow); --stage-fg: var(--c-ink); --stage-bg-text: #a37a00; }
.stage-btn[data-color="red"] { --stage-bg: var(--c-red); --stage-bg-text: var(--c-red); }
.stage-btn:hover { opacity: .9; }
.stage-btn[aria-selected="true"] { opacity: 1; filter: none; }
.stage-btn[aria-selected="true"]::after {
  content: "查看中"; position: absolute; right: 14px; top: 14px;
  font-size: .75rem; font-weight: 700; padding: 0 8px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .9); color: var(--c-ink);
}
.stage-name { font-size: 1.25rem; font-weight: 900; line-height: 1.4; }
.stage-period { font-size: .875rem; font-weight: 500; opacity: .95; }

.stage-panel {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 16px; border-top: 6px solid var(--panel-color, var(--c-orange));
}
.stage-panel[data-color="yellow"] { --panel-color: var(--c-yellow); }
.stage-panel[data-color="red"] { --panel-color: var(--c-red); }
.stage-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.stage-panel-head h3 { font-size: 1.25rem; font-weight: 900; color: var(--c-royal); }
.stage-panel-head p { font-size: .9375rem; color: var(--c-muted); }

/* 科目：手機 accordion／平板以上 tab */
.subj-tabs { display: none; }
.acc-item { border: 1.5px solid var(--c-border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 10px 16px;
  background: #fff; border: 0; text-align: left;
  font-weight: 700; font-size: 1.0625rem; color: var(--c-royal);
}
.acc-head .icon { transition: transform .3s var(--ease); color: var(--c-orange); }
.acc-item.is-open .acc-head { background: var(--c-sky-soft); }
.acc-item.is-open .acc-head .icon { transform: rotate(180deg); }
.acc-body { display: none; padding: 14px 16px 16px; }
.acc-item.is-open .acc-body { display: block; }

.point-list li {
  position: relative; padding-left: 1.6em; margin-bottom: 6px;
}
.point-list li::before {
  content: ""; position: absolute; left: .2em; top: .62em;
  width: .7em; height: .7em; border-radius: 50%;
  background: var(--c-yellow); box-shadow: 0 0 0 3px #fff6c2;
}
.stage-empty {
  display: grid; gap: 14px; justify-items: start;
  padding: 16px; border-radius: var(--radius-sm); background: #fffbe0; color: var(--c-ink-soft);
}

/* 選擇先修？還是先休？ */
.flip-slogan { text-align: center; margin-top: 48px; }
.flip-line {
  display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center;
  font-size: clamp(1.625rem, 7vw, 2.75rem); font-weight: 900; color: var(--c-red); line-height: 1.3;
}
.flip-line > span:first-child { color: var(--c-royal); margin-right: .4em; }
.flip-char {
  display: inline-block; width: 1.15em; height: 1.3em; padding: 0; margin: 0 .04em;
  background: none; border: 0; font-size: inherit; font-weight: inherit; color: inherit;
  perspective: 600px; cursor: pointer;
}
.flip-inner {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .6s var(--ease);
}
.flip-face {
  position: absolute; inset: 0; display: grid; place-items: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 10px;
}
.flip-front { background: var(--c-yellow); color: var(--c-red); }
.flip-back { background: var(--c-royal); color: #fff; transform: rotateY(180deg); }
@media (hover: hover) { .flip-char:hover .flip-inner { transform: rotateY(180deg); } }
.flip-char:focus-visible .flip-inner,
.flip-char[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.flip-hint { margin-top: 8px; font-size: .9375rem; color: var(--c-muted); }

.dm-figure { max-width: 360px; margin: 40px auto 0; }

/* ---------- Scholarship ---------- */
.section-scholarship {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 227, 77, .35) 0, rgba(255, 227, 77, 0) 35%),
    radial-gradient(circle at 90% 90%, rgba(255, 138, 31, .18) 0, rgba(255, 138, 31, 0) 35%),
    #fff;
}
.scholar-groups { display: grid; gap: 40px; }
.scholar-group h3 {
  text-align: center; font-size: 1.25rem; font-weight: 900; color: var(--c-red); margin-bottom: 20px;
}
.scholar-group h3::before, .scholar-group h3::after { content: "✦"; color: var(--c-orange); margin: 0 .5em; font-size: .8em; }
.medal-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 12px; }
.medal-list > li { flex: 0 0 calc(50% - 6px); }
.medal-list.count-3 > li { flex-basis: calc(33.333% - 8px); }
.medal {
  --m1: #ffe680; --m2: #f5b700; --m3: #b07d00;
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: 28px;
}
.medal[data-tier="2"] { --m1: #f4f6fa; --m2: #b9c2d3; --m3: #7a849a; }
.medal[data-tier="3"] { --m1: #ffd5ad; --m2: #d98a4a; --m3: #995a25; }
.medal[data-tier="4"] { --m1: #d7e9ff; --m2: #5b8be0; --m3: var(--c-royal); }
.medal[data-tier="5"] { --m1: #e3f6fd; --m2: #7cc9ea; --m3: #3e8fb3; }
/* 緞帶 */
.medal::before, .medal::after {
  content: ""; position: absolute; top: 0; width: 22px; height: 46px;
  background: var(--c-red);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.medal::before { left: calc(50% - 24px); transform: rotate(14deg); }
.medal::after { left: calc(50% + 2px); transform: rotate(-14deg); background: var(--c-royal); }
.medal-disc {
  position: relative; z-index: 1;
  width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-items: center; align-content: center;
  background: radial-gradient(circle at 35% 30%, var(--m1) 0, var(--m2) 60%, var(--m3) 100%);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .55), inset 0 0 0 8px var(--m3), 0 8px 18px rgba(0, 0, 0, .15);
  transition: transform .35s var(--ease);
}
.medal:hover .medal-disc { transform: rotate(-6deg) scale(1.05); }
.medal-label { font-size: 1rem; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); line-height: 1.3; }
.medal[data-tier="2"] .medal-label, .medal[data-tier="5"] .medal-label { color: var(--c-ink); text-shadow: none; }
.medal-amount { margin-top: 10px; font-size: 1.25rem; font-weight: 900; color: var(--c-ink); line-height: 1.3; }
.medal-amount small { font-size: .8125rem; font-weight: 700; color: var(--c-muted); margin-right: 2px; }
.medal-amount .unit { font-size: .9375rem; margin-left: 2px; }
.scholar-note {
  margin: 36px auto 0; max-width: max-content; text-align: center;
  font-size: .9375rem; color: var(--c-ink-soft);
  background: #fffbe0; border: 1.5px dashed #e6c200; border-radius: var(--radius-sm); padding: 8px 16px;
}

/* ---------- Features ---------- */
.section-features { background: var(--c-sky); }
.feature-grid { display: grid; gap: 18px; }
.feature-card {
  background: #fff; border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.feature-icon {
  flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--c-royal); color: #fff;
}
.feature-card:nth-child(2) .feature-icon { background: var(--c-orange); }
.feature-card:nth-child(3) .feature-icon { background: var(--c-red); }
.feature-icon svg { width: 28px; height: 28px; }
.feature-card h3 { font-size: 1.375rem; font-weight: 900; color: var(--c-royal); }
.feature-tagline {
  font-size: .9375rem; font-weight: 700; color: var(--c-ink-soft);
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px dashed var(--c-border);
}
.feature-list li { display: flex; gap: 10px; margin-bottom: 10px; }
.feature-num {
  flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%;
  display: grid; place-items: center; font-size: .8125rem; font-weight: 900;
  background: var(--c-yellow); color: var(--c-ink);
}
.feature-list b { color: var(--c-ink); }
.feature-list .sep { color: var(--c-muted); margin: 0 .25em; }

.cycle-wrap {
  display: grid; gap: 24px; align-items: center;
  margin-top: 40px; background: #fff; border-radius: var(--radius-lg); padding: 28px 20px;
  box-shadow: var(--shadow);
}
.cycle-text p { color: var(--c-ink-soft); margin-bottom: 18px; }
.cycle-text b { color: var(--c-red); }
.cycle-figure { max-width: 340px; width: 100%; margin-inline: auto; }
.cycle-svg { width: 100%; height: auto; overflow: visible; }
.cycle-arc { fill: none; stroke: var(--c-border); stroke-width: 10; stroke-linecap: round; transition: stroke .5s; }
.cycle-arrowhead { fill: var(--c-border); transition: fill .5s; }
.cycle-node circle { fill: #fff; stroke: var(--c-border); stroke-width: 4; transition: fill .5s, stroke .5s; }
.cycle-node text { font-family: var(--font); font-weight: 900; font-size: 19px; fill: var(--c-muted); transition: fill .5s; }
.cycle-step.is-lit .cycle-arc { stroke: var(--step-color); }
.cycle-step.is-lit .cycle-arrowhead { fill: var(--step-color); }
.cycle-step.is-lit .cycle-node circle { fill: var(--step-color); stroke: var(--step-color); }
.cycle-step.is-lit .cycle-node text { fill: #fff; }
.cycle-step { --step-color: var(--c-royal); }
.cycle-step.step-1 { --step-color: var(--c-orange); }
.cycle-step.step-2 { --step-color: var(--c-red); }
.cycle-step.step-3 { --step-color: #1a9a5a; }
.cycle-target circle { transition: transform .6s var(--ease); transform-origin: 160px 160px; transform: scale(.6); opacity: .35; }
.cycle-target.is-lit circle { transform: scale(1); opacity: 1; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery-item .zoomable { aspect-ratio: 3 / 4; border-radius: var(--radius-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.gallery-item figcaption { font-size: .8125rem; color: var(--c-ink-soft); margin-top: 6px; line-height: 1.5; }

/* ---------- Contact ---------- */
.section-contact { background: var(--c-sky-soft); }
.contact-grid { display: grid; gap: 28px; }
.contact-info { background: #fff; border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow); }
.info-row { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.info-row:last-child { border-bottom: 0; }
.info-row dt { display: flex; align-items: center; gap: .4em; font-weight: 700; color: var(--c-royal); white-space: nowrap; }
.info-row dt .icon { color: var(--c-orange); }
.info-row dd { font-weight: 500; overflow-wrap: anywhere; }
.phone-link { font-size: 1.25rem; font-weight: 900; color: var(--c-red); text-decoration: none; }
.hours-list li { line-height: 1.6; }
.qr-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; scroll-margin-top: calc(var(--header-h) + 16px); }
.qr-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 14px 10px; border-radius: var(--radius-sm); border: 2px solid var(--c-border);
}
.qr-line { border-color: rgba(6, 199, 85, .45); }
.qr-line.is-pulse { animation: qr-pulse 1.2s var(--ease) 2; }
@keyframes qr-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0); } 40% { box-shadow: 0 0 0 10px rgba(6, 199, 85, .35); } }
.qr-fb { border-color: rgba(24, 119, 242, .4); }
.qr-card img { width: 100%; max-width: 160px; aspect-ratio: 1; object-fit: contain; }
.qr-card figcaption { font-size: .875rem; font-weight: 700; line-height: 1.5; }
.map-wrap { display: flex; flex-direction: column; gap: 8px; }
.map-wrap iframe {
  width: 100%; height: 320px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--c-sky);
}
.map-link { align-self: flex-end; font-weight: 700; font-size: .9375rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-royal-dark); color: rgba(255, 255, 255, .88); padding-block: 36px 110px; font-size: .9375rem; }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.logo-mark-sm { flex: none; white-space: nowrap; font-size: 2.25rem; text-shadow: 1px 1px 0 #fff, 2px 2px 0 #7a0f14; }
.footer-name { font-weight: 900; font-size: 1.0625rem; color: #fff; }
.footer-partner { font-size: .8125rem; opacity: .8; }
.footer-meta li { margin-bottom: 2px; }
.site-footer a { color: #fff; }
.copyright { font-size: .8125rem; opacity: .7; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 14px; }

/* ---------- Floating buttons ---------- */
.fab-group {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  transition: opacity .3s, transform .3s var(--ease), visibility 0s;
}
.fab-group.is-hidden { opacity: 0; transform: translateY(20px); visibility: hidden; pointer-events: none; transition: opacity .3s, transform .3s var(--ease), visibility 0s .3s; }
.fab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 56px; height: 56px; padding: 0 16px; border-radius: var(--radius-pill);
  color: #fff; text-decoration: none; font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.fab .icon { width: 28px; height: 28px; }
.fab:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, .26); }
.fab-line { background: var(--c-line); }
.fab-phone { background: var(--c-orange); padding: 0; width: 56px; }
.fab-label { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: rgba(8, 16, 42, .96);
  padding: 56px 8px 24px;
  touch-action: pan-y;
  animation: lb-in .25s var(--ease);
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-figure { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-img {
  max-width: min(100%, 1000px); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px);
  width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm);
  user-select: none; -webkit-user-drag: none;
  transition: opacity .2s;
}
.lb-caption { color: #fff; font-size: .9375rem; text-align: center; padding-inline: 8px; }
.lb-btn {
  position: absolute; z-index: 1;
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff;
  transition: background-color .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .3); }
.lb-btn .icon { width: 26px; height: 26px; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

/* =========================================================
   ≥ 768px 平板
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 28px; --header-h: 72px; }
  .br-sm { display: none; }
  .section { padding-block: 88px; }
  .section-head { margin-bottom: 48px; }

  .hero { padding-block: 40px 72px; }
  .hero-cta .btn { flex: 0 0 auto; }

  /* 5 張卡：上 3 下 2 置中 */
  .service-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
  .service-grid li { grid-column: span 2; }
  .service-grid li:nth-child(4) { grid-column: 2 / span 2; }
  .service-grid li:last-child { grid-column: span 2; }

  .about-split { grid-template-columns: 1.3fr 1fr; gap: 48px; }

  /* 時間軸：橫向箭頭 */
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .stage-btn {
    min-height: 104px; padding: 14px 36px 14px 76px;
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%, 22px 50%);
    border-radius: 0;
  }
  .timeline li:first-child .stage-btn { clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%); border-radius: var(--radius-sm) 0 0 var(--radius-sm); padding-left: 58px; }
  .timeline li + li .stage-btn { margin-left: -14px; width: calc(100% + 14px); }
  .stage-btn::before { left: 30px; transform: translateY(-50%); }
  .timeline li:first-child .stage-btn::before { left: 12px; }
  .stage-btn[aria-selected="true"]::after { content: none; }
  .stage-name { font-size: 1.1875rem; }

  .stage-panel { padding: 28px 28px 30px; }
  .subj-tabs {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px;
    border-bottom: 2px solid var(--c-border);
  }
  .subj-tab {
    position: relative; min-height: 44px; padding: 6px 20px; margin-bottom: -2px;
    background: none; border: 0; border-bottom: 4px solid transparent;
    font-weight: 700; font-size: 1.0625rem; color: var(--c-muted);
    transition: color .2s, border-color .2s;
  }
  .subj-tab:hover { color: var(--c-royal); }
  .subj-tab[aria-selected="true"] { color: var(--c-royal); border-bottom-color: var(--c-orange); }
  .acc-item { border: 0; margin: 0; }
  .acc-head { display: none; }
  .acc-body, .acc-item.is-open .acc-body { display: none; padding: 4px 4px 0; }
  .acc-item.is-active .acc-body { display: block; animation: fade-up .35s var(--ease); }
  .point-list li { font-size: 1.0625rem; margin-bottom: 10px; }

  .medal-list { flex-wrap: nowrap; }
  .medal-list > li { flex: 1 1 0; }
  .medal-list.count-3 { max-width: 560px; margin-inline: auto; }

  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card:last-child { grid-column: 1 / -1; }
  .cycle-wrap { grid-template-columns: 1fr 1fr; padding: 36px; }

  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .map-wrap iframe { height: 440px; }

  .footer-inner { grid-template-columns: 1fr 1fr; align-items: center; }
  .copyright { grid-column: 1 / -1; }
  .site-footer { padding-bottom: 36px; }

  .fab-phone { display: none; }
  .fab-label { display: inline; }
  .fab-line { padding: 0 20px 0 16px; }
}

@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =========================================================
   ≥ 1024px 桌機
   ========================================================= */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; visibility: visible; opacity: 1; transform: none;
    background: none; box-shadow: none; transition: none;
  }
  .site-nav ul { display: flex; gap: 4px; padding: 0; }
  .site-nav a {
    position: relative; border: 0; padding: 8px 14px; font-size: 1rem; border-radius: var(--radius-pill);
    transition: color .2s, background-color .2s;
  }
  .site-nav a:hover { background: var(--c-sky-soft); color: var(--c-royal); }
  .site-nav a.is-active { color: #fff; background: var(--c-royal); }
  .logo-mark { font-size: 2.25rem; }
  .logo-sub { font-size: 1rem; }

  .hero { padding-block: 72px 96px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 56px; }
  .hero-media { order: 0; }
  .hero-sub { font-size: 1.25rem; }

  .service-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .service-grid li, .service-grid li:nth-child(4), .service-grid li:last-child { grid-column: auto; }

  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-card:last-child { grid-column: auto; }
  .cycle-wrap { grid-template-columns: 1fr 1.1fr; padding: 40px 56px; }

  .dm-figure { max-width: 320px; }

  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-close { top: 16px; right: 16px; }
}

/* ---------- 關於全慧：圖文並列 ---------- */
.about-rows { display: grid; gap: 20px; }
/* 課程系列 */
.series-grid { display: grid; gap: 14px; }
.series-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 2px solid var(--c-sky); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.series-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c-royal); }
.series-icon {
  flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-sky-soft); color: var(--c-royal);
}
.series-icon svg { width: 30px; height: 30px; }
.series-card:nth-child(6n+1) .series-icon { background: #ffe9d6; color: var(--c-orange-dark); }
.series-card:nth-child(6n+2) .series-icon { background: #fff6c2; color: #a37a00; }
.series-card:nth-child(6n+3) .series-icon { background: #ffe1e2; color: var(--c-red); }
.series-card:nth-child(6n+5) .series-icon { background: #dcf7e6; color: #0a8a3e; }
.series-card h3 { font-size: 1.1875rem; font-weight: 900; line-height: 1.45; color: var(--c-royal); }
.series-card p { margin-top: 4px; font-size: .9375rem; line-height: 1.75; color: var(--c-ink-soft); }

.series-visit {
  margin-top: 36px; display: grid; overflow: hidden;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.series-visit-photo { border-radius: 0; box-shadow: none; }
.series-visit-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
.series-visit-text { padding: 24px 20px 28px; }
.series-visit-text h3 { font-size: 1.375rem; font-weight: 900; color: var(--c-royal); }
.series-visit-text > p { margin-top: 10px; color: var(--c-ink-soft); }
.series-visit-text .partner-note { margin-top: 16px; }
.series-visit-addr { margin-top: 14px; font-weight: 700; color: var(--c-ink); }
.series-visit-btns { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 768px) {
  .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .series-visit { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: stretch; }
  .series-visit-photo img { height: 100%; aspect-ratio: auto; min-height: 320px; }
  .series-visit-text { padding: 36px 40px; align-self: center; }
}
@media (min-width: 1024px) {
  .series-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.section-series { background: var(--c-sky-soft); }
.section-blog { background: #fff; }
.blog-more { margin-top: 28px; text-align: center; }
.about-row {
  display: grid; gap: 14px; align-items: center;
  background: #fff; border: 2px solid var(--c-sky); border-radius: var(--radius-lg);
  padding: 12px; box-shadow: var(--shadow-sm);
}
.about-row-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-sky-soft); }
.about-row-media img, .about-row-media svg { width: 100%; height: 100%; object-fit: cover; }
.about-row-text { padding: 0 8px 10px; }
.about-row-num {
  display: inline-block; padding: 2px 12px; border-radius: var(--radius-pill);
  background: var(--c-orange); color: #fff; font-size: .8125rem; font-weight: 900; letter-spacing: .1em;
}
.about-row-text h3 { margin: 10px 0 6px; font-size: 1.375rem; font-weight: 900; line-height: 1.4; color: var(--c-royal); }
.about-row-text p { font-size: 1.0625rem; color: var(--c-ink-soft); }
.about-services-title { justify-content: center; }

@media (min-width: 768px) {
  .about-row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; padding: 16px; }
  .about-row:nth-child(even) .about-row-media { order: 2; }
  .about-row-text { padding: 8px 12px; }
}
@media (min-width: 1024px) {
  .about-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .about-row { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .about-row:nth-child(even) .about-row-media { order: 0; }
  .about-row-text { padding: 0 8px 12px; }
}

/* ---------- 減少動態 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .service-card:hover, .feature-card:hover, .fab:hover { transform: none; }
  .zoomable:hover img, .medal:hover .medal-disc { transform: none; }
}
