/* 興福堂網站自定義樣式 */

:root {
  --primary: #1173d4;
  --primary-dark: #0d5aaa;
  --background-light: #f6f7f8;
  --background-dark: #101922;
  --text-dark: #0f172a;
  --text-light: #f1f5f9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans TC', 'Inter', sans-serif;
  background-color: var(--background-light);
  color: var(--text-dark);
  line-height: 1.6;
}

/* ===== 導航欄 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(17, 115, 212, 0.1);
  transition: all 0.3s ease;
}

.navbar .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.navbar .logo-icon {
  color: var(--primary);
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.navbar .logo-text {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
}

.navbar .logo-text span {
  color: var(--primary);
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar .nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
  color: var(--primary);
}

.navbar .nav-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.navbar .nav-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.25rem;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 75%;
  max-width: 320px;
  height: 100%;
  background: white;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-panel a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
  transition: color 0.2s ease;
}

.mobile-menu-panel a:hover {
  color: var(--primary);
}

.mobile-close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.25rem;
}

/* ===== Hero 區域 ===== */
.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}

.hero:hover .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.65));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  padding: 0 1.5rem;
  max-width: 800px;
  animation: fadeUp 0.8s ease both;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(17, 115, 212, 0.4);
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: white;
  text-decoration: none;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* ===== 通用 Section 樣式 ===== */
.section {
  padding: 5rem 1.5rem;
}

.section-bg-white {
  background: white;
}

.section-bg-light {
  background: var(--background-light);
}

.section-bg-blue {
  background: var(--primary);
  color: white;
}

.section-bg-dark {
  background: #0f172a;
  color: white;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1rem;
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== 崇拜資訊 ===== */
.worship-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .worship-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.worship-card {
  background: var(--background-light);
  border: 1px solid rgba(17,115,212,0.1);
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.worship-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.worship-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.worship-card:hover img {
  transform: scale(1.05);
}

.worship-card-body {
  padding: 1.5rem;
}

.worship-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.worship-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.worship-card p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.worship-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s ease;
}

.btn-sm.primary {
  background: var(--primary);
  color: white;
}

.btn-sm.primary:hover {
  background: var(--primary-dark);
}

.btn-sm.secondary {
  background: #e2e8f0;
  color: #475569;
}

.btn-sm.secondary:hover {
  background: #cbd5e1;
}

.worship-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid rgba(17,115,212,0.05);
  border-radius: 0.75rem;
  transition: transform 0.2s ease;
}

.service-item:hover {
  transform: translateX(4px);
}

.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(17,115,212,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.service-item h4 {
  font-weight: 700;
  font-size: 0.95rem;
}

.service-item p {
  font-size: 0.8rem;
  color: #64748b;
}

.bible-quote {
  background: rgba(17,115,212,0.05);
  border-left: 4px solid var(--primary);
  padding: 1.25rem;
  border-radius: 0 0.75rem 0.75rem 0;
}

.bible-quote p {
  font-style: italic;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.7;
}

/* ===== 最新消息 ===== */
.news-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.news-card-img {
  height: 190px;
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-img img {
  transform: scale(1.08);
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.news-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.news-card:hover h3 {
  color: var(--primary);
}

.news-card p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-date {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: auto;
}

/* ===== 團契事工 ===== */
.ministry-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1024px) {
  .ministry-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ministry-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1rem;
}

.ministry-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ministry-card:hover img {
  transform: scale(1.1);
}

.ministry-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
}

.ministry-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  color: white;
}

.ministry-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ministry-card p {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ===== 核心信仰區 ===== */
.belief-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .belief-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.belief-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.belief-item .check-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ===== 歷史時間線 ===== */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(17,115,212,0.2);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.timeline-item:nth-child(odd) .timeline-content {
  grid-column: 1;
  text-align: right;
}

.timeline-item:nth-child(odd) .timeline-dot {
  grid-column: 2;
}

.timeline-item:nth-child(odd) .timeline-empty {
  grid-column: 3;
}

.timeline-item:nth-child(even) .timeline-empty {
  grid-column: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
  grid-column: 2;
}

.timeline-item:nth-child(even) .timeline-content {
  grid-column: 3;
  text-align: left;
}

.timeline-dot {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(17,115,212,0.2);
}

.timeline-content {
  background: white;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.timeline-content p {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.6;
}

/* ===== 教牧團隊 ===== */
.pastor-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
  .pastor-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pastor-card {
  text-align: center;
  transition: transform 0.3s ease;
}

.pastor-card:hover {
  transform: translateY(-4px);
}

.pastor-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  background: #f1f5f9;
}

.pastor-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2);
  transition: filter 0.3s ease;
}

.pastor-card:hover .pastor-img img {
  filter: grayscale(0);
}

.pastor-card h4 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.pastor-card p {
  font-size: 0.8rem;
  color: #64748b;
}

/* ===== 聯絡表格 ===== */
.contact-form {
  background: white;
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  max-width: 700px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: white;
  color: var(--text-dark);
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17,115,212,0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 7rem;
}

.form-submit {
  width: 100%;
  padding: 0.875rem;
  margin-top: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17,115,212,0.35);
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.contact-info-item span {
  color: var(--primary);
}

/* ===== 頁腳 ===== */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 4rem 1.5rem 2rem;
}

.footer-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
  max-width: 1280px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand .logo-text {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.social-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: background 0.2s ease;
}

.social-btn:hover {
  background: var(--primary);
}

.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.footer-contact-item .material-symbols-outlined {
  font-size: 1rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 3rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 動畫 ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 頁面橫幅 ===== */
.page-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 5rem 1.5rem 3.5rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231173d4' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-banner-content {
  position: relative;
  z-index: 1;
}

.page-banner h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.page-banner p {
  font-size: 1rem;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== 響應式 ===== */
@media (max-width: 768px) {
  .nav-links,
  .nav-btn {
    display: none !important;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero {
    height: 520px;
  }
  .section {
    padding: 3.5rem 1rem;
  }
  .timeline::before {
    left: 1.25rem;
  }
  .timeline-item {
    grid-template-columns: 2.5rem 1fr;
  }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
    text-align: left;
  }
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    grid-column: 1;
  }
  .timeline-empty {
    display: none;
  }
}

/* ===== 滾動進度 ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  z-index: 999;
  transition: width 0.1s linear;
}
