:root {
  --navy: #1a2d5a;
  --navy-dark: #111e3d;
  --gold: #c9a84c;
  --gold-light: #e0c06e;
  --purple: #6b5fb5;
  --purple-soft: #8a7fd4;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --text: #333333;
  --text-light: #666666;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(26, 45, 90, 0.1);
  --grad-section: linear-gradient(135deg, #1a2d5a 0%, #6b5fb5 100%);
  --grad-text: linear-gradient(90deg, #1a2d5a, #6b5fb5);
  --grad-cta: linear-gradient(135deg, #c9a84c 0%, #6b5fb5 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

/* ── 네비게이션 ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 30, 61, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
nav.scrolled {
  background: rgba(17, 30, 61, 0.82);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  nav { background: var(--navy-dark); }
}

.nav-logo {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: #cdd8f0;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 1rem; }
}

/* ── 히어로 ── */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
}

/* 배경 이미지 레이어 — Ken Burns 효과 */
.hero::before {
  content: '';
  position: absolute;
  inset: -4%;
  background-image: var(--hero-bg-image, none);
  background-size: cover;
  background-position: center;
  animation: kenburns 24s ease-in-out infinite alternate;
  will-change: transform;
  z-index: 0;
}

/* 어둡기 오버레이 */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 50, var(--hero-overlay-alpha, 0.65));
  z-index: 1;
}

@keyframes kenburns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1.5%, -1%); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 3rem 4rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.hero-cross {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: 16px;
  display: block;
}

.hero h1 {
  font-family: 'Noto Serif KR', 'Noto Sans KR', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.hero h1 span { color: var(--gold); }

/* 제목용 Serif 폰트 일괄 적용 */
.section-title,
.page-header h1,
.greeting h2 {
  font-family: 'Noto Serif KR', 'Noto Sans KR', serif;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.hero-sub {
  color: #a0b4d8;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.hero-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 20px auto;
}

.hero-verse {
  color: #c0d0e8;
  font-style: italic;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  margin-bottom: 36px;
}

.hero-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.35s ease, color 0.35s, transform 0.2s, box-shadow 0.25s;
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.25);
}

.hero-btn:hover {
  background: var(--grad-cta);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(107, 95, 181, 0.35);
}

/* ── 섹션 공통 ── */
section { padding: 80px 24px; }

.section-label {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
/* 어두운 배경 섹션(연락처)에서는 골드 톤 유지 */
#contact .section-label {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--gold-light);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--grad-text);
  margin: 16px 0 40px;
  border-radius: 2px;
}
#contact .section-divider { background: var(--gold); }

.section-inner { max-width: 1000px; margin: 0 auto; }

/* ── 목사님 인사말 ── */
.greeting-inner {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.pastor-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--navy);
  border: 4px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
  overflow: hidden;
}

.pastor-photo img { width: 100%; height: 100%; object-fit: cover; }

.greeting-text p { color: var(--text-light); margin-bottom: 16px; }
.greeting-text .signature { color: var(--navy); font-weight: 500; }

@media (max-width: 640px) {
  .greeting-inner { flex-direction: column; align-items: center; }
  .greeting-text { text-align: center; }
}

/* ── 예배 시간 카드 ── */
#worship { background: var(--bg-alt); }

.worship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.worship-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  text-align: center;
}

.worship-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(26,45,90,0.15); }

.worship-icon { font-size: 2rem; margin-bottom: 12px; }
.worship-name { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.worship-time { font-size: 1.8rem; font-weight: 300; color: var(--gold); margin-bottom: 4px; }
.worship-detail { font-size: 0.85rem; color: var(--text-light); }

/* ── 오시는 길 ── */
.directions-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

/* 좌측 텍스트 영역(타이틀+항목) */
.directions-text { display: flex; flex-direction: column; }
.directions-text .section-label,
.directions-text .section-title,
.directions-text .section-divider { text-align: left; margin-left: 0; margin-right: 0; }
.directions-text .section-divider { margin: 12px 0 28px; }

@media (max-width: 768px) {
  .directions-inner { grid-template-columns: 1fr; }
  .directions-text .section-divider { margin: 10px 0 20px; }
}

.direction-item { display: flex; gap: 12px; margin-bottom: 20px; }
.direction-icon {
  font-size: 1.2rem; flex-shrink: 0; margin-top: 2px;
  filter: drop-shadow(0 1px 2px rgba(107, 95, 181, 0.25));
}
.direction-label { font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.direction-text { color: var(--text-light); font-size: 0.9rem; }

/* 지도 컨테이너 — 좌측 영역 전체 높이만큼 stretch */
.map-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 100%;
  min-height: 320px;
}
.map-container iframe,
.map-container > div { display: block; width: 100%; height: 100%; min-height: 320px; border: none; }

/* 카카오맵 이동 CTA 오버레이 */
.map-cta-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  background: rgba(255,255,255,0.95);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background 0.2s, transform 0.18s, box-shadow 0.2s;
}
.map-cta-btn:hover {
  background: var(--grad-cta);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(107,95,181,0.3);
}

@media (max-width: 768px) {
  .map-container { height: 320px; min-height: 320px; }
  .map-container iframe, .map-container > div { height: 320px; }
}

/* ── 연락처 (컴팩트) ── */
#contact { background: var(--navy); padding: 48px 24px; }
#contact .section-title { color: #fff; font-size: clamp(1.4rem, 3.5vw, 1.8rem); }
#contact .section-divider { margin: 12px auto 24px; }

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: center;
  align-items: flex-start;
}

.contact-item { text-align: center; width: 132px; }

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin: 0 auto 8px;
  transition: background 0.2s;
}

.contact-item:hover .contact-icon { background: rgba(201,168,76,0.3); }

.contact-label { color: var(--gold-light); font-size: 0.72rem; font-weight: 700; margin-bottom: 2px; letter-spacing: 0.04em; }
.contact-value { color: #e0e8f8; font-size: 0.85rem; word-break: break-all; line-height: 1.45; }

/* ── 최신 주보 미리보기 ── */
.bulletin-preview {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}

.bulletin-preview h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: 16px; }

/* ── 푸터 ── */
footer {
  background: var(--navy-dark);
  color: #7090b8;
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}

footer strong { color: var(--gold); }

/* ── 통합 버튼 / CTA ── */
.btn,
button.btn,
.btn-cta,
a.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  background: var(--gold);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.18s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(201, 168, 76, 0.25);
}
.btn:hover,
.btn-cta:hover {
  background: var(--grad-cta);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(107, 95, 181, 0.28);
  color: #fff;
}
.btn:active,
.btn-cta:active { transform: translateY(1px) scale(0.98); transition-duration: 0.08s; }
.hero-btn:active { transform: translateY(1px) scale(0.98); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--grad-text);
  color: #fff;
  border-color: transparent;
}

/* ── 페이지 헤더 (내부 페이지) ── */
.page-header {
  background: var(--navy);
  padding: 60px 24px 40px;
  text-align: center;
}

.page-header h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.2rem); }
.page-header p { color: #a0b4d8; margin-top: 8px; font-size: 0.95rem; }

/* ── 카드 공통 ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,45,90,0.15); }
.card-date { color: var(--gold); font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card-meta { color: var(--text-light); font-size: 0.85rem; }

/* ── 주보 상세 콘텐츠 ── */
.bulletin-content {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 24px;
  font-size: 1rem;
  line-height: 1.8;
}

.bulletin-content h1, .bulletin-content h2 { color: var(--navy); margin: 24px 0 12px; }
.bulletin-content p { margin-bottom: 12px; }
.bulletin-content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }

@media print {
  nav, footer, .page-header { display: none; }
  .bulletin-content { font-size: 11pt; }
}

/* ── 검색 바 ── */
.search-bar {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 24px auto 0;
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #dde4ef;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus { border-color: var(--navy); }

/* ── 페이지네이션 ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 16px;
  border: 2px solid #dde4ef;
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.pagination button:hover, .pagination button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ── PDF 캐러셀 ── */
.pdf-loading {
  text-align: center; padding: 60px 20px; color: var(--text-light); font-size: 0.95rem;
}
.pdf-carousel {
  position: relative;
  background: #f0f4fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(26,45,90,0.08);
  /* 데스크톱: 세로 충분하게 (포트레이트 PDF에서 여유 확보) */
  height: clamp(560px, 82vh, 920px);
}
.pdf-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: 100%;
  touch-action: pan-x;
  outline: none;
}
.pdf-track::-webkit-scrollbar { display: none; }
.pdf-page-wrap {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden; /* 확대 시 옆 페이지로 안 새도록 */
}
.pdf-page-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  background: #fff;
  display: block;
  /* 캔버스의 내재 비율 유지 (inline width/height 미설정) */
  object-fit: contain;
}
.pdf-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.96);
  border: 1px solid #dde4ef;
  border-radius: 50%;
  width: 40px; height: 40px;
  cursor: pointer;
  z-index: 5;
  font-size: 1.6rem;
  line-height: 0;
  color: var(--navy);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: background 0.2s, color 0.2s, transform 0.2s;
  font-family: inherit;
  padding: 0;
}
.pdf-nav-btn:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}
.pdf-nav-prev { left: 10px; }
.pdf-nav-next { right: 10px; }
.pdf-page-indicator {
  text-align: center;
  padding: 10px 0 0;
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 600;
}

/* 확대/축소 컨트롤 */
.pdf-zoom-controls {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.96);
  border: 1px solid #dde4ef;
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.pdf-zoom-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
  transition: background 0.15s;
}
.pdf-zoom-btn:hover { background: var(--navy); color: #fff; }
.pdf-zoom-btn.pdf-zoom-reset { font-size: 0.95rem; }
.pdf-zoom-level {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  min-width: 38px;
  text-align: center;
  user-select: none;
}
@media (max-width: 768px) {
  .pdf-zoom-controls { right: 8px; bottom: 8px; padding: 3px; gap: 2px; }
  .pdf-zoom-btn { width: 30px; height: 30px; font-size: 1rem; }
  .pdf-zoom-level { min-width: 32px; font-size: 0.72rem; }
}
@media (max-width: 768px) {
  .pdf-carousel { height: clamp(420px, 80vh, 760px); }
  .pdf-nav-btn { width: 34px; height: 34px; font-size: 1.3rem; opacity: 0.85; }

  /* 좌/우 반 페이지 모드 — 각 반쪽이 컨테이너 높이에 꽉 차게 */
  .pdf-carousel.half-mode { height: clamp(480px, 82vh, 820px); }
  .pdf-carousel.half-mode .pdf-page-wrap {
    padding: 6px;
  }
  .pdf-carousel.half-mode .pdf-page-wrap canvas {
    /* 좌/우 반쪽은 세로로 길쭉 → 높이 가득, 폭은 비율 따라감 */
    height: 100%;
    max-height: 100%;
    width: auto;
    max-width: 100%;
  }
}

/* ── 스크롤 fade-in (페이드 + 슬라이드 업) ── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.fade-in.visible { opacity: 1; transform: none; }
.fade-in.delay-1 { transition-delay: 0.08s; }
.fade-in.delay-2 { transition-delay: 0.16s; }
.fade-in.delay-3 { transition-delay: 0.24s; }
.fade-in.delay-4 { transition-delay: 0.32s; }

/* 모션 감소 선호 사용자 존중 */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in.delay-1, .fade-in.delay-2, .fade-in.delay-3, .fade-in.delay-4 {
    opacity: 1; transform: none; transition: none;
  }
  .hero::before { animation: none !important; }
}

/* ── 로딩 스켈레톤 ── */
.skeleton {
  background: linear-gradient(90deg, #eef2f8 25%, #f6f8fc 37%, #eef2f8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 10px;
  display: block;
}
.skeleton-card { aspect-ratio: 3/4; width: 100%; }
.skeleton-line { height: 12px; margin: 8px 0; border-radius: 6px; }
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── YouTube 썸네일 ── */
.youtube-thumb {
  aspect-ratio: 16/9;
  background: var(--navy-dark);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.youtube-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── 빈 상태 ── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-light);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── 사진첩 ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,45,90,0.15); }

.gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.gallery-caption-desc {
  padding: 0 14px 10px;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* 모달 라이트박스 */
.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.gallery-modal.open { display: flex; }

.gallery-modal-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
}

.gallery-modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.gallery-modal-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.95rem;
  background: rgba(0,0,0,0.5);
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 모바일 반응형 보완 ── */

/* 히어로 svh 미지원 구형 브라우저 fallback */
.hero { min-height: 100vh; }
@supports (min-height: 100svh) {
  .hero { min-height: 100svh; }
}

@media (max-width: 768px) {
  /* 네비: 교단명 텍스트 숨김, 로고 축소, overflow 방지 */
  #navDenomName { display: none !important; }
  #navDenomLogo { height: 32px !important; }
  #navDenomGroup { padding-right: 8px; margin-right: 2px; }
  .nav-logo { overflow: hidden; max-width: calc(100vw - 80px); }

  /* 페이지네이션 터치 영역 확대 */
  .pagination button { padding: 11px 18px; min-width: 44px; }

  /* 사진첩 라이트박스 캡션 — 모바일 하단 인터페이스 위로 */
  .gallery-modal-caption { bottom: 48px; }

  /* 모바일 가독성·터치 강화 */
  body { font-size: 15.5px; }
  .section-title { line-height: 1.35; }
  .hero-btn, .btn, .btn-cta, .nav-links a { min-height: 44px; }

  /* 모바일에서 섹션 라벨 가독성 (그라데이션 → 단색 fallback) */
  .section-label { color: var(--purple); }

  /* 갤러리 슬라이더 자연스러운 수평 스와이프 */
  #gallerySlider { touch-action: pan-y; }
}

/* ── 모바일 하단 고정 CTA 바 ── */
.mobile-cta-bar { display: none; }
@media (max-width: 768px) {
  .mobile-cta-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.93);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    backdrop-filter: blur(10px) saturate(160%);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0,0,0,0.10);
    border-top: 1px solid rgba(0,0,0,0.06);
    z-index: 90;
  }
  .mcb-btn {
    text-align: center;
    padding: 12px 0;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    background: #f0f4fa;
    color: var(--navy);
    transition: transform 0.18s, box-shadow 0.2s;
  }
  .mcb-btn:active { transform: scale(0.97); }
  .mcb-btn.primary {
    background: var(--grad-cta);
    color: #fff;
    box-shadow: 0 4px 12px rgba(107, 95, 181, 0.28);
  }
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  /* footer 위에 살짝 여유 */
  footer { padding-bottom: 28px; }
}

@media (max-width: 640px) {
  /* 섹션 상하 패딩 축소 */
  section { padding: 56px 20px; }
  .hero-inner { padding: 2rem 1.5rem; border-radius: 16px; }

  /* 연락처 카드 — 소형폰 2열 보장 */
  .contact-item { width: 120px; }
  .contact-grid { gap: 20px; }

  /* 갤러리 그리드 — 소형폰 1열 */
  .gallery-grid { grid-template-columns: 1fr; }

  /* 검색바 패딩 조정 */
  .search-bar input { padding: 10px 12px; }

  /* 새신자 그리드 모바일 */
  .newcomer-grid { grid-template-columns: repeat(2, 1fr); }
  /* 소식 카드 모바일 */
  .notice-cards { grid-template-columns: 1fr; }
}

/* 교회 소식 카드 */
.notice-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.notice-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(26,45,90,0.09);
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1), box-shadow 0.32s ease;
}
.notice-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(26,45,90,0.16), 0 6px 16px rgba(107,95,181,0.12);
}
.notice-card-img img { transition: transform 0.6s ease; }
.notice-card:hover .notice-card-img img { transform: scale(1.05); }
.notice-card-img { overflow: hidden; }
.notice-card-body { padding: 14px 16px; }
.notice-card-title { font-size: 0.92rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; line-height: 1.4; }
.notice-card-date { font-size: 0.78rem; color: var(--text-light); }

/* 새신자 안내 카드 */
.newcomer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}
.newcomer-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 16px;
  box-shadow: 0 2px 12px rgba(26,45,90,0.08);
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1), box-shadow 0.32s ease;
}
.newcomer-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(26,45,90,0.14), 0 6px 14px rgba(107,95,181,0.12);
}
.newcomer-icon { font-size: 2rem; margin-bottom: 12px; }
.newcomer-card-title { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.newcomer-card-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; }
