/* TMI Demo — 商業派設計（深藍 + 金色 + 白底）
   字體 Noto Sans TC，大留白，響應式 */

:root {
  --navy: #1B2B4D;
  --navy-700: #243760;
  --navy-50: #F4F6FB;
  --gold: #C9A961;
  --gold-soft: #FAF3E1;
  --dark: #2C2C2C;
  --muted: #6E6E6E;
  --line: #E4E4E4;
  --bg-soft: #F8F8F6;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 6px rgba(27, 43, 77, 0.06);
  --shadow-md: 0 8px 28px rgba(27, 43, 77, 0.10);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

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

/* ============ Top bar ============ */
.topbar {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  padding: 8px 0;
  letter-spacing: 0.05em;
}
.topbar .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,0.85); }
.topbar a:hover { color: var(--gold); }
@media (max-width: 640px) {
  /* 聯絡信箱是很長的一串 gmail，窄螢幕縮字級並允許斷行，才不會被擠掉 */
  .topbar { font-size: 12px; }
  .topbar .wrap { gap: 12px; padding: 0 16px; }
  .topbar span:first-child { overflow-wrap: anywhere; min-width: 0; }
}

/* ============ Header / Nav ============ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* 學會正式 LOGO（含中文會名與英文全名），取代原本的 TMI 文字標 */
.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}
@media (max-width: 900px) {
  .brand-logo { height: 38px; }
}
@media (max-width: 380px) {
  .brand-logo { height: 32px; }
}
/* 頁尾（深藍底）用的反白版，尺寸與頁首各自獨立 */
.footer-brand .brand-logo-invert { height: 42px; }
@media (max-width: 900px) {
  .footer-brand .brand-logo-invert { height: 38px; }
}
.brand-mark {
  width: 48px; height: 48px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.05em;
}
.brand-text { line-height: 1.2; }
.brand-text .zh {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}
.brand-text .en {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
nav.main-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
nav.main-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  padding: 10px 16px;
  border-radius: 4px;
  position: relative;
}
nav.main-nav a:hover { color: var(--navy); background: var(--navy-50); }
nav.main-nav a.active {
  color: var(--navy);
  font-weight: 700;
}
nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 2px;
  background: var(--gold);
}
nav.main-nav .cta {
  margin-left: 12px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 4px;
}
nav.main-nav .cta:hover {
  background: var(--navy);
  color: var(--white);
}
.menu-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--navy); }

@media (max-width: 900px) {
  nav.main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 8px 16px 16px;
    box-shadow: var(--shadow-md);
    display: none;
    border-top: 1px solid var(--line);
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 14px 12px; border-bottom: 1px solid var(--line); }
  nav.main-nav .cta { margin: 12px 0 0; text-align: center; }
  .menu-toggle { display: block; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(27,43,77,0.92) 0%, rgba(36,55,96,0.85) 50%, rgba(27,43,77,0.92) 100%),
    radial-gradient(circle at 80% 20%, rgba(201,169,97,0.25) 0%, transparent 60%),
    var(--navy);
  color: var(--white);
  /* 2026-08-09 貫貫：版面看起來扁，上下留白各加約 45%（96/110 → 140/162），整塊高約 +18% */
  padding: 140px 24px 162px;
  overflow: hidden;
}
/* 輪播圖層（2026-08-09）：圖在最底、遮罩壓在圖上、斜紋再上一層、文字最上。
   沒有 .has-slider 時整段不作用，hero 維持原本的純色漸層。 */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.hero-slide.is-active { opacity: 1; }
/* 窄螢幕換直式裁圖：1920x900 的寬幅圖在手機上 cover 只會露出正中一小條，
   等於看不到照片。這裡用 !important 蓋掉樣板寫在元素上的 inline background-image
   （inline 樣式沒有 !important，所以蓋得過）。檔名對應 hero-N-m.jpg。 */
@media (max-width: 720px) {
  .hero-slide:nth-child(1) { background-image: url('img/hero/hero-1-m.jpg') !important; }
  .hero-slide:nth-child(2) { background-image: url('img/hero/hero-2-m.jpg') !important; }
  .hero-slide:nth-child(3) { background-image: url('img/hero/hero-3-m.jpg') !important; }
  .hero-slide:nth-child(4) { background-image: url('img/hero/hero-4-m.jpg') !important; }
  .hero-slide:nth-child(5) { background-image: url('img/hero/hero-5-m.jpg') !important; }
  .hero-slide:nth-child(6) { background-image: url('img/hero/hero-6-m.jpg') !important; }
}
.hero.has-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(27,43,77,0.86) 0%, rgba(27,43,77,0.64) 46%, rgba(20,32,58,0.32) 100%),
    radial-gradient(circle at 80% 20%, rgba(201,169,97,0.14) 0%, transparent 60%);
  pointer-events: none;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.hero .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}
/* 輪播指示器：金色短線條，跟按鈕的直角風格一致 */
.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 40px;
}
.hero-dots button {
  width: 36px;
  height: 4px;
  padding: 0;
  border: 0;
  background: rgba(255,255,255,0.32);
  cursor: pointer;
  transition: background 0.3s ease;
}
.hero-dots button:hover { background: rgba(255,255,255,0.6); }
.hero-dots button[aria-selected="true"] { background: var(--gold); }
.hero-dots button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold);
  font-weight: 700;
  border: 1px solid var(--gold);
  padding: 6px 14px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
/* 遮罩調淡後照片亮部會吃掉字的對比，用陰影頂住，不必再把照片壓暗 */
.hero.has-slider .eyebrow,
.hero.has-slider h1,
.hero.has-slider .lead {
  text-shadow: 0 2px 16px rgba(12,20,38,0.72);
}
.hero h1 .highlight { color: var(--gold); }
.hero .lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: rgba(255,255,255,0.85);
  max-width: 620px;
  margin-bottom: 36px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, background .2s, color .2s;
}
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover { background: var(--white); color: var(--navy); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* ============ Section common ============ */
section.block {
  padding: 84px 24px;
}
section.block.tight { padding: 56px 24px; }
section.block.alt { background: var(--bg-soft); }
section.block.deep { background: var(--navy); color: var(--white); }
section.block .wrap { max-width: var(--maxw); margin: 0 auto; }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
section.deep .section-head h2 { color: var(--white); }
.section-head p {
  color: var(--muted);
  font-size: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.section-head::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  background: var(--gold);
  margin: 22px auto 0;
}

/* ============ Page Banner（次頁用） ============ */
.page-banner {
  background:
    linear-gradient(135deg, rgba(27,43,77,0.95) 0%, rgba(36,55,96,0.88) 100%),
    var(--navy);
  color: var(--white);
  padding: 80px 24px 64px;
  text-align: center;
}
.page-banner .kicker {
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--gold);
  font-weight: 700;
}
.page-banner h1 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  margin: 14px 0;
  letter-spacing: 0.02em;
}
.page-banner .breadcrumb {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.page-banner .breadcrumb a { color: rgba(255,255,255,0.85); }
.page-banner .breadcrumb a:hover { color: var(--gold); }

/* ============ Cards / Grid ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 900px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}
.card .thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.3em;
  font-weight: 700;
}
.card .thumb.thumb-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #B6924C 100%);
  color: var(--navy);
}
/* 照片底的縮圖（2026-08-09 倡議三主題卡）：照片鋪滿後壓一層深藍遮罩，
   金色主題字才壓得住。背景圖由樣板 inline 指定，這裡只管遮罩與層次。 */
.card .thumb.thumb-photo {
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.card .thumb.thumb-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(27,43,77,0.86) 0%, rgba(27,43,77,0.72) 55%, rgba(20,32,58,0.80) 100%);
  transition: background 0.35s ease;
}
/* 主題字是 text node 疊不上遮罩，樣板把它包成 .badge-text 才能提到遮罩之上 */
.card .thumb.thumb-photo .badge-text {
  position: relative;
  z-index: 1;
}
.topic-card-link:hover .card .thumb.thumb-photo::before {
  background: linear-gradient(160deg, rgba(27,43,77,0.78) 0%, rgba(27,43,77,0.62) 55%, rgba(20,32,58,0.74) 100%);
}
.card .thumb.thumb-pattern::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 14px);
}
.card .body { padding: 24px 22px 26px; }
.card .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 10px;
}
.card .meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.card p {
  font-size: 15px;
  color: var(--dark);
  line-height: 1.7;
}
.card .more {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.card .more::after { content: " →"; color: var(--gold); }

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 -8px;
}
.stats .stat {
  text-align: center;
  padding: 20px 12px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stats .stat:last-child { border-right: 0; }
.stats .num {
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  letter-spacing: 0.02em;
}
.stats .label {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.08em;
}
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
}

/* ============ Feature row ============ */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
@media (max-width: 900px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 32px; direction: ltr; }
}
.feature-visual {
  height: 360px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.3em;
  font-weight: 700;
}
.feature-visual::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 16px);
}
/* 2026-08-09：原本是寫著「學會主視覺」的深藍色塊，改成山景照＋反白 LOGO。
   照片由樣板 inline 指定，這裡管遮罩與 LOGO 的層次。 */
.feature-visual.has-photo {
  background-size: cover;
  background-position: center;
}
.feature-visual.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(27,43,77,0.52) 0%, rgba(27,43,77,0.40) 55%, rgba(20,32,58,0.56) 100%);
}
.feature-visual-logo {
  position: relative;
  z-index: 2;
  width: min(62%, 330px);
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(12,20,38,0.45));
}
.feature-text h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.feature-text .gold-line {
  width: 48px; height: 3px;
  background: var(--gold);
  margin-bottom: 18px;
}
.feature-text p {
  font-size: 16px;
  color: var(--dark);
  line-height: 1.85;
  margin-bottom: 14px;
}

/* ============ News list ============ */
.news-list { list-style: none; }
.news-list li {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.news-list li:hover { background: var(--bg-soft); }
.news-list .date {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-top: 4px;
}
.news-list .date .y { font-size: 12px; display: block; }
.news-list .title {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.6;
}
.news-list .title:hover { color: var(--gold); }
.news-list .tag-pill {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  align-self: start;
  margin-top: 4px;
}
@media (max-width: 700px) {
  .news-list li { grid-template-columns: 1fr; gap: 8px; }
  .news-list .tag-pill { justify-self: start; }
}

/* ============ Officers ============ */
.officer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.officer {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 18px;
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}
.officer:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.officer .avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  margin: 0 auto 14px;
  letter-spacing: 0.04em;
}
.officer .role {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 6px;
}
.officer .name {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.officer .affil {
  font-size: 13px;
  color: var(--muted);
}

/* ============ Timeline ============ */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
}
.timeline .item {
  position: relative;
  padding: 0 0 32px 0;
}
.timeline .item::before {
  content: "";
  position: absolute;
  left: -25px; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline .year {
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.timeline .title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.timeline .desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

/* ============ Quote ============ */
.quote-block {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  padding: 32px 36px;
  margin: 32px 0;
  border-radius: 0 6px 6px 0;
}
.quote-block .who {
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.quote-block .text {
  font-size: 17px;
  color: var(--dark);
  line-height: 1.85;
  font-style: italic;
}

/* ============ Form / Login ============ */
.form-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-md);
}
.form-shell .left {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 100%);
  color: var(--white);
  padding: 56px 44px;
}
.form-shell .left::before {
  content: "✦";
  font-size: 32px;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}
.form-shell .left h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}
.form-shell .left .gold-line {
  width: 40px; height: 3px;
  background: var(--gold);
  margin: 14px 0 18px;
}
.form-shell .left p {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  line-height: 1.85;
  margin-bottom: 14px;
}
.form-shell .left ul {
  list-style: none;
  margin-top: 18px;
}
.form-shell .left ul li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}
.form-shell .left ul li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 6px;
  color: var(--gold);
  font-weight: 700;
}
.form-shell .right {
  padding: 56px 44px;
}
.form-shell .right h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-shell .right .sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}
@media (max-width: 800px) {
  .form-shell { grid-template-columns: 1fr; }
  .form-shell .left, .form-shell .right { padding: 36px 26px; }
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--gold);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .field { margin-bottom: 0; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.helper {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.helper a { font-weight: 600; }

/* ============ Footer ============ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 64px 24px 28px;
}
.site-footer .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-brand .brand-mark {
  background: var(--gold); color: var(--navy);
}
.footer-brand .brand-text .zh { color: var(--white); }
.footer-brand .brand-text .en { color: var(--gold); }
.footer-brand p {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255,255,255,0.7);
}
.footer-grid h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; }
/* overflow-wrap：聯絡信箱是很長的一串 gmail，手機寬度下不換行會被裁掉 */
.footer-grid ul li { margin-bottom: 10px; overflow-wrap: anywhere; }
.footer-grid ul a {
  color: rgba(255,255,255,0.78);
  font-size: 15px;
  transition: color .2s, padding-left .2s;
}
.footer-grid ul a:hover { color: var(--gold); padding-left: 4px; }

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ============ Misc ============ */
.center { text-align: center; }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 36px; } .mt-4 { margin-top: 48px; }
.mb-2 { margin-bottom: 24px; }
.lead { font-size: 18px; color: var(--muted); line-height: 1.85; }

/* Demo banner（內部備註，淡灰低調，不搶截圖視覺） */
.demo-banner {
  background: #F0EFEC;
  color: var(--muted);
  padding: 5px 24px;
  font-size: 11px;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}

/* ============ 圖文列表卡（分類頁／倡議主題頁） ============ */
.post-card-media {
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
  align-items: stretch;
}
/* 焦點卡的圖再寬一些，維持橫幅感 */
.post-card-media.featured { grid-template-columns: 420px 1fr; }
.post-card-media.featured .media { min-height: 236px; }
.post-card-media .media {
  position: relative;
  min-height: 176px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  overflow: hidden;
  /* 圖在框內置中，四周補深底 */
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 不裁切：舊文縮圖多是活動圖卡（圖上有標題字）與合照，cover 會把字和人臉切掉，
   改用 contain 照原比例完整顯示、四周補深底。
   尺寸必須維持 100%（不要改成 auto）：img 加了 loading="lazy"，auto 尺寸的圖在
   載入前是 0x0，瀏覽器會判定它不需要載入，頁面下半部的縮圖就整排空白。 */
.post-card-media .media img {
  /* 絕對定位：直式海報（如 768x958）若參與高度計算會把整張卡撐到 500px 以上，
     右側文字區跟著空一大塊。脫離文件流後卡片高度只由文字與 min-height 決定。 */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* 無圖時的色塊 fallback：斜紋 + 金色標籤字 */
.post-card-media .media.is-empty::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 14px);
}
.post-card-media .media .media-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  z-index: 1;
}
.post-card-media .body { padding: 26px 30px 28px; }
@media (max-width: 700px) {
  /* .featured 要跟著單欄，否則它 0,2,0 的優先權會壓過這條 0,1,0，
     手機上焦點卡維持 420px 圖欄，文字區整塊被推出畫面（overflow:hidden 裁掉） */
  .post-card-media,
  .post-card-media.featured { grid-template-columns: 1fr; }
  .post-card-media .media { height: 190px; min-height: 0; }
  .post-card-media.featured .media { height: 200px; min-height: 0; }
  .post-card-media .body { padding: 22px 22px 24px; }
}

/* 最新消息列表：左圖右標題的緊湊卡（一頁 12 筆仍好掃） */
.news-cards { display: flex; flex-direction: column; gap: 16px; }
/* 縮圖走寬幅橫式（2:1），不要接近正方形（貫貫 2026-08-08 指示，兩度加寬） */
.post-card-media.compact { grid-template-columns: 360px 1fr; }
.post-card-media.compact .media { min-height: 180px; }
/* 不放大：contain 之下放大會把圖擠出框外，等於又裁到內容 */
.post-card-media.compact .body {
  padding: 18px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.post-card-media.compact .tag { font-size: 13px; }
.post-card-media.compact h3 {
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  min-height: 0;
}
.post-card-media.compact h3 a { color: var(--navy); }
.post-card-media.compact:hover h3 a { color: var(--gold); }
@media (max-width: 700px) {
  /* 訊息列表在手機維持左小圖右標題，不放大成整張圖；比例同樣走寬幅 */
  .post-card-media.compact { grid-template-columns: 172px 1fr; }
  .post-card-media.compact .media { height: auto; min-height: 86px; }
  .post-card-media.compact .body { padding: 14px 16px; }
  .post-card-media.compact h3 { font-size: 16px; }
}

/* ============ 活動相簿：照片牆（活動紀錄分類頁） ============ */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(286px, 1fr));
  gap: 18px;
}
.album-item {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
}
/* 同列表縮圖：完整顯示不裁切，四周補深底（照片會裁到人臉與圖上的字） */
.album-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.album-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 34px 16px 14px;
  background: linear-gradient(to top, rgba(12,22,44,0.94) 40%, rgba(12,22,44,0));
  color: var(--white);
}
.album-date {
  display: block;
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.album-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}
.album-item:hover { border-color: var(--gold); }
.album-item:hover .album-title { color: var(--gold); }
@media (max-width: 640px) {
  .album-grid { grid-template-columns: 1fr; }
}

/* ============ 倡議區：書籤列 + 卡片牆 ============ */
.topic-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 26px;
}
.topic-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.topic-tab:hover { border-color: var(--gold); color: var(--gold); }
.topic-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.topic-tab .n {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}
.topic-tab.is-active .n { color: var(--gold); }
.topic-intro {
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
  color: var(--muted);
  line-height: 1.85;
}
.topic-intro strong { color: var(--navy); }
.topic-card .thumb.topic-thumb {
  display: block;
  height: 200px;
  padding: 0;
  overflow: hidden;
}
.topic-card .thumb.topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.topic-card:hover .thumb.topic-thumb img { transform: scale(1.04); }
.topic-card .body { display: flex; flex-direction: column; }
.topic-card .body .more { margin-top: auto; }
.topic-card h3 { min-height: 0; }
@media (max-width: 900px) {
  .topic-card .thumb.topic-thumb { height: 190px; }
}

/* 書籤列用 <a> 時（分類頁切換各主題）與 <button> 版共用外觀 */
a.topic-tab { text-decoration: none; display: inline-block; }
a.topic-tab:hover { text-decoration: none; }

/* 倡議主題卡：整張卡即連結（卡內文字不再另外掛 <a>） */
.topic-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.topic-card-link:hover { text-decoration: none; }
.topic-card-link:hover .more { color: var(--gold); }
.topic-card-link:focus-visible .card {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* 三大核心目標：色塊直接放標題，不用 01/02/03 編號 */
.card .thumb.goal-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.12em;
  height: 150px;
  padding: 0 16px;
  text-align: center;
  line-height: 1.4;
}

/* ============ 主選單子選單（關於本會） ============ */
nav.main-nav .nav-item { position: relative; display: flex; align-items: center; }
nav.main-nav .sub-toggle {
  display: none; /* 桌機用 hover，不需要箭頭按鈕 */
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 10px 8px;
}
nav.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 60;
}
nav.main-nav .has-sub:hover .sub-menu,
nav.main-nav .has-sub:focus-within .sub-menu { display: flex; }
nav.main-nav .sub-menu a {
  font-size: 15px;
  padding: 10px 14px;
  white-space: nowrap;
  border-radius: 4px;
}
nav.main-nav .sub-menu a.active { color: var(--navy); font-weight: 700; }
nav.main-nav .sub-menu a.active::after { display: none; }

@media (max-width: 900px) {
  nav.main-nav .nav-item { flex-wrap: wrap; }
  nav.main-nav .nav-item > a { flex: 1; }
  nav.main-nav .sub-toggle { display: block; border-bottom: 1px solid var(--line); }
  nav.main-nav .sub-menu {
    position: static;
    width: 100%;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 16px;
    border-radius: 0;
  }
  nav.main-nav .has-sub:hover .sub-menu { display: none; } /* 手機改點擊展開 */
  nav.main-nav .has-sub.open .sub-menu { display: flex; }
}
