:root {
  /* SAIP TAIWAN — CIS 官方品牌色 (Color System v1.0) */
  --primary-color:    #1B2C5A;       /* SAIP Navy — 主視覺深藍,信任、沉穩 */
  --primary-hover:    #13204A;       /* Deep Navy — 加深陰影、Hover */
  --primary-soft:     #2C3F73;       /* Soft Navy — 過渡與輔助 */
  --secondary-color:  #D9A441;       /* SAIP Gold — 主導金色,品質、智啟 */
  --secondary-hover:  #B8862C;       /* Gold Hover */
  --secondary-soft:   #E8C078;       /* Light Gold — 高光、強調點綴 */
  --accent-color:     #2C3F73;       /* Soft Navy 兼作連結強調 */

  /* CIS 中性色 */
  --paper-white:      #FAFAF7;       /* Paper White — 背景主色 */
  --ink-black:        #1A1A1A;       /* Ink Black — 內文最深 */
  --neutral-gray:     #868E96;       /* Neutral Gray — 輔助說明 */

  /* 主漸層:CIS 同色系深藍 (Navy → Soft Navy) */
  --gradient-main: linear-gradient(135deg, #1B2C5A 0%, #2C3F73 100%);
  /* 副漸層:Navy × Gold,用於高光卡片或強調區塊 */
  --gradient-cool: linear-gradient(135deg, #1B2C5A 0%, #D9A441 100%);
  --gradient-warm: linear-gradient(135deg, #D9A441 0%, #E8C078 100%);

  /* 背景與文字 (CIS 60/25/10/5 — Navy/PaperWhite/Gold/Ink) */
  --bg-color: #FAFAF7;               /* Paper White — CIS 主背景 */
  --surface-color: #ffffff;
  --text-main: #1A1A1A;              /* Ink Black — 高對比內文 */
  --text-muted: #868E96;             /* Neutral Gray — 輔助文字 */

  /* 卡片 / 毛玻璃 */
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(27, 44, 90, 0.08);
  --shadow-sm: 0 4px 10px -2px rgba(19, 32, 74, 0.06), 0 2px 4px -2px rgba(19, 32, 74, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(19, 32, 74, 0.14);

  /* 品牌 logo 圖檔路徑 (CSS 預設;由後台上傳的圖會覆寫此檔) */
  --site-logo: url('../img/logo-inline.svg');
}

/* Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* CIS 字型系統 — Noto Serif TC (CJK 標題) + Inter (Latin 正文/標題) + Noto Sans TC (CJK 正文)
   參考 SAIP_Taiwan_CIS_Manual 2.12 / 2.13 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Serif+TC:wght@400;500;700;900&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  font-family: 'Inter', 'Noto Sans TC', 'PingFang TC', 'Heiti TC', sans-serif;
  background-attachment: fixed;
  letter-spacing: 0;                      /* CIS 內文字距 0 ~ +1 */
}

/* CIS 標題:中文襯線 (Noto Serif TC) + 西文 Inter Black 9
   字距 -2 ~ -4 (CIS 2.13 大標規範) */
h1, h2, h3, h4 {
    font-family: 'Noto Serif TC', 'Inter', 'PingFang TC', serif !important;
    letter-spacing: -0.5px;
}
.logo, .cta-button, .btn-action {
    font-family: 'Inter', 'Noto Sans TC', sans-serif !important;
    letter-spacing: 0.5px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.text-center {
  text-align: center;
}

/* 頂部導覽列 Header */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.glass-header.scrolled {
    padding: 0.7rem 5%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* 品牌 logo:CIS 規範採堆疊式,以背景圖呈現,DOM 文字隱藏 (a11y / SEO) */
.logo {
  display: inline-block;
  width: 144px;
  height: 80px;
  background-image: var(--site-logo);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  vertical-align: middle;
}
@media (max-width: 768px) {
  .logo { width: 120px; height: 66px; }
}
@media (max-width: 480px) {
  .logo { width: 104px; height: 58px; }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: -6px;
  left: 0;
  background: var(--gradient-main);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.auth-buttons button {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1.8rem;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 700;
  margin-left: 1rem;
}

.auth-buttons button:hover {
  background: rgba(0, 0, 0, 0.03);
}

.auth-buttons button.primary {
  background: var(--text-main);
  border: none;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.auth-buttons button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  background: var(--primary-color);
}

/* 首頁英雄區 Hero */
.hero {
  padding: 12rem 5% 8rem;
  min-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.badge {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.8rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--text-main);
}

.hero h1 span {
  background: var(--gradient-main);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.25rem;
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.8;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.cta-button {
  background: var(--gradient-main);
  color: white;
  padding: 1.1rem 2.5rem;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.cta-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 35px rgba(79, 70, 229, 0.35);
}

.secondary-button {
  background: white;
  color: var(--text-main);
  padding: 1.1rem 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: var(--shadow-sm);
}

.secondary-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 0, 0, 0.15);
}

.secondary-button .fa-line {
  color: #00c300;
  font-size: 1.4rem;
}

/* ============================================================
   Hero 多媒體輪播 — CIS 動畫特效 (fade / slide / kenburns / zoom / flip)
   ============================================================ */
.hero-carousel { position: relative; overflow: hidden; }

.hero-carousel.has-media {
  background: var(--ink-black);
  isolation: isolate;
}

.hero-carousel.has-media .hero-content { position: relative; z-index: 3; }
.hero-carousel.has-media .badge {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-color);
  border-color: transparent;
}
.hero-carousel.has-media .hero h1,
.hero-carousel.has-media h1 { color: #fff !important; }
.hero-carousel.has-media .hero h1 span,
.hero-carousel.has-media h1 span {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-carousel.has-media .hero p,
.hero-carousel.has-media p { color: rgba(255, 255, 255, 0.92); }

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 1;
  perspective: 1200px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.1s ease, transform 1.1s ease;
  will-change: opacity, transform;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide-media {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(19, 32, 74, 0.35) 0%, rgba(19, 32, 74, 0.65) 60%, rgba(19, 32, 74, 0.78) 100%),
    radial-gradient(ellipse at top right, rgba(217, 164, 65, 0.18) 0%, transparent 55%);
  pointer-events: none;
}

/* 上一張 / 下一張 控制鍵 */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(19, 32, 74, 0.45);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.hero-nav:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--ink-black);
  transform: translateY(-50%) scale(1.05);
}
.hero-prev { left: 24px; }
.hero-next { right: 24px; }

/* 指示點 */
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}
.hero-dot {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, width 0.3s ease;
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.6); }
.hero-dot.is-active {
  width: 56px;
  background: var(--secondary-color);
}

/* 動畫特效 — fade (預設) */
.hero-carousel.effect-fade .hero-slide { transform: scale(1); }

/* 動畫特效 — slide */
.hero-carousel.effect-slide .hero-slide { transform: translateX(60px); }
.hero-carousel.effect-slide .hero-slide.is-active { transform: translateX(0); }

/* 動畫特效 — kenburns (緩慢推近) */
.hero-carousel.effect-kenburns .hero-slide.is-active .hero-slide-media {
  animation: heroKenburns 12s ease-in-out forwards;
}
@keyframes heroKenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-1.5%, -1.5%); }
}

/* 動畫特效 — zoom */
.hero-carousel.effect-zoom .hero-slide { transform: scale(1.08); }
.hero-carousel.effect-zoom .hero-slide.is-active { transform: scale(1); }

/* 動畫特效 — flip */
.hero-carousel.effect-flip .hero-slide {
  transform: rotateY(20deg);
  transform-origin: center center;
}
.hero-carousel.effect-flip .hero-slide.is-active { transform: rotateY(0); }

@media (max-width: 768px) {
  .hero-nav { width: 42px; height: 42px; font-size: 1rem; }
  .hero-prev { left: 12px; }
  .hero-next { right: 12px; }
  .hero-dot { width: 24px; }
  .hero-dot.is-active { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-carousel.effect-kenburns .hero-slide.is-active .hero-slide-media {
    transition: opacity 0.3s ease;
    animation: none;
  }
}

/* 區塊標題 */
.section-title {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 4rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-main);
}

.section-title span.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  color: #ef4444;
  margin-top: 1rem;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  width: fit-content;
  margin: 1.5rem auto 0;
}

/* 平台優勢 Features */
.features-section {
  padding: 8rem 0;
  position: relative;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  background: var(--card-bg);
  padding: 3rem 2rem;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  text-align: center;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gradient-cool);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-card:hover::before {
  opacity: 1;
}

/* CIS feature icon — Navy stroke + Gold accent, 對齊 SAIP CIS 2.10/2.14
   不採天藍/俏皮歪斜,改為 Paper White 底 + 金色細邊 + hover 時下方浮現 Gold Rule */
.feature-icon {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 0 auto 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);                      /* SAIP Navy stroke */
  background: linear-gradient(150deg, #FAFAF7 0%, #F2EFE6 100%);
  border: 1px solid rgba(217, 164, 65, 0.45);       /* CIS Gold 細邊 */
  border-radius: 16px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 6px 18px -8px rgba(27, 44, 90, 0.18);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.feature-icon::after {
  /* CIS Aux Graphic B — Gold Rule,hover 時浮現 */
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 0;
  height: 1.5px;
  background: linear-gradient(90deg, var(--secondary-color), var(--secondary-soft));
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.45s ease, width 0.45s ease;
  border-radius: 2px;
}
.feature-icon svg { width: 38px; height: 38px; display: block; }
.feature-icon i {  /* 後台填 FA icon 時的 fallback 樣式 */
  font-size: 2.1rem;
  color: var(--primary-color);
}

.feature-card:hover .feature-icon {
  transform: translateY(-3px);
  border-color: var(--secondary-color);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 14px 28px -10px rgba(217, 164, 65, 0.45);
}
.feature-card:hover .feature-icon::after {
  opacity: 0.9;
  width: 38px;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.7;
  font-weight: 500;
}

/* 推薦課程 Courses */
.featured-courses {
  padding: 8rem 0;
  background: white;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.course-card {
  background: var(--surface-color);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.course-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
}

.course-image {
  width: 100%;
  height: 220px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-image i {
  font-size: 4rem;
  color: #cbd5e1;
}

.category-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-color);
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.5px;
}

.course-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  font-weight: 800;
}

.course-title a {
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.3s;
}

.course-title a:hover {
  color: var(--primary-color);
}

.course-instructor {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.course-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #f59e0b;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.course-rating span {
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-weight: 500;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.course-price {
  display: flex;
  flex-direction: column;
}

.original-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.current-price {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-main);
}

.buy-btn {
  background: var(--bg-color);
  color: var(--primary-color);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 0.7rem 1.6rem;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.buy-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: transparent;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.2);
}

.outline-button {
  background: white;
  color: var(--text-main);
  border: 2px solid rgba(0, 0, 0, 0.1);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.outline-button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 學員見證 Testimonials */
.testimonials-section {
  padding: 8rem 0;
  position: relative;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.testimonial-card {
  background: var(--card-bg);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--card-border);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.testimonial-card:hover {
  transform: translateY(-8px);
}

.quote-icon {
  font-size: 2.5rem;
  color: rgba(236, 72, 153, 0.2);
  margin-bottom: 1.5rem;
}

.testimonial-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 2.5rem;
  font-weight: 500;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: auto;
}

.author-avatar {
  width: 55px;
  height: 55px;
  background: var(--gradient-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: white;
  box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

.author-info h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.author-info span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 底部訂閱 Bottom CTA */
.bottom-cta {
  padding: 9rem 0;
  text-align: center;
  background: linear-gradient(to bottom, transparent, rgba(79, 70, 229, 0.05));
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.bottom-cta h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 900;
  letter-spacing: -1px;
}

.bottom-cta p {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 3.5rem;
  font-weight: 500;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  max-width: 550px;
  margin: 0 auto;
  background: white;
  padding: 0.5rem;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-lg);
}

.newsletter-form input {
  flex-grow: 1;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
}

.newsletter-form input:focus {
  outline: none;
}

.newsletter-form .cta-button {
  padding: 1rem 2.5rem;
  border-radius: 50px;
  margin: 0;
  box-shadow: none;
}

.newsletter-form .cta-button:hover {
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* 網頁底部 Footer */
.site-footer {
  background: #ffffff;
  padding: 6rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.footer-col h3 {
  font-size: 1.6rem;
  background: var(--gradient-main);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.8rem;
  color: var(--text-main);
  font-weight: 800;
}

.brand-col p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 320px;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--bg-color);
  border-radius: 50%;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.social-links a:hover {
  background: var(--gradient-main);
  border-color: transparent;
  transform: translateY(-5px);
  color: white;
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 1rem;
}

.footer-col ul a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.95rem;
  font-weight: 500;
}

.footer-col ul a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
}

/* 區塊漸變動畫 Animations */
.fade-in-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RWD Responsive Settings */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 10rem 5% 5rem;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .newsletter-form {
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    gap: 1rem;
    box-shadow: none;
  }

  .newsletter-form input {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--shadow-sm);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
 * CIS HOME LAYER — 對齊 SAIP_Taiwan_CIS_Manual V1.0
 *  - 2.10/2.11 色彩 60-25-10-5 (Navy / Paper / Gold / Ink)
 *  - 2.12/2.13 字型 Noto Serif TC + Inter
 *  - 2.14 輔助圖形 A 山巒 / B 金色分隔 / C 智識網格
 *  本區覆寫先前部分樣式,讓首頁更有節奏、紋理與精緻感
 *  (排序:A 階 紋理/標題/底色 → B 階 卡片/頭像/統計 → C 階 動畫/留白)
 * ===================================================================== */

/* ───── A1. Hero 山巒紋 + 金色光暈 (覆寫舊 .hero) ───── */
.hero {
    background:
        radial-gradient(ellipse at 80% 0%, rgba(217,164,65,0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 0% 100%, rgba(44,63,115,0.45) 0%, transparent 55%),
        linear-gradient(160deg, #0F1A3D 0%, #1B2C5A 55%, #2C3F73 100%);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.hero::before {
    /* CIS Aux Graphic A — 山巒水印 (前景) */
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M0 60 Q 25 38 50 60 T 100 60' stroke='rgba(217,164,65,0.09)' fill='none' stroke-width='0.5'/><path d='M0 75 Q 25 52 50 75 T 100 75' stroke='rgba(217,164,65,0.06)' fill='none' stroke-width='0.4'/></svg>");
    background-size: 420px;
    opacity: 0.85; pointer-events: none; z-index: 0;
}
.hero::after {
    /* CIS Gold Rule — Hero 底部金線 */
    content: '';
    position: absolute; left: 50%; bottom: 50px;
    transform: translateX(-50%);
    width: 100px; height: 2.5px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    z-index: 1; opacity: 0.7;
}
.hero-content { position: relative; z-index: 2; max-width: 920px; margin: 0 auto; }
.hero h1 { color: #fff !important; letter-spacing: -1.4px; font-family: 'Noto Serif TC', 'Inter', serif !important; }
.hero h1 span { -webkit-text-fill-color: var(--secondary-color); background: none; color: var(--secondary-color); }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.18rem; }
.hero .badge {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(217,164,65,0.5);
    color: var(--secondary-soft); backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px -4px rgba(0,0,0,0.25);
}
.hero .secondary-button {
    background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.45); color: #fff;
}
.hero .secondary-button:hover { background: rgba(255,255,255,0.14); border-color: var(--secondary-color); }
.hero .trust-stats { border-top-color: rgba(255,255,255,0.18) !important; }

/* ───── A2. CIS Eyebrow + Gold Rule Block (套在 section title 上方) ───── */
.cis-section-head {
    text-align: center; margin-bottom: 3.5rem;
    position: relative; z-index: 2;
}
.cis-section-head .eyebrow {
    display: inline-flex; align-items: center; gap: 0.7rem;
    font-family: 'Inter', sans-serif; font-weight: 700;
    font-size: 0.78rem; letter-spacing: 3.5px; text-transform: uppercase;
    color: var(--secondary-color); margin-bottom: 1rem;
}
.cis-section-head .eyebrow::before, .cis-section-head .eyebrow::after {
    content: ''; display: inline-block; width: 28px; height: 1.5px;
    background: var(--secondary-color); opacity: 0.7;
}
.cis-section-head.is-light .eyebrow { color: var(--secondary-soft); }
.cis-section-head.is-light .eyebrow::before, .cis-section-head.is-light .eyebrow::after { background: var(--secondary-soft); }
.cis-section-head .section-title {
    margin: 0 0 0.6rem !important;
    font-family: 'Noto Serif TC', 'Inter', serif !important;
}
.cis-section-head .gold-rule {
    display: block; width: 70px; height: 2.5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--secondary-soft));
    margin: 1.4rem auto 1.6rem;
    border-radius: 2px;
}
.cis-section-head .lead {
    color: var(--text-muted); font-size: 1.05rem; line-height: 1.85;
    max-width: 680px; margin: 0 auto;
}
.cis-section-head.is-light .lead { color: rgba(255,255,255,0.78); }
.cis-section-head.is-light .section-title { color: #fff !important; }

/* ───── A3. Section 底色節奏 (60-25-10-5) ───── */

/* features 改 Paper White + 山巒水印 */
.features-section {
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFAF7 60%, #F2EFE6 100%);
    overflow: hidden;
}
.features-section::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M0 50 Q 25 30 50 50 T 100 50' stroke='rgba(27,44,90,0.04)' fill='none' stroke-width='0.4'/></svg>");
    background-size: 380px; opacity: 0.6;
}
.features-section .container { position: relative; z-index: 1; }

/* how-it-works 區用獨立 cis-howto-section class (見 home.php) */
.cis-howto-section {
    background: #FFFFFF;
    padding: 5.5rem 0 !important;
    position: relative;
    border-top: 1px solid rgba(27,44,90,0.05);
    border-bottom: 1px solid rgba(27,44,90,0.05);
}
.cis-howto-section .step-num {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary-color), #2C3F73);
    color: var(--secondary-color);
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.15rem;
    flex-shrink: 0; letter-spacing: 1px;
    box-shadow: 0 8px 18px -8px rgba(27,44,90,0.45);
    border: 1px solid rgba(217,164,65,0.35);
    position: relative;
}
.cis-howto-section .step-num::after {
    content: ''; position: absolute; right: -3px; bottom: -3px;
    width: 10px; height: 10px; background: var(--secondary-color);
    border-radius: 50%; border: 2px solid #fff;
}
.cis-howto-section .step-card { display: flex; align-items: flex-start; gap: 1.5rem; padding: 1rem; }
.cis-howto-section .step-card h4 { font-family: 'Noto Serif TC', serif; font-size: 1.15rem; font-weight: 800; color: var(--primary-color); margin-bottom: 0.5rem; }
.cis-howto-section .step-card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.75; }

/* category section 加金色框邊與懸浮 */
#category-section { background: linear-gradient(180deg, #F2EFE6 0%, #FFFFFF 100%) !important; }
#category-section a {
    border: 1px solid rgba(27,44,90,0.12) !important;
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px -8px rgba(27,44,90,0.18);
}

/* testimonials 改 Soft Navy + 山巒紋 (深色 section) */
.testimonials-section {
    background:
        radial-gradient(ellipse at 100% 0%, rgba(217,164,65,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 0% 100%, rgba(0,0,0,0.18) 0%, transparent 60%),
        linear-gradient(165deg, #1B2C5A 0%, #2C3F73 100%);
    color: #fff;
    overflow: hidden;
}
.testimonials-section::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M0 50 Q 25 30 50 50 T 100 50' stroke='rgba(217,164,65,0.08)' fill='none' stroke-width='0.4'/></svg>");
    background-size: 380px; opacity: 0.85;
}
.testimonials-section .container { position: relative; z-index: 1; }
.testimonials-section .section-title { color: #fff !important; }

/* testimonial 卡片改深色玻璃 */
.testimonial-card {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(217,164,65,0.25) !important;
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px -22px rgba(0,0,0,0.5) !important;
}
.testimonial-card .quote-icon { color: var(--secondary-color) !important; opacity: 0.85; }
.testimonial-card .testimonial-text { color: rgba(255,255,255,0.92) !important; }
.testimonial-card .author-info h4 { color: #fff; }
.testimonial-card .author-info span { color: rgba(255,255,255,0.65); }

/* bottom-cta 改 Navy + 金色 + 山巒紋 */
.bottom-cta {
    background:
        radial-gradient(ellipse at 100% 100%, rgba(217,164,65,0.18) 0%, transparent 55%),
        linear-gradient(155deg, #13204A 0%, #1B2C5A 55%, #2C3F73 100%) !important;
    color: #fff !important; overflow: hidden;
    border-bottom: none !important;
}
.bottom-cta::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M0 50 Q 25 30 50 50 T 100 50' stroke='rgba(217,164,65,0.10)' fill='none' stroke-width='0.4'/></svg>");
    background-size: 380px; opacity: 0.9;
}
.bottom-cta .container { position: relative; z-index: 1; }
.bottom-cta h2 { color: #fff !important; font-family: 'Noto Serif TC', serif !important; letter-spacing: -0.8px; }
.bottom-cta p { color: rgba(255,255,255,0.78) !important; }
.bottom-cta .newsletter-form input {
    background: rgba(255,255,255,0.95);
    color: #1a1a1a;
    border: 1px solid rgba(217,164,65,0.4);
}
.bottom-cta .newsletter-form input:focus { border-color: var(--secondary-color); outline: none; }
.bottom-cta .cta-button {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-soft)) !important;
    color: var(--ink-black) !important; font-weight: 800;
    box-shadow: 0 12px 30px -10px rgba(217,164,65,0.5) !important;
}

/* ───── B1. 課程卡 — 常駐金色頂條 + Hover Navy 強化 ───── */
.course-card { position: relative; overflow: hidden; }
.course-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--secondary-soft));
    z-index: 3;
}
.course-card::after {
    /* CIS Gold Rule — 卡片底部細線 */
    content: ''; position: absolute; bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    transition: width 0.4s ease;
}
.course-card:hover::after { width: 100%; }
.course-card:hover { border-color: var(--secondary-color) !important; }

/* ───── B2. 講師頭像 — 金色雙環 ───── */
#featured-teachers .teacher-avatar-wrap::before {
    content: ''; position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1.5px solid var(--secondary-color);
    opacity: 0.5;
    pointer-events: none;
}
#featured-teachers .teacher-avatar-wrap::after {
    content: ''; position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed rgba(217,164,65,0.35);
    pointer-events: none;
    animation: cis-ring-rotate 60s linear infinite;
}
@keyframes cis-ring-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    #featured-teachers .teacher-avatar-wrap::after { animation: none; }
}

/* ───── B3. 智識網格 統計區塊 (CIS Aux Graphic C) ───── */
.cis-stats-section {
    padding: 5rem 0;
    background:
        linear-gradient(135deg, #FAFAF7 0%, #FFFFFF 60%, #F2EFE6 100%);
    position: relative; overflow: hidden;
    border-top: 1px solid rgba(27,44,90,0.05);
    border-bottom: 1px solid rgba(27,44,90,0.05);
}
.cis-stats-section::before {
    /* 智識網格 — 細點陣 */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(27,44,90,0.08) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: 0.55;
}
.cis-stats-section .container { position: relative; z-index: 1; }
.cis-stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; max-width: 1100px; margin: 0 auto;
}
.cis-stat-item {
    text-align: center; padding: 1.6rem 1.2rem;
    border-left: 2px solid rgba(217,164,65,0.45);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.cis-stat-item:hover {
    transform: translateY(-4px);
    border-left-color: var(--secondary-color);
    box-shadow: 0 14px 30px -16px rgba(27,44,90,0.25);
}
.cis-stat-num {
    font-family: 'Noto Serif TC', 'Inter', serif;
    font-size: clamp(2.2rem, 4vw, 2.8rem); font-weight: 900;
    color: var(--primary-color); letter-spacing: -1px; line-height: 1;
}
.cis-stat-num .unit { font-size: 1.2rem; color: var(--secondary-color); margin-left: 0.2rem; font-weight: 700; }
.cis-stat-label {
    margin-top: 0.6rem; font-size: 0.85rem; letter-spacing: 2px;
    color: var(--text-muted); font-family: 'Inter', sans-serif; font-weight: 600;
    text-transform: uppercase;
}
.cis-stat-zh { font-size: 0.95rem; color: var(--primary-color); font-weight: 700; margin-top: 0.3rem; }

/* ───── C. reveal 動畫曲線優化 + 留白節奏 ───── */
.fade-in-hidden { opacity: 0; transform: translateY(28px); transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1); }
.fade-in-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .fade-in-hidden { opacity: 1; transform: none; transition: none; }
}

/* CIS section 留白節奏 — Navy 主場拉長,Paper 補白偏緊 */
.testimonials-section, .bottom-cta { padding: 9rem 0 !important; }
.features-section, .featured-courses { padding: 7rem 0 !important; }

/* CIS pillar feature card — h3 對齊 Noto Serif TC */
.feature-card h3 {
    font-family: 'Noto Serif TC', serif !important;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

/* =====================================================================
 * CIS MOBILE NAV — RWD 漢堡選單 + 抽屜式主導覽
 *  - 對齊 SAIP_Taiwan_CIS V1.0:Navy 底 + Gold 點綴 + 山巒水印
 *  - 觸控目標 ≥44×44 (a11y)、ESC 關閉、overlay tap 關閉、捕捉焦點
 *  - 桌機 (>768px) 完全隱藏,不影響既有版面
 * ===================================================================== */
.nav-toggle {
    display: none;                /* 桌機隱藏 */
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: transparent;
    border: 1.5px solid rgba(27,44,90,0.12);
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    margin-left: 0.6rem;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 1101;                /* 高於 drawer overlay 才能在開啟時當「關閉」按鈕 */
}
.nav-toggle:hover { border-color: var(--secondary-color); background: rgba(217,164,65,0.06); }
.nav-toggle:focus-visible { outline: 2px solid var(--secondary-color); outline-offset: 2px; }

.nav-toggle .bar {
    position: absolute;
    left: 50%;
    width: 22px; height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease, background 0.3s ease;
    transform-origin: center;
}
.nav-toggle .bar:nth-child(1) { top: 14px; transform: translateX(-50%); }
.nav-toggle .bar:nth-child(2) { top: 21px; transform: translateX(-50%); }
.nav-toggle .bar:nth-child(3) { top: 28px; transform: translateX(-50%); }

/* 開啟狀態 — 漢堡轉 X,中段 Gold,呼應 CIS 金線分隔 */
.nav-toggle.is-open .bar { background: var(--secondary-color); }
.nav-toggle.is-open .bar:nth-child(1) { top: 21px; transform: translateX(-50%) rotate(45deg); }
.nav-toggle.is-open .bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .bar:nth-child(3) { top: 21px; transform: translateX(-50%) rotate(-45deg); }

/* ───── Overlay 黑色遮罩 ───── */
.nav-overlay {
    position: fixed; inset: 0;
    background: rgba(15,26,61,0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.32s ease, visibility 0.32s ease;
    z-index: 1099;
}
.nav-overlay.is-open { opacity: 1; visibility: visible; }

/* ───── Drawer 抽屜面板 — 由右側滑入,Navy 底 + 山巒水印 ───── */
.nav-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(360px, 86vw);
    height: 100vh; height: 100dvh;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(217,164,65,0.18) 0%, transparent 55%),
        linear-gradient(160deg, #0F1A3D 0%, #1B2C5A 60%, #2C3F73 100%);
    color: #fff;
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(0.4,0,0.2,1);
    z-index: 1100;
    display: flex; flex-direction: column;
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(15,26,61,0.25);
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer::before {
    /* CIS Aux Graphic A — 山巒水印,呼應 hero */
    content: '';
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M0 60 Q 25 38 50 60 T 100 60' stroke='rgba(217,164,65,0.10)' fill='none' stroke-width='0.5'/><path d='M0 75 Q 25 52 50 75 T 100 75' stroke='rgba(217,164,65,0.07)' fill='none' stroke-width='0.4'/></svg>");
    background-size: 320px;
    pointer-events: none;
    opacity: 0.85;
}

.nav-drawer .drawer-head {
    position: relative;
    padding: 1.6rem 1.6rem 1.2rem;
    border-bottom: 1px solid rgba(217,164,65,0.25);
}
.nav-drawer .drawer-head .eyebrow-line {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-family: 'Inter', sans-serif; font-weight: 700;
    font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase;
    color: var(--secondary-soft);
}
.nav-drawer .drawer-head .eyebrow-line::before {
    content: ''; width: 24px; height: 1.5px; background: var(--secondary-color);
}
.nav-drawer .drawer-head h2 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 900; font-size: 1.35rem;
    margin: 0.55rem 0 0; color: #fff; letter-spacing: -0.3px;
}

.nav-drawer .drawer-nav {
    list-style: none; margin: 0; padding: 1rem 0;
    display: flex; flex-direction: column;
    position: relative;
}
.nav-drawer .drawer-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-drawer .drawer-nav a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.6rem;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-family: 'Noto Serif TC', serif;
    font-weight: 700; font-size: 1.08rem;
    letter-spacing: 0.5px;
    transition: background 0.25s ease, color 0.25s ease, padding 0.25s ease;
}
.nav-drawer .drawer-nav a::after {
    content: '\\2192';            /* 右箭頭 → */
    color: var(--secondary-color);
    opacity: 0.55;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-drawer .drawer-nav a:hover,
.nav-drawer .drawer-nav a:focus-visible {
    background: rgba(217,164,65,0.08);
    color: #fff;
    padding-left: 1.9rem;
    outline: none;
}
.nav-drawer .drawer-nav a:hover::after,
.nav-drawer .drawer-nav a:focus-visible::after {
    transform: translateX(4px); opacity: 1;
}

/* 抽屜內帳號區 — 與 desktop .auth-buttons 風格區分 (深底白字 + 金邊) */
.nav-drawer .drawer-auth {
    position: relative;
    margin-top: auto;             /* 推到底部 */
    padding: 1.6rem;
    border-top: 1px solid rgba(217,164,65,0.25);
    background: rgba(15,26,61,0.4);
    display: flex; flex-direction: column; gap: 0.7rem;
}
.nav-drawer .drawer-auth .greeting {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem; color: rgba(255,255,255,0.78);
    margin-bottom: 0.3rem;
}
.nav-drawer .drawer-auth .greeting strong {
    color: var(--secondary-soft); font-weight: 700;
}
.nav-drawer .drawer-auth a,
.nav-drawer .drawer-auth button {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 700; font-size: 0.98rem;
    text-decoration: none; text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
}
.nav-drawer .drawer-auth a.btn-line,
.nav-drawer .drawer-auth button.btn-line {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.35);
}
.nav-drawer .drawer-auth a.btn-line:hover,
.nav-drawer .drawer-auth button.btn-line:hover {
    border-color: var(--secondary-color); color: var(--secondary-soft);
}
.nav-drawer .drawer-auth a.btn-gold,
.nav-drawer .drawer-auth button.btn-gold {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 1.5px solid var(--secondary-color);
}
.nav-drawer .drawer-auth a.btn-gold:hover,
.nav-drawer .drawer-auth button.btn-gold:hover {
    background: #C28F2E; border-color: #C28F2E;
    transform: translateY(-1px);
}

/* body 鎖捲動 — 抽屜開啟時 */
body.nav-locked { overflow: hidden; }

/* ───── 顯示斷點 — 768px 以下啟用 ───── */
@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; }
    /* 桌機 auth-buttons 在手機隱藏,改在 drawer 內呈現 */
    .glass-header > .auth-buttons { display: none !important; }
}

/* prefers-reduced-motion — 關閉滑動動畫 */
@media (prefers-reduced-motion: reduce) {
    .nav-drawer { transition: none; }
    .nav-overlay { transition: none; }
    .nav-toggle .bar { transition: none; }
}
}