/* ============================================================
   TSIA 前台樣式（PHP 版）
   對應 classes：site-header / hero / about / news / footer …
   色系對齊 assets/earth.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

: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;
  --max: 72rem;
  --header-h: 4.5rem;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 1rem;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; color: var(--text-heading); font-weight: 600; }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.py-section { padding: 3.5rem 0 4.5rem; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 251, 249, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar { min-height: var(--header-h); }
.nav-container {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo img { height: 2.5rem; width: auto; }
.nav-logo .logo-white { display: none !important; }
.nav-logo .logo-dark { display: block !important; }

.nav-menu {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  color: #5c6b62;
  transition: background .2s, color .2s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent-green);
  background: rgba(6, 95, 70, 0.1);
  font-weight: 600;
}

.nav-social {
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.nav-social img { width: 1.35rem; height: 1.35rem; }

.mobile-menu-btn {
  margin-left: auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.mobile-menu-btn span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
}

.nav-menu.is-open {
  display: flex;
  position: absolute;
  top: calc(var(--header-h) + 1px);
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(26, 51, 41, 0.08);
}

@media (min-width: 960px) {
  .mobile-menu-btn { display: none; }
  .nav-menu { display: flex; }
  .nav-social { display: flex; margin-left: 0.5rem; }
  .nav-menu.is-open {
    position: static;
    flex-direction: row;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn,
.btn-primary-hero,
.btn-outline-hero,
.btn-outline,
.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}

.btn-primary-hero {
  background: linear-gradient(135deg, #047857, #065f46);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(6, 95, 70, 0.25);
}
.btn-primary-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 95, 70, 0.3);
}

.btn-outline-hero,
.btn-outline,
.btn-outline-sm {
  background: #fff;
  border-color: var(--border);
  color: var(--accent-green) !important;
}
.btn-outline-hero:hover,
.btn-outline:hover,
.btn-outline-sm:hover {
  border-color: var(--accent-green);
  background: rgba(6, 95, 70, 0.05);
}
.btn-outline-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* ── Home Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1.25rem 3.5rem;
  text-align: center;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
}
.hero::before {
  width: 18rem; height: 18rem;
  background: #a7f3d0;
  top: 2rem; left: -4rem;
}
.hero::after {
  width: 22rem; height: 22rem;
  background: #fde68a;
  bottom: -2rem; right: -3rem;
}

.hero-content { position: relative; max-width: 46rem; margin: 0 auto; }
.hero-label {
  color: var(--accent-amber);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}
.hero-title {
  font-family: 'Noto Serif TC', 'Playfair Display', serif;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.25;
  color: var(--accent-green);
  margin-bottom: 1.25rem;
}
.hero-desc {
  max-width: 36rem;
  margin: 0 auto 2rem;
  color: #5c6b62;
  font-size: 1.05rem;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 48rem;
  margin: 0 auto;
}
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  box-shadow: 0 8px 24px rgba(26, 51, 41, 0.04);
}
.stat-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 2.5rem;
  color: var(--accent-green);
  font-weight: 600;
}
.stat-unit {
  font-size: 1.25rem;
  color: rgba(6, 95, 70, 0.65);
  margin-left: 0.15rem;
}
.stat-lbl {
  display: block;
  margin-top: 0.35rem;
  color: #6b7280;
  font-size: 0.9rem;
}
@media (min-width: 640px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-item:nth-child(2) { transform: translateY(-0.5rem); }
}

/* ── Sections common ────────────────────────────────────── */
.section-label {
  color: var(--accent-amber);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--accent-green);
  margin-bottom: 1rem;
}
.section-header { text-align: center; margin-bottom: 2rem; }

/* About */
.about-section {
  background: rgba(245, 242, 236, 0.85);
  padding: 4rem 0;
}
.about-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.about-text p { color: #5c6b62; margin: 0 0 1rem; }
.about-features {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}
.feature-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
.feature-item strong {
  display: block;
  color: var(--accent-green);
  margin-bottom: 0.2rem;
}
.feature-item span { color: #6b7280; font-size: 0.92rem; }
.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 220px;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}

/* News */
.news-section { padding: 4rem 0; }
.news-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26, 51, 41, 0.08);
}
.news-card-thumb img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.news-card-body { padding: 1.15rem 1.2rem 1.35rem; }
.news-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(6, 95, 70, 0.08);
  border-radius: 9999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.55rem;
}
.news-card-body h3 {
  font-size: 1.05rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.news-card-body h3 a:hover { color: var(--accent-green); }
.news-card-body p {
  color: #6b7280;
  font-size: 0.92rem;
  margin: 0 0 0.75rem;
}
.news-date { color: #9ca3af; font-size: 0.85rem; }

/* VR / CTA */
.vr-section { padding: 4rem 0; background: rgba(245, 242, 236, 0.55); }
.vr-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  min-height: 320px;
}
.vr-embed iframe { width: 100%; min-height: 420px; border: 0; display: block; }
.vr-guides {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 768px) {
  .vr-guides { grid-template-columns: repeat(4, 1fr); }
}
.guide-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}
.guide-num {
  display: inline-block;
  color: var(--accent-amber);
  font-family: 'Noto Serif TC', serif;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.guide-step p { margin: 0.35rem 0 0; color: #6b7280; font-size: 0.9rem; }

.cta-section {
  padding: 4.5rem 1.25rem;
  text-align: center;
}
.cta-desc { max-width: 36rem; margin: 0 auto 1.25rem; color: #5c6b62; }
.cta-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.2rem;
  margin: 0 auto 1.75rem;
  color: var(--accent-green);
  font-weight: 600;
}
.cta-benefits li::before { content: "✓ "; }
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ── Inner pages ────────────────────────────────────────── */
/* 配合固定浮動導覽列預留上方空間 */
.page-main { min-height: 50vh; padding-top: 5.5rem; }
.page-hero {
  background: linear-gradient(180deg, #f5f2ec 0%, var(--bg) 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.page-hero-title {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--accent-green);
}
.page-hero-sub { margin: 0.5rem 0 0; color: #6b7280; }

.rich-content { color: #3d4a42; }
.rich-content p { margin: 0 0 1rem; }
.rich-content h2, .rich-content h3 { margin: 1.5rem 0 0.75rem; color: var(--accent-green); }

/* Members */
.members-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.filter-input,
.filter-select,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.filter-input { flex: 1 1 14rem; width: auto; }
.filter-select { flex: 0 1 10rem; width: auto; }
.result-count { color: #6b7280; margin-bottom: 1.25rem; }
.members-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .members-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .members-grid { grid-template-columns: repeat(3, 1fr); }
}
.member-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: flex;
  gap: 1rem;
}
.member-logo img,
.member-logo-placeholder {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  border-radius: 1rem;
  background: var(--bg-muted);
}
.member-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-green);
}
.member-name { font-size: 1.05rem; margin-bottom: 0.25rem; }
.member-abbr { color: #9ca3af; font-size: 0.85rem; margin: 0 0 0.5rem; }
.member-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.member-type-badge,
.badge-blue,
.badge-amber {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.15rem 0.55rem;
}
.badge-blue { background: #ecfdf5; color: #065f46; }
.badge-amber { background: #fffbeb; color: #b45309; }
.empty-result {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Links */
.links-group { margin-bottom: 2.5rem; }
.links-group-title {
  font-size: 1.2rem;
  color: var(--accent-green);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.links-grid { display: grid; gap: 0.75rem; }
@media (min-width: 720px) {
  .links-grid { grid-template-columns: repeat(2, 1fr); }
}
.link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  transition: border-color .2s, transform .2s;
}
.link-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}
.link-icon { font-size: 1.1rem; }
.link-arrow { margin-left: auto; color: #9ca3af; }

/* Contact / Apply forms */
.contact-layout,
.apply-form-wrap {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .contact-layout { grid-template-columns: 0.9fr 1.1fr; }
}
.contact-info,
.contact-form-wrap,
.apply-form-wrap,
.apply-intro {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.contact-list li {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  color: #4b5563;
}
.ci-icon { flex: 0 0 auto; }
.form-row-2 {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}
.form-group { margin-bottom: 0.95rem; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-heading);
}
.alert-success-msg,
.alert-error-msg {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  font-weight: 600;
}
.alert-success-msg { background: #ecfdf5; color: #065f46; }
.alert-error-msg { background: #fef2f2; color: #b91c1c; }

/* News list / detail extras */
.news-list { display: grid; gap: 1rem; }
.news-list-item {
  display: grid;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
@media (min-width: 720px) {
  .news-list-item { grid-template-columns: 12rem 1fr; align-items: center; }
}
.article-meta { color: #9ca3af; font-size: 0.9rem; margin-bottom: 1rem; }
.article-body { color: #3d4a42; }
.article-body img { border-radius: 0.75rem; margin: 1rem 0; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: #143528;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3rem;
  padding-top: 3rem;
}
.footer-container {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
}
@media (min-width: 860px) {
  .footer-container { grid-template-columns: 1.3fr 1fr 1.2fr; }
}
.footer-logo img { height: 2.4rem; width: auto; filter: brightness(0) invert(1); }
.footer-tagline { margin: 0.85rem 0 1rem; color: rgba(255,255,255,0.65); }
.footer-social { display: flex; gap: 0.65rem; }
.footer-social img {
  width: 1.4rem;
  height: 1.4rem;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.footer-heading {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}
.footer-nav a,
.footer-contact a { color: rgba(255,255,255,0.75); }
.footer-nav a:hover,
.footer-contact a:hover { color: #fff; }
.footer-nav li,
.footer-contact li { margin-bottom: 0.45rem; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1rem 0 1.25rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.footer-bottom a { color: inherit; }
