/* ============================================
   全人健康自主管理推廣協會 官網樣式
   色彩系統沿用協會既有視覺識別
   （學習營手冊 style.css + 粉專封面 SVG）
   ============================================ */

:root {
  --forest-dark: #2d4a22;
  --forest-mid: #4a7c3f;
  --forest-light: #7ab648;
  --earth-dark: #5c4a32;
  --earth-brown: #8b7355;
  --earth-cream: #f5f0e8;
  --accent-gold: #b8960c;
  --accent-warm: #d4a857;
  --accent-orange: #e8921c;
  --accent-sun: #f5a623;
  --bg-page: #fdfbf7;
  --text-main: #3a3a32;
  --text-soft: #6b6b5e;
  --card-shadow: 0 2px 12px rgba(45, 74, 34, 0.08);
}

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

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 90px; }

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  line-height: 1.75;
  color: var(--text-main);
  background: var(--bg-page);
  letter-spacing: 0.02em;
}

img { max-width: 100%; }

/* ---------- 導覽列 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(45, 74, 34, 0.12);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  height: 44px;
  width: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.brand .brand-name {
  font-weight: 700;
  color: var(--forest-dark);
  font-size: 1.05rem;
  line-height: 1.3;
}

.brand .brand-en {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--earth-brown);
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--forest-dark);
  font-size: 0.95rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover {
  background: var(--forest-mid);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    url("../assets/hero-bg.svg") bottom center / cover no-repeat;
  padding: 6rem 1.5rem 11rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: 0.18em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero .hero-sub {
  margin-top: 1rem;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: #5c7d1f;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.hero .hero-org {
  margin-top: 1.6rem;
  font-size: 1.05rem;
  color: var(--earth-brown);
  letter-spacing: 0.1em;
}

.hero .hero-org span {
  display: block;
  font-size: 0.78rem;
  opacity: 0.7;
  letter-spacing: 0.06em;
}

.hero .hero-cta {
  margin-top: 2.2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 0.7rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(45,74,34,0.25); }

.btn-primary { background: var(--forest-mid); color: #fff; }
.btn-outline {
  background: rgba(255, 255, 255, 0.75);
  color: var(--forest-dark);
  border: 2px solid var(--forest-mid);
}

/* ---------- 區塊通用 ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 1rem;
}

.section-alt {
  background: var(--earth-cream);
}

.section-alt-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3.5rem;
}

.section-title {
  text-align: center;
  font-size: 1.9rem;
  color: var(--forest-dark);
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 0.7rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--forest-light), var(--accent-sun));
}

.section-lead {
  text-align: center;
  color: var(--text-soft);
  max-width: 46em;
  margin: 0 auto 2.5rem;
}

/* ---------- 關於協會 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3rem;
}

.about-text p { margin-bottom: 1rem; }

.about-text strong { color: var(--forest-dark); }

.fact-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.7rem;
  border-top: 4px solid var(--forest-light);
}

.fact-card h3 {
  color: var(--forest-dark);
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.08em;
}

.fact-card dl { font-size: 0.92rem; }

.fact-card dt {
  color: var(--forest-mid);
  font-weight: 700;
  margin-top: 0.6rem;
}

.fact-card dd { color: var(--text-main); }

/* ---------- 三生健康卡片 ---------- */
.tri-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.tri-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: transform 0.2s;
}

.tri-card:hover { transform: translateY(-4px); }

.tri-card .tri-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.6rem;
}

.tri-card h3 {
  color: var(--forest-dark);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.2rem;
}

.tri-card .tri-eq {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.tri-card p { font-size: 0.92rem; color: var(--text-soft); }

/* ---------- 任務列表 ---------- */
.mission-list {
  counter-reset: mission;
  list-style: none;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.mission-list li {
  position: relative;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1rem 1.4rem 1rem 4rem;
  margin-bottom: 0.9rem;
}

.mission-list li::before {
  counter-increment: mission;
  content: counter(mission);
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--forest-mid);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 2rem; }

table.org-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  font-size: 0.95rem;
}

table.org-table th {
  background: var(--forest-mid);
  color: #fff;
  padding: 0.7rem 1rem;
  text-align: left;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

table.org-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(45, 74, 34, 0.08);
}

table.org-table tr:nth-child(even) td { background: rgba(122, 182, 72, 0.06); }
table.org-table tr:hover td { background: rgba(122, 182, 72, 0.13); }

.org-note {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: -1rem 0 2.5rem;
}

.org-columns {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.6rem;
}

.org-block h3 {
  color: var(--forest-dark);
  letter-spacing: 0.1em;
  margin: 0 0 0.8rem;
  padding-left: 0.7rem;
  border-left: 4px solid var(--accent-sun);
}

/* ---------- 活動 ---------- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.event-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem 1.5rem 1.3rem;
  border-top: 4px solid var(--accent-warm);
  display: flex;
  flex-direction: column;
}

.event-card .event-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--accent-orange);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  margin-bottom: 0.7rem;
}

.event-card .event-tag.tag-done { background: var(--earth-brown); }
.event-card .event-tag.tag-ongoing { background: var(--forest-mid); }

.event-card h3 {
  color: var(--forest-dark);
  font-size: 1.08rem;
  margin-bottom: 0.3rem;
}

.event-card .event-date {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
}

.event-card p { font-size: 0.9rem; color: var(--text-soft); }

/* ---------- 入會 ---------- */
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-bottom: 2rem;
}

.join-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.7rem 1.5rem;
  text-align: center;
}

.join-card h3 {
  color: var(--forest-dark);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.join-card .join-fee {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-orange);
  margin: 0.5rem 0;
}

.join-card .join-fee small {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 400;
  display: block;
}

.join-card p { font-size: 0.9rem; color: var(--text-soft); }

.join-steps {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.6rem 1.8rem;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.join-steps h3 { color: var(--forest-dark); margin-bottom: 0.6rem; letter-spacing: 0.1em; }

.doc-link {
  color: var(--forest-mid);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-link::before { content: "📄 "; }
.doc-link:hover { color: var(--accent-orange); }
.join-steps ol { padding-left: 1.4rem; }
.join-steps li { margin-bottom: 0.4rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto 3rem; }

.faq-list details {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  padding: 1rem 1.4rem;
  font-weight: 700;
  color: var(--forest-dark);
  list-style: none;
  position: relative;
  padding-right: 3rem;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "＋";
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--forest-light);
  font-weight: 400;
  transition: transform 0.2s;
}

.faq-list details[open] summary::after { content: "－"; }

.faq-list .faq-body {
  padding: 0 1.4rem 1.2rem;
  color: var(--text-main);
  font-size: 0.95rem;
  border-top: 1px dashed rgba(45, 74, 34, 0.15);
  padding-top: 0.9rem;
}

.faq-body ul { padding-left: 1.3rem; margin-top: 0.4rem; }
.faq-body li { margin-bottom: 0.3rem; }

/* ---------- 聯絡 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 3rem;
}

.contact-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 1.8rem;
}

.contact-card h3 {
  color: var(--forest-dark);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.contact-card ul { list-style: none; }

.contact-card li {
  margin-bottom: 0.7rem;
  padding-left: 2rem;
  position: relative;
}

.contact-card li .ico {
  position: absolute;
  left: 0;
  top: 0.1rem;
}

.contact-card a { color: var(--forest-mid); font-weight: 700; text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

/* ---------- 頁尾 ---------- */
.site-footer {
  background: var(--forest-dark);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 2.2rem 1.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.site-footer .footer-slogan {
  color: var(--accent-sun);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  margin-bottom: 0.6rem;
}

/* ---------- 漢堡選單按鈕（桌機隱藏） ---------- */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--forest-dark);
  cursor: pointer;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
}

.nav-toggle:active { background: rgba(122, 182, 72, 0.15); }

/* ---------- 回到頂端 ---------- */
.to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.4rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--forest-mid);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(45, 74, 34, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 90;
}

.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 手機底部快速行動列（桌機隱藏） ---------- */
.mobile-actions { display: none; }

/* ============================================
   手機版重新設計（≤ 860px）
   原則：單欄流、拇指可及、觸控目標 ≥ 44px
   ============================================ */
@media (max-width: 860px) {
  body { padding-bottom: 62px; } /* 預留底部快速行動列高度 */

  /* — 導覽：品牌列＋漢堡選單 — */
  .nav-inner { padding: 0.55rem 1rem; }
  .brand { gap: 0.5rem; }
  .brand img { height: 38px; width: 38px; }
  .brand .brand-name { font-size: 0.92rem; }
  .brand .brand-en { display: none; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.3rem 0 0.5rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.85rem 0.6rem;
    font-size: 1.02rem;
    border-bottom: 1px solid rgba(45, 74, 34, 0.08);
    border-radius: 0;
  }
  .site-nav a:last-child { border-bottom: 0; }

  /* — Hero：縮短高度、按鈕全寬好按 — */
  .hero { padding: 3rem 1.4rem 8.5rem; }
  .hero h1 {
    white-space: nowrap;
    letter-spacing: 0.05em;
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }
  .hero .hero-sub { margin-top: 0.8rem; }
  .hero .hero-org { margin-top: 1.2rem; font-size: 0.95rem; }
  .hero .hero-cta {
    margin-top: 1.8rem;
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    gap: 0.7rem;
  }
  .btn { text-align: center; padding: 0.85rem 1.2rem; font-size: 1.02rem; }

  /* — 區塊節奏：縮小留白、標題適配 — */
  .section { padding: 2.6rem 1.2rem 0.6rem; }
  .section-alt-inner { padding: 2.6rem 1.2rem 2rem; }
  .section-title { font-size: 1.45rem; letter-spacing: 0.12em; }
  .section-lead { font-size: 0.95rem; margin-bottom: 1.6rem; }

  /* — 全部改單欄 — */
  .about-grid, .org-columns, .contact-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .tri-grid, .join-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
  .event-grid { grid-template-columns: 1fr; gap: 1rem; }
  .about-grid { margin-bottom: 1.8rem; }
  .tri-grid, .event-grid, .mission-list, .faq-list { margin-bottom: 1.8rem; }
  .tri-card { padding: 1.4rem 1.2rem; }
  .tri-card:hover { transform: none; }
  .mission-list li { padding: 0.9rem 1rem 0.9rem 3.4rem; font-size: 0.95rem; }
  .mission-list li::before { left: 0.8rem; width: 1.8rem; height: 1.8rem; font-size: 0.9rem; }

  /* — 理監事表格 → 名片式卡片 — */
  table.org-table, table.org-table tbody, table.org-table tr, table.org-table td {
    display: block;
    width: 100%;
  }
  table.org-table thead { display: none; }
  table.org-table { background: transparent; box-shadow: none; border-radius: 0; }
  table.org-table tr {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.7rem;
  }
  table.org-table tr:nth-child(even) td,
  table.org-table tr:hover td { background: transparent; }
  table.org-table tr td { padding: 0; border: none; background: transparent; }
  table.org-table tr td:nth-child(1) {
    display: inline-block;
    width: auto;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--forest-mid);
    border-radius: 999px;
    padding: 0.12rem 0.7rem;
    margin-bottom: 0.35rem;
    letter-spacing: 0.08em;
  }
  table.org-table tr td:nth-child(2) { font-size: 1.08rem; font-weight: 700; color: var(--forest-dark); }
  table.org-table tr td:nth-child(3) { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.1rem; }
  .table-wrap { overflow: visible; margin-bottom: 1.2rem; }
  .org-note { margin: -0.2rem 0 1.5rem; }

  /* — FAQ：加大觸控目標 — */
  .faq-list summary { padding: 1rem 2.8rem 1rem 1.1rem; font-size: 0.98rem; }
  .faq-list .faq-body { padding: 0.8rem 1.1rem 1.1rem; }

  /* — 聯絡與入會 — */
  .contact-card { padding: 1.4rem 1.2rem; }
  .contact-card a { word-break: break-all; }
  .join-steps { padding: 1.3rem 1.2rem; margin-bottom: 1.8rem; }

  /* — 底部快速行動列：拇指黃金區 — */
  .mobile-actions {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    grid-template-columns: repeat(3, 1fr);
    background: rgba(253, 251, 247, 0.97);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(45, 74, 34, 0.15);
    box-shadow: 0 -2px 12px rgba(45, 74, 34, 0.08);
    padding-bottom: env(safe-area-inset-bottom); /* iPhone 底部手勢條 */
  }
  .mobile-actions a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.5rem 0 0.6rem;
    text-decoration: none;
    color: var(--forest-dark);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
  }
  .mobile-actions a .ma-ico { font-size: 1.3rem; line-height: 1.25; }
  .mobile-actions a.ma-primary { color: #fff; background: var(--forest-mid); font-weight: 700; }

  .to-top { bottom: 76px; right: 0.9rem; width: 42px; height: 42px; }

  .site-footer { padding: 1.8rem 1.2rem; font-size: 0.8rem; }
}
