/* ============================================
   國立臺南大學性別培力研究中心 - 主樣式
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* 主色系 - 紫色（性研中心 logo） */
  --primary: #7B2D8E;
  --primary-dark: #5E1D6E;
  --primary-light: #F3E8F7;
  --primary-rgb: 123, 45, 142;

  /* 輔色 - 青綠色（台南大學 logo） */
  --secondary: #00857C;
  --secondary-dark: #006B63;
  --secondary-light: #E6F5F4;

  /* 強調色 - 橘色（台南大學 logo） */
  --accent: #E8772E;
  --accent-dark: #D06520;
  --accent-light: #FFF3EB;
  /* 淺橘底上的文字色：對 --accent-light 為 5.4:1，符合 WCAG AA 4.5:1 */
  --accent-text: #A34A12;
  /* 分類標籤的第 4、5 組配色（藍 7.2:1、桃 6.0:1，皆符合 AA） */
  --info-light: #E8F0FB;
  --info-text: #1A4F8A;
  --pink-light: #FDEAF1;
  --pink-text: #A6265C;

  /* 中性色 */
  --text: #2D2D3A;
  --text-secondary: #6B6B80;
  --text-light: #9999AA;
  --bg: #FAFAFA;
  --bg-white: #FFFFFF;
  --border: #dcdce2;
  --border-light: rgba(0, 0, 0, 0.1);

  /* 字體 */
  --font-family: "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, sans-serif;

  /* 字級系統 (1.25 modular scale) */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* 間距系統 (8px base) */
  --space-0: 0rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-9: 2.25rem;
  --space-10: 2.5rem;
  --space-11: 2.75rem;
  --space-12: 3rem;
  --space-13: 3.25rem;
  --space-14: 3.5rem;
  --space-15: 3.75rem;
  --space-16: 4rem;
  --space-17: 4.25rem;
  --space-18: 4.5rem;
  --space-19: 4.75rem;
  --space-20: 5rem;
  --space-21: 5.25rem;
  --space-22: 5.5rem;
  --space-23: 5.75rem;
  --space-24: 6rem;
  --space-25: 6.25rem;
  --space-26: 6.5rem;
  --space-27: 6.75rem;
  --space-28: 7rem;
  --space-32: 8rem;
  --space-36: 9rem;
  --space-40: 10rem;
  --space-48: 12rem;
  --space-56: 14rem;
  --space-64: 16rem;

  /* 圓角 */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* 陰影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.04), 0 10px 24px rgba(0, 0, 0, 0.1);

  /* 過渡 */
  --transition: all 0.3s ease;

  /* 容器寬度 */
  --container-max: 1240px;
  --container-narrow: 900px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}
.p-0 {
  padding: 0!important;
}
.mb-0 {
  margin-bottom: 0!important;
}
/* --- 容器 --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 1280px) {
  .container {
    padding: 0 var(--space-6);
  }

}

.container--narrow {
  max-width: var(--container-narrow);
}

/* --- 共用元件 --- */

/* Skip Navigation */
.skip-nav,
.skip-to-main {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  padding: var(--space-3) var(--space-6);
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 500;
}

.skip-nav:focus,
.skip-to-main:focus {
  left: var(--space-4);
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  color: #fff;
}

/* --- Header / Navbar --- */
.header {
  position: sticky;
  top: -40px;
  z-index: 1000;
  background: var(--bg-white);
}

.header--scrolled .header__main {
  padding: var(--space-3) 0;
  position: relative;
}

.header--scrolled .header__main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.header__top {
  background: var(--primary);
  color: #fff;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}

.header__top-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-6);
}

/* 搜尋框在頂部列 */
.header__top .header__search {
  position: relative;
}

.header__top .header__search-input {
  width: 200px;
  padding: var(--space-1) var(--space-4);
  padding-right: var(--space-8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: var(--text-sm);
  transition: var(--transition);
}

.header__top .header__search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.header__top .header__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") center/contain no-repeat;
  cursor: pointer;
}

.header__top .header__search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.header__top .header__search-btn {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.header__top .header__search-btn:hover {
  color: #fff;
}

.header__top a {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
}

.header__top a:hover {
  color: #fff;
}

.header__top .accessibility-links a + a::before {
  content: "|";
  opacity: 0.5;
  margin-right: var(--space-3);
  display: inline-block;
}

.header__main {
  padding: var(--space-4) 0;
  background: var(--bg-white);
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

.header__main-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__logo-img {
  height: 53px;
  width: auto;
  transition: height 0.3s ease;
}

.header--scrolled .header__logo {
  gap: var(--space-2);
}

.header--scrolled .header__logo-img {
  height: 42px;
}

.header__logo-img--nutn {
  height: 54px;
  margin-right: .4rem;
}

.header__logo-divider {
  width: 1px;
  height: 36px;
  background: transparent;
  transition: height 0.3s ease;
}

.header--scrolled .header__logo-divider {
  height: 26px;
}

.header__logo-text {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  transition: font-size 0.3s ease;
}

.header--scrolled .header__logo-text {
  font-size: var(--text-xl);
}

.header__logo-text small {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05rem;
  margin-bottom: .08rem;
  transition: font-size 0.3s ease;
}

.header--scrolled .header__logo-text small {
  font-size: var(--text-sm);
}
.header--scrolled .nav__link {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
/* 主選單（與 logo 同列） */
.nav {
  display: flex;
  align-items: center;
}

.nav__close {
  display: none;
}

.nav__list {
  display: flex;
  gap: 0;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: block;
  padding: var(--space-4) var(--space-5);
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  position: relative;
  transition: var(--transition), padding 0.3s ease;
}

.header--scrolled .nav__link {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: calc(var(--space-4) * -1 - 1px);
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
  transition: width 0.3s ease, bottom 0.3s ease;
}

.header--scrolled .nav__dropdown {
  top: calc(100% + var(--space-2) + 4px);
}

.header--scrolled .nav__link::after {
  bottom: calc(var(--space-2) * -1 - 1px);
}

.nav__link:hover,
.nav__link--active {
  color: var(--primary);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 60%;
}

/* 下拉選單 */
.nav__dropdown {
  position: absolute;
  top: calc(100% + var(--space-4) + 0px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  min-width: 200px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2) 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 100;
}

.nav__dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: calc(var(--space-4) + 6px);
}

.nav__item:hover .nav__dropdown,
.nav__item:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
  display: block;
  padding: var(--space-2) var(--space-6);
  color: var(--text);
  font-size: var(--text-base);
  white-space: nowrap;
  transition: var(--transition);
  font-weight: 500;
}

.nav__dropdown-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* 手機版選單元素（預設隱藏） */
.nav__mobile-links,
.nav__mobile-search {
  display: none;
}

/* 漢堡選單 */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active .hamburger__line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger__line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero 輪播 --- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--primary);
}

.hero__slides {
  display: flex;
  transition: transform 0.6s ease;
}

.hero__slide {
  min-width: 100%;
  position: relative;
  aspect-ratio: 16 / 5;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

/* 後台上傳的輪播背景圖（帶 role="img" 供無障礙描述） */
.hero__slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
/*
.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0) 70%),
    linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 55%);
}*/

.hero__slide-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 640px;
  padding: var(--space-10) var(--space-8) var(--space-16);
  margin-top: auto;
}

.hero__slide-content::before {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  margin-bottom: var(--space-5);
  opacity: 0.9;
}

.hero__slide-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hero__slide-desc {
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  max-width: 34em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.15);
  font-weight: 500;
}

.hero__slide-content .btn {
  position: relative;
  isolation: isolate;
  padding: var(--space-2) var(--space-5);
  padding-right: calc(var(--space-5) + 32px);
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: 0.08em;
  overflow: hidden;
  box-shadow: none;
  transform: translateY(0);
  will-change: transform;
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__slide-content .btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}

.hero__slide-content .btn::after {
  content: "→";
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: var(--text-base);
  z-index: 1;
  transition: transform 0.35s ease, right 0.35s ease;
}

.hero__slide-content .btn > * {
  position: relative;
  z-index: 1;
}

.hero__slide-content .btn:hover {
  color: var(--primary);
  border-color: #fff;
  transform: translateY(-3px);
}

.hero__slide-content .btn:hover::before {
  transform: translateX(0);
}

.hero__slide-content .btn:hover::after {
  transform: translateY(-50%) translateX(4px);
}

.hero__controls {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  z-index: 2;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: width 0.35s ease, background-color 0.35s ease, opacity 0.2s ease;
}

.hero__dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.hero__dot.active {
  width: 28px;
  background: #fff;
}

.hero__toggle {
  /* DOM 上排第一（無障礙：Tab 先選到暫停鈕），視覺上仍在圓點右側 */
  order: 1;
  margin-left: var(--space-2);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hero__toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero__toggle svg {
  width: 14px;
  height: 14px;
}

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero__arrow:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
}

.hero__arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.hero__arrow--prev {
  left: var(--space-6);
  transform: translateY(-50%);
}

.hero__arrow--prev:hover {
  transform: translateY(-50%) translateX(-2px);
}

.hero__arrow--next {
  right: var(--space-6);
  transform: translateY(-50%);
}

.hero__arrow--next:hover {
  transform: translateY(-50%) translateX(2px);
}

/* --- Section 共用 --- */
.section {
  padding: var(--space-20) 0;
}

/* --- Sitemap 網站導覽 --- */
.sitemap-intro {
  max-width: 100%;
  margin-bottom: var(--space-10);
  padding: 0;
}

.page-content .sitemap-intro p {
  margin-bottom: var(--space-3);
  line-height: 1.8;
  color: var(--text);
}

.page-content .sitemap-intro__hint {
  margin-top: var(--space-0);
}

.sitemap-intro__hint strong {
  color: var(--text);
}

.sitemap-intro__keys {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 var(--space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2) var(--space-6);
}

.sitemap-intro__keys li {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 2;
}

.sitemap-intro kbd {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--text-sm);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-7);
  padding-bottom: var(--space-0);
}

.sitemap-section {
  padding: var(--space-5) var(--space-6) var(--space-6);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sitemap-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
}

.sitemap-section:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
  border-color: rgba(123, 45, 142, 0.2);
}

.sitemap-section h3.sitemap-section__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  border-left: none;
  padding-left: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0;
  margin-top: 0;
}

.sitemap-section__title i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.sitemap-section__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sitemap-section__list li {
  margin-bottom: var(--space-0)!important;
}

.sitemap-section__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: .3rem var(--space-3);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--text-base);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-weight: 500;
}
.sitemap-section__link::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.sitemap-section__link:hover {
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(4px);
}

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

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

.section--alt {
  background: var(--bg-white);
  padding: var(--space-12) 0 var(--space-20);
  position: relative;
  z-index: 2;
}

.section--purple {
  background: var(--primary-light);
}

.section--gradient {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  padding-bottom: var(--space-26);
  padding-top: var(--space-21);
  position: relative;
  z-index: 1;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-4);
}

.section__subtitle-en {
  display: block;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: clamp(var(--text-4xl), 4vw, var(--text-5xl));
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: var(--space-1);
}

/* section__header 排版模式：英文大標 + 中文小字 + 分隔線 */
.section__header .section__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: #1a1a2e;
  letter-spacing: 0em;
  margin-top: 0;
}

.section__header .section__title::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--text-secondary);
  flex-shrink: 0;
}

.section__header .section__title::after {
  display: none;
}

.section__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  margin: var(--space-3) 0 0;
}

.section__header .section__title::after {
  margin-left: auto;
  margin-right: auto;
}

.section__subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- 最新消息 --- */

/* 手機版下拉選單（預設隱藏） */
.news-select,
.news-dropdown {
  display: none;
}

.news-dropdown__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.news-dropdown__btn:hover {
  background: var(--primary-dark);
}

.news-dropdown__btn svg {
  transition: transform 0.2s ease;
}

.news-dropdown.open .news-dropdown__btn svg {
  transform: rotate(180deg);
}

.news-dropdown__list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: var(--space-2);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
}

.news-dropdown.open .news-dropdown__list {
  display: block;
  animation: dropdown-in 0.2s ease;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.news-dropdown__item {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.news-dropdown__item:last-child {
  border-bottom: none;
}

.news-dropdown__item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.news-dropdown__item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* 消息分類頁籤 - 底線滑動式 */
.news-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  border-bottom: 2px solid rgba(var(--primary-rgb), 0.4);
}

.news-tabs__btn {
  padding: var(--space-2) var(--space-8);
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--primary-light);
  color: var(--primary);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease, background 0.3s ease;
}

.news-tabs__btn:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.news-tabs__btn.active {
  color: #fff;
  font-weight: 600;
  background: var(--primary);
}

/* 焦點新聞 */
.news-featured {
  display: flex;
  background: var(--bg-white);
  overflow: hidden;
  margin-bottom: var(--space-6);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-featured__img {
  flex-shrink: 0;
  width: 280px;
  height: 180px;
  overflow: hidden;
  display: flex;
  border-radius: var(--radius-lg);
}

.news-featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.news-featured:hover .news-featured__img img {
  transform: scale(1.05);
}

.news-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--space-5);
  gap: var(--space-2);
}

.news-featured__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.news-featured__date {
  font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02rem;
}

.news-featured__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
  transition: color 0.3s ease;
}

.news-featured:hover .news-featured__title {
  color: var(--primary);
}

.news-featured__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  /* 截字改由後端處理（50 字 + ...），避免瀏覽器 line-clamp 顯示置中的「…」 */
}

.news-featured__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  align-self: flex-end;
  transition: color 0.3s ease;
}

.news-featured:hover .news-featured__link {
  color: var(--primary-dark);
}

/* 焦點新聞也支援分類篩選 */
.news-featured.hide {
  display: none;
}

.news-item[data-category].hide {
  display: none;
}


.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  transition: var(--transition);
  position: relative;
  border-bottom: 1px solid var(--border);
}

.news-item:hover {
  background: var(--primary-light);
}

.news-item__date {
  flex-shrink: 0;
  font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  min-width: 100px;
  letter-spacing: -.02rem;
}

.news-item__tag {
  flex-shrink: 0;
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
}

.news-item__tag--event {
  background: var(--accent-light);
  color: var(--accent-text);
}

.news-item__tag--course {
  background: var(--secondary-light);
  color: var(--secondary-dark);
}

.news-item__tag--info {
  background: var(--info-light);
  color: var(--info-text);
}

.news-item__tag--pink {
  background: var(--pink-light);
  color: var(--pink-text);
}

.news-item__title {
  flex: 1;
  font-size: var(--text-base);
  color: var(--text);
  font-weight: 400;
}

.news-item:hover .news-item__title {
  color: var(--primary);
}

.news-more {
  text-align: center;
  margin-top: var(--space-6);
}

/* --- 消息列表頁 --- */
.news-page {
  padding: var(--space-10) 0 var(--space-20);
}

.page-content .news-page {
  padding: 0;
  margin-top: -.5rem;
}

.news-filter {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.news-filter__btn {
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.news-filter__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.news-filter__btn--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.news-page__list {
  display: flex;
  flex-direction: column;
}

.news-page__item {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
}

.news-page__item:first-child {
  border-top: none;
}

.news-page__item:hover {
  background: var(--primary-light);
}

.news-page__item.hidden {
  display: none;
}

.news-page__date {
  flex-shrink: 0;
  font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  min-width: 100px;
  letter-spacing: -.02rem;
}

.news-page__title {
  flex: 1;
  font-size: 1.0625rem;
  color: var(--text);
  line-height: 1.6;
}

.news-page__item:hover .news-page__title {
  color: var(--primary);
}

/* --- 行事曆 --- */
/* --- 行事曆（Google Calendar 風格） --- */
.calendar-wrapper {
  position: relative;
  z-index: 10;
}

.cal-popup {
  z-index: 9999;
}

.cal-popup__content {
  z-index: 9999;
}

.calendar {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: visible;
  font-family: Inter, "Noto Sans TC", sans-serif;
  margin-top: -0.3rem;
}

.calendar__loading {
  padding: var(--space-16) var(--space-6);
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-base);
}

.calendar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-wrap: wrap;
}

.calendar__header-left,
.calendar__header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.calendar__header-left {
  flex: 1;
}

.calendar__today-btn {
  padding: var(--space-1) var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-full);
  background: transparent;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.calendar__today-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

/* 年月選擇器 picker */
.cal-picker {
  position: relative;
}

.cal-picker__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-1);
  background: transparent;
  color: #fff;
  border: 0;
  font-size: var(--text-2xl);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.cal-picker__trigger:hover {
  opacity: 0.9;
}

.cal-picker__trigger[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.cal-picker__trigger i {
  transition: transform 0.2s ease;
}

.cal-picker__panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: var(--bg-white);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: var(--space-4);
  z-index: 50;
  animation: cal-picker-in 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.cal-picker__panel[hidden] {
  display: none;
}

@keyframes cal-picker-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cal-picker__year-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.cal-picker__year-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cal-picker__year-btn:hover {
  background: var(--bg);
  color: var(--primary);
}

.cal-picker__year {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}

.cal-picker__months {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.cal-picker__month {
  padding: var(--space-3) 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cal-picker__month:hover {
  background: var(--bg);
  border-color: var(--border);
}

.cal-picker__month--active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.cal-picker__month--active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.cal-picker__month:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.calendar__nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.calendar__nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.calendar__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.calendar__tz {
  letter-spacing: 0.02em;
}

.calendar__add-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--primary);
  font-weight: 500;
  transition: color 0.2s ease;
}

.calendar__add-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}


.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar__row {
  display: contents;
}

.calendar__day:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
  z-index: 2;
  position: relative;
}

.calendar__weekday {
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.calendar__day {
  border: 1px solid var(--border-light);
  min-height: 76px;
  padding: var(--space-1);
  display: flex;
  flex-direction: column;
  font-size: var(--text-sm);
  transition: background 0.2s ease;
  cursor: default;
  overflow: hidden;
  min-width: 0;
}

.calendar__day:hover {
  background: var(--bg);
}

.calendar__day--other {
  background: var(--bg);
  opacity: 0.4;
}

/* 日期數字 */
.calendar__day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  border-radius: 50%;
  margin-bottom: 2px;
}

.calendar__day-num--today {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* 行程色條 */
.calendar__day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.calendar__event-bar {
  display: block;
  width: 100%;
  padding: 2px 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: filter 0.2s ease;
}

.calendar__event-bar:hover {
  filter: brightness(1.15);
}

.calendar__event-bar:nth-child(2) {
  background: var(--secondary);
}

.calendar__event-bar:nth-child(3) {
  background: var(--accent);
}

.calendar__event-more {
  display: block;
  width: 100%;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.calendar__event-more:hover {
  background: var(--bg);
}

/* --- 行程彈窗 --- */
.cal-popup {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2000;
}

.cal-popup--show {
  display: block;
}

.cal-popup__overlay {
  position: fixed;
  inset: 0;
  background: transparent;
}

.cal-popup__content {
  position: absolute;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 0;
  width: 340px;
  z-index: 2001;
  overflow: hidden;
  animation: cal-popup-in 0.25s ease-out;
  padding-bottom:var(--space-6);
}

@keyframes cal-popup-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cal-popup__content::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--primary);
}

.cal-popup__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--bg);
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.cal-popup__close:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.cal-popup__date {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-2);
  padding: var(--space-5) var(--space-6) 0;
}

.cal-popup__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
  padding: 0 var(--space-6);
  padding-right: var(--space-12);
  line-height: 1.4;
}

.cal-popup__detail {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  padding: 0 var(--space-6);
  line-height: 1.6;
}

.cal-popup__icon {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--primary);
}

.cal-popup__event-item {
  padding: var(--space-3) 0;
  margin: 0 var(--space-6);
  border-bottom: 1px solid var(--border);
}

.cal-popup__event-item .cal-popup__date,
.cal-popup__event-item .cal-popup__title,
.cal-popup__event-item .cal-popup__detail {
  padding-left: 0;
  padding-right: 0;
}

.cal-popup__event-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}


/* --- 線上研習課程 --- */

/* 標題裝飾 */
.section--gradient .section__header {
  padding-bottom: var(--space-6);
}

.section--gradient .section__subtitle-en {
  color: var(--primary);
}

.section--gradient .section__header .section__title::before,
.section--gradient .section__header .section__title::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--text-secondary);
  flex-shrink: 0;
  margin: 0;
}

.course-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.page-content .course-cards {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 600px) {
  .page-content .course-cards {
    grid-template-columns: 1fr;
  }
}

.page-content .course-card__title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
  line-height: 1.4;
  letter-spacing: normal;
  transition: color 0.3s ease;
}

.page-content .course-card:hover .course-card__title {
  color: var(--primary);
}

.page-content .course-card__desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
}

a.course-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
}

a.course-card.course-card--extra {
  display: none;
}

a.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.course-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.course-card__img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: var(--text-3xl);
  position: relative;
  overflow: hidden;
}

.course-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.course-card:hover .course-card__img img {
  transform: scale(1.03);
}

.course-card__body {
  padding: var(--space-6) var(--space-6) var(--space-9);
}

.course-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.course-card__tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
}

.course-card__tag--event {
  background: var(--accent-light);
  color: var(--accent-text);
}

.page-workshop-detail-3 .course-card__tag {
  margin-top: var(--space-4);
}

.course-card__tag--course {
  background: var(--secondary-light);
  color: var(--secondary-dark);
}

.course-card__tag--info {
  background: var(--info-light);
  color: var(--info-text);
}

.course-card__tag--pink {
  background: var(--pink-light);
  color: var(--pink-text);
}

.course-card__status {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  z-index: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 內文標題列的狀態標籤：與分類標籤同尺寸，不浮在圖片上 */
.course-card__status--inline {
  position: static;
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: normal;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 狀態標籤疊在圖片上，最不利情境（純白底圖）白字仍須達 WCAG AA 4.5:1，
   故保留 0.88 透明度呈現毛玻璃，但底色改用較深的色階 */
.course-card__status--open {
  background: rgba(232, 119, 46, 0.7);
  color: #fff;
}

.course-card__status--active {
  background: rgba(123, 45, 142, 0.7);
  color: #fff;
}

.course-card__status--closed {
  background: rgba(75, 85, 99, 0.4);
  color: #fff;
}

.course-card__dates {
  display: flex;
  flex-direction: column;
  gap:var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.course-card__date {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02rem;
}

.course-card__date-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--primary);
  color: #fff;
  padding:.2rem var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  flex-shrink: 0;
}

.course-card__date-label .icon--sm {
  color: #fff;
}

.course-card__title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
  line-height: 1.4;
  transition: color 0.3s ease;
}

.course-card:hover .course-card__title {
  color: var(--primary);
}

.course-card__desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- 按鈕 --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: var(--text-base);
  transition: var(--transition);
  text-align: center;
  justify-content: center;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn--accent {
  background: var(--accent);
  color: #fff;
}

.btn--accent:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn--sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
}

.btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn--arrow {
  position: relative;
  padding-right: calc(var(--space-8) + 20px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.btn--arrow::after {
  content: "→";
  position: absolute;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
}

.btn--arrow:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
}

.btn--arrow:hover::after {
  transform: translateY(-50%) translateX(4px);
}

.btn--arrow-left {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.btn--arrow-left:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
}

.btn--arrow-left:hover::before {
  transform: translateY(-50%) translateX(-4px);
}

.btn--white {
  background: #fff;
  color: var(--primary);
}

.btn--white:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

/* --- Footer --- */
.footer {
  background: #3D1150;
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-8) 0 0;
  position: relative;
  overflow: hidden;
}

.footer::after {
  content: "";
  position: absolute;
  right: 30px;
  bottom: -110px;
  width: 450px;
  height: 450px;
  background: url('../images/logo.png') no-repeat center;
  background-size: contain;
  opacity: 0.05;
  pointer-events: none;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2.4fr 0.8fr 1fr 1fr 0.8fr 1fr;
  gap: var(--space-5);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__name {
  font-size: var(--text-xl);
  font-weight: 600;
  color: #fff;
}

.footer__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-0);
  font-size: var(--text-base);
  line-height: 1.8;
}

.footer__info-item {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.footer__info-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  margin-top: 2px;
}

.footer__heading {
  font-size: var(--text-base);
  font-weight: 600;
  color: #fff;
  padding-bottom: var(--space-5);
}

.footer__heading--mt {
  margin-top: var(--space-6);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap:0.35rem;
}

.footer__link {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-md);
  transition: var(--transition);
  line-height: 1.5;
}

.footer__link:hover {
  color: #fff;
  padding-left: var(--space-1);
}

.footer__bottom {
  margin-top: var(--space-14);
  padding: var(--space-5) 0 var(--space-7);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}

/* 段落中的連結不可只靠顏色辨識（WCAG 1.4.1）：
   純白與周圍文字亮度對比 3.21:1（≥3:1），並於 hover/focus 補上底線提示（技術 G183） */
.footer__bottom a {
  color: rgba(255, 255, 255, 0.7);
}

.footer__bottom a:hover,
.footer__bottom a:focus-visible {
  color: #fff;
}

/* --- 內頁共用 --- */

/* 頁面頂部 Banner */
.page-banner {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: var(--space-24) 0;
  text-align: center;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
  /* background: linear-gradient(0deg, rgba(62, 20, 80, 0.1) 0%, rgba(var(--primary-rgb), 0.1) 100%);*/
}

.page-banner__title {
  position: relative;
  z-index: 1;
}

.page-banner__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 麵包屑 */
.breadcrumb {
  background: var(--bg-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

#main-content {
  background: linear-gradient(180deg, #f5f5f5 0%, #fff 70%);
}

.breadcrumb .breadcrumb__list {
  max-width: var(--container-max);
  margin: 0 auto;
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: var(--text-sm);
  flex-wrap: wrap;
  background: transparent;
  border-radius: 0;
  padding: var(--space-3) 0;
  width: 100%;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "／";
  color: var(--text-light);
  padding: 0 var(--space-2);
}

.breadcrumb__link {
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.breadcrumb__link:hover {
  color: var(--primary);
}

.breadcrumb__current {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb__text {
  color: var(--text-secondary);
}

.breadcrumb__item--active .breadcrumb__text {
  color: var(--text);
  font-weight: 500;
}

/* 內頁 Layout（側邊選單 + 內容區） */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-10);
  padding: var(--space-6) 0 var(--space-26);
}

/* 無左側次選單時，內容區 100% 寬度 */
.page-layout--full {
  grid-template-columns: 1fr;
}

.page-layout--full {
  grid-template-columns: 1fr;
}

/* 無左側次選單時，內容區寬度收斂並置中 */
.page-layout--full .page-content {
  max-width: 90%;
  margin-inline: auto;
  width: 100%;
}

/* 側邊選單 */
.sidebar {
  position: sticky;
  top: 140px;
  align-self: start;
}

.sidebar__title {
  font-size:1.35rem;
  font-weight: 700;
  color: #fff;
  padding: var(--space-8) var(--space-2) var(--space-8) var(--space-6);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  line-height: 1.4;
}

.sidebar__title-en {
  display: block;
  font-size: var(--text-md);
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  opacity:.8;
  margin-top: 7px;
  line-height: 1.4;
}

.sidebar__list {
  background: var(--bg-white);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sidebar__link {
  display: block;
  padding: 0.6rem var(--space-4);
  padding-left: var(--space-12);
  color: var(--text);
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
  font-weight: 500;
}

button.sidebar__link {
  width: 100%;
  text-align: left;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-family: inherit;
}

.sidebar__link--placeholder {
  display: block;
  padding: 0.6rem var(--space-4);
  padding-left: var(--space-12);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border-bottom: 1px dashed var(--border-light);
  font-style: italic;
  opacity: 0.6;
  cursor: default;
}

.sidebar__link:hover {
  color: var(--primary);
  transform: translateX(6px);
}

.sidebar__link--active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  padding-left: var(--space-8);
  transition: padding-left 0.3s ease, color 0.3s ease;
}

.sidebar__link--active:hover {
  transform: none;
  padding-left: calc(var(--space-8) + 6px);
}

.sidebar__link--active::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-right: var(--space-2);
  vertical-align: 2px;
}

/* 內容區 */
.page-content {
  min-width: 0;
}

.container > .page-content {
  padding: var(--space-6) 0 var(--space-26);
  max-width: 90%;
  margin: 0 auto;
}

.page-content h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-9);
  padding-bottom: var(--space-4);
  border-bottom: none;
  position: relative;
}

.page-content h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 90px;
  height: 5px;
  background: linear-gradient(90deg, rgba(123,75,170,0.85) 0%, rgba(160,80,145,0.8) 20%, rgba(205,110,105,0.75) 40%, rgba(217,136,92,0.7) 60%, rgba(94,170,125,0.7) 100%);
  border-radius: 2px;
}
.page-content h3 {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: .05rem;
   margin-bottom: var(--space-2);
}

.page-content p + h3,
.page-content ul + h3,
.page-content ol + h3,
.page-content figure + h3 {
  margin-top: var(--space-8);
}
.page-content p + p {
  margin-top: var(--space-8);
}
.page-content h4 {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: var(--space-2);
}
.page-content h5 {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: var(--space-2);
}
.page-content h6 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: var(--space-2);
}
.text-gradient-bar {
  display: inline-block;
  background: linear-gradient(90deg,
    rgba(123, 75, 170, 0.2),
    rgba(192, 84, 122, 0.2),
    rgba(217, 136, 92, 0.2),
    rgba(94, 170, 125, 0.2)
  );
  color: #222;
  font-weight: 600;
  padding: 6px 15px;
  border-radius: 0px;
  font-size: 1.4rem!important;
  margin-bottom: var(--space-5);
}

.text-highlight {
  background-image: linear-gradient(90deg,
    rgba(150, 80, 200, 0.35),
    rgba(200, 60, 120, 0.35),
    rgba(240, 140, 50, 0.35),
    rgba(80, 180, 100, 0.35)
  );
  background-size: 100% 45%;
  background-position: left bottom;
  background-repeat: no-repeat;
  padding: 0 2px 3px;
  font-weight: 600;
  color: var(--text);
}

.page-content p.text-gradient-bar + h3 {
  margin-top: var(--space-4);
}

/* --- 計畫簡介 Logo --- */
.intro-logo {
  text-align: center;
  margin: var(--space-10) 0 var(--space-10);
}

.intro-logo img {
  width: 360px;
  height: auto;
  max-width: 70%;
  margin-bottom: 2rem;
}

/* --- 計畫簡介圖文區塊（左文右圖） --- */
.intro-feature {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
  margin: 0 0 var(--space-8);
}

.intro-feature__text {
  flex: 1;
}

.intro-feature__text p {
  line-height: 1.9;
  color: var(--text);
}

.intro-feature__img {
  flex: 0 0 42%;
}

.intro-feature__img img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .intro-feature {
    flex-direction: column;
    gap: var(--space-4);
  }

  .intro-feature__img {
    flex: none;
    width: 100%;
  }
}

.page-content .heading-bar,
.article-content h3,
.workshop-detail__body h3 {
  padding-left: var(--space-4);
  position: relative;
  font-weight: 600;
  font-size: 1.4rem;
}

.page-content .heading-bar::before,
.article-content h3::before,
.workshop-detail__body h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-43%);
  width: 4px;
  height: 55%;
  background: var(--primary);
  border-radius: 2px;
}

.page-content p {
  margin-bottom: var(--space-0);
  line-height: 2;
  color: var(--text);
  font-size:1.0625rem; ;
}

.page-content ul:not([class]),
.page-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.page-content ul:not([class]) {
  list-style: disc;
}

.page-content ol {
  list-style: decimal;
}

.page-content li {
  margin-bottom: var(--space-2);
  line-height: 1.7;
}

/* 標語圖片 */
.director-slogan {
  padding-bottom: var(--space-4);
}

.director-slogan img {
  max-width: 80%;
  width: 350px;
  height: auto;
  display: block;
  border-radius: 0;
}

/* 人員卡片 */
.profile-card {
  display: flex;
  gap: var(--space-12);
  padding: 0;
  align-items: flex-start;
}

.profile-card__left {
  flex-shrink: 0;
  width: 320px;
}

.profile-card__photo {
  flex-shrink: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: var(--primary);
  font-size: var(--text-5xl);
}

.profile-card__photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 沒放照片時的預設頭像（維持與照片相同的長方形框） */
.profile-card__photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.profile-card__photo-placeholder i,
.profile-card__photo-placeholder svg {
  width: 96px;
  height: 96px;
}


.profile-card__info {
  flex: 1;
}

.page-content .profile-card__name {
  font-size: var(--text-3xl);
  font-weight: 800;
  padding-bottom: var(--space-2);
  margin-top: 0;
}

.page-content .profile-card__position {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-0);
}

.profile-card__role {
  font-size: var(--text-base);
  color: var(--primary);
  font-weight: 500;
  margin-bottom: var(--space-6);
}

.profile-card__section {
  margin-bottom: var(--space-6);
}

.back-to-list {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-light);
}

.profile-card__divider {
  border: none;
  border-top: 2px solid rgba(var(--primary-rgb), 0.3);
  margin: var(--space-14) 0 var(--space-5);
}
.profile-card__divider2 {
  border: none;
  border-top: 2px solid rgba(var(--primary-rgb), 0.3);
  margin: var(--space-5) 0 var(--space-5);
}
.page-content .profile-card__heading {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.profile-card__section-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.profile-card__list {
  list-style: none;
  padding-left: var(--space-2);
}

.profile-card__list li {
  margin-bottom: var(--space-2);
  font-size: 1.0625rem;
  line-height: 1.8;
  padding-left: var(--space-4);
  position: relative;
}

.profile-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* 經歷條列 */
.career-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-content .career-list__item {
  display: flex;
  align-items: baseline;
  gap: 0;
  padding: 0.55rem .15rem 0.55rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.0625rem;
  line-height: 1.7;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.contact-detail .career-list__item::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 12px;
  margin-left: 5px;
  position: relative;
  top: -1px;
}

.career-list__item:first-child {
  border-top: 1px solid var(--border);
}

.career-list__year {
  flex-shrink: 0;
  font-size: 1.0625rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.career-list__sep {
  margin: 0 8px;
  color: var(--text-light);
}

.career-list__org {
  color: var(--text);
}

.career-list__role {
  font-weight: 400;
}

/* 經歷表格 */
.career-table-wrap {
  margin-top: var(--space-6);
  overflow-x: auto;
}

.career-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.career-table thead th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  text-align: left;
  white-space: nowrap;
}

.career-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.6;
}

.career-table tbody tr:hover {
  background: var(--primary-light);
}

.career-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.career-table tbody tr:nth-child(even):hover {
  background: var(--primary-light);
}

.profile-card__section ul {
  list-style: none;
  padding-left: 0;
}

.profile-card__section li {
  margin-bottom: var(--space-2);
  font-size: 1.0625rem;;
  line-height: 1.6;
}

/* 團隊成員 Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-8);
}

.heading-bar + .team-grid {
  margin-top: var(--space-3);
}

.team-grid + .heading-bar {
  margin-top: var(--space-10);
}

/* 連結分類分區：格線／清單接下一個分類標題時的間距 */
.link-grid + .heading-bar,
.law-list + .heading-bar {
  margin-top: var(--space-10);
}

.team-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6) ;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
}

.team-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.team-card__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--primary-light);
  margin: 0 auto var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: var(--text-3xl);
  overflow: hidden;
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card .team-card__badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 2px 18px;
  border-radius: 999px;
  margin-bottom: var(--space-2);
  letter-spacing: .08rem;
}

.page-content .team-card__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-0);
  letter-spacing: 0.05em;
}

.page-content .team-card__dept {
  font-size: var(--text-base);
  color: var(--primary);
  font-weight: 500;
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

.page-content .team-card__contact {
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
  margin-top: var(--space-2);
  margin-bottom: .1rem;
}

.page-content .team-card__contact p {
  font-size: var(--text-md);
  color: var(--text);
  line-height: 1.8;
  margin-bottom: var(--space-0);
  text-align: left;
}
.page-content .team-card__contact p+p {
  margin-top: var(--space-0);
}

/* 活動照片 Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: .8rem;
}

.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.gallery-item__img {
  aspect-ratio: 16 / 11;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: var(--text-3xl);
}

.gallery-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item--clickable .gallery-item__img {
  position: relative;
  overflow: hidden;
}

.gallery-item--clickable .gallery-item__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item--clickable .gallery-item__img::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center no-repeat;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item--clickable:hover .gallery-item__img::after {
  opacity: 1;
}

.gallery-item--clickable:hover .gallery-item__img::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-item__caption {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-white);
  font-size: var(--text-sm);
  font-weight: 500;
}

.gallery-item--clickable .gallery-item__caption {
  display: none;
}

.gallery-item--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* 活動卡片（列表頁） */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.event-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.event-card__img {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.event-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card__status {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: 6px 18px;
  border-radius: var(--radius);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
}

.event-card__status--open {
  background: #c27a3a;
}

.event-card__status--active {
  background: #9b59b6;
}

.event-card__status--closed {
  background: var(--text-light);
}

.event-card__body {
  padding:1rem 1.4rem 1.4rem ;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-card__date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02rem;
}

.event-card__tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  margin-bottom: 0;
  background: var(--primary-light);
  color: var(--primary);
}

.event-card__tag--orange {
  background: var(--accent-light);
  color: var(--accent-text);
}

.event-card__tag--green {
  background: var(--secondary-light);
  color: var(--secondary-dark);
}

.event-card__tag--purple {
  background: var(--primary-light);
  color: var(--primary);
}

.event-card__tag--blue {
  background: #EBF3FF;
  color: #2a6cb8;
}

.page-content .event-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
  line-height: 1.4;
}

.page-content .event-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-card__more {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  align-self: flex-end;
  margin-top: auto;
  padding-top: var(--space-2);
  transition: color 0.3s ease;
}

.event-card:hover .event-card__more {
  color: var(--primary-dark);
}

.event-card:hover .event-card__title {
  color: var(--primary);
}

/* --- 分頁元件 --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.pagination__link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.pagination__link--active {
  background: var(--primary);
  color: #fff;
}

.pagination__link--active:hover {
  background: var(--primary-dark);
  color: #fff;
}

.pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.pagination__btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.pagination__btn--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pagination__ellipsis {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: var(--text-sm);
}

.event-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
}

.lightbox.is-active {
  display: flex;
}

.lightbox__close,
.lightbox__nav,
.lightbox__caption {
  flex-shrink: 0;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox__caption {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: var(--text-base);
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
}

.lightbox__close {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 10001;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  font-size: 0;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: scale(1.05);
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
}

.lightbox__nav--prev {
  left: var(--space-6);
}

.lightbox__nav--prev:hover {
  transform: translateY(-50%) translateX(-2px);
}

.lightbox__nav--next {
  right: var(--space-6);
}

.lightbox__nav--next:hover {
  transform: translateY(-50%) translateX(2px);
}

.gallery-item--clickable {
  cursor: pointer;
}

/* 文章詳細頁 */
.article-header {
  position: relative;
}

.article-header__date {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--primary);
  margin-top: 1.5rem;
}

.page-content .article-header__title {
  font-weight: 800;
  color: var(--primary);
  margin: var(--space-2) 0 var(--space-10);
  padding-bottom: var(--space-5);
  line-height: 1.5;
  border-bottom: none;
  position: relative;
  margin-top: -.1rem;
}

.page-content .article-header__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 90px;
  height: 5px;
  background: linear-gradient(90deg, rgba(123,75,170,0.85) 0%, rgba(160,80,145,0.8) 20%, rgba(205,110,105,0.75) 40%, rgba(217,136,92,0.7) 60%, rgba(94,170,125,0.7) 100%);
  border-radius: 2px;
}

.article-header .article-share {
  position: absolute;
  top: -.3rem;
  right: 0;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.article-meta__left {
  display: flex;
  gap: var(--space-5);
}

.article-share {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.article-share__label {
  font-size: var(--text-sm);
  color: var(--text);
  margin-right: var(--space-1);
}

.article-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.article-share__btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.article-share__btn--fb {
  background: #1877F2;
}

.article-share__btn--line {
  background: #06C755;
}

.article-share__btn--copy {
  background: var(--primary);
}

.article-meta__date {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: Inter, "Noto Sans TC", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02rem;
}

.article-meta__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-light);
}

.article-content {
  margin-bottom: var(--space-8);
}

/* 內文插圖與圖說 */
.article-content figure {
  margin: var(--space-6) 0;
}

.article-content figure img {
  margin-inline: auto;
  border-radius: var(--radius-lg);
}

.article-content figcaption {
  margin-top: var(--space-2);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-light);
}

/* 好站報報 - 連結卡片 */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: .8rem;
}

/* 書封版型：欄數不寫死，改由「有無左側次選單」決定
   （有次選單 → 沿用 .link-grid 的 3 欄，圖片較大；無次選單 → responsive.css 給 4 欄） */
.quarterly-grid {
  gap: var(--space-8);
}

.link-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
  display: block;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* 同一頁使用多個模組時，模組之間留出間距（單一模組的頁面不受影響） */
.page-module + .page-module {
  margin-top: var(--space-10);
}

.link-card__img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--secondary-light), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: var(--text-2xl);
}

.link-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 滿版裁切：圖片填滿整張卡片（16:9、cover），不留白 */
.link-card__img--fill {
  background: #fff;
}

.link-card__img--fill img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.link-card__img--book {
  aspect-ratio: 1000 / 1369;
}

.link-card__img--logo {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.link-card__img--logo img {
  width: auto;
  height: 80%;
  max-width:80%;
  object-fit: contain;
}

/* 書封格中的預設 logo 佔位：維持書封比例，logo 置中縮小 */
.link-card__img--book-size {
  aspect-ratio: 1000 / 1369;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-card__img--book-size img {
  height: auto;
  max-height: 40%;
}

.link-card__body {
  padding: var(--space-3) var(--space-3) var(--space-4);
  text-align: center;
}

.link-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.link-card:hover .link-card__title {
  color: var(--primary);
}

/* 影音區塊 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.video-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  display: block;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.video-card__player {
  aspect-ratio: 16 / 9;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--text-5xl);
  position: relative;
  transition: var(--transition);
}

.video-card:hover .video-card__player {
  color: rgba(255, 255, 255, 0.7);
}

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

.video-card__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: var(--transition);
  pointer-events: none;
}

.video-card__player:hover .video-card__play-icon {
  color: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-card__player iframe {
  width: 100%;
  height: 100%;
}

.video-card__body {
  padding: var(--space-4);
}

.video-card__title {
  font-size: var(--text-md);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  padding: var(--space-3) var(--space-5) var(--space-4);
}

.video-card:hover .video-card__title {
  color: var(--primary);
}

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

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

/* --- 影片輪播 --- */
.video-carousel {
  position: relative;
  padding: 0 48px;
  overflow: hidden;
}

.video-carousel--static {
  padding: 0;
}

.video-carousel--static .video-carousel__track {
  justify-content: center;
  transition: none;
}

.video-carousel--static .video-carousel__item {
  flex: 0 0 33.333%;
  max-width: 33.333%;
  padding: 0 var(--space-4);
}

.video-carousel__track {
  display: flex;
  align-items: center;
  padding: var(--space-8) 0;
  transition: transform 0.5s ease;
}

.video-carousel__track.no-transition {
  transition: none;
}

.video-carousel__track.no-transition .video-carousel__item-inner {
  transition: none;
}

.video-carousel__item {
  flex: 0 0 33.333%;
  padding: 0 var(--space-2);
  box-sizing: border-box;
}

.video-carousel__item-inner {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transform: scale(0.88);
  opacity: 1;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}

.video-carousel__item.is-center .video-carousel__item-inner {
  transform: scale(1);
  opacity: 1;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.video-carousel__item:not(.is-center) .video-carousel__item-inner:hover {
  opacity: 0.85;
  transform: scale(0.92);
}

.video-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.video-carousel__arrow--prev {
  left: 16px;
}

.video-carousel__arrow--next {
  right: 16px;
}

.video-carousel__arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.video-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.video-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.video-carousel__dot--active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

.page-content .video-carousel__item {
  flex: 0 0 50%;
}

/* 內頁靜態排列（≤2 部）也用 50%，與輪播同尺寸，避免切分類時忽大忽小 */
.page-content .video-carousel--static .video-carousel__item {
  flex: 0 0 50%;
  max-width: 50%;
}

.page-content .video-carousel__item-inner {
  transform: scale(1);
}

.page-content .video-carousel__item.is-center .video-carousel__item-inner {
  transform: scale(1);
  box-shadow: var(--shadow-sm);
}

.page-content .video-carousel__item .video-carousel__item-inner:hover {
  opacity: 1;
  transform: scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .video-carousel {
    padding: 0 36px;
  }

  .video-carousel__item {
    flex: 0 0 100%;
  }

  .page-content .video-carousel__item {
    flex: 0 0 100%;
  }

  .video-carousel__item-inner {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-carousel__track {
    transition: none;
  }

  .video-carousel__item-inner {
    transition: none;
  }
}

/* --- 搜尋結果頁 --- */
.search-page {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: var(--space-16);
}

.search-box {
  margin-bottom: var(--space-6);
}

@media (min-width: 769px) {
  .search-box {
    max-width: 65%;
  }
}

.search-box__form {
  display: flex;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.search-box__form:focus-within {
  border-color: var(--primary);
}

.search-box__input {
  flex: 1;
  padding: var(--space-3) var(--space-6);
  border: none;
  outline: none;
  font-size: var(--text-lg);
  font-family: inherit;
  background: transparent;
}

.search-box__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  background: var(--primary);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-box__btn:hover {
  background: var(--primary-dark);
}

.search-summary {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.search-summary strong {
  font-weight: 600;
}

.search-results {
  display: flex;
  flex-direction: column;
  margin-top: .5rem;
}

.search-result {
  display: block;
  padding: var(--space-7) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.search-result:first-child {
  border-top: 1px solid var(--border);
}

.search-result:hover {
  background-color: var(--gray-50, #f9fafb);
}

.page-content .search-result__title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-4);
  line-height: 1.5;
  letter-spacing: 0;
}

.page-content .search-result__title mark {
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary-dark);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.page-content .search-result__excerpt {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-content .search-result__excerpt mark {
  background: rgba(var(--primary-rgb), 0.15);
  color: var(--primary-dark);
  padding: 1px 4px;
  border-radius: 3px;
}

.search-empty {
  text-align: center;
  padding: var(--space-16) 0;
  color: var(--text-light);
}

.search-empty__text {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-4);
  color: var(--text-secondary);
}

.search-empty__hint {
  font-size: var(--text-base);
  color: var(--text-light);
  margin-top: var(--space-2);
}

.search-empty__hint a {
  color: var(--primary);
  text-decoration: underline;
}

/* 表單 placeholder */
.form-placeholder {
  background: var(--bg-white);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  color: var(--text-secondary);
}

.form-placeholder__icon {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.form-placeholder__text {
  font-size: var(--text-lg);
  font-weight: 500;
}

/* 檔案下載 */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-6);
}

.download-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.download-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.download-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
}

.download-card__info {
  flex: 1;
  min-width: 0;
}

.download-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.download-card__meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* 檔案下載列表式 */
.download-list {
  display: flex;
  flex-direction: column;
}

.download-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.download-list__item:first-child {
  border-top: 1px solid var(--border);
}

.download-list__item:hover {
  background: var(--bg-light);
}

.download-list__info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.download-list__icon {
  color: var(--accent);
  flex-shrink: 0;
}

.download-list__name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
}

.download-list__item:hover .download-list__name {
  color: var(--primary);
}

.download-list__formats {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.download-list__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.download-list__btn--pdf {
  background: #FEE2E2;
  color: #DC2626;
}

.download-list__btn--pdf:hover {
  background: #DC2626;
  color: #fff;
}

.download-list__btn--odt,
.download-list__btn--odp {
  background: #DBEAFE;
  color: #2563EB;
}

.download-list__btn--odt:hover,
.download-list__btn--odp:hover {
  background: #2563EB;
  color: #fff;
}

.download-list__btn--doc {
  background: #DBEAFE;
  color: #1D4ED8;
}

.download-list__btn--doc:hover {
  background: #1D4ED8;
  color: #fff;
}

/* 法規列表 */
.law-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-left: var(--space-0);
}

.law-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin-bottom: 0!important;
}

.law-item:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.law-item--sub:hover {
  box-shadow: none;
  transform: none;
}

.law-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.law-item__title {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.law-item:hover > .law-item__title {
  color: var(--primary);
}

.law-item--sub:hover > .law-item__title {
  color: var(--text);
}

.law-item--sub > .law-item__title:hover {
  color: var(--primary);
}

/* 子層級 */
.law-list--sub {
  width: 100%;
  margin-top: -0.8rem;
  margin-left: var(--space-12);
  padding-left: 0;
  gap: var(--space-1);
  margin-bottom: .7rem;
}

.law-item--sub {
  padding: var(--space-0) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-light);
  box-shadow: none;
}

.law-item--sub .law-item__icon {
  width: 24px;
  height: 24px;
  background: transparent;
  color: var(--text-light);
}

.law-item--sub .law-item__title {
  font-size: var(--text-md);
}

.law-item__link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.law-item__link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.law-item--download {
  cursor: default;
}

.law-item--download .law-item__title {
  flex: 1;
}

.law-item__formats {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

.law-item__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
}

.law-item__btn--pdf {
  background: #FEE2E2;
  color: #DC2626;
}

.law-item__btn--pdf:hover {
  background: #DC2626;
  color: #fff;
}

.law-item__btn--odt,
.law-item__btn--word {
  background: #DBEAFE;
  color: #2563EB;
}

.law-item__btn--odt:hover,
.law-item__btn--word:hover {
  background: #2563EB;
  color: #fff;
}

.law-item__btn--excel {
  background: #DCFCE7;
  color: #16A34A;
}

.law-item__btn--excel:hover {
  background: #16A34A;
  color: #fff;
}

.law-item__btn--odp,
.law-item__btn--ppt {
  background: #FFEDD5;
  color: #EA580C;
}

.law-item__btn--odp:hover,
.law-item__btn--ppt:hover {
  background: #EA580C;
  color: #fff;
}

.law-item__btn--img {
  background: #F3E8FF;
  color: #9333EA;
}

.law-item__btn--img:hover {
  background: #9333EA;
  color: #fff;
}

.law-item__btn--zip {
  background: #FEF3C7;
  color: #D97706;
}

.law-item__btn--zip:hover {
  background: #D97706;
  color: #fff;
}

.law-item__btn--other {
  background: #F3F4F6;
  color: #4B5563;
}

.law-item__btn--other:hover {
  background: #4B5563;
  color: #fff;
}

/* --- 數位影音滿版頁面 --- */
.media-page {
  padding: var(--space-7) 0 var(--space-20);
}

.media-page__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-5);
  position: relative;
  text-align: center;
}

.media-page__title::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 90px;
  height: 5px;
  background: linear-gradient(90deg, rgba(123,75,170,0.85) 0%, rgba(160,80,145,0.8) 20%, rgba(205,110,105,0.75) 40%, rgba(217,136,92,0.7) 60%, rgba(94,170,125,0.7) 100%);
  border-radius: 2px;
}

/* --- 數位影音分類切換 --- */
.media-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.media-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.media-tabs__btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.media-tabs__btn--active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.media-tabs__btn--active:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

/* 手機版下拉選單（預設隱藏） */
.media-dropdown {
  display: none;
  position: relative;
  margin-bottom: var(--space-6);
}
.media-dropdown__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.media-dropdown__btn:hover {
  background: var(--primary-dark);
}
.media-dropdown__btn svg {
  transition: transform 0.2s ease;
}
.media-dropdown.open .media-dropdown__btn svg {
  transform: rotate(180deg);
}
.media-dropdown__list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: var(--space-2);
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
}
.media-dropdown.open .media-dropdown__list {
  display: block;
  animation: dropdown-in 0.2s ease;
}
.media-dropdown__item {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: var(--text-base);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.media-dropdown__item:last-child {
  border-bottom: none;
}
.media-dropdown__item:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.media-dropdown__item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.media-panel {
  display: none;
}

.media-panel--active {
  display: block;
}

/* --- 影片詳細頁（左列表右影片） --- */
.video-detail {
  display: flex;
  gap: var(--space-14);
  padding: var(--space-10) 0 var(--space-20);
}

.video-playlist {
  flex: 0 0 300px;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.video-playlist__group {
  margin-bottom: var(--space-4);
}

.video-playlist__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: var(--space-3) 0;
  list-style: none;
  user-select: none;
}

.video-playlist__title::-webkit-details-marker {
  display: none;
}

.video-playlist__title::after {
  content: "";
  margin-left: auto;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237b4baa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.video-playlist__group[open] > .video-playlist__title::after {
  transform: rotate(180deg);
}

.video-playlist__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2);
}

.video-playlist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.video-playlist__item:hover {
  background: var(--primary-light);
  color: var(--text);
}

.video-playlist__item--active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

.video-playlist__num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.video-playlist__item--active .video-playlist__num {
  background: var(--primary);
  color: #fff;
}

.video-playlist__name {
  flex: 1;
}

.video-main {
  flex: 1;
  min-width: 0;
}

.video-main__player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.video-main__player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 只顯示縮圖模式（點擊另開 YouTube） */
.video-main__player--thumb {
  display: block;
  cursor: pointer;
}
.video-facade {
  cursor: pointer;
}
.video-main__player--thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-main__player--thumb:hover .video-card__play-icon {
  color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

.video-main__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.video-main__meta {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.video-main__category {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.video-main__desc {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: var(--space-8);
}

.video-main__desc ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin: var(--space-2) 0;
}

.video-main__desc ol {
  list-style: decimal;
  padding-left: var(--space-6);
  margin: var(--space-2) 0;
}

@media (max-width: 768px) {
  .video-detail {
    flex-direction: column;
  }

  .video-playlist {
    flex: none;
    position: static;
    max-height: none;
    order: 2;
  }

  .video-main {
    order: 1;
  }
}

/* 中心地址頁 */
.address-info {
  margin-bottom: var(--space-1);
}

.address-info--inline {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
}

.address-info__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.0625rem;
  color: var(--text);
}

.address-info__tag i {
  color: var(--primary);
}

.address-info__item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-light);
}

.address-info__item:first-child {
  border-top: 1px solid var(--border-light);
}

.address-info__icon {
  color: var(--primary);
  flex-shrink: 0;
}

.address-info__item strong {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: block;
  margin-bottom: 2px;
}

.address-info__item p {
  font-size: 1.0625rem;
  margin: 0;
}

.map-embed {
  margin-bottom: var(--space-8);
}

.map-embed__wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.traffic-info {
  margin-top: var(--space-5);
}

.traffic-info__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.traffic-info__content h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
}

.traffic-info__content p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

/* Google Map placeholder */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe,
.map-embed__wrapper iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
}

.map-placeholder {
  width: 100%;
  height: 400px;
  background: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: var(--text-lg);
}

/* Google 表單嵌入 */
.form-embed {
  margin: var(--space-4) 0;
  max-width: 800px;
}
.form-embed iframe {
  width: 100%;
  border: none;
}
@media (max-width: 768px) {
  #form-apply  { height: 2400px; }
  #form-report { height: 4200px; }
}
@media (max-width: 480px) {
  #form-apply  { height: 2100px; }
  #form-report { height: 3800px; }
}

/* 流程圖圖片 */
.flowchart-img {
  margin: var(--space-6) auto;
  max-width: 580px;
  text-align: center;
}
.flowchart-img img {
  width: 100%;
  height: auto;
}

/* 垂直流程圖 */
.flowchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: var(--space-8) 60px var(--space-8) 0;
  margin-bottom: var(--space-10);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.flowchart__node {
  position: relative;
  z-index: 1;
}

.flowchart__box {
  background: var(--bg-white);
  border: 2px solid var(--text-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  min-width: 180px;
}

.flowchart__box--final {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* 菱形判斷節點 */
.flowchart__node--decision {
  position: relative;
}

.flowchart__diamond {
  width: 140px;
  height: 140px;
  background: var(--bg-white);
  border: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--space-2) 0;
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.flowchart__diamond > span {
  transform: rotate(-45deg);
}

/* 箭頭連接線 */
.flowchart__arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 2px;
  height: 40px;
  background: var(--text-secondary);
}

.flowchart__arrow::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--text-secondary);
}

/* 箭頭旁的備註文字 */
.flowchart__note {
  position: absolute;
  left: calc(100% + 16px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 未核定標籤 */
.flowchart__reject {
  position: absolute;
  right: -76px;
  top: 50%;
  transform: translateY(-50%);
}

.flowchart__reject-label {
  color: #dc2626;
  font-size: var(--text-sm);
  font-weight: 600;
  writing-mode: vertical-rl;
  letter-spacing: 0.15em;
}

/* 右側回頭線（從團隊審核回到填寫表單） */
.flowchart__loop {
  position: absolute;
  top: 48px;
  right: 0;
  width: 48px;
  height: 350px;
  border: 2px solid #dc2626;
  border-left: none;
  border-radius: 0 8px 8px 0;
}

.flowchart__loop::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid #dc2626;
}

/* 手機版流程圖調整 */
@media (max-width: 576px) {
  .flowchart {
    padding-right: 40px;
  }

  .flowchart__box {
    min-width: 130px;
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
  }

  .flowchart__diamond {
    width: 110px;
    height: 110px;
    font-size: var(--text-sm);
  }

  .flowchart__note {
    font-size: var(--text-xs);
    white-space: normal;
    max-width: 140px;
  }

  .flowchart__loop {
    width: 30px;
    height: 270px;
  }

  .flowchart__reject {
    right: -56px;
  }
}

/* 手冊卡片 */
.book-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-8);
  margin-top: 1rem;
}

.book-card {
  display: block;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--text);
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.book-card__cover {
  aspect-ratio: 720 / 983;
  overflow: hidden;
}

.book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.book-card:hover .book-card__cover img {
  transform: scale(1.03);
}

.book-card__info {
  padding: var(--space-5) var(--space-5) var(--space-7);
  text-align: center;
}

.book-card .book-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
  line-height: 1.4;
}

.book-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-1) var(--space-5);
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background 0.2s ease;
}

.book-card:hover .book-card__btn {
  background: var(--primary-dark);
}

@media (max-width: 576px) {
  .book-cards {
    grid-template-columns: 1fr;
  }
}

/* --- 首頁兩欄 layout --- */
.home-grid {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--space-10);
  align-items: start;
}

/* --- 動畫 --- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* 課程卡片載入動畫 */
  a.course-card.fade-in {
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  a.course-card.fade-in:nth-child(2) { transition-delay: 0.1s; }
  a.course-card.fade-in:nth-child(3) { transition-delay: 0.2s; }
  a.course-card.fade-in:nth-child(4) { transition-delay: 0.3s; }

  /* visible 後恢復 hover transition */
  a.course-card.fade-in.visible {
    transition: opacity 0.7s ease, transform 0.25s ease-out, box-shadow 0.25s ease-out;
  }
}

/* --- 無障礙導盲磚 --- */
.accessibility-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.accessibility-links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
}

.accessibility-links a:hover {
  color: #fff;
}

/* 導盲磚：::: 符號常駐顯示 */
.guide-brick {
  display: inline-block;
  font-size: var(--text-sm);
  color: #666;
  line-height: 1.5;
  text-decoration: none;
  position: relative;
  z-index: 1;
  left: 0rem;
}

.guide-brick--light {
  color: rgba(255, 255, 255, 0.7);
}

.guide-brick:focus {
  color: var(--primary);
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.guide-brick--light:focus {
  color: #fff;
  outline-color: #fff;
}

/* --- 焦點樣式 (WCAG AA) --- */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.header__top *:focus-visible,
.hero *:focus-visible,
.page-banner *:focus-visible,
.footer *:focus-visible {
  outline-color: #fff;
}

.footer .guide-brick {
  left: 0rem;
}

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

/* --- 工具類 --- */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-8 {
  margin-top: var(--space-8);
}
.mt-9 {
  margin-top: var(--space-9);
}
.mt-10 {
  margin-top: var(--space-10);
}
.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Icon 尺寸工具類（取代 Lucide inline style） --- */
.icon--xs { width: 14px; height: 14px; }
.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 18px; height: 18px; }
.icon--base { width: 20px; height: 20px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; }
.icon--2xl { width: 48px; height: 48px; }
.icon--3xl { width: 64px; height: 64px; }

/* --- Section header 靠左對齊 --- */
.section__header--left {
  text-align: left;
}

/* --- 導盲磚間距 --- */
.guide-brick--spaced {
  margin-bottom: 4px;
}

/* --- News more 較大上間距 --- */
.news-more--lg {
  margin-top: var(--space-12);
}

/* --- 無障礙標章圖片 --- */
.footer__badge {
  margin-top: var(--space-2);
  width: 140px;
  height: auto;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  transform: translateY(12px);
  z-index: 999;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* --- Hero 輪播背景圖 --- */
.hero__slide--1 { background-image: url('../images/index-banner-1.jpg'); }
.hero__slide--2 { background-image: url('../images/index-banner-1.jpg'); }
.hero__slide--3 { background-image: url('../images/index-banner-1.jpg'); }

/* --- 內頁 Banner 背景圖 --- */
.page-banner--about { background-image: url('../images/in-banner-1.jpg'); }
.page-banner--preschool { background-image: url('../images/in-banner-2.jpg'); }
.page-banner--special { background-image: url('../images/in-banner-3.jpg'); }
.page-banner--highschool { background-image: url('../images/in-banner-5.jpg'); }
.page-banner--news { background-image: url('../images/in-banner-6.jpg'); }
.page-banner--sitemap { background-image: url('../images/in-banner-1.jpg'); }
.page-banner--quarterly { background-image: url('../images/in-banner-4.jpg'); }
.page-banner--workshop  { background-image: url('../images/in-banner-6.jpg'); }

/* --- 研習課程細節頁 --- */
.workshop-detail__cover {
  margin: 0 0 var(--space-8);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.workshop-detail__cover img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.workshop-detail__header {
  position: relative;
  margin-bottom: var(--space-6);
}

.workshop-detail__header .article-share {
  position: absolute;
  top: -1.8rem;
  right: 0;
}

.workshop-detail__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.workshop-detail .workshop-detail__title {
  font-weight: 800;
    color: var(--primary);
    margin: var(--space-2) 0 var(--space-10);
    padding-bottom: var(--space-5);
    line-height: 1.5;
    border-bottom: none;
    position: relative;
    margin-top: -.5rem;
}

.workshop-detail__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  border: none;
  background: rgba(var(--primary-rgb), 0.06);
}

.workshop-detail__info-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--text);
}

.workshop-detail__info-item .icon--sm {
  color: var(--primary);
  flex-shrink: 0;
}

.workshop-detail__info-label {
  font-weight: 600;
  min-width: 5em;
  color: var(--primary);
}

.workshop-detail__body {
  margin-bottom: var(--space-10);
}

.workshop-detail__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-light);
}
