/* 公開頁面樣式 — 詔安社區發展協會 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: #FFF8E7;
  color: #3D2817;
  line-height: 1.7;
}

/* ─── 導覽列 ─── */
.public-nav {
  background: #FFFFFF;
  padding: 16px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.public-nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.public-nav .logo .icon {
  width: 44px;
  height: 44px;
  background: #B45309;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 20px;
  font-family: "Songti TC", "Noto Serif TC", serif;
  flex-shrink: 0;
}
.public-nav .logo-text { display: flex; flex-direction: column; }
.public-nav .logo-text .full {
  font-size: 12px;
  color: #7A6248;
  letter-spacing: 1px;
}
.public-nav .logo-text .short {
  font-size: 18px;
  font-weight: 700;
  color: #3D2817;
}
.public-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.public-nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}
.public-nav ul a {
  color: #5C4527;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}
.public-nav ul a:hover { background: #FEF3C7; color: #D97706; }
.public-nav ul a.active { background: #FEF3C7; color: #D97706; }
.login-btn {
  padding: 8px 20px;
  background: white;
  color: #D97706;
  border: 2px solid #D97706;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}
.login-btn:hover { background: #D97706; color: white; }

/* ─── Hero ─── */
.public-hero {
  padding: 88px 32px 96px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255,248,231,0.96) 0%, rgba(254,243,199,0.92) 100%),
    repeating-linear-gradient(90deg, rgba(146,64,14,0.06) 0 1px, transparent 1px 96px);
  position: relative;
  overflow: hidden;
}
.public-hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.public-hero .full-name {
  color: #92400E;
  font-size: 16px;
  letter-spacing: 4px;
  margin-bottom: 16px;
  font-weight: 500;
}
.public-hero h1 {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 64px;
  font-weight: 900;
  color: #3D2817;
  margin-bottom: 24px;
  letter-spacing: 4px;
}
.public-hero h1 .highlight {
  background: linear-gradient(transparent 60%, #FCD34D 60%);
}
.public-hero p {
  font-size: 20px;
  color: #5C4527;
  margin-bottom: 40px;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s;
  display: inline-block;
}
.btn-primary { background: #D97706; color: white; }
.btn-primary:hover {
  background: #B45309;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217,119,6,0.3);
}
.btn-outline {
  background: white;
  color: #D97706;
  border: 2px solid #D97706;
}
.btn-outline:hover { background: #FFF8E7; }

/* ─── Page Header(內頁用) ─── */
.page-header {
  padding: 80px 32px 60px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255,248,231,0.96) 0%, rgba(254,243,199,0.92) 100%),
    repeating-linear-gradient(90deg, rgba(146,64,14,0.06) 0 1px, transparent 1px 96px);
}
.page-header .crumb {
  color: #92400E;
  font-size: 14px;
  letter-spacing: 4px;
  margin-bottom: 12px;
}
.page-header h1 {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 48px;
  font-weight: 900;
  color: #3D2817;
  letter-spacing: 4px;
}
.page-header p {
  margin-top: 16px;
  font-size: 17px;
  color: #5C4527;
}

/* ─── Section ─── */
.public-section {
  padding: 80px 32px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  margin-bottom: 64px;
}
.section-title .label {
  color: #D97706;
  font-size: 14px;
  letter-spacing: 4px;
  margin-bottom: 12px;
  font-weight: 700;
}
.section-title h2 {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #3D2817;
}
.section-title .deco { margin-top: 16px; font-size: 24px; }
.section-action {
  text-align: center;
  margin-top: 48px;
}

/* ─── 理事會卡片 ─── */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.person {
  background: white;
  border-radius: 8px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(61,40,23,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}
.person:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(217,119,6,0.15);
}
.person .photo {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #FCD34D, #D97706);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 900;
  font-family: "Songti TC", "Noto Serif TC", serif;
  border: 6px solid #FEF3C7;
  box-shadow: 0 4px 12px rgba(217,119,6,0.2);
  overflow: hidden;
}
.person .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.person .role {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.person .name {
  font-size: 26px;
  font-weight: 900;
  color: #3D2817;
  margin-bottom: 12px;
  letter-spacing: 4px;
}
.person .desc {
  font-size: 14px;
  color: #7A6248;
  line-height: 1.7;
}

/* ─── 社區靈魂人物 spotlight ─── */
.spotlight-section {
  padding: 80px 32px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FED7AA 100%);
}
.spotlight-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 60px;
  align-items: center;
}
.spotlight-photo {
  width: 280px;
  height: 280px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FCD34D, #D97706);
  border: 8px solid white;
  box-shadow: 0 16px 40px rgba(217,119,6,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
}
.spotlight-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spotlight-fallback {
  color: white;
  font-size: 96px;
  font-weight: 900;
  font-family: "Songti TC", "Noto Serif TC", serif;
}
.spotlight-text { padding: 20px 0; }
.spotlight-label {
  color: #92400E;
  font-size: 14px;
  letter-spacing: 6px;
  margin-bottom: 16px;
  font-weight: 700;
}
.spotlight-name {
  font-family: "Songti TC", "Noto Serif TC", serif;
  font-size: 56px;
  font-weight: 900;
  color: #3D2817;
  letter-spacing: 8px;
  margin-bottom: 12px;
}
.spotlight-role {
  display: inline-block;
  background: #D97706;
  color: white;
  padding: 6px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.spotlight-quote {
  font-size: 18px;
  color: #5C4527;
  line-height: 1.9;
  font-style: italic;
  border-left: 4px solid #D97706;
  padding-left: 24px;
}

@media (max-width: 768px) {
  .spotlight-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .spotlight-photo { width: 200px; height: 200px; }
  .spotlight-fallback { font-size: 64px; }
  .spotlight-name { font-size: 40px; letter-spacing: 4px; }
  .spotlight-quote { border-left: none; padding-left: 0; text-align: left; }
}

/* ─── 活動 ─── */
.activities-section {
  background: white;
  padding: 80px 32px;
}
.activities-section-muted { background: transparent; }
.activities-inner { max-width: 1200px; margin: 0 auto; }
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* 活動 cover 圖(首頁卡片頂部) */
.activity-cover {
  margin: -32px -32px 20px;
  height: 200px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}
.activity-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity {
  background: #FFF8E7;
  border-radius: 8px;
  padding: 32px;
  border: 2px solid transparent;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
  overflow: hidden;
}
.activity:hover {
  border-color: #D97706;
  transform: translateY(-4px);
}
.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.activity .emoji { font-size: 36px; }
.activity .date {
  background: #D97706;
  color: white;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}
.activity h3 {
  font-size: 22px;
  font-weight: 900;
  color: #3D2817;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.activity p {
  color: #5C4527;
  font-size: 15px;
}
.activity .location {
  margin-top: 12px;
  color: #7A6248;
  font-size: 14px;
}

/* ─── /gallery 頁的活動卡片(垂直版) ─── */
.activity-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.activity-card {
  background: white;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(61,40,23,0.08);
}
.activity-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.activity-card-header .emoji {
  font-size: 48px;
  line-height: 1;
}
.activity-card-header .meta { flex: 1; }
.activity-card-header .date {
  display: inline-block;
  background: #D97706;
  color: white;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.activity-card-header h3 {
  font-size: 26px;
  font-weight: 900;
  color: #3D2817;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.activity-card-header .location {
  color: #7A6248;
  font-size: 14px;
}
.activity-desc {
  color: #5C4527;
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.8;
}

/* ─── 照片 carousel(輪播) ─── */
.photo-carousel-wrapper {
  position: relative;
  margin-top: 8px;
}
.photo-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #D97706 transparent;
}
.photo-carousel::-webkit-scrollbar { height: 8px; }
.photo-carousel::-webkit-scrollbar-thumb { background: #D97706; border-radius: 4px; }
.photo-slide {
  flex: 0 0 75%;
  max-width: 480px;
  scroll-snap-align: center;
  height: 320px;
  border-radius: 8px;
  overflow: hidden;
  background: #FEF3C7;
  text-decoration: none;
  display: block;
  transition: transform 0.3s;
}
.photo-slide:hover { transform: scale(1.02); }
.photo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 左右輪播按鈕 */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 32px;
  font-weight: 700;
  color: #D97706;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding-bottom: 4px;
  transition: all 0.2s;
}
.carousel-btn:hover {
  background: #D97706;
  color: white;
  transform: translateY(-50%) scale(1.05);
}
.carousel-prev { left: -16px; }
.carousel-next { right: -16px; }

@media (max-width: 768px) {
  .photo-slide { flex-basis: 88%; height: 240px; }
  .carousel-btn { width: 36px; height: 36px; font-size: 24px; }
  .carousel-prev { left: 4px; }
  .carousel-next { right: 4px; }
}

/* ─── empty state ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #7A6248;
}
.empty-state .ico { font-size: 48px; margin-bottom: 16px; }

/* ─── Footer ─── */
.public-footer {
  background: #3D2817;
  color: #FCD34D;
  text-align: center;
  padding: 48px 32px;
  font-size: 14px;
  letter-spacing: 2px;
}
.public-footer .small {
  color: #B89968;
  font-size: 12px;
  margin-top: 12px;
}

/* ─── 響應式 ─── */
@media (max-width: 768px) {
  .public-nav {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .public-nav .logo-text .full { font-size: 11px; }
  .public-nav .logo-text .short { font-size: 16px; }
  .public-nav .nav-right {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .public-nav ul {
    flex: 1;
    gap: 6px;
    flex-wrap: wrap;
  }
  .public-nav ul a { padding: 6px 8px; font-size: 14px; }
  .login-btn { padding: 6px 14px; }
  .public-hero { padding: 60px 16px 80px; }
  .public-hero h1 { font-size: 40px; letter-spacing: 2px; }
  .public-hero p { font-size: 16px; }
  .page-header h1 { font-size: 32px; }
  .section-title h2 { font-size: 30px; }
  .public-section { padding: 60px 16px; }
  .activity-grid { grid-template-columns: 1fr; }
  .activity-card { padding: 24px; }
  .activity-card-header h3 { font-size: 22px; }
}
