/* 麻小豆數位匯城鄉聯盟 — 全站樣式
   配色來源：2026「麻豆好生活．數位新體驗」活動主背板實物取色
   柚綠（主）× 柚橘 × 湖水藍 × 薰衣紫，明亮活潑
   風格參考：經濟部城鄉特色網（卡片式、明亮、在地感） */

:root {
  --green: #5f9e2a;
  --green-dark: #43761c;
  --green-light: #8dc63f;
  --yellow: #f0913a;
  --yellow-light: #fbdcb8;
  --brick: #2e9ab0;
  --purple: #a78bc9;
  --cream: #f5faef;
  --white: #fff;
  --ink: #2a2723;
  --ink-soft: #5c554c;
  --line: #e2dcd0;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(42, 39, 35, .08);
  --shadow-lg: 0 8px 28px rgba(42, 39, 35, .13);
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--brick); }

h1, h2, h3, h4 {
  font-family: "Noto Serif TC", "PingFang TC", serif;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 .6em;
  color: var(--green-dark);
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); font-size: .95rem; }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  transition: .2s;
  font-size: 1rem;
  font-family: inherit;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); transform: translateY(-2px); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #d99a2e; color: var(--ink); transform: translateY(-2px); }
.btn-ghost { border-color: var(--white); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--green-dark); }
.btn-outline { border-color: var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green); color: var(--white); }

/* ---------- 頁首 ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { line-height: 1.25; }
.logo-text strong {
  display: block;
  font-family: "Noto Serif TC", serif;
  font-size: 1.1rem;
  color: var(--green-dark);
}
.logo-text span { font-size: .72rem; color: var(--ink-soft); letter-spacing: .08em; }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink);
  font-size: .97rem;
  white-space: nowrap;
}
.nav a:hover { background: var(--cream); color: var(--green); }
.nav a.active { color: var(--green); font-weight: 500; background: var(--cream); }

.nav-toggle {
  display: none;
  background: none; border: 0;
  font-size: 1.7rem; color: var(--green);
  cursor: pointer; padding: 4px 8px;
}

/* ---------- 主視覺 ---------- */
.hero {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--green-dark);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.on { opacity: 1; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(35,71,48,.35) 0%, rgba(35,71,48,.72) 100%);
}
.hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 80px 20px;
  max-width: 780px;
}
.hero-body h1 { color: var(--white); font-size: 2.7rem; margin-bottom: .3em; text-shadow: 0 2px 16px rgba(0,0,0,.3); }
.hero-body p { font-size: 1.15rem; margin-bottom: 1.8em; opacity: .95; }
.hero-eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  padding: 5px 18px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 1.2em;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-dots {
  position: absolute; bottom: 24px; left: 0; right: 0;
  z-index: 3; display: flex; gap: 8px; justify-content: center;
}
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.45); cursor: pointer; padding: 0;
  transition: .2s;
}
.hero-dots button.on { background: var(--yellow); width: 26px; border-radius: 999px; }

/* ---------- 區塊 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--white); }
.section-green { background: var(--green); color: var(--white); }
.section-green h2, .section-green h3 { color: var(--white); }

.section-head { text-align: center; margin-bottom: 44px; }
.section-head .eyebrow {
  color: var(--brick);
  font-size: .9rem;
  letter-spacing: .18em;
  font-weight: 500;
  display: block;
  margin-bottom: .5em;
}
.section-head h2 { margin-bottom: .3em; }
.section-head p { color: var(--ink-soft); max-width: 640px; margin: 0 auto; }
.section-green .section-head p { color: rgba(255,255,255,.88); }
.section-green .section-head .eyebrow { color: var(--yellow); }

/* ---------- 頁面標頭 ---------- */
.page-head {
  background: var(--green);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}
.page-head h1 { color: var(--white); margin-bottom: .2em; }
.page-head p { color: rgba(255,255,255,.9); margin: 0; }
.page-head .crumb { color: rgba(255,255,255,.75); }
.page-head .crumb a { color: rgba(255,255,255,.9); }
.page-head .crumb a:hover { color: #fff; text-decoration: underline; }

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: .25s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img {
  aspect-ratio: 4/3;
  background: var(--yellow-light);
  background-size: cover;
  background-position: center;
  position: relative;
}
/* 尚未提供照片的店家：用一條緊湊的色帶，不要留一大塊空白 */
.card-img.is-empty {
  aspect-ratio: 16/5;
  background: linear-gradient(135deg, #eaf4dc 0%, #fdf0dc 100%);
  display: grid;
  place-items: center;
}
.card-img.is-empty img { opacity: .8; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: .35em; font-size: 1.15rem; }
.card-body p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1em; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; font-size: .9rem; }

.tag {
  display: inline-block;
  background: var(--cream);
  color: var(--brick);
  border: 1px solid var(--line);
  padding: 2px 12px;
  border-radius: 999px;
  font-size: .8rem;
  margin: 0 6px 6px 0;
}
.tag-pay { background: var(--yellow-light); color: #8a6a1c; border-color: transparent; }

.meta-row { font-size: .9rem; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.meta-row .ico { color: var(--green-light); flex-shrink: 0; }

/* ---------- 篩選 ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-bottom: 36px;
}
.chip {
  background: var(--white);
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: .95rem;
  font-family: inherit;
  transition: .2s;
}
.chip:hover { border-color: var(--green-light); color: var(--green); }
.chip.on { background: var(--green); border-color: var(--green); color: var(--white); }

.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ---------- 步驟／數字 ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.step { text-align: center; }
.step .num {
  width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--green-dark);
  display: grid; place-items: center;
  font-family: "Noto Serif TC", serif;
  font-weight: 700; font-size: 1.3rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .3em; }
.step p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.section-green .step p { color: rgba(255,255,255,.85); }
.section-green .step .num { background: var(--white); }

/* ---------- 相簿 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery-grid figure {
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--line);
}
.gallery-grid img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: .35s;
}
.gallery-grid figure:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 18, 15, .93);
  z-index: 200;
  display: none;
  place-items: center;
}
.lightbox.on { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.lightbox button {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: 0; color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.6rem; cursor: pointer;
  display: grid; place-items: center;
}
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox button:hover { background: rgba(255,255,255,.28); }

/* ---------- 時間軸（遊程） ---------- */
.timeline { border-left: 3px solid var(--yellow); padding-left: 26px; margin: 0; }
.timeline li { list-style: none; position: relative; padding-bottom: 26px; }
.timeline li::before {
  content: "";
  position: absolute; left: -34px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--yellow);
}
.timeline .time { color: var(--brick); font-weight: 500; font-size: .92rem; }
.timeline h3 { margin: .1em 0 .2em; font-size: 1.1rem; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- CTA 條 ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--brick), #8f4535);
  color: var(--white);
  border-radius: var(--radius);
  padding: 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: .2em; }
.cta-band p { margin: 0; opacity: .92; }

/* ---------- 表格 ---------- */
.info-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.info-table th, .info-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .96rem; }
.info-table th { background: var(--cream); color: var(--green-dark); width: 30%; font-weight: 500; white-space: nowrap; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }

/* ---------- 頁尾 ---------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.8);
  padding: 54px 0 26px;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
}
.site-footer h4 { color: var(--yellow); font-size: 1rem; margin-bottom: .9em; }
.site-footer a { color: rgba(255,255,255,.8); display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--yellow); }
.footer-units {
  border-top: 1px solid rgba(255,255,255,.16);
  padding: 18px 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 30px;
  font-size: .84rem;
  color: rgba(255,255,255,.6);
}
.footer-units b { color: rgba(255,255,255,.85); font-weight: 500; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16);
  padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .86rem;
  color: rgba(255,255,255,.6);
}

/* ---------- RWD ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  .hero { min-height: 440px; }
  .hero-body { padding: 60px 18px; }
  .hero-body h1 { font-size: 1.95rem; }
  .hero-body p { font-size: 1rem; }
  .section { padding: 52px 0; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; }

  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 32px 24px; text-align: center; justify-content: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .info-table th { width: 36%; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}
