/* ===== 2026 新竹縣桐花祭 — 共用設計系統 ===== */

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary:        #4A8FD6;
  --primary-dark:   #3A7BC0;
  --primary-light:  #6BA5E0;
  --gold:           #C9A855;
  --gold-light:     #DABB6A;
  --gold-dark:      #B8943D;
  --white:          #FFFFFF;
  --bg:             #F8FAFD;
  --text:           #2D3748;
  --text-light:     #5A6B80;
  --petal-pink:     #D4A8A0;
  --footer-bg:      #1E3A5F;
  --serif: 'Noto Serif TC', serif;
  --sans: 'Noto Sans TC', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-weight: 300;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; }

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.section-title .divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.section-title .divider::before,
.section-title .divider::after {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--gold);
}

.section-title .divider svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(248, 250, 253, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 143, 214, 0.1);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(74, 143, 214, 0.1);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-logo svg { width: 32px; height: 32px; }

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 24px;
}

.navbar-menu a {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-light);
  transition: color 0.3s;
  position: relative;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.navbar-menu a:hover { color: var(--primary-dark); }
.navbar-menu a:hover::after { width: 100%; }
.navbar-menu a.active { color: var(--primary-dark); font-weight: 500; }
.navbar-menu a.active::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary-dark);
  transition: 0.3s;
}

/* ===== Page Hero (子頁面共用) ===== */
.page-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #5A9DE0 0%, #4A8FD6 30%, #3A7BC0 70%, #2E6AAF 100%);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(107, 165, 224, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(58, 123, 192, 0.5) 0%, transparent 50%);
}

.page-hero-flowers {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.page-hero-flower {
  position: absolute;
}

.page-hero-flower img { width: 100%; height: auto; display: block; }

/* 左上花簇 */
.page-hero-flower:nth-child(1)  { top: -8%; left: -3%; width: 130px; transform: rotate(-15deg); }
.page-hero-flower:nth-child(2)  { top: 5%;  left: 8%;  width: 100px; transform: rotate(20deg); }
.page-hero-flower:nth-child(3)  { top: 15%; left: -1%; width: 90px;  transform: rotate(35deg); }
.page-hero-flower:nth-child(4)  { top: -5%; left: 15%; width: 80px;  transform: rotate(-10deg); }

/* 右上花簇 */
.page-hero-flower:nth-child(5)  { top: -8%; right: -3%; width: 120px; transform: rotate(15deg); }
.page-hero-flower:nth-child(6)  { top: 5%;  right: 8%;  width: 95px;  transform: rotate(-20deg); }
.page-hero-flower:nth-child(7)  { top: 15%; right: 0%;  width: 85px;  transform: rotate(-30deg); }
.page-hero-flower:nth-child(8)  { top: -5%; right: 15%; width: 75px;  transform: rotate(10deg); }
.page-hero-flower:nth-child(9)  { top: 10%; right: 14%; width: 65px;  transform: rotate(30deg); }
.page-hero-flower:nth-child(10) { top: -3%; right: 22%; width: 70px;  transform: rotate(-5deg); }

/* 左下花簇 */
.page-hero-flower:nth-child(11) { bottom: -5%; left: -2%; width: 110px; transform: rotate(25deg); }
.page-hero-flower:nth-child(12) { bottom: 5%;  left: 10%; width: 85px;  transform: rotate(-20deg); }
.page-hero-flower:nth-child(13) { bottom: -8%; left: 12%; width: 70px;  transform: rotate(40deg); }
.page-hero-flower:nth-child(14) { bottom: 8%;  left: -1%; width: 75px;  transform: rotate(-10deg); }
.page-hero-flower:nth-child(15) { bottom: -3%; left: 20%; width: 60px;  transform: rotate(15deg); }
.page-hero-flower:nth-child(16) { bottom: 10%; left: 14%; width: 65px;  transform: rotate(-30deg); }

/* 右下花簇 */
.page-hero-flower:nth-child(17) { bottom: -5%; right: -2%; width: 105px; transform: rotate(-25deg); }
.page-hero-flower:nth-child(18) { bottom: 5%;  right: 10%; width: 80px;  transform: rotate(15deg); }
.page-hero-flower:nth-child(19) { bottom: -8%; right: 12%; width: 65px;  transform: rotate(-35deg); }

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(5deg); }
}

/* Gold arc at bottom of page-hero */
.page-hero-arc {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  padding: 100px 24px 60px;
}

.page-hero-content h1 {
  font-size: 2.4rem;
  color: #e9ac29;
  margin-bottom: 12px;
  letter-spacing: 6px;
  line-height: 1.3;
  font-weight: 700;
  text-shadow: 0 0 30px rgba(201, 168, 85, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.page-hero-content .subtitle {
  font-family: var(--sans);
  font-size: 1.125rem;
  color: var(--white);
  letter-spacing: 3px;
  font-weight: 400;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 16px 24px;
  background: var(--white);
  border-bottom: 1px solid rgba(74, 143, 214, 0.08);
  font-size: 1.125rem;
  color: var(--text-light);
}

.breadcrumb ol {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.breadcrumb a {
  color: var(--primary);
  transition: color 0.3s;
}

.breadcrumb a:hover { color: var(--primary-dark); }

.breadcrumb .sep { margin: 0 8px; color: var(--text-light); }

/* ===== Pill Button (共用篩選按鈕) ===== */
.pill-btn {
  padding: 8px 24px;
  border: 1px solid rgba(74, 143, 214, 0.2);
  border-radius: 24px;
  background: var(--white);
  color: var(--text-light);
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--sans);
}

.pill-btn:hover { border-color: var(--primary); color: var(--primary); }
.pill-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pill-btn:focus-visible,
.navbar-menu a:focus-visible,
.hero-cta:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== Falling Petals Animation ===== */
.petal {
  position: fixed;
  top: -60px;
  z-index: 10;
  pointer-events: none;
  animation: petalFall linear infinite;
}

.petal svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.petal:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; }
.petal:nth-child(2) { left: 30%; animation-duration: 15s; animation-delay: 3s; }
.petal:nth-child(3) { left: 55%; animation-duration: 11s; animation-delay: 6s; }
.petal:nth-child(4) { left: 75%; animation-duration: 14s; animation-delay: 2s; }
.petal:nth-child(5) { left: 90%; animation-duration: 13s; animation-delay: 8s; }

@keyframes petalFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  5% { opacity: 0.8; }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(60px);
    opacity: 0.6;
  }
  95% { opacity: 0.3; }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(-30px);
    opacity: 0;
  }
}

/* ===== Footer ===== */
.footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 32px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--gold-light);
  font-size: 1.125rem;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.footer p {
  font-size: 1.125rem;
  line-height: 2;
}

.footer-links {
  list-style: none;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--gold-light); }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.3s;
}

.footer-social a:hover { background: rgba(201, 168, 85, 0.3); }

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: rgba(255, 255, 255, 0.8);
}

.footer-social a:hover svg { fill: var(--gold-light); }

.footer-orgs {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 2;
}

.footer-orgs span {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 0;
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
  font-size: 0.85rem;
}

/* ===== Screen Reader Only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Responsive 共用 ===== */
@media (max-width: 1024px) {
  .footer-content { grid-template-columns: 1fr 1fr; gap: 32px; }
  .page-hero-content h1 { font-size: 2rem; }

  .navbar-menu {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: rgba(248, 250, 253, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    gap: 20px;
    transform: translateY(-120%);
    transition: transform 0.3s;
    border-bottom: 1px solid rgba(74, 143, 214, 0.1);
  }

  .navbar-menu.active { transform: translateY(0); }

  .menu-toggle { display: flex; }

  .page-hero-content h1 {
    font-size: 1.8rem;
    letter-spacing: 3px;
  }

  .page-hero-content .subtitle {
    font-size: 1.125rem;
    letter-spacing: 2px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .petal:nth-child(4),
  .petal:nth-child(5) { display: none; }

  .page-hero-flower { transform: scale(0.6) !important; }

  .page-hero-arc { display: none; }
}

@media (max-width: 375px) {
  .page-hero-content h1 { font-size: 1.5rem; letter-spacing: 2px; }
  .page-hero-content .subtitle { font-size: 1.125rem; }
  .section-title h2 { font-size: 1.6rem; }
  .container { padding: 0 16px; }
  .footer-orgs { font-size: 1rem; }
  .navbar-logo { font-size: 1.125rem; }
}
