:root {
  --sun: #ffe000;
  --leaf: #14ae36;
  --ink: #211916;
  --site-width: 80%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

.site-container {
  width: var(--site-width);
  max-width: 1600px;
  padding-inline: 0;
}


/* =========================================================
   首頁主視覺
   ========================================================= */
.hero {
  width: 100%;
  overflow: hidden;
  background: #9c8a70;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
}


/* =========================================================
   區塊導覽列
   ========================================================= */
.section-nav {
  padding: .9rem 0;
  background: #1d1513;
}

.section-nav a {
  color: #fff;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a:focus {
  color: var(--sun);
}


/* =========================================================
   活動狀態快速入口
   ========================================================= */
.status-picker {
  display: grid;
  min-height: 230px;
  grid-template-columns: 1fr 1fr;
}

.status-link {
  display: grid;
  padding: 2rem;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.status-now {
  background: var(--sun);
  color: #211916;
}

.status-now .status-frame {
  border-color: #42b035;
}

.status-soon {
  background: var(--leaf);
  color: var(--sun);
}

.status-frame {
  display: grid;
  width: min(70%, 740px);
  min-height: 132px;
  align-content: center;
  padding: 1.25rem;
  border: 5px solid currentColor;
  border-radius: 32px;
  transition: transform .2s ease, background .2s ease;
}

.status-link:hover .status-frame {
  transform: translateY(-4px);
  background: rgb(255 255 255 / 9%);
}

.status-title {
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  font-weight: 900;
  letter-spacing: .12em;
}

.status-subtitle {
  font-size: clamp(.9rem, 1.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: .08em;
}


/* =========================================================
   縣市活動區塊標題與背景
   ========================================================= */
.township-section {
  padding: clamp(3.5rem, 7vw, 7rem) 0;
  background-position: center;
  background-size: cover;
}

.performing-section {
  background-image:
    linear-gradient(rgb(255 255 255 / 42%), rgb(255 255 255 / 42%)),
    url("../images/02-07.jpg");
}

.coming-section {
  background-image:
    linear-gradient(rgb(255 255 255 / 42%), rgb(255 255 255 / 42%)),
    url("../images/02-08.jpg");
}

.section-heading {
  margin-bottom: 2rem;
  text-align: center;
}

.section-heading .eyebrow {
  margin-bottom: .4rem;
  color: #397b39;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: .08em;
}

.section-heading > p:last-child {
  margin: .2rem 0 0;
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  font-weight: 700;
  letter-spacing: .1em;
}


/* =========================================================
   縣市活動卡片
   ========================================================= */
.township-row {
  padding-inline: 0;
}

.township-card {
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--sun);
}

.township-card.miaoli,
.township-card.tainan {
  color: inherit;
  text-decoration: none;
}

.township-card.miaoli:focus-visible,
.township-card.tainan:focus-visible {
  outline: 4px solid #215b2c;
  outline-offset: 4px;
}

.township-art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
}

.township-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 1.8rem);
  text-align: center;
}

.township-kicker {
  margin-bottom: .5rem;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .18em;
  opacity: .72;
}

.township-info h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 600;
  letter-spacing: .08em;
}

.township-info h2 span {
  color: var(--leaf);
  white-space: nowrap;
}

.township-info p {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: .12em;
}

.township-info strong {
  color: var(--leaf);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.03;
  margin-top: 6px;
}

.chiayi {
  background: var(--leaf);
  color: var(--sun);
}

.chiayi .township-info h2 span,
.chiayi .township-info strong {
  color: #fff;
}


/* =========================================================
   頁尾與社群連結
   ========================================================= */
.site-footer {
  padding: 3rem 1rem 2.5rem;
  background: #1d1513;
  color: #fff;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: .65rem;
  margin-bottom: .75rem;
}

.social {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 40%);
  border-radius: 50%;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  text-decoration: none;
}

.facebook {
  background: #1877f2;
}

.youtube {
  background: #f00000;
  font-size: 1rem;
}

.site-footer h2 {
  margin-bottom: .4rem;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: .15em;
}

.site-footer p {
  margin: 0;
  font-weight: 600;
  letter-spacing: .05em;
}

.site-footer a {
  color: inherit;
}

.site-footer small {
  display: block;
  margin-top: 1rem;
  color: rgb(255 255 255 / 60%);
}


/* =========================================================
   右下角回到頂端按鈕
   ========================================================= */
.back-to-top {
  position: fixed;
  z-index: 10;
  right: clamp(1rem, 2.4vw, 2.5rem);
  bottom: clamp(1rem, 2.4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: var(--ink);
  text-decoration: none;
  margin-top: 7px;
  transition: opacity .2s ease, visibility .2s ease;
}

.back-to-top-control.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.back-to-top-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: rgb(255 224 0 / 94%);
  transition: transform .2s ease, background .2s ease;
}

.back-to-top-icon svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.back-to-top-label {
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 88%);
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}

.back-to-top:hover .back-to-top-icon,
.back-to-top:focus-visible .back-to-top-icon {
  transform: translateY(-3px);
  background: #fff;
}

.back-to-top:focus-visible {
  outline: 3px solid #215b2c;
  outline-offset: 3px;
  border-radius: .5rem;
}

.page-actions {
  position: fixed;
  z-index: 10;
  right: clamp(1rem, 2.4vw, 2.5rem);
  bottom: clamp(1rem, 2.4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}

.page-actions .back-to-top {
  position: static;
}

@media (max-width: 767.98px) {
  .page-actions {
    right: auto;
    bottom: .75rem;
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 1rem);
    flex-direction: row;
    justify-content: center;
    gap: .45rem;
    transform: translateX(-50%);
  }

  .page-actions .back-to-top {
    margin-top: 0;
  }
}


/* =========================================================
   手機版版面調整
   ========================================================= */
@media (max-width: 767.98px) {
  :root {
    --site-width: 90%;
  }

  .hero-image {
    width: 150%;
    max-width: none;
    margin-left: -25%;
  }

  .status-picker {
    grid-template-columns: 1fr;
  }

  .status-link {
    min-height: 170px;
  }

  .status-frame {
    width: min(100%, 520px);
    min-height: 112px;
    border-width: 4px;
    border-radius: 25px;
  }

  .township-card {
    grid-template-columns: 1fr;
  }

  

  .site-footer p {
    line-height: 1.8;
    font-size: 17px;
    letter-spacing: 1px;
  }

  .back-to-top-icon {
    width: 3rem;
    height: 3rem;
  }
}


/* =========================================================
   減少動態效果的無障礙設定
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
