/* 版型 B — 大自然大地色系 */
* { -webkit-font-smoothing: antialiased; }

:root {
  --bg: #fcfbf9;
  --bg-card: #ffffff;
  --bg-muted: #f5f2ec;
  --text: #3d4a42;
  --text-heading: #1a3329;
  --accent-green: #065f46;
  --accent-amber: #b45309;
  --border: #e8e4dc;
  --radius: 1.25rem;
  --font-size-base: 1rem;
  --line-height: 1.75;
}

html { scroll-behavior: smooth; }
html.a11y-reduce-motion, html.a11y-reduce-motion * {
  scroll-behavior: auto !important;
  animation: none !important;
  transition-duration: 0.01ms !important;
}

body.earth-body {
  font-family: 'Noto Sans TC', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
}

.font-serif { font-family: 'Playfair Display', 'Noto Serif TC', serif; }

/* 無障礙字級 */
html.a11y-text-lg { --font-size-base: 1.125rem; }
html.a11y-text-xl { --font-size-base: 1.25rem; }

html.a11y-high-contrast {
  --text: #1a2e24;
  --text-heading: #0a1f14;
  --border: #9ca89e;
  --accent-green: #064e3b;
  --accent-amber: #92400e;
}
html.a11y-high-contrast .earth-body { background-color: #faf8f4; }

/* 導覽 */
.earth-nav {
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.earth-nav.is-scrolled {
  box-shadow: 0 4px 24px rgba(26, 51, 41, 0.08);
}

.earth-nav-link {
  position: relative;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  color: #5c6b62;
  transition: all 0.3s ease;
}
.earth-nav-link:hover {
  color: var(--accent-green);
  background: rgba(6, 95, 70, 0.06);
}
.earth-nav-link.is-active {
  color: var(--accent-green);
  background: rgba(6, 95, 70, 0.1);
  font-weight: 600;
}

/* 按鈕 */
.btn-earth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(6, 95, 70, 0.25);
}
.btn-earth-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 95, 70, 0.3);
}
.btn-earth-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 2px solid var(--border);
  color: var(--accent-green);
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--bg-card);
  transition: all 0.3s ease;
}
.btn-earth-outline:hover {
  border-color: #a7d4bc;
  background: #f0fdf4;
}

/* 卡片 */
.earth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  transition: all 0.3s ease;
}
.earth-card:hover {
  border-color: #c5dcc9;
  box-shadow: 0 12px 40px rgba(26, 51, 41, 0.08);
  transform: translateY(-4px);
}

/* 表單 */
.earth-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-heading);
  font-size: 0.9375rem;
  line-height: 1.6;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.earth-input:focus {
  outline: 2px solid #047857;
  outline-offset: 2px;
  border-color: #047857;
}
.earth-input[type="search"]::-webkit-search-decoration,
.earth-input[type="search"]::-webkit-search-cancel-button,
.earth-input[type="search"]::-webkit-search-results-button,
.earth-input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.earth-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5c6b62;
  margin-bottom: 0.4rem;
}

/* 標籤 */
.tag-earth {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 滾動顯示動畫 */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 有機背景裝飾 */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  animation: blob-float 12s ease-in-out infinite;
}
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.05); }
}

/* 無障礙切換器 */
#a11yToggle {
  position: fixed;
  left: 1rem;
  bottom: 1.5rem;
  z-index: 55;
}
#a11yPanel {
  position: fixed;
  left: 1rem;
  bottom: 5rem;
  z-index: 55;
  width: min(280px, calc(100vw - 2rem));
}
.a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  transition: background 0.3s ease;
}
.a11y-option:hover { background: var(--bg-muted); }
.a11y-option[aria-pressed="true"] {
  background: #ecfdf5;
  color: var(--accent-green);
  font-weight: 600;
}

/* 篩選 / 分頁 */
.filter-chip {
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: #5c6b62;
  transition: all 0.3s ease;
}
.filter-chip:hover, .filter-chip.is-active {
  border-color: #86efac;
  background: #ecfdf5;
  color: var(--accent-green);
  font-weight: 600;
}

/* 會員名錄 — 篩選按鈕與卡片標籤同色 */

/* 正式會員 → 藍色系 */
.filter-chip.filter-chip-cat[data-cat="正式會員"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}
.filter-chip.filter-chip-cat[data-cat="正式會員"]:hover,
.filter-chip.filter-chip-cat[data-cat="正式會員"].is-active {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

/* 贊助會員 → 琥珀色系 */
.filter-chip.filter-chip-cat[data-cat="贊助會員"] {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.filter-chip.filter-chip-cat[data-cat="贊助會員"]:hover,
.filter-chip.filter-chip-cat[data-cat="贊助會員"].is-active {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
}

/* 全部 → 翠綠 active */
.filter-chip.filter-chip-cat[data-cat="all"]:hover,
.filter-chip.filter-chip-cat[data-cat="all"].is-active {
  border-color: #86efac;
  background: #ecfdf5;
  color: var(--accent-green);
  font-weight: 600;
}

.page-dot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.page-dot:hover, .page-dot.is-active {
  background: #047857;
  border-color: #047857;
  color: #fff;
}

/* 靜態頁 / WYSIWYG 內容 */
.prose-custom h2,
.prose-custom h3 {
  font-family: 'Playfair Display', 'Noto Serif TC', serif;
  color: var(--text-heading);
  margin: 2rem 0 1rem;
}
.prose-custom p { margin-bottom: 1.25rem; line-height: var(--line-height); }
.prose-custom a { color: var(--accent-green); text-decoration: underline; }

/* 文章內文 */
.article-body p {
  margin-bottom: 1.5rem;
  line-height: var(--line-height);
  color: var(--text);
}
.article-body img,
.article-body figure,
.article-body video,
.article-body table {
  max-width: 100%;
}
.article-body iframe {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  min-height: 200px;
  margin: 1.25rem 0;
  border: 0;
  border-radius: 1rem;
}
.article-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  object-fit: contain;
}
.news-cover {
  border: 1px solid #e8e4dc;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #f5f2ec;
  text-align: center;
}
.news-cover-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.article-body h2 {
  font-family: 'Playfair Display', 'Noto Serif TC', serif;
  font-size: 1.25rem;
  color: var(--text-heading);
  margin: 2.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 4px solid #86efac;
}
.article-body ul { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.article-body ul li {
  padding: 0.4rem 0 0.4rem 1.25rem;
  position: relative;
  line-height: var(--line-height);
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #047857;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f5f2ec; }
::-webkit-scrollbar-thumb { background: #c5dcc9; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob { animation: none; }
}
