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

:root {
  --green-dark:  #1e4d2b;
  --green-mid:   #2e7d45;
  --green-light: #e8f5ec;
  --cream:       #f8f6f1;
  --text-dark:   #1a1a1a;
  --text-mid:    #555;
  --white:       #ffffff;
  --shadow:      0 4px 20px rgba(0,0,0,0.09);
  --radius:      12px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans TC', sans-serif; color: var(--text-dark); background: var(--cream); line-height: 1.7; }
img { display: block; width: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }

/* ── 導覽列 ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 64px;
  background: rgba(20, 60, 35, 0.65); backdrop-filter: blur(10px);
}
.nav-logo { font-size: 1.15rem; font-weight: 700; color: #fff; letter-spacing: .06em; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }

/* ── 英雄區（影片） ── */
.hero { position: relative; width: 100%; height: 88vh; min-height: 520px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10,40,20,.5) 0%, rgba(10,40,20,.65) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 5vw; }
.hero-content h1 { font-size: clamp(2rem, 5.5vw, 3.8rem); font-weight: 700; letter-spacing: .1em; margin-bottom: .75rem; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.hero-content .tagline { font-size: clamp(.95rem, 2.2vw, 1.3rem); opacity: .9; letter-spacing: .12em; margin-bottom: 2.2rem; font-weight: 300; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: .8rem 2rem; border-radius: 50px; font-size: .97rem; font-weight: 600; cursor: pointer; transition: all .25s; letter-spacing: .03em; font-family: inherit; border: 2px solid transparent; }
.btn-primary { background: var(--green-mid); color: #fff; border-color: var(--green-mid); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.15); }

/* ── 滾動提示箭頭 ── */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  letter-spacing: .08em;
  animation: bounce 1.8s ease-in-out infinite;
  cursor: pointer;
}
.scroll-hint svg { width: 28px; height: 28px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ── 共用區塊 ── */
section { padding: 80px 5vw; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; color: var(--green-dark); margin-bottom: .4rem; }
.section-title p { color: var(--text-mid); font-size: .97rem; }
.divider { width: 44px; height: 3px; background: var(--green-mid); margin: .6rem auto 0; border-radius: 2px; }

/* ── 園區介紹（首頁） ── */
.about-home {
  background: var(--white);
  background-image: url('../images/leaf-pattern.svg');
  background-size: 500px 500px;
  background-repeat: repeat;
}
.about-home-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.about-home-inner p { font-size: 1.05rem; color: var(--text-mid); line-height: 2; }

/* ── 快速入口 ── */
.quick-links { background: var(--green-light); }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; max-width: 860px; margin: 0 auto; }
.quick-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.quick-card:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(0,0,0,.13); }
.quick-card-img { height: 220px; overflow: hidden; background: var(--green-light); display: flex; align-items: center; justify-content: center; }
.quick-card-img svg { width: 64px; height: 64px; opacity: .25; }
.quick-card-body { padding: 1.25rem 1.5rem 1.5rem; }
.quick-card-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); margin-bottom: .4rem; }
.quick-card-body p { font-size: .9rem; color: var(--text-mid); margin-bottom: 1rem; }
.link-arrow { color: var(--green-mid); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .3rem; }
.link-arrow::after { content: '→'; }

/* ── 樹種目錄 ── */
.species-page { background: var(--cream); }
.search-wrap { max-width: 480px; margin: 0 auto 2.5rem; position: relative; }
.search-wrap input { width: 100%; padding: .85rem 1.25rem .85rem 3rem; border: 2px solid #ddd; border-radius: 50px; font-size: 1rem; font-family: inherit; outline: none; transition: border-color .2s; background: var(--white); }
.search-wrap input:focus { border-color: var(--green-mid); }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #aaa; pointer-events: none; }
.species-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.species-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.species-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.13); }
.species-thumb { height: 160px; background: var(--green-light); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.species-thumb img { width: 100%; height: 100%; object-fit: cover; }
.species-thumb img.placeholder-logo { width: auto; height: 55px; object-fit: contain; opacity: .2; }
.species-thumb .placeholder-icon { font-size: 3rem; opacity: .25; }
.species-name { padding: .85rem 1rem; font-weight: 600; font-size: .97rem; color: var(--green-dark); text-align: center; }
.no-results { grid-column: 1/-1; text-align: center; color: var(--text-mid); padding: 3rem 0; }

/* ── 燈箱 ── */
.lightbox { display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.9); align-items: center; justify-content: center; flex-direction: column; padding: 1rem; }
.lightbox.active { display: flex; }
.lb-close { position: absolute; top: 1rem; right: 1.5rem; color: #fff; font-size: 2.2rem; cursor: pointer; line-height: 1; background: none; border: none; }
.lb-title { color: #fff; font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.lb-imgs { display: flex; gap: .75rem; max-width: 92vw; overflow-x: auto; padding-bottom: .5rem; }
.lb-imgs img { height: 65vh; width: auto; border-radius: 8px; flex-shrink: 0; }
.lb-placeholder { color: rgba(255,255,255,.5); font-size: 1rem; margin-top: 1rem; }

/* ── 案例動態牆 ── */
.cases-page { background: var(--cream); }
.cases-grid { columns: 3 280px; gap: 1.25rem; }
.case-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); break-inside: avoid; margin-bottom: 1.25rem; }
.case-img { overflow: hidden; }
.case-img img { width: 100%; height: auto; transition: transform .4s; }
.case-card:hover .case-img img { transform: scale(1.04); }
.case-text { padding: 1rem 1.25rem 1.25rem; font-size: .95rem; color: var(--text-mid); line-height: 1.85; }
.cases-empty { text-align: center; color: var(--text-mid); padding: 4rem 0; }

/* ── 關於我們 ── */
.about-page {
  background: var(--white);
  background-image: url('../images/leaf-pattern.svg');
  background-size: 500px 500px;
  background-repeat: repeat;
}
.about-inner { max-width: 680px; margin: 0 auto; }
.about-inner p { font-size: 1.05rem; color: var(--text-mid); line-height: 2; margin-bottom: 1.5rem; }
.contact-box { background: var(--green-light); border-radius: var(--radius); padding: 2rem 2rem 1.5rem; margin-top: 2rem; }
.contact-box h3 { font-size: 1.1rem; font-weight: 700; color: var(--green-dark); margin-bottom: 1.25rem; }
.contact-item { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .9rem; font-size: 1rem; color: var(--text-mid); }
.contact-item .ci-label { font-weight: 600; color: var(--green-dark); min-width: 60px; }
.contact-item a { color: var(--green-mid); }
.contact-item a:hover { text-decoration: underline; }
.map-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--green-mid); font-weight: 600; margin-top: 1rem; font-size: .95rem; }
.map-link:hover { text-decoration: underline; }

/* ── 頁尾 ── */
footer { background: var(--green-dark); color: rgba(255,255,255,.65); text-align: center; padding: 1.75rem 5vw; font-size: .87rem; }

/* ── RWD ── */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--green-dark); flex-direction: column; gap: 0; padding: .5rem 0; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .85rem 5vw; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-toggle { display: flex; }
  .cases-grid { columns: 1; }
  section { padding: 60px 5vw; }
  .species-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .species-thumb { height: 130px; }
}
