/* === 全站基本設定 === */
:root {
  --header-h: 64px;
  --brand-main: #C9B4E8;      /* 淡紫 */
  --brand-main-dark: #B99DE0; /* hover 紫 */
  --brand-line: #e7dff6;      /* 淺紫底線 */
  --brand-text: #3a3a3a;      /* 深灰文字 */
  --brand-bg: #ffffff;
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
}

html {
  height: 100%;
  margin: 0;
  font-family: "Noto Sans TC", "Inter", sans-serif;
  background: var(--brand-bg);
  color: var(--brand-text);

  /* iOS 避免字體自動放大造成版面跳動 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;

  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  height: 100%;
  margin: 0;
  font-family: inherit;
  background: var(--brand-bg);
  color: var(--brand-text);

  /* 讓主內容不被 fixed header 壓住 */
  padding-top: var(--header-h);

  /* 防止某元素超出造成左右滑 */
  overflow-x: hidden;
}

.container {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* footer */
.site-footer {
  background-color: #f9f7ff;
  padding: 30px 20px;
  text-align: center;
  font-size: 14px;
  color: #4a4a4a;
}

/* === Header 導覽列 === */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1500;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--brand-line);
  width: 100%;
  padding: 10px 20px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  width: 100%;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #000;
  margin: 0;
}

.logo a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}

nav { position: relative; }

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.menu li a {
  text-decoration: none;
  color: var(--brand-text);
  font-family: "Noto Serif TC", serif;
  font-weight: 600;
  transition: color 0.25s ease;
}

.menu li a:hover { color: var(--brand-main-dark); }

/* === 漢堡按鈕（品牌版） === */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--brand-main);
  background: #ffffff;
  color: var(--brand-text);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: #f3e9ff;
  box-shadow: 0 0 0 3px rgba(201,180,232,0.35);
}

/* 手機 RWD 選單 */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .header { padding: 10px 16px; }
  .logo { font-size: 1.4rem; }

  .menu {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.97);
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    z-index: 1100;
  }

  .menu.open { display: flex; }

  body.nav-open {
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .container { padding: 0 16px 32px; }
}

/* === 按鈕 (品牌統一版) === */
.more-center {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.more-button,
.form-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 12px 24px;
  border-radius: 999px;

  font-family: "Noto Sans TC","Inter",sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;

  text-decoration: none;
  text-align: center;

  border: none;
  background: linear-gradient(90deg, var(--brand-main), var(--brand-main-dark));
  color: #ffffff;

  box-shadow: 0 6px 16px rgba(130,112,173,0.26);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.more-button:hover,
.form-button:hover {
  background: linear-gradient(90deg, var(--brand-main-dark), #AF91DD);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(130,112,173,0.33);
}

.more-button:active,
.form-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(130,112,173,0.22);
}

@media (max-width: 768px) {
  .more-center {
    flex-direction: column;
    align-items: center;
  }
  .more-button,
  .form-button {
    width: 100%;
    max-width: 260px;
  }
}

/* === 內容區塊標題 === */
.section {
  margin-bottom: 50px;
  scroll-margin-top: calc(var(--header-h) + 12px);
  color: var(--brand-text);
}

.section h2 {
  font-family: "Noto Serif TC", serif;
  font-size: 1.6rem;
  border-bottom: 2px solid var(--brand-main);
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.section p {
  line-height: 1.85;
  letter-spacing: 0.2px;
  color: #4a4a4a;
}

/* === 課程卡片 === */
.course-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.course-card {
  display: block;
  width: 280px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  text-decoration: none;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.course-card img {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}

.course-card h3 {
  margin-top: 10px;
  font-family: "Noto Serif TC", serif;
  font-size: 1.2rem;
  color: var(--brand-text);
}

.course-card p {
  color: #666;
  margin-bottom: 0;
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* === 師資照片（圓形） === */
.teacher-photo-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.teacher-photo {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ===== Hero 區塊 ===== */
.hero {
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: center;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-family: "Noto Serif TC", "Playfair Display", serif;
  font-size: 1.6rem;
  margin: 0 0 10px;
  color: #333;
}

.hero-subtitle {
  font-size: 1rem;
  color: #555;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-b {
  background: linear-gradient(180deg, #f9f7ff 0%, #ffffff 70%);
}

.hero-logo-wrap {
  position: relative;
  width: 220px;
  max-width: 65vw;
  margin: 0 auto 18px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff 0, #f3e9ff 40%, #e4d5ff 80%);
  filter: blur(2px);
  z-index: -1;
}

.hero-logo {
  width: 180px;
  max-width: 55vw;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero {
    padding-top: 30px;
    padding-bottom: 32px;
  }
  .hero-title {
    font-size: 1.35rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
}

/* === Lightbox === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* =========================
   學員成果：橫向輪播（含箭頭/計數/等高）
   ========================= */

.gallery-wrap {
  position: relative;
  margin-top: 16px;
}

/* ✅ 只給輪播用，避免被你其他 .gallery 設定影響 */
.gallery--carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 52px;

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;

  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery--carousel::-webkit-scrollbar { display: none; }

.gallery--carousel .lightbox-link {
  flex: 0 0 240px;          /* 桌機每張寬度 */
  border-radius: 14px;
  overflow: hidden;
  scroll-snap-align: start;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.gallery--carousel img {
  width: 100%;
  height: 180px;            /* ✅ 統一高度 */
  object-fit: cover;
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  width: 38px;
  height: 38px;
  border-radius: 999px;

  border: 1px solid var(--brand-main);
  background: rgba(255,255,255,0.92);
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  transition: transform .15s ease, opacity .2s ease, box-shadow .2s ease;
}

.gallery-arrow:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 10px 22px rgba(0,0,0,0.16);
}

.gallery-arrow.left { left: 8px; }
.gallery-arrow.right { right: 8px; }

.gallery-arrow.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.gallery-counter {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

@media (max-width: 768px) {
  .gallery--carousel {
    padding: 6px 44px;
  }
  .gallery--carousel .lightbox-link {
    flex: 0 0 80%;        /* 手機一張大圖好滑 */
  }
  .gallery--carousel img {
    height: 160px;
  }
}

/* Footer */
.footer-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Social icons */
.social-icons a img {
  width: 26px;
  margin: 0 6px;
  transition: transform .2s ease;
}

.social-icons a img:hover {
  transform: scale(1.1);
}
