/* ═══════════════════════════════════════════════════════════════
   楓橋美語 Maple Bridge — 全站共用樣式表 (single source of truth)
   設計變數驅動 · 桌機優先 · 響應式 (RWD)
   ═══════════════════════════════════════════════════════════════ */

/* ── 設計變數 ───────────────────────────────────────────────── */
:root {
  --primary:      #CC1616;
  --primary-dk:   #A81010;
  --secondary:    #1A9BD7;
  --secondary-dk: #127ba8;
  --accent:       #FFD84D;
  --dark:         #222222;
  --text:         #444444;
  --muted:        #6b7280;
  --light:        #F7F8FA;
  --white:        #FFFFFF;
  --line:         #e8eaef;
  --radius:       14px;
  --radius-lg:    24px;
  --shadow-sm:    0 2px 10px rgba(0,0,0,.06);
  --shadow:       0 8px 30px rgba(0,0,0,.10);
  --shadow-lg:    0 16px 48px rgba(0,0,0,.16);
  --transition:   .3s ease;
  --container-max: 1180px;
  --nav-h:        76px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 800; line-height: 1.25; color: var(--dark); }
strong { font-weight: 700; }

/* ── 共用容器 ───────────────────────────────────────────────── */
.container {
  width: min(92vw, var(--container-max));
  margin-inline: auto;
}

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── 按鈕 ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1;
  padding: .8rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--secondary-dk); border-color: #fff; }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ── 導覽列 (透明疊在 hero 上，捲動後變白) ─────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  padding: .55rem 0;
}
.nav-inner {
  width: min(92vw, var(--container-max)); margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-mobile { display: flex; align-items: center; gap: .6rem; }
.nav-logo-leaf { height: 48px; width: auto; }
.nav-logo-mobile-text { display: flex; flex-direction: column; line-height: 1.12; font-weight: 800; font-size: 1.3rem; color: #fff; transition: color var(--transition); text-shadow: 0 1px 6px rgba(0,0,0,.28); }
.nav-logo-mobile-en { font-size: .64rem; font-weight: 600; letter-spacing: .2em; opacity: .9; }
/* 選單置中：左右等量 auto margin 讓導覽列文字置中於 Logo 與 CTA 之間 */
.nav-links { display: flex; align-items: center; gap: 1.7rem; margin-inline: auto; }
.nav-links a { font-size: 1rem; font-weight: 600; color: #fff; transition: color var(--transition); padding: .3rem 0; position: relative; text-shadow: 0 1px 6px rgba(0,0,0,.22); }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  margin-left: 0; padding: .6rem 1.45rem; font-size: .96rem;
  background: transparent; border: 2px solid rgba(255,255,255,.85); color: #fff;
}
.nav-cta:hover { background: #fff; color: var(--primary); border-color: #fff; transform: translateY(-2px); }

/* 捲動後 / 內頁：白底實心 */
#navbar.scrolled { background: #fff; box-shadow: 0 2px 16px rgba(0,0,0,.08); }
#navbar.scrolled .nav-logo-mobile-text { color: var(--dark); text-shadow: none; }
#navbar.scrolled .nav-links a { color: var(--dark); text-shadow: none; }
#navbar.scrolled .nav-links a:hover { color: var(--primary); }
#navbar.scrolled .nav-cta { background: var(--primary); border-color: var(--primary); color: #fff; }
#navbar.scrolled .nav-cta:hover { background: var(--primary-dk); border-color: var(--primary-dk); }

/* 漢堡 (桌機隱藏) */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; margin-left: auto; }
.hamburger span { display: block; width: 26px; height: 3px; border-radius: 3px; background: #fff; transition: var(--transition); }
#navbar.scrolled .hamburger span { background: var(--dark); }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 行動選單抽屜 */
.mobile-menu {
  display: none; flex-direction: column; gap: .25rem;
  background: #fff; box-shadow: var(--shadow);
  padding: .5rem 1.2rem; max-height: 0; overflow: hidden;
}
.mobile-menu.open { display: flex; max-height: 80vh; padding: 1rem 1.2rem; }
.mobile-menu a { padding: .85rem .4rem; border-bottom: 1px solid var(--line); color: var(--dark); font-weight: 600; }
.mobile-menu a:last-child { border-bottom: 0; }

/* ── 區塊標題 ───────────────────────────────────────────────── */
.section-title { text-align: center; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-title .en {
  display: block; color: var(--primary); font-weight: 700;
  font-size: .9rem; letter-spacing: .20em; text-transform: uppercase; margin-bottom: .6rem;
}
.section-title h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--dark); }
.section-title p { color: var(--muted); margin: 1rem auto 0; max-width: 620px; line-height: 1.8; }

/* ── 波浪分隔 ───────────────────────────────────────────────── */
.wave-divider { line-height: 0; margin-top: -1px; }
.wave-divider svg { display: block; width: 100%; height: clamp(36px, 5vw, 64px); }
.wave-divider--light { background: #fff; }
.wave-divider--blue  { background: var(--light); }
/* 統計帶下方的藍色波浪過渡（白底上的藍色弧線） */
.wave-divider--accent { background: var(--white); }
.wave-divider--accent svg { height: clamp(28px, 4vw, 48px); }
#gallery + .wave-divider--white { background: var(--secondary); }

/* ── 內頁頁首 page-hero ─────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff; padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem));
  padding-bottom: clamp(2.5rem, 5vw, 4rem); text-align: center;
}
.page-hero .en { display: block; color: var(--accent); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: .9rem; margin-bottom: .6rem; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); }
.page-hero .lead { color: rgba(255,255,255,.9); max-width: 680px; margin: 1rem auto 0; line-height: 1.8; }
.breadcrumb { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.2rem; font-size: .9rem; color: rgba(255,255,255,.85); }
.breadcrumb a { color: rgba(255,255,255,.85); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb i { font-size: .7rem; opacity: .8; }

/* ── 頁尾 CTA 紅條 ─────────────────────────────────────────── */
.footer-cta-bar { background: linear-gradient(135deg, var(--primary), var(--primary-dk)); }
.footer-cta-inner {
  width: min(92vw, var(--container-max)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.2rem) 0; flex-wrap: wrap;
}
.footer-cta-text { color: #fff; font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 800; }
.footer-cta-btns { display: flex; gap: .8rem; flex-wrap: wrap; }
.footer-cta-btn {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 700;
  padding: .75rem 1.5rem; border-radius: 999px; transition: var(--transition);
}
.footer-cta-btn--phone { background: #fff; color: var(--primary); }
.footer-cta-btn--phone:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.footer-cta-btn--line { background: #06C755; color: #fff; }
.footer-cta-btn--line:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ── 頁尾主體 ───────────────────────────────────────────────── */
footer { background: var(--dark); color: rgba(255,255,255,.75); }
footer > .container { width: min(92vw, var(--container-max)); }
.footer-inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(3rem, 5vw, 4.5rem) 0 2.5rem;
}
.footer-brand .logo-wrap { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.footer-brand .logo-wrap img { height: 54px; width: auto; }
.footer-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.footer-brand-zh { font-size: 1.35rem; font-weight: 800; color: #fff; }
.footer-brand-en { font-size: .72rem; letter-spacing: .08em; color: rgba(255,255,255,.6); }
.footer-brand p { line-height: 1.9; max-width: 340px; font-size: .95rem; }
.footer-col h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1.2rem; display: flex; align-items: center; }
.footer-col ul { display: flex; flex-direction: column; gap: .7rem; }
.footer-col a { display: inline-flex; align-items: center; gap: .55rem; color: rgba(255,255,255,.75); font-size: .95rem; transition: var(--transition); }
.footer-col a:hover { color: #fff; padding-left: .25rem; }
.footer-col a i { width: 1rem; text-align: center; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 1.6rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .88rem; color: rgba(255,255,255,.6);
}
.maple-heart { display: inline-block; }

/* ── 回到頂部 ───────────────────────────────────────────────── */
#scrollTop {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 1.1rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: var(--transition);
}
#scrollTop.visible { opacity: 1; pointer-events: auto; transform: none; }
#scrollTop:hover { background: var(--primary-dk); }

/* ── 響應式：導覽列收合 ─────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .nav-inner { justify-content: space-between; }
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cta-inner { flex-direction: column; text-align: center; }
  .footer-bottom { justify-content: center; text-align: center; }
}


/* ═══════════════════════════════════════════════════════════════
   HERO / 統計列
   ═══════════════════════════════════════════════════════════════ */
/* Hero Section — 楓橋美語首頁主視覺區域 */

#hero {
  position: relative;
  min-height: clamp(520px, 70vh, 760px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

/* Hero Background Image */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hero Overlay — Dark gradient for text readability */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* 左深右透：保留教室細節與人物辨識度，同時讓左側白字可讀 */
  background: linear-gradient(100deg,
    rgba(15, 18, 28, 0.74) 0%,
    rgba(15, 18, 28, 0.42) 45%,
    rgba(15, 18, 28, 0.12) 100%);
}

/* Hero Content Container */
.hero-content {
  position: relative;
  z-index: 2;
  width: min(92vw, var(--container-max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  flex: 1 0 auto;
}

/* Hero Text Block */
.hero-text {
  max-width: 620px;
  color: #fff;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Main Heading — 更大、更有重量 */
#hero h1 {
  font-size: clamp(2.7rem, 5.6vw, 4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.highlight {
  color: var(--accent);
  font-weight: 800;
}

/* Subtitle — 緊鄰主標 */
.subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

/* Main paragraph text */
.hero-text > p:not(.subtitle) {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 1.7rem;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  min-height: 52px;
  padding: 0 1.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 999px;
}

.hero-buttons .btn i {
  font-size: 0.95em;
}

.hero-buttons .btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(204, 22, 22, 0.35);
}

.hero-buttons .btn-primary:hover {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
}

.hero-buttons .btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.hero-buttons .btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

/* Stats Bar Section — 全寬扁平白色統計帶（非浮動圓角卡片） */
.hero-stats {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-block: clamp(1.4rem, 2.6vw, 2rem);
}

.hero-stats-inner {
  width: min(92vw, var(--container-max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* Stats Item */
.stat-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-item .num {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-item .label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
}

/* Stats Divider */
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--line);
  flex-shrink: 0;
}

/* Stats right-side red circular arrow CTA — Hide */
.hero-stats-cta {
  display: none !important;
}

/* Responsive — Tablet (max-width: 992px) */
@media (max-width: 992px) {
  #hero {
    min-height: clamp(480px, 65vh, 700px);
  }

  .hero-content {
    padding: 7rem 1.5rem 3rem;
  }

  #hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }

  .hero-stats-inner {
    padding: 0;
    gap: 0.8rem;
  }

  .stat-item .num {
    font-size: clamp(1.6rem, 2.8vw, 2rem);
  }

  .stat-divider {
    display: none;
  }
}

/* Responsive — Mobile (max-width: 640px) */
@media (max-width: 640px) {
  #hero {
    min-height: clamp(450px, 60vh, 620px);
  }

  .hero-content {
    padding: 5.5rem 1.2rem 2.5rem;
  }

  .hero-text {
    max-width: 100%;
  }

  .badge {
    padding: 0.45rem 0.9rem;
    font-size: 0.78rem;
    margin-bottom: 1rem;
  }

  #hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 0.3rem;
  }

  .subtitle {
    font-size: 0.88rem;
    margin-bottom: 0.8rem;
  }

  .hero-text > p:not(.subtitle) {
    font-size: 0.94rem;
    margin-bottom: 1.5rem;
    max-width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  .hero-buttons .btn {
    width: 100%;
    padding: 0.85rem 1.8rem;
    font-size: 0.95rem;
  }

  .hero-stats-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.2rem;
    padding: 0;
    margin-top: 0;
  }

  .stat-item {
    flex: 1;
  }

  .stat-item .num {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  }

  .stat-item .label {
    font-size: 0.8rem;
  }

  .stat-divider {
    display: none;
  }
}


/* ═══════════════════════════════════════════════════════════════
   ABOUT 關於我們
   ═══════════════════════════════════════════════════════════════ */
#about {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--white);
}

.about-fullbleed {
  width: min(92vw, var(--container-max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
}

.about-photo-col {
  position: relative;
}

/* 左圖更大、接近直式矩形，圓角/陰影較收斂 */
.about-photo-col img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.about-floating-badge {
  position: absolute;
  bottom: 1.2rem;
  right: -1rem;
  background: var(--white);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.about-floating-badge .icon {
  background: var(--primary);
  color: var(--white);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.about-floating-badge .info strong {
  display: block;
  font-weight: 700;
  color: var(--dark);
}

.about-floating-badge .info span {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}

.about-text-col {
  padding-inline: 0;
}

.about-en-label {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.6rem;
}

#about h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.about-text-col p {
  color: var(--text);
  line-height: 1.8;
  margin-block: 0.6rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.feature-item:hover {
  background: rgba(204, 22, 22, 0.04);
}

.feature-icon {
  background: rgba(204, 22, 22, 0.1);
  color: var(--primary);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.feature-item h4 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 992px) {
  .about-fullbleed {
    grid-template-columns: 1fr;
  }

  .about-floating-badge {
    right: 1rem;
    bottom: 1.2rem;
  }
}

@media (max-width: 640px) {
  .about-floating-badge {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .about-floating-badge .icon {
    width: 40px;
    height: 40px;
  }

  #about h2 {
    font-size: clamp(1.5rem, 5vw, 1.8rem);
  }
}


/* ═══════════════════════════════════════════════════════════════
   COURSES 課程
   ═══════════════════════════════════════════════════════════════ */
#courses {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  background: var(--light);
}

.courses-home-spacer {
  height: clamp(0.5rem, 2vw, 1.5rem);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  width: min(92vw, var(--container-max));
  margin-inline: auto;
}

.courses-grid[hidden] {
  display: none !important;
}

.course-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.course-header {
  padding: 1.5rem;
  background: #fff;
  position: relative;
}

.course-icon-wrap {
  width: 52px;
  height: 52px;
  background: rgba(204, 22, 22, 0.1);
  color: var(--primary);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.course-header h3 {
  font-weight: 800;
  color: var(--dark);
  margin-top: 0.8rem;
}

.level-tag {
  display: inline-block;
  background: rgba(255, 216, 77, 0.28);
  color: #7a5a00;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.4rem;
}

.course-body {
  padding: 0 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-body p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
  flex: 1;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.course-tag {
  display: inline-block;
  background: var(--light);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 992px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
}


/* ═══════════════════════════════════════════════════════════════
   CAMPUS LIFE 活動花絮
   ═══════════════════════════════════════════════════════════════ */
#gallery {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: linear-gradient(135deg, #2daae3, var(--secondary-dk));
}

#gallery .section-title {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

#gallery .section-title h2 {
  color: #fff;
}

#gallery .section-title p {
  color: rgba(255, 255, 255, 0.85);
}

#gallery .section-title .en {
  color: var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.2rem;
  width: min(92vw, var(--container-max));
  margin-inline: auto;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.gallery-item--wide {
  grid-column: span 2;
  grid-row: span 2;
}

/* 藍色漸層佔位卡片（無照片，置中大圖示 + 底部標籤） */
.gallery-item--ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%),
              linear-gradient(160deg, #2fb0e6, var(--secondary-dk));
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: relative;
}

.gallery-ph-icon {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: clamp(0.8rem, 2vw, 1.2rem);
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  font-weight: 600;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.9rem;
}

.gallery-item--ph .gallery-caption {
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .gallery-item {
    aspect-ratio: 1;
  }

  .gallery-item--wide {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .gallery-item {
    aspect-ratio: 1;
    min-height: 200px;
  }

  .gallery-item--wide {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-ph-icon {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 0.8rem;
  }

  .gallery-caption {
    padding: 0.8rem;
    font-size: 0.85rem;
  }
}


/* ═══════════════════════════════════════════════════════════════
   STUDY ABROAD 海外遊學
   ═══════════════════════════════════════════════════════════════ */
/* ─────── banner: STUDY ABROAD ─────── */
/* ═══════════════════════════════════════════════
   ABROAD SECTION — Study Abroad Grid & CTA
   ═══════════════════════════════════════════════ */

#abroad {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--white);
}

.abroad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  width: min(92vw, var(--container-max));
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

/* 各國卡片改為全站一致的「白卡」語言：上方彩色橫幅(國旗+國別代碼) + 白底內文。
   解決原本「整張卡單色、白字壓在彩底上對比不足」的問題：
   內文改為深色字壓白底 (對比 >7:1)，彩色僅出現在無內文的橫幅區。 */
.country-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.country-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* 橫幅改為各國「實景插畫圖」(images2/*-banner.svg) 取代原本的單色漸層。
   圖以 ::before 承載 (可在 hover 緩慢推近)，::after 疊一層底部加深 scrim
   保障國旗 / 國別代碼疊字可讀，並讓圖與下方白底之間有乾淨分界。
   每張卡用 --banner-img / --banner-fallback 變數指定，純色 fallback 仍與該國同色系。 */
.country-banner {
  position: relative;
  height: clamp(120px, 18vw, 156px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.6rem;
  overflow: hidden;
  background-color: var(--banner-fallback, var(--primary-dk));
  isolation: isolate;
}

/* 場景圖層 */
.country-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--banner-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.01);
  transition: transform 600ms cubic-bezier(0.2, 0, 0, 1);
}

/* 對比 scrim：底部加深 + 左側微暗(國旗後方)，讓疊字達標且圖體更有層次 */
.country-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.30) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 42%);
}

.country-card:hover .country-banner::before { transform: scale(1.08); }

/* 各國場景圖 + 同色系純色 fallback */
.country-card--canada { --banner-img: url("../images2/abroad-canada-banner.svg"); --banner-fallback: #a81010; }
.country-card--uk     { --banner-img: url("../images2/abroad-uk-banner.svg");     --banner-fallback: #10266b; }
.country-card--au     { --banner-img: url("../images2/abroad-au-banner.svg");     --banner-fallback: #0c6e5a; }

@media (prefers-reduced-motion: reduce) {
  .country-banner::before,
  .country-card:hover .country-banner::before { transition: none; transform: none; }
}

.country-flag {
  position: relative;
  z-index: 2;
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

/* 大型半透明國別代碼，純裝飾 (資訊由內文 h3 提供，無對比疑慮) */
.country-code {
  position: relative;
  z-index: 2;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 3.2rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.country-body {
  padding: 1.4rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.country-body h3 {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.country-body p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

/* 標籤：同國色系淡底 + 深色字，維持 AA 對比 */
.country-tag {
  align-self: flex-start;
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
}

.country-card--canada .country-tag { background: rgba(204, 22, 22, 0.10); color: var(--primary-dk); }
.country-card--uk     .country-tag { background: rgba(26, 155, 215, 0.14); color: var(--secondary-dk); }
.country-card--au     .country-tag { background: rgba(12, 110, 90, 0.12);  color: #0c6e5a; }

.abroad-cta {
  width: min(92vw, var(--container-max));
  margin-inline: auto;
  /* 以多層漸層取代單調純色：右上高光 + 左下陰影 + 加深品牌藍底，
     讓白字達 WCAG AA 對比，同時帶出立體感而非平塗 */
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
    radial-gradient(100% 130% at 0% 100%, rgba(0, 0, 0, 0.22), transparent 60%),
    linear-gradient(120deg, #0e6a92, #08415a);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(8, 65, 90, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.6rem, 2.8vw, 2.2rem) clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
}

.abroad-cta-text {
  flex: 1;
}

.abroad-cta h3 {
  color: var(--white);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin: 0 0 0.5rem 0;
  font-weight: 800;
}

.abroad-cta p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  line-height: 1.6;
}

.abroad-cta .btn-white {
  background: var(--white);
  color: var(--secondary-dk);
  font-weight: 700;
  padding: clamp(0.65rem, 1.2vw, 0.8rem) clamp(1.2rem, 2.2vw, 1.6rem);
  font-size: clamp(0.9rem, 1.6vw, 0.95rem);
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid var(--white);
  transition: var(--transition);
}

.abroad-cta .btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

@media (max-width: 992px) {
  .abroad-grid {
    grid-template-columns: 1fr;
  }

  .abroad-cta {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1.5rem;
  }

  .abroad-cta .btn-white {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .abroad-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 1.2rem;
  }

  .abroad-cta .btn-white {
    width: 100%;
    justify-content: center;
  }

  .abroad-cta h3 {
    font-size: 1.05rem;
  }

  .abroad-cta p {
    font-size: 0.9rem;
  }
}


/* ═══════════════════════════════════════════════════════════════
   CONTACT 聯絡我們
   ═══════════════════════════════════════════════════════════════ */

#contact {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.4rem, 3vw, 2rem);
  align-items: start;
  width: min(92vw, var(--container-max));
  margin-inline: auto;
}

.contact-grid-col {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-grid-col--left {
  /* Left column: phone card + hours + contact form card */
}

.contact-grid-col--right {
  /* Right column: location cards stacked vertically */
}

/* ── Big phone highlight card (red gradient) ── */
.contact-phone-big {
  background: linear-gradient(135deg, var(--primary), var(--primary-dk));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-phone-big-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.contact-phone-big .label {
  opacity: 0.92;
  font-weight: 600;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.contact-phone-big .number {
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.contact-phone-big .number a {
  color: #fff;
  text-decoration: none;
}

.contact-phone-big .hint {
  opacity: 0.85;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* ── Hours card (white background) ── */
.contact-hours {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 2vw, 1.4rem);
  box-shadow: var(--shadow-sm);
}

.contact-hours h4 {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.contact-hours h4 i {
  color: var(--primary);
  font-size: 0.9rem;
}

.contact-hours p {
  line-height: 1.8;
  color: var(--text);
  font-size: 0.9rem;
  margin: 0;
}

/* ── Contact card (generic: form card on left, location cards on right) ── */
.contact-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 2.5vw, 1.6rem);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-card--contact-form {
  background: #fff;
}

.contact-card--contact-form-desc {
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Card header (icon + title + subtitle) ── */
.contact-card-header {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.contact-card-header .icon {
  background: var(--primary);
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-card-icon--secondary {
  background: var(--secondary) !important;
}

.contact-card-header h3 {
  font-weight: 800;
  color: var(--dark);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.contact-card-header span {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
}

/* ── Info row (address / phone with icons) ── */
.contact-info-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.contact-info-row i {
  color: var(--primary);
  margin-top: 0.15rem;
  flex-shrink: 0;
  font-size: 0.85rem;
}

/* ── Map container (light blue background) ── */
.contact-map {
  margin-top: 0.8rem;
  border-radius: var(--radius);
  overflow: hidden;
  height: clamp(180px, 22vw, 220px);
  background: #e6eef5;
  border: 1px solid #dce8f0;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Storefront photo ── */
.contact-storefront {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.contact-storefront img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

/* ── Buttons container (side-by-side, capsule-shaped) ── */
.contact-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

.contact-btn {
  flex: 1;
  background: var(--primary);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-size: 0.95rem;
}

.contact-btn:hover {
  background: var(--primary-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(204, 22, 22, 0.4);
}

.contact-btn--line {
  flex: 1;
  background: #06C755;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.contact-btn--line:hover {
  background: #058c3e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 199, 85, 0.3);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: Tablet (max-width: 992px)
   ═══════════════════════════════════════════════ */

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .contact-buttons {
    flex-direction: column;
    gap: 0.6rem;
  }

  .contact-btn,
  .contact-btn--line {
    width: 100%;
  }

  .contact-card-header .icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .contact-card-header h3 {
    font-size: 1rem;
  }

  .contact-map {
    height: clamp(160px, 20vw, 200px);
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: Mobile (max-width: 640px)
   ═══════════════════════════════════════════════ */

@media (max-width: 640px) {
  #contact {
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
  }

  .contact-grid {
    gap: 1rem;
  }

  .contact-grid-col {
    gap: 1rem;
  }

  .contact-phone-big {
    padding: clamp(1.2rem, 3vw, 1.6rem);
  }

  .contact-phone-big .label {
    font-size: 0.85rem;
  }

  .contact-phone-big .number {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
  }

  .contact-phone-big .hint {
    font-size: 0.8rem;
    margin-top: 0.1rem;
  }

  .contact-hours {
    padding: 1rem;
  }

  .contact-hours h4 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }

  .contact-hours p {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .contact-card {
    padding: 1rem;
    gap: 0.6rem;
  }

  .contact-card-header {
    gap: 0.6rem;
  }

  .contact-card-header .icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .contact-card-header h3 {
    font-size: 0.95rem;
  }

  .contact-card-header span {
    font-size: 0.75rem;
    margin-top: 0.1rem;
  }

  .contact-info-row {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    gap: 0.6rem;
  }

  .contact-buttons {
    gap: 0.6rem;
    margin-top: 0;
  }

  .contact-btn,
  .contact-btn--line {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    border-radius: 999px;
  }

  .contact-map {
    height: 160px;
    margin-top: 0.6rem;
  }

  .contact-storefront {
    margin-top: 0.8rem;
  }

  .contact-card--contact-form-desc {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
  }
}
