/* 中華初本多元發展協會 官方網站 主樣式 */

/* ---------- 色彩與字體設定（取自協會 LOGO 的灰藍與暖沙金） ---------- */
:root {
  --ink: #2f3a46;
  --slate-800: #3f4c5a;
  --slate-600: #5d6c7c;
  --slate-400: #8796a5;
  --slate-200: #d5dce3;
  --slate-100: #eef1f4;
  --sand-700: #a87d3f;
  --sand-600: #c9a063;
  --sand-400: #e2c08c;
  --sand-200: #f1dfc0;
  --sand-50: #fbf6ee;
  --bg: #fdfbf8;
  --white: #fff;
  --line: #e8e2d8;

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

  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 6px 24px rgba(63, 76, 90, .08);
  --shadow-hover: 0 14px 36px rgba(63, 76, 90, .14);
  --container: 1200px;
  --header-h: 84px;
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate-800); text-decoration: none; transition: color .2s; }
a:hover { color: var(--sand-700); }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.4; margin: 0 0 .6em; color: var(--slate-800); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--sand-600); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--slate-800); color: var(--white); padding: 10px 18px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.8em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 500; letter-spacing: .05em; transition: all .25s; line-height: 1.4;
}
.btn-primary { background: var(--slate-800); color: var(--white); }
.btn-primary:hover { background: var(--slate-600); color: var(--white); transform: translateY(-2px); }
.btn-sand { background: var(--sand-600); color: var(--white); }
.btn-sand:hover { background: var(--sand-700); color: var(--white); transform: translateY(-2px); }
.btn-outline { border-color: var(--slate-800); color: var(--slate-800); background: transparent; }
.btn-outline:hover { background: var(--slate-800); color: var(--white); }
.btn-light { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-light:hover { background: var(--white); color: var(--slate-800); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
/* 毛玻璃放在偽元素：直接加在頁首會讓手機選單（fixed）被限制在頁首高度內 */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(253, 251, 248, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 2px 16px rgba(63,76,90,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--slate-800); flex-shrink: 0; }
.brand:hover { color: var(--slate-800); }
.brand img { width: 52px; height: 52px; }
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; letter-spacing: .08em; line-height: 1.3; }
.brand-name small { display: block; font-family: var(--font-sans); font-size: .68rem; font-weight: 400; letter-spacing: .12em; color: var(--slate-400); }

.main-nav > ul { display: flex; list-style: none; gap: 4px; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-size: .97rem; font-weight: 500; letter-spacing: .06em; color: var(--slate-800);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a[aria-current="page"] { color: var(--sand-700); }
.main-nav > ul > li > a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 2px; background: var(--sand-600); border-radius: 2px;
}
.submenu {
  position: absolute; top: 100%; left: 50%; min-width: 168px; list-style: none;
  transform: translate(-50%, 8px); opacity: 0; visibility: hidden;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-hover);
  padding: 8px; transition: all .2s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.submenu a { display: block; padding: 8px 14px; border-radius: 8px; font-size: .93rem; white-space: nowrap; }
.submenu a:hover { background: var(--sand-50); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 0; border-radius: 10px; background: var(--slate-100);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--slate-800); border-radius: 2px; transition: .3s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--slate-800); color: #d9e0e7; padding: 64px 0 0; margin-top: 96px; }
.site-footer a { color: #d9e0e7; }
.site-footer a:hover { color: var(--sand-400); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 56px; height: 56px; background: var(--white); border-radius: 50%; padding: 6px; }
.footer-brand span { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--white); letter-spacing: .08em; }
.site-footer h3 { color: var(--white); font-size: 1.05rem; letter-spacing: .1em; margin-bottom: 18px; }
.footer-links { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.footer-contact { list-style: none; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 5px; color: var(--sand-400); }
.footer-bottom {
  margin-top: 48px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .85rem; color: var(--slate-400); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-sep { font-style: normal; margin: 0 10px; opacity: .5; }
.site-footer .footer-credit a { color: var(--slate-400); }
.site-footer .footer-credit a:hover { color: var(--sand-400); }
/* 手機版頁尾最後一行會被右下角「回到頂部」按鈕蓋住，底部留出按鈕的高度 */
@media (max-width: 640px) { .footer-bottom { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

.back-to-top {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: var(--sand-600); color: var(--white); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top svg { width: 22px; height: 22px; }

/* ---------- 區塊共用 ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--sand-50); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head.align-left { text-align: left; margin-left: 0; }
.eyebrow {
  display: inline-block; font-size: .82rem; letter-spacing: .3em; color: var(--sand-700);
  font-weight: 500; margin-bottom: 10px; text-transform: uppercase;
}
.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: .08em; }
.section-title::after {
  content: ""; display: block; width: 48px; height: 3px; margin: 18px auto 0;
  background: linear-gradient(90deg, var(--sand-600), var(--sand-400)); border-radius: 3px;
}
.section-head.align-left .section-title::after { margin-left: 0; }
.section-desc { color: var(--slate-600); margin-top: 16px; }
.section-more { text-align: center; margin-top: 48px; }

/* 內容尚未提供的提示 */
.placeholder-note {
  display: inline-block; font-size: .78rem; color: var(--sand-700); background: var(--sand-50);
  border: 1px dashed var(--sand-400); border-radius: 6px; padding: 1px 8px; margin-left: 6px; vertical-align: middle;
}

/* ---------- 首頁主視覺 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(226,192,140,.35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(135,150,165,.18), transparent 40%),
    var(--bg);
  padding: 96px 0 120px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  background: var(--white); box-shadow: var(--shadow); font-size: .88rem; color: var(--slate-600); margin-bottom: 24px;
}
.hero-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--sand-600); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: .1em; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--sand-700); }
.hero-lead { font-size: 1.12rem; color: var(--slate-600); max-width: 520px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 460px; margin-left: auto; width: 100%; }
.hero-visual::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle, var(--white) 55%, var(--sand-50) 100%);
  box-shadow: 0 30px 80px rgba(201,160,99,.22);
}
.hero-visual img { position: relative; width: 74%; margin: 13%; animation: float 7s ease-in-out infinite; }
.hero-ring { position: absolute; inset: 0; border: 1px dashed var(--sand-400); border-radius: 50%; animation: spin 60s linear infinite; }
.hero-ring::after {
  content: ""; position: absolute; top: 12%; right: 10%; width: 14px; height: 14px; border-radius: 50%; background: var(--sand-600);
}
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 80px; color: var(--white); }

/* ---------- 首頁：關於摘要 ---------- */
.intro { background: var(--white); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.intro-quote {
  position: relative; padding: 48px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-600)); color: var(--white);
}
.intro-quote::before {
  content: "\201C"; position: absolute; top: -10px; left: 28px; font-family: var(--font-serif);
  font-size: 7rem; line-height: 1; color: var(--sand-400); opacity: .6;
}
.intro-quote p, .content-block .intro-quote p { color: var(--white); }
.intro-quote p { font-family: var(--font-serif); font-size: 1.3rem; line-height: 1.9; letter-spacing: .06em; margin: 0; position: relative; }
.intro-quote cite { display: block; margin-top: 20px; font-style: normal; font-size: .9rem; color: var(--sand-200); }

.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 64px; }
.value-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 24px; text-align: center; transition: all .3s;
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; background: var(--white); }
.value-icon {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand-50); color: var(--sand-700);
}
.value-icon svg { width: 30px; height: 30px; }
.value-card h3 { font-size: 1.15rem; letter-spacing: .1em; }
.value-card p { font-size: .93rem; color: var(--slate-600); margin: 0; }
.value-card p span { display: inline-block; }

/* ---------- 消息列表 ---------- */
.news-list { list-style: none; border-top: 1px solid var(--line); }
.news-item a {
  display: grid; grid-template-columns: 120px 110px 1fr 24px; align-items: center; gap: 20px;
  padding: 22px 12px; border-bottom: 1px solid var(--line); color: var(--ink); transition: background .2s, padding .2s;
}
.news-item a:hover { background: var(--white); padding-inline: 20px; }
.news-date { font-family: var(--font-serif); color: var(--slate-400); font-size: .95rem; letter-spacing: .05em; }
.news-title { font-weight: 500; }
.news-arrow { color: var(--sand-600); width: 20px; height: 20px; transition: transform .2s; }
.news-item a:hover .news-arrow { transform: translateX(4px); }

.tag {
  display: inline-block; text-align: center; padding: 3px 12px; border-radius: 999px;
  font-size: .8rem; letter-spacing: .08em; white-space: nowrap;
  background: var(--slate-100); color: var(--slate-800);
}
.tag-announce { background: #e9eef3; color: #3f4c5a; }
.tag-event { background: #f7ead3; color: #8b6430; }
.tag-meeting { background: #e6efe9; color: #3d6450; }
.tag-partner { background: #f3e6e3; color: #8a4f43; }

/* ---------- 分類頁籤 ---------- */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; list-style: none; }
.filter-tabs button {
  border: 1px solid var(--line); background: var(--white); color: var(--slate-600);
  padding: 8px 22px; border-radius: 999px; font-size: .93rem; letter-spacing: .06em; transition: all .2s;
}
.filter-tabs button:hover { border-color: var(--sand-600); color: var(--sand-700); }
.filter-tabs button[aria-pressed="true"] { background: var(--slate-800); border-color: var(--slate-800); color: var(--white); }

/* ---------- 活動卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.activity-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all .3s; display: flex; flex-direction: column;
}
.activity-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.activity-card a { color: inherit; display: flex; flex-direction: column; height: 100%; }
.activity-thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.activity-thumb .tag { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.92); }
.activity-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.activity-body time { font-size: .85rem; color: var(--slate-400); letter-spacing: .05em; }
.activity-body h3 { font-size: 1.1rem; margin: 6px 0 10px; font-family: var(--font-sans); font-weight: 700; }
.activity-body p { font-size: .92rem; color: var(--slate-600); margin: 0; flex: 1; }
.activity-meta { display: flex; gap: 16px; margin-top: 16px; font-size: .85rem; color: var(--slate-400); }
.activity-meta span { display: inline-flex; align-items: center; gap: 4px; }
.activity-meta svg { width: 15px; height: 15px; }
.is-hidden { display: none !important; }

/* 照片尚未提供時的佔位圖 */
.img-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85); transition: transform .5s;
}
.img-ph svg { width: 44px; height: 44px; opacity: .8; }
.activity-card:hover .img-ph { transform: scale(1.05); }
.ph-1 { background: linear-gradient(135deg, #8796a5, #5d6c7c); }
.ph-2 { background: linear-gradient(135deg, #e2c08c, #c9a063); }
.ph-3 { background: linear-gradient(135deg, #a9b7a8, #6f8670); }
.ph-4 { background: linear-gradient(135deg, #d9b3a6, #b07e6e); }
.ph-5 { background: linear-gradient(135deg, #b5c2cf, #7d8b9a); }
.ph-6 { background: linear-gradient(135deg, #ecd3a8, #d4ad6d); }

/* ---------- 首頁行動呼籲 ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--slate-800) 0%, var(--slate-600) 100%);
  color: var(--white); padding: 64px; display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.cta-band::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  border: 40px solid rgba(226,192,140,.18);
}
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: .08em; margin-bottom: 8px; }
.cta-band p { color: #d9e0e7; margin: 0; }
.cta-band .btn-group { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; flex-shrink: 0; }

/* ---------- 內頁標題 ---------- */
.page-hero {
  position: relative; overflow: hidden; padding: 72px 0 64px; text-align: center;
  background:
    radial-gradient(circle at 90% 10%, rgba(226,192,140,.35), transparent 40%),
    radial-gradient(circle at 5% 100%, rgba(135,150,165,.2), transparent 40%),
    var(--sand-50);
}
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: .14em; margin-bottom: 12px; }
.page-hero p { color: var(--slate-600); margin: 0 auto; max-width: 600px; }
.breadcrumb { display: flex; justify-content: center; gap: 8px; list-style: none; font-size: .88rem; color: var(--slate-400); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--slate-200); }
.breadcrumb a { color: var(--slate-600); }

/* ---------- 內頁側欄版型 ---------- */
.with-aside { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--header-h) + 24px); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.side-nav h2 { font-size: 1rem; letter-spacing: .12em; padding: 12px 14px 8px; margin: 0; color: var(--slate-400); font-family: var(--font-sans); font-weight: 500; }
.side-nav ul { list-style: none; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--slate-800); font-size: .95rem; }
.side-nav a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--slate-200); transition: background .2s; }
.side-nav a:hover, .side-nav a.is-active { background: var(--sand-50); color: var(--sand-700); }
.side-nav a:hover::before, .side-nav a.is-active::before { background: var(--sand-600); }

.content-block { padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.content-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.content-block h2 { display: flex; align-items: center; gap: 14px; font-size: 1.6rem; letter-spacing: .1em; margin-bottom: 24px; }
.content-block h2 .num {
  font-family: var(--font-serif); font-size: .85rem; color: var(--sand-700);
  border: 1px solid var(--sand-400); border-radius: 999px; padding: 2px 12px; letter-spacing: .1em;
}
.content-block p { color: #44505c; }
.lead-text { font-size: 1.1rem; color: var(--slate-800) !important; }

.mission-list { list-style: none; display: grid; gap: 16px; counter-reset: m; }
.mission-list li {
  counter-increment: m; position: relative; padding: 20px 24px 20px 76px;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
}
.mission-list li::before {
  content: counter(m, decimal-leading-zero); position: absolute; left: 22px; top: 18px;
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--sand-600);
}
.mission-list strong { display: block; color: var(--slate-800); margin-bottom: 2px; }
.mission-list span { color: var(--slate-600); font-size: .95rem; }

.info-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.info-table th, .info-table td { padding: 16px 24px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th { width: 160px; background: var(--sand-50); color: var(--slate-800); font-weight: 500; letter-spacing: .08em; }

.map-box {
  margin-top: 24px; aspect-ratio: 16 / 7; border-radius: var(--radius); overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--slate-100), var(--slate-100) 12px, #e7ebef 12px, #e7ebef 24px);
  display: flex; align-items: center; justify-content: center; color: var(--slate-600); text-align: center;
}
.map-box iframe { width: 100%; height: 100%; border: 0; }

/* ---------- 章程 ---------- */
.charter-intro { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 40px; padding: 28px 32px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.charter-intro p { margin: 0; color: var(--slate-600); }
.accordion { display: grid; gap: 14px; }
.accordion details { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px;
  padding: 22px 28px; font-weight: 500; font-size: 1.08rem; color: var(--slate-800);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .chap { font-family: var(--font-serif); color: var(--sand-700); font-size: .95rem; min-width: 64px; }
.accordion summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--slate-400); border-bottom: 2px solid var(--slate-400);
  transform: rotate(45deg); transition: transform .25s;
}
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion details[open] summary { border-bottom: 1px solid var(--line); }
.accordion .acc-body { padding: 20px 28px 26px 108px; color: #44505c; }
.accordion .acc-body ol { padding-left: 1.2em; display: grid; gap: 6px; }

/* ---------- 組織架構 ---------- */
.leader-card {
  display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 40px; margin-bottom: 72px;
}
.avatar {
  aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--slate-100), var(--sand-50)); color: var(--slate-400);
}
.avatar svg { width: 42%; height: 42%; }
.leader-card .avatar { border: 6px solid var(--sand-50); box-shadow: 0 0 0 1px var(--sand-200); }
.leader-role { color: var(--sand-700); letter-spacing: .2em; font-size: .9rem; }
.leader-card h3 { font-size: 2rem; letter-spacing: .15em; margin: 4px 0 16px; }
.leader-card blockquote { margin: 0; padding-left: 20px; border-left: 3px solid var(--sand-400); color: var(--slate-600); }

.org-group { margin-bottom: 64px; }
.org-group > h2 { font-size: 1.5rem; letter-spacing: .12em; display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.org-group > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.people-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.people-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.person { text-align: center; }
.person .avatar { width: 100%; max-width: 150px; margin: 0 auto 14px; }
.person strong { display: block; font-size: 1.05rem; color: var(--slate-800); letter-spacing: .1em; }
.person span { font-size: .88rem; color: var(--sand-700); }
.person p { font-size: .85rem; color: var(--slate-600); margin: 6px 0 0; line-height: 1.6; }

/* 組織架構圖 */
.org-chart { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 48px 24px; overflow-x: auto; }
.org-tree { min-width: 780px; display: flex; flex-direction: column; align-items: center; }
.org-node {
  display: inline-block; padding: 12px 28px; border-radius: 12px; font-weight: 500; letter-spacing: .1em;
  background: var(--white); border: 2px solid var(--slate-200); color: var(--slate-800); position: relative; text-align: center;
}
.org-node.lv1 { background: var(--slate-800); border-color: var(--slate-800); color: var(--white); }
.org-node.lv2 { background: var(--sand-50); border-color: var(--sand-400); }
.org-node.lv3 { background: var(--sand-600); border-color: var(--sand-600); color: var(--white); }
.org-node small { display: block; font-size: .75rem; font-weight: 400; opacity: .8; letter-spacing: .05em; }
.org-vline { width: 2px; height: 32px; background: var(--slate-200); }
/* 每個分支自己畫上方橫線的一半，分支寬度不同也能對齊 */
.org-row { display: flex; justify-content: center; padding-top: 28px; }
.org-row > .org-col { display: flex; flex-direction: column; align-items: center; position: relative; padding: 0 14px; }
.org-row > .org-col::before { content: ""; position: absolute; top: -28px; left: 50%; width: 2px; height: 28px; margin-left: -1px; background: var(--slate-200); }
.org-row > .org-col::after { content: ""; position: absolute; top: -28px; left: 0; right: 0; height: 2px; background: var(--slate-200); }
.org-row > .org-col:first-child::after { left: 50%; }
.org-row > .org-col:last-child::after { right: 50%; }
.org-row > .org-col:only-child::after { display: none; }

/* ---------- 消息內文 ---------- */
.article { max-width: 820px; margin: 0 auto; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 32px; }
.article-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: .06em; margin: 12px 0; }
.article-meta { display: flex; gap: 16px; align-items: center; color: var(--slate-400); font-size: .9rem; flex-wrap: wrap; }
.article-body { font-size: 1.05rem; }
.article-body h2 { font-size: 1.35rem; margin-top: 1.8em; }
.article-body ul { padding-left: 1.4em; margin-bottom: 1em; }
.article-figure { margin: 32px 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.attach-list { list-style: none; display: grid; gap: 10px; margin-top: 24px; }
.attach-list a {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px;
  background: var(--sand-50); border: 1px solid var(--sand-200);
}
.attach-list svg { width: 20px; height: 20px; color: var(--sand-700); }
.article-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-nav a { font-size: .93rem; }
.article-nav .next { text-align: right; }
.article-nav small { display: block; color: var(--slate-400); font-size: .8rem; }

/* ---------- 相簿 ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 32px 0; }
.gallery button {
  border: 0; padding: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: none;
}
.gallery button:first-child { grid-column: span 2; grid-row: span 2; }
.gallery .img-ph:hover { transform: scale(1.05); }
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(30,37,45,.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-stage { width: min(960px, 100%); aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; }
.lightbox-stage .img-ph svg { width: 80px; height: 80px; }
.lightbox-caption { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: #d9e0e7; font-size: .95rem; }
.lightbox button {
  position: absolute; border: 0; background: rgba(255,255,255,.12); color: var(--white);
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lightbox button:active { background: rgba(255,255,255,.3); }
.lightbox button:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.lightbox button svg { width: 24px; height: 24px; }
.lb-close { top: calc(20px + env(safe-area-inset-top, 0px)); right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- 分頁 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; list-style: none; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--white); color: var(--slate-800); font-size: .93rem;
}
.pagination a:hover { border-color: var(--sand-600); color: var(--sand-700); }
.pagination [aria-current="page"] { background: var(--slate-800); border-color: var(--slate-800); color: var(--white); }

/* ---------- 加入協會 ---------- */
.member-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.member-type {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 28px; position: relative; overflow: hidden;
}
.member-type::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--slate-400); }
.member-type:nth-child(2)::before { background: var(--sand-600); }
.member-type:nth-child(3)::before { background: #7e9a85; }
.member-type h3 { font-size: 1.3rem; letter-spacing: .12em; }
.member-type ul { list-style: none; display: grid; gap: 10px; margin-top: 16px; }
.member-type li { display: flex; gap: 10px; color: #44505c; font-size: .95rem; }
.member-type li svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 5px; color: var(--sand-600); }
.member-type .member-fee { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); gap: 8px; }
.member-type .member-fee li { display: block; padding: 8px 14px; background: var(--sand-50); border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; color: var(--slate-600); }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; top: 36px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--sand-400) 0 8px, transparent 8px 16px); }
.steps li { counter-increment: s; text-align: center; position: relative; }
.step-dot {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--white);
  border: 2px solid var(--sand-400); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1;
  color: var(--sand-700);
}
.step-dot svg { width: 30px; height: 30px; }
.steps li::after {
  content: "STEP " counter(s); position: absolute; top: -6px; left: 50%; transform: translateX(14px);
  background: var(--slate-800); color: var(--white); font-size: .68rem; padding: 2px 8px; border-radius: 999px; letter-spacing: .1em; z-index: 2;
}
.steps h3 { font-size: 1.1rem; letter-spacing: .1em; margin-bottom: 6px; }
.steps p { font-size: .9rem; color: var(--slate-600); }

.apply-box { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.apply-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; display: flex; gap: 20px; align-items: flex-start; }
.apply-card .value-icon { margin: 0; flex-shrink: 0; }
.apply-card h3 { font-size: 1.15rem; letter-spacing: .08em; }
.apply-card p { color: var(--slate-600); font-size: .95rem; }

/* ---------- 聯絡我們 ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.contact-cards { display: grid; gap: 16px; }
.contact-card {
  display: flex; gap: 18px; align-items: center; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; color: var(--ink); transition: all .25s;
}
a.contact-card:hover { transform: translateX(4px); box-shadow: var(--shadow-hover); color: var(--ink); }
.contact-card .value-icon { width: 52px; height: 52px; margin: 0; flex-shrink: 0; }
.contact-card .value-icon svg { width: 24px; height: 24px; }
.contact-card small { display: block; color: var(--slate-400); font-size: .82rem; letter-spacing: .1em; }
.contact-card strong { font-weight: 500; font-size: 1.05rem; word-break: break-all; }
.contact-card.line .value-icon { background: #e7f6ec; color: #06a64a; }

.form-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 44px; }
.form-card h2 { font-size: 1.5rem; letter-spacing: .1em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 500; font-size: .93rem; margin-bottom: 6px; color: var(--slate-800); }
.field label .req { color: #c0533e; margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  font: inherit; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sand-600); box-shadow: 0 0 0 4px rgba(201,160,99,.18); background: var(--white); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c0533e; }
.field-error { display: none; color: #c0533e; font-size: .85rem; margin-top: 4px; }
.field.has-error .field-error { display: block; }
.hp-field { position: absolute; left: -9999px; }
.captcha-ph {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border: 1px dashed var(--slate-200);
  border-radius: 10px; color: var(--slate-400); font-size: .88rem; background: var(--bg);
}
.field .form-check { display: flex; font-weight: 400; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--slate-600); }
.field .form-check input { width: 18px; height: 18px; padding: 0; flex-shrink: 0; margin-top: 6px; accent-color: var(--slate-800); }
.form-actions { margin-top: 8px; }
.form-result { display: none; text-align: center; padding: 40px 0 16px; }
.form-result.is-shown { display: block; }
.form-result .value-icon { width: 80px; height: 80px; background: #e6efe9; color: #3d6450; }

/* ---------- 進場動畫 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
/* 錨點目標若還在位移，瀏覽器會捲到位移後的位置，動畫歸位後標題就鑽進頁首底下 */
.reveal:target { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 響應式 ---------- */
@media (max-width: 1100px) {
  .main-nav > ul > li > a { padding: 10px 9px; font-size: .93rem; }
  .people-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 1.05rem; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--bg); overflow-y: auto; padding: 16px 24px calc(32px + env(safe-area-inset-bottom, 0px));
    opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-open .main-nav { opacity: 1; transform: none; visibility: visible; }
  .nav-open { overflow: hidden; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .main-nav > ul > li > a { padding: 16px 4px; font-size: 1.05rem; }
  .main-nav > ul > li > a[aria-current="page"]::after { display: none; }
  .submenu {
    position: static; transform: none; opacity: 1; visibility: inherit; box-shadow: none; background: transparent;
    display: grid; grid-template-columns: 1fr 1fr; padding: 0 0 12px;
  }
  .has-sub:hover .submenu, .has-sub:focus-within .submenu { transform: none; visibility: inherit; }
  .submenu a { padding: 8px 12px; color: var(--slate-600); }

  .hero { padding: 56px 0 96px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 300px; margin: 0 auto; grid-row: 1; }
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { flex-direction: column; text-align: center; padding: 48px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .with-aside { grid-template-columns: 1fr; gap: 32px; }
  .side-nav { position: static; }
  .side-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .leader-card { grid-template-columns: 1fr; text-align: center; padding: 32px 24px; }
  .leader-card .avatar { max-width: 200px; margin: 0 auto; }
  .leader-card blockquote { border-left: 0; padding: 0; }
  .people-grid, .people-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .member-types { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
  .apply-box { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .container { padding-inline: 18px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  .brand-name small { display: none; }
  .brand-name { font-size: .95rem; letter-spacing: .04em; }
  .value-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .value-card { padding: 24px 14px; }
  .card-grid { grid-template-columns: 1fr; }
  .news-item a { grid-template-columns: auto 1fr; gap: 6px 12px; padding: 18px 4px; }
  .news-item a:hover { padding-inline: 8px; }
  .news-title { grid-column: 1 / -1; }
  .news-arrow { display: none; }
  .intro-quote { padding: 40px 28px; }
  .intro-quote p { font-size: 1.1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .info-table th, .info-table td { display: block; width: 100%; padding: 10px 18px; }
  .info-table th { border-bottom: 0; padding-top: 14px; }
  .accordion summary { padding: 18px 20px; font-size: 1rem; gap: 10px; }
  .accordion .acc-body { padding: 16px 20px 22px; }
  .people-grid, .people-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .form-card { padding: 28px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .article-nav { grid-template-columns: 1fr 1fr; }
  .article-nav .back { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .charter-intro { padding: 22px; }
  .lb-prev, .lb-next { top: auto; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); transform: none; }
}

/* ==========================================================================
   接後台後新增：分類改為連結、真實照片、伺服器端訊息
   ========================================================================== */

/* 分類頁籤改成連結（伺服器依 ?cat= 篩選並分頁） */
.filter-tabs a {
  border: 1px solid var(--line); background: var(--white); color: var(--slate-600);
  padding: 8px 22px; border-radius: 999px; font-size: .93rem; letter-spacing: .06em; transition: all .2s;
}
.filter-tabs a:hover { border-color: var(--sand-600); color: var(--sand-700); }
.filter-tabs a[aria-current="page"] { background: var(--slate-800); border-color: var(--slate-800); color: var(--white); }

/* 後台上傳的照片：一律鎖住比例，不讓原圖尺寸撐破版面 */
.activity-thumb img,
.gallery button img,
.article-figure img,
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.activity-card:hover .activity-thumb img,
.gallery button:hover img { transform: scale(1.05); }
.lightbox-stage { display: flex; align-items: center; justify-content: center; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.org-chart-img { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: var(--radius); }

/* 編輯器內容：圖片與表格不超出內文寬度 */
.rich-text img { max-width: 100%; height: auto; border-radius: 8px; }
.rich-text table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
.rich-text th, .rich-text td { border: 1px solid var(--line); padding: 8px 12px; }
.rich-text figure { margin: 1.5em 0; }
.rich-text figcaption { font-size: .88rem; color: var(--slate-400); text-align: center; margin-top: 6px; }
.text-pre { white-space: pre-line; }

/* 伺服器回傳的表單訊息 */
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; font-size: .95rem; }
.notice-error { background: #fbeeeb; color: #8a3a2c; border: 1px solid #efcfc7; }
.empty-note { text-align: center; color: var(--slate-400); padding: 48px 0; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }