/* =========================================================
   巨擎升學教育中心｜style.css
   Mobile-first；斷點 768px、1024px
   ========================================================= */

:root {
  /* 品牌色（取自海報） */
  --navy: #0B2A5B;
  --navy-700: #12376f;
  --blue: #1E73E8;
  --blue-50: #eaf2fe;
  --orange: #FF7A1A;
  --orange-600: #e8650a;
  --yellow: #FFC928;
  --red: #d6290f;
  --line-green: #06C755;
  --fb-blue: #1877F2;

  /* 中性色 */
  --bg: #ffffff;
  --bg-alt: #F5F7FA;
  --ink: #1a2433;
  --ink-soft: #4a5568;
  --muted: #8a94a6;
  --border: #e3e8ef;

  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;

  --container: 1180px;
  --gutter: 16px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --header-h: 68px;
  --header-h-small: 56px;

  --shadow-sm: 0 2px 8px rgba(11, 42, 91, .08);
  --shadow: 0 8px 24px rgba(11, 42, 91, .12);
  --shadow-lg: 0 16px 40px rgba(11, 42, 91, .18);

  /* 速度感條紋 */
  --stripes: repeating-linear-gradient(-55deg, var(--orange) 0 10px, transparent 10px 20px);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h-small) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
body.lb-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

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

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.5em;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(-1px); }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: .8em 2em; }
.btn-icon { width: 1.3em; height: 1.3em; flex: none; }

.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 4px 0 var(--orange-600); }
.btn-primary:hover { background: var(--orange-600); box-shadow: 0 8px 20px rgba(255, 122, 26, .4); }
.btn-line { background: var(--line-green); color: #fff; }
.btn-line:hover { box-shadow: 0 8px 20px rgba(6, 199, 85, .35); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-fb { background: var(--fb-blue); color: #fff; }

.text-link { font-weight: 700; color: var(--blue); }
.ext-icon { width: 1em; height: 1em; flex: none; vertical-align: -.12em; margin-left: .3em; opacity: .7; }

.tag {
  display: inline-block; padding: 1px 10px; margin-right: 6px; border-radius: var(--radius-pill);
  background: var(--navy); color: #fff; font-size: .8rem; font-weight: 700; line-height: 1.7; white-space: nowrap;
}
.tag-math { background: var(--orange); }
.tag-sci { background: #1b9a6c; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s, border-color .25s;
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); }
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-bottom-color: var(--border); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--header-h); transition: min-height .25s var(--ease);
}
.site-header.is-scrolled .header-inner { min-height: var(--header-h-small); }

.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--navy); min-width: 0; }
.brand-name { font-weight: 900; font-size: 1.2rem; letter-spacing: .04em; line-height: 1.25; transition: font-size .25s var(--ease); }
.brand-sub { font-size: .72rem; color: var(--orange-600); font-weight: 700; line-height: 1.4; }
.brand-license { display: none; color: var(--muted); font-weight: 400; }
.site-header.is-scrolled .brand-name { font-size: 1.08rem; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; flex: none;
  background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle-bar { display: block; height: 3px; border-radius: 2px; background: var(--navy); transition: transform .25s, opacity .25s; }
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-nav {
  position: fixed; left: 0; right: 0; top: var(--header-h);
  background: #fff; border-top: 1px solid var(--border); box-shadow: var(--shadow);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.site-header.is-scrolled .site-nav { top: var(--header-h-small); }
.nav-open .site-nav { visibility: visible; opacity: 1; transform: none; }
.site-nav ul { list-style: none; padding: 8px var(--gutter) 16px; }
.site-nav a {
  display: block; padding: 12px 8px; border-bottom: 1px solid var(--border);
  color: var(--ink); font-weight: 700; text-decoration: none;
}
.site-nav a.is-active { color: var(--orange); }
.site-nav a.nav-cta { margin-top: 12px; border: 0; border-radius: var(--radius-pill); background: var(--orange); color: #fff; text-align: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(115deg, transparent 62%, rgba(30, 115, 232, .35) 62% 74%, transparent 74%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 55%, #0f4fa8 100%);
}
.hero::after {
  content: ""; position: absolute; left: -10%; bottom: 0; width: 70%; height: 10px;
  background: var(--stripes); opacity: .9; transform: skewX(-20deg);
}
.hero-inner { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 56px; }
.hero-brand { margin: 0 0 12px; font-size: .9rem; font-weight: 700; color: rgba(255, 255, 255, .85); letter-spacing: .03em; }
.hero-brand span { color: var(--yellow); margin: 0 .2em; }
.hero-start {
  display: table; margin: 0 0 12px; padding: 6px 16px;
  background: var(--yellow); color: var(--navy); border-radius: var(--radius-pill);
  font-size: 1.05rem; font-weight: 900; letter-spacing: .03em;
  box-shadow: 0 0 0 4px rgba(255, 201, 40, .25);
}
.hero-eyebrow {
  display: inline-block; margin-bottom: 12px; padding: 4px 14px;
  background: var(--orange); color: #fff; transform: skewX(-10deg);
  border-radius: 4px; font-size: .95rem; font-weight: 900;
}
.hero-title { font-weight: 900; font-size: clamp(2.1rem, 10vw, 3.8rem); line-height: 1.18; letter-spacing: .02em; margin-bottom: 16px; }
.hero-title span { display: block; }
.hero-title-accent { color: var(--yellow); }
.hero-lead { font-size: 1.05rem; color: rgba(255, 255, 255, .9); max-width: 34em; }

.hero-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 20px 0 24px; }
.hero-facts li {
  display: flex; flex-direction: column; padding: 10px 8px; text-align: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius-sm);
  line-height: 1.4;
}
.hero-facts strong { color: var(--yellow); font-size: 1.05rem; font-weight: 900; }
.hero-facts span { font-size: .75rem; color: rgba(255, 255, 255, .8); margin-top: 2px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { flex: 1 1 200px; }

.hero-media { margin: 0; justify-self: center; width: min(100%, 380px); }
.hero-media .zoomable { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.hero-media figcaption { margin-top: 10px; text-align: center; font-size: .85rem; color: rgba(255, 255, 255, .7); }

/* ---------- Zoomable image ---------- */
.zoomable {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: #fff; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in;
}
.zoomable img { width: 100%; transition: transform .35s var(--ease); }
.zoomable:hover img { transform: scale(1.03); }
.zoom-hint {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px;
  display: grid; place-items: center; border-radius: 50%; background: rgba(11, 42, 91, .8); color: #fff;
}
.zoom-hint svg { width: 20px; height: 20px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 32px; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 6px;
  font-size: .85rem; font-weight: 900; letter-spacing: .12em; color: var(--orange-600);
}
.section-kicker::before { content: ""; width: 28px; height: 6px; background: var(--stripes); }
.section-title { font-size: clamp(1.75rem, 6.5vw, 2.5rem); font-weight: 900; color: var(--navy); letter-spacing: .04em; }
.section-desc { margin: 10px 0 0; color: var(--ink-soft); max-width: 46em; }

.section-navy { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.section-navy::before {
  content: ""; position: absolute; right: -40px; top: 0; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent 0 30%, rgba(30, 115, 232, .25) 30% 55%, transparent 55%);
  pointer-events: none;
}
.section-navy .section-title { color: #fff; }
.section-navy .section-kicker { color: var(--yellow); }
.section-navy .section-desc { color: rgba(255, 255, 255, .85); }
.section-navy .container { position: relative; }

/* ---------- 會考班 ---------- */
.step-list { list-style: none; display: grid; gap: 16px; counter-reset: step; }
.step {
  position: relative; padding: 24px 20px 20px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
}
.step::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 5px; background: linear-gradient(90deg, var(--blue), var(--orange)); }
.step-no { display: block; font-size: 2.2rem; font-weight: 900; line-height: 1; color: var(--blue); opacity: .25; margin-bottom: 6px; }
.step h3 { font-size: 1.25rem; font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); }

.cap-panel {
  display: grid; gap: 20px; margin-top: 24px; padding: 24px 20px;
  border-radius: var(--radius); color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(105deg, var(--navy) 0 70%, var(--blue) 70% 100%);
  box-shadow: var(--shadow);
}
.cap-panel::after { content: ""; position: absolute; right: -20px; bottom: 0; width: 45%; height: 8px; background: var(--stripes); transform: skewX(-20deg); }
.cap-start {
  grid-column: 1 / -1; justify-self: start; margin: 0; padding: 6px 18px;
  background: var(--yellow); color: var(--navy); font-size: 1.2rem; font-weight: 900;
  border-radius: 4px; transform: skewX(-8deg); box-shadow: 4px 4px 0 var(--orange);
}
.cap-label { font-size: .9rem; font-weight: 700; color: rgba(255, 255, 255, .75); margin-bottom: 6px; }
.cap-day { margin: 0 0 8px; font-size: 1.5rem; font-weight: 900; color: var(--yellow); }
.slot-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.slot-list li { padding: 4px 14px; background: rgba(255, 255, 255, .14); border-radius: var(--radius-pill); font-weight: 700; }
.cap-extra { margin: 10px 0 0; font-weight: 700; }
.capacity-num { margin: 0; font-weight: 900; font-size: 1.3rem; line-height: 1; }
.capacity-num strong { font-size: 3.6rem; color: var(--yellow); margin-right: 4px; }
.cap-note { margin: 8px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .8); }
.cap-actions { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.cap-actions .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.cap-actions .btn-outline:hover { background: #fff; color: var(--navy); }

.cap-insight {
  margin-top: 24px; padding: 20px; background: var(--bg-alt);
  border-left: 6px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0;
}
.cap-insight h3 { font-size: 1.15rem; font-weight: 900; color: var(--navy); margin-bottom: 10px; }
.cap-insight ul { list-style: none; margin-bottom: 10px; }
.cap-insight li + li { border-top: 1px dashed var(--border); }
.cap-insight li a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.6; }
.cap-insight li a:hover { color: var(--blue); }

/* ---------- 高中數學 ---------- */
.motto {
  margin: 0 0 28px; padding: 18px 20px;
  border-left: 6px solid var(--orange); background: #fff; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
}
.motto p { margin: 0; font-weight: 900; color: var(--navy); font-size: clamp(1.05rem, 4.2vw, 1.4rem); }

.course-list { display: grid; gap: 28px; }
.course-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.course-head {
  position: relative; padding: 22px 20px 26px; color: #fff; overflow: hidden;
  background: linear-gradient(105deg, var(--navy) 0 68%, var(--blue) 68% 100%);
}
.course-head::after { content: ""; position: absolute; right: -20px; bottom: 0; width: 45%; height: 8px; background: var(--stripes); transform: skewX(-20deg); }
.course-level {
  display: inline-block; padding: 2px 12px; margin-bottom: 8px;
  background: var(--orange); color: #fff; font-weight: 900; font-size: .85rem;
  transform: skewX(-12deg); border-radius: 4px;
}
.course-title { font-size: clamp(1.35rem, 5.5vw, 1.9rem); font-weight: 900; letter-spacing: .02em; }
.course-subtitle { margin: 6px 0 0; color: var(--yellow); font-weight: 700; }

.course-body { display: grid; gap: 24px; padding: 20px; }
.course-media .zoomable { border: 1px solid var(--border); max-width: 420px; margin: 0 auto; }
.media-hint { margin: 8px 0 0; text-align: center; font-size: .85rem; color: var(--muted); }

.course-badge {
  display: inline-block; margin: 0 0 16px; padding: 8px 16px;
  background: var(--yellow); color: var(--navy); font-weight: 900; border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--orange); transform: skewX(-6deg);
}
.course-subhead { font-size: 1rem; font-weight: 900; color: var(--navy); margin: 20px 0 10px; padding-left: 10px; border-left: 4px solid var(--blue); }

.check-list, .dot-list, .hours-list, .unit-list { list-style: none; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.unit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.unit-list li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--blue-50); border-radius: var(--radius-sm); font-weight: 700; color: var(--navy); line-height: 1.4;
}
.unit-list span {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: #fff; font-size: .85rem; font-weight: 900;
}

.time-list { list-style: none; display: grid; gap: 8px; margin-bottom: 8px; }
.time-list li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 14px; background: var(--blue-50); border-radius: var(--radius-sm); border-left: 5px solid var(--orange);
}
.time-grade { padding: 2px 10px; background: var(--navy); color: #fff; font-weight: 900; border-radius: 4px; font-size: .95rem; }
.time-day { font-weight: 700; color: var(--navy); }
.time-list strong { font-size: 1.05rem; font-weight: 900; color: var(--orange-600); white-space: nowrap; }

.session-list { list-style: none; display: grid; gap: 8px; }
.session {
  display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center;
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--blue-50); border-left: 5px solid var(--orange);
}
.session-date { font-weight: 900; color: var(--navy); white-space: nowrap; }
.session-topic { font-weight: 700; }
.session-note { margin: 10px 0 0; font-size: .92rem; color: var(--blue); font-weight: 700; }
.session-empty {
  margin: 0; padding: 12px 14px; border: 2px dashed var(--orange); border-radius: var(--radius-sm);
  color: var(--navy); font-weight: 700;
}
.launch { margin: 14px 0 0; padding: 10px 14px; font-weight: 900; color: var(--navy); border: 2px dashed var(--orange); border-radius: var(--radius-sm); }
.launch time { color: var(--red); font-size: 1.2rem; margin-right: 4px; }

.course-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.course-actions .btn { flex: 1 1 180px; }

/* ---------- 師資 ---------- */
.teacher-layout { display: grid; gap: 20px; }
.teacher-photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--bg-alt); }
.teacher-photo figcaption { padding: 10px 16px; font-weight: 700; color: var(--navy); background: #fff; }
.teacher-cards { display: grid; gap: 16px; align-content: start; }
.teacher-card {
  padding: 20px 22px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border-top: 5px solid var(--orange);
}
.teacher-name { font-size: 1.6rem; font-weight: 900; color: var(--navy); }
.teacher-name small { font-size: .95rem; font-weight: 700; margin-left: 4px; color: var(--ink-soft); }
.teacher-subject { margin: 2px 0 10px; color: var(--blue); font-weight: 700; }
.teacher-subhead { font-size: .95rem; color: var(--navy); margin: 12px 0 4px; }
.dot-list li { position: relative; padding-left: 18px; }
.dot-list li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); transform: rotate(45deg); }

/* 裁切照片：以百分比放大並位移原圖，只露出指定區域 */
.crop { position: relative; overflow: hidden; aspect-ratio: var(--ratio, 4 / 3); }
.crop img { position: absolute; max-width: none; height: auto; width: var(--w, 100%); left: var(--x, 0); top: var(--y, 0); }

.book-row {
  display: grid; gap: 20px; align-items: center; margin-top: 40px; padding: 24px 20px;
  background: var(--bg-alt); border-radius: var(--radius);
}
.book-text h3 { font-size: 1.4rem; font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.book-text p:last-child { margin: 0; color: var(--ink-soft); }
.book-figure { margin: 0; max-width: 300px; width: 100%; justify-self: center; }
.book-figure .zoomable { box-shadow: var(--shadow); }
.book-figure figcaption { margin-top: 8px; font-size: .85rem; color: var(--ink-soft); text-align: center; line-height: 1.6; }

/* ---------- 團隊特色 ---------- */
.feature-grid { list-style: none; display: grid; gap: 16px; }
.feature-card {
  display: flex; flex-direction: column; padding: 26px 22px; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius);
  transition: transform .25s var(--ease), background-color .25s;
}
.feature-card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .1); }
.feature-icon {
  display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 14px;
  border-radius: 16px; background: var(--yellow); color: var(--navy);
}
.feature-icon svg { width: 32px; height: 32px; }
.feature-card h3 { font-size: 1.2rem; font-weight: 900; color: #fff; margin-bottom: 8px; }
.feature-card p { margin: 0; color: rgba(255, 255, 255, .85); }
.feature-link { margin-top: 12px; color: var(--yellow); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; }
.feature-link:hover { text-decoration: underline; }

/* ---------- 會考分析 ---------- */
.article-list { list-style: none; display: grid; gap: 12px; }
.article-item a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.article-item a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue); }
.article-title { font-weight: 700; font-size: 1.05rem; line-height: 1.6; color: var(--navy); }
.article-source { margin-top: auto; font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; }

.tv-box { margin-top: 28px; padding: 18px 20px; border: 1px dashed #c3ccda; border-radius: var(--radius); }
.tv-box h3 { font-size: 1rem; font-weight: 900; color: var(--navy); margin-bottom: 8px; }
.tv-list { list-style: none; display: grid; gap: 4px; color: var(--ink-soft); }
.tv-list li::before { content: "▶"; color: var(--orange); font-size: .75em; margin-right: 8px; }

/* ---------- 升學諮詢 ---------- */
.consult-grid { display: grid; gap: 24px; align-items: center; }
.consult-text p { font-size: 1.05rem; }
.consult-text strong { color: var(--navy); }
.consult-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consult-actions .btn { flex: 1 1 160px; }

.info-card {
  position: relative; padding: 24px 16px 18px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, #f4f7fd 0%, #dfe7f6 100%); box-shadow: var(--shadow); border: 1px solid #d3dcec;
}
.info-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: var(--stripes); }
.info-card-title { font-size: clamp(1.4rem, 5.5vw, 2rem); font-weight: 900; color: #1340a0; margin-bottom: 16px; letter-spacing: .06em; }
.info-rows { list-style: none; display: grid; gap: 10px; }
.info-row { display: grid; grid-template-columns: minmax(0, 1.5fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; }
.info-from, .info-to { display: flex; align-items: center; padding: 10px 12px; border-radius: 6px; background: var(--navy); font-weight: 900; line-height: 1.35; }
.info-from { color: #fff; flex-wrap: wrap; }
.info-from small { font-size: .78em; font-weight: 700; color: rgba(255, 255, 255, .8); }
.info-to { justify-content: center; color: var(--yellow); text-align: center; }
.info-arrow { display: grid; place-items: center; color: var(--navy); }
.info-arrow svg { width: 26px; height: 26px; }
.info-source { margin: 14px 0 0; font-size: .82rem; color: var(--ink-soft); text-align: right; }

/* ---------- 報名與聯絡 ---------- */
.form-cta {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start; margin-bottom: 24px; padding: 24px 20px;
  border-radius: var(--radius); color: #fff; background: linear-gradient(105deg, var(--orange) 0 70%, var(--orange-600) 70%);
  box-shadow: var(--shadow);
}
.form-cta h3 { font-size: 1.35rem; font-weight: 900; margin-bottom: 4px; }
.form-cta p { margin: 0; }
.form-cta .btn-primary { background: #fff; color: var(--orange-600); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }

.contact-grid { display: grid; gap: 16px; }
.contact-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.contact-card h3 { font-size: 1.1rem; font-weight: 900; color: var(--navy); }
.contact-card p { margin: 0; }
.contact-card .contact-sub { margin-top: 8px; }
.contact-big { font-size: 1.6rem; font-weight: 900; }
.contact-big a { color: var(--navy); text-decoration: none; }
.contact-id, .contact-transit { color: var(--ink-soft); font-size: .95rem; }
.qr { width: 150px; height: 150px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.contact-card .btn { margin-top: auto; }

.map-wrap { margin-top: 24px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.map-wrap iframe { display: block; width: 100%; height: 320px; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .85); padding: 40px 0 96px; font-size: .92rem; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--stripes); opacity: .9; }
.footer-name { font-weight: 900; font-size: 1.2rem; color: #fff; margin-bottom: 12px; }
.footer-name span { display: block; font-size: .85rem; font-weight: 500; color: var(--yellow); }
.footer-info { list-style: none; margin-bottom: 16px; }
.footer-info a { color: #fff; }
.footer-copy { margin: 0; font-size: .82rem; color: rgba(255, 255, 255, .6); }

/* ---------- Floating actions ---------- */
.float-actions {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px; transition: opacity .25s, transform .25s;
}
.float-actions.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.float-btn {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  color: #fff; text-decoration: none; box-shadow: var(--shadow-lg); transition: transform .2s var(--ease);
}
.float-btn:hover { transform: translateY(-3px); }
.float-btn svg { width: 30px; height: 30px; }
.float-line { background: var(--line-green); }
.float-tel { background: var(--orange); }
.float-fb { background: var(--fb-blue); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 56px 8px 48px; background: rgba(5, 15, 35, .94);
}
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.lb-caption { margin-top: 10px; color: #fff; text-align: center; font-size: .92rem; padding: 0 12px; }
.lb-counter { position: absolute; top: 16px; left: 16px; margin: 0; color: rgba(255, 255, 255, .75); font-size: .9rem; }
.lb-close, .lb-nav {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .28); }
.lb-close { top: 8px; right: 8px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   ≥ 768px
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 28px; }
  html { scroll-padding-top: calc(var(--header-h-small) + 16px); }

  .brand-name { font-size: 1.4rem; }
  .brand-sub { font-size: .78rem; }
  .brand-license { display: inline; }

  .hero-inner { grid-template-columns: 1.25fr 1fr; align-items: center; padding-top: 56px; padding-bottom: 80px; }
  .hero-actions .btn { flex: 0 0 auto; }
  .hero-facts span { font-size: .82rem; }

  .section { padding: 88px 0; }
  .section-head { margin-bottom: 44px; }

  .step-list { grid-template-columns: repeat(3, 1fr); }
  .cap-panel { grid-template-columns: 1.3fr 1fr; padding: 28px 32px; }
  .cap-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .cap-actions .btn { flex: 1 1 0; }

  .course-head { padding: 26px 32px 30px; }
  .course-body { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); padding: 32px; gap: 32px; align-items: start; }
  .course-card.no-media .course-body { grid-template-columns: 1fr; }

  .teacher-layout { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .book-row { grid-template-columns: 1fr 260px; padding: 32px; gap: 32px; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .article-list { grid-template-columns: repeat(2, 1fr); }

  .info-card { padding: 28px 28px 20px; }
  .info-from, .info-to { padding: 12px 16px; font-size: 1.1rem; }

  .form-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 28px 32px; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .map-wrap iframe { height: 380px; }

  .site-footer { padding-bottom: 48px; }
}

/* =========================================================
   ≥ 1024px
   ========================================================= */
@media (min-width: 1024px) {
  html { scroll-padding-top: calc(var(--header-h-small) + 20px); }

  .nav-toggle { display: none; }
  .site-nav {
    position: static; visibility: visible; opacity: 1; transform: none;
    background: transparent; border: 0; box-shadow: none; max-height: none; overflow: visible;
  }
  .site-nav ul { display: flex; align-items: center; gap: 2px; padding: 0; }
  .site-nav a { position: relative; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); font-size: .95rem; white-space: nowrap; }
  .site-nav a::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 3px;
    background: var(--orange); border-radius: 2px; transform: scaleX(0); transition: transform .25s var(--ease);
  }
  .site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
  .site-nav a.is-active { color: var(--navy); }
  .site-nav a.nav-cta { margin: 0 0 0 8px; padding: 8px 18px; }
  .site-nav a.nav-cta::after { display: none; }
  .site-nav a.nav-cta:hover { background: var(--orange-600); }
  .brand-license { display: none; }

  .hero-inner { grid-template-columns: 1.3fr 1fr; gap: 56px; padding-top: 72px; padding-bottom: 96px; }
  .hero-media { width: min(100%, 400px); }

  .cap-panel { grid-template-columns: 1.2fr 1fr 1fr; align-items: center; padding: 32px 36px; }
  .cap-actions { grid-column: auto; flex-direction: column; }
  .cap-actions .btn { flex: none; }

  .course-list { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .course-body { grid-template-columns: 1fr; }
  .course-card:not(.no-media) .course-body { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }

  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .article-list { grid-template-columns: repeat(3, 1fr); }
  .consult-grid { grid-template-columns: 1fr 1.1fr; gap: 48px; }

  .contact-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px 40px; align-items: start; }
  .footer-copy { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .15); }
}

@media (min-width: 1200px) {
  .brand-license { display: inline; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .feature-card:hover, .float-btn:hover, .article-item a:hover { transform: none; }
  .zoomable:hover img { transform: none; }
}
