/* ================================================================
   JESUS KOREA CHURCH — 전체 디자인 파일
   ⚠️ 이 파일은 수정하지 마세요.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* ── 기본 설정 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1b3060;
  --navy-dark:  #122040;
  --gold:       #c8a45a;
  --gold-light: #d4b472;
  --bg:         #f9f7f3;
  --white:      #ffffff;
  --text:       #2a2a2a;
  --text-mid:   #555555;
  --text-light: #888888;
  --border:     #e5dfd5;
  --shadow:     0 4px 24px rgba(0,0,0,0.09);
  --radius:     12px;
  --header-h:   70px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================================================
   헤더 & 내비게이션
   ================================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
}
/* backdrop-filter를 ::before로 분리 — 헤더에 직접 쓰면 모바일에서
   position:fixed 자식(#nav-menu)이 뷰포트 대신 헤더(70px) 기준으로
   배치되어 메뉴 높이가 0이 되는 버그가 발생함 */
#site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(27, 48, 96, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 로고 */
.logo-link { display: flex; align-items: center; gap: 10px; }
.logo-slogan { display: none !important; }

.logo-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.logo-slogan {
  display: block;
  font-size: 0.65rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-top: 2px;
}

/* PC 메뉴 */
#nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

#nav-menu > li { position: relative; }

#nav-menu > li > a {
  display: block;
  color: rgba(255,255,255,0.88);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

#nav-menu > li > a:hover,
#nav-menu > li > a.active {
  color: var(--gold);
  background: rgba(255,255,255,0.08);
}

/* 드롭다운 서브메뉴 */
.sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.14);
  padding: 6px 0;
  z-index: 200;
}

.has-sub:hover .sub-menu { display: block; }

.sub-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: var(--text-mid);
  transition: color 0.15s, background 0.15s;
}

.sub-menu li a:hover {
  color: var(--navy);
  background: var(--bg);
}

/* 햄버거 버튼 */
#menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

#menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

#menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-toggle.active span:nth-child(2) { opacity: 0; }
#menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================================
   히어로 섹션
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0e1e42 0%, #1b3060 55%, #142850 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero/main.jpg') center/cover no-repeat;
  opacity: 0.3;
  transition: opacity 0.5s;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(14,30,66,0.5) 0%, rgba(14,30,66,0.3) 50%, rgba(14,30,66,0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: calc(var(--header-h) + 60px) 24px 80px;
  max-width: 760px;
}

.hero-church-name {
  font-size: clamp(1.7rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  line-height: 1.3;
}

.hero-slogan {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.18em;
  margin-bottom: 56px;
}

.hero-divider {
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 40px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ================================================================
   버튼
   ================================================================ */
.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  min-width: 150px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(145deg, #dbbe72 0%, #c8a45a 45%, #a8841a 100%);
  color: var(--navy-dark);
  box-shadow: 0 4px 14px rgba(200,164,90,0.45), inset 0 1px 0 rgba(255,255,255,0.38), inset 0 -1px 0 rgba(0,0,0,0.12);
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.32), transparent);
  transition: left 0.42s ease;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(200,164,90,0.52), inset 0 1px 0 rgba(255,255,255,0.42); }
.btn-primary:hover::before { left: 100%; }
.btn-primary:active { transform: translateY(0); box-shadow: inset 0 2px 5px rgba(0,0,0,0.18); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.12); transform: translateY(-2px); }

.btn-navy {
  background: linear-gradient(145deg, #243d78 0%, #1b3060 45%, #0e1e42 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(18,32,64,0.42), inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -1px 0 rgba(0,0,0,0.2);
}
.btn-navy::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transition: left 0.42s ease;
}
.btn-navy:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(18,32,64,0.48), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn-navy:hover::before { left: 100%; }
.btn-navy:active { transform: translateY(0); box-shadow: inset 0 2px 6px rgba(0,0,0,0.28); }

/* ================================================================
   공통 섹션
   ================================================================ */
.section { padding: 88px 0; }
.section-alt { background: var(--bg); }

.section-title {
  text-align: center;
  margin-bottom: 52px;
}

.section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.35;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-title p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 10px;
}

/* 페이지 상단 배너 */
.page-header {
  position: relative;
  overflow: hidden;
  background: var(--navy-dark);
  color: var(--white);
  padding: calc(var(--header-h) + 56px) 0 56px;
  text-align: center;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.7;
  z-index: 0;
}

.page-header > * {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.page-header p {
  color: rgba(255,255,255,0.82);
  font-size: 1rem;
}

/* 페이지별 헤더 배경 이미지 (PC) — images/page-header/ 폴더에 파일 넣으면 자동 적용
   PC 권장 사이즈: 1920×400px */
#ph-about::before    { background-image: url('../images/page-header/about-pc.jpg'); }
#ph-worship::before  { background-image: url('../images/page-header/worship-pc.jpg'); }
#ph-staff::before    { background-image: url('../images/page-header/staff-pc.jpg'); }
#ph-gallery::before  { background-image: url('../images/page-header/gallery-pc.jpg'); }
#ph-media::before    { background-image: url('../images/page-header/media-pc.jpg'); }
#ph-location::before { background-image: url('../images/page-header/location-pc.jpg'); }
#ph-notices::before  { background-image: url('../images/page-header/notices-pc.jpg'); }

/* 페이지별 헤더 배경 이미지 (모바일)
   모바일 권장 사이즈: 768×300px */
@media (max-width: 767px) {
  #ph-about::before    { background-image: url('../images/page-header/about-mobile.jpg'); }
  #ph-worship::before  { background-image: url('../images/page-header/worship-mobile.jpg'); }
  #ph-staff::before    { background-image: url('../images/page-header/staff-mobile.jpg'); }
  #ph-gallery::before  { background-image: url('../images/page-header/gallery-mobile.jpg'); }
  #ph-media::before    { background-image: url('../images/page-header/media-mobile.jpg'); }
  #ph-location::before { background-image: url('../images/page-header/location-mobile.jpg'); }
  #ph-notices::before  { background-image: url('../images/page-header/notices-mobile.jpg'); }
}

/* 탭 내비게이션 */
.tab-section {
  padding-top: 16px;
}

.tab-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  margin-bottom: 48px;
}

.tab-btn {
  padding: 12px 22px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover, .tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

/* ================================================================
   홈 — 교회 소개 영역
   ================================================================ */
.home-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.home-about-img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #c4cfe0, #9aaec7);
}

.home-about-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.home-about-text h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--navy);
  margin-bottom: 18px;
  line-height: 1.4;
}

.home-about-text h2 span { color: var(--gold); }

.home-about-text p {
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 28px;
}

/* ================================================================
   예배 시간 카드
   ================================================================ */
#home-worship-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 20px;
}

.worship-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  transition: transform 0.2s, box-shadow 0.2s;
}

.worship-card:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(0,0,0,0.12); }

.worship-name   { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.worship-time   { font-size: 1.2rem;  font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.worship-detail { font-size: 0.8rem;  color: var(--text-light); }

/* 예배 안내 페이지 — 시간표 (PC: 주일2개 2열 / 나머지3개 3열) */
#worship-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.worship-row {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 20px 28px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
  border-top: 4px solid var(--gold);
  gap: 10px;
}

.worship-row:nth-child(-n+2) { grid-column: span 3; }

.wr-name   { font-size: 1rem; font-weight: 700; color: var(--navy); }
.wr-center { text-align: center; }
.wr-time   { font-size: 1.25rem; font-weight: 700; color: var(--gold); }
.wr-detail { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

/* 온라인 헌금 */
#offering-list {
  display: flex;
  justify-content: center;
}

.offering-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 60px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.07);
  text-align: center;
  border-top: 4px solid var(--gold);
  min-width: 280px;
}

.offering-account {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.acct-name { white-space: nowrap; }
@media (max-width: 767px) {
  .acct-name { display: block; }
}

/* 성전 안내 */
#sanctuary-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.sanctuary-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.sanctuary-photo {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: linear-gradient(135deg, #c4cfe0, #9aaec7);
}

.sanctuary-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.sanctuary-info   { padding: 20px 24px; }
.sanctuary-title  { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.sanctuary-desc   { font-size: 0.9rem; color: var(--text-mid); line-height: 1.75; }

/* ================================================================
   설교 카드
   ================================================================ */
#home-sermons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}

#sermon-list,
#media-video-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.sermon-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.sermon-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,0.14); }

.sermon-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #2a4a8a 100%);
}

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

.sermon-no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #999;
  background: #e2e2e2;
  letter-spacing: 0.05em;
}

.sermon-info    { padding: 18px 20px; }
.sermon-title   { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 7px; line-height: 1.45; }
.sermon-meta    { font-size: 0.82rem; color: var(--text-light); }

/* ================================================================
   담임목사 소개
   ================================================================ */
.pastor-section {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto 1fr;
  gap: 24px 40px;
  align-items: start;
}

.pastor-photo-wrap {
  grid-column: 1;
  grid-row: 1 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #c4cfe0, #9aaec7);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.08),
    0 8px 18px rgba(0,0,0,0.10),
    0 22px 44px rgba(0,0,0,0.11),
    0 44px 80px rgba(0,0,0,0.07),
    0 0 0 1px rgba(200,164,90,0.28);
  position: relative;
  transition: transform 0.38s ease, box-shadow 0.38s ease;
}
.pastor-photo-wrap::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.13), transparent);
  pointer-events: none;
  z-index: 1;
}
.pastor-photo-wrap:hover {
  transform: translateY(-8px);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.09),
    0 18px 36px rgba(0,0,0,0.13),
    0 40px 72px rgba(0,0,0,0.10),
    0 72px 100px rgba(0,0,0,0.06),
    0 0 0 1px rgba(200,164,90,0.42),
    0 0 36px rgba(200,164,90,0.10);
}

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

.pastor-meta { grid-column: 2; grid-row: 1; }
.pastor-intro { grid-column: 2; grid-row: 2; }

.pastor-label { font-size: 0.85rem; color: var(--gold); letter-spacing: 0.1em; margin-bottom: 10px; }
.pastor-name  { font-size: 1.7rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.pastor-title-display { font-size: 0.95rem; color: var(--gold); font-weight: 600; }
.pastor-intro p { color: var(--text-mid); line-height: 1.9; }

/* ================================================================
   갤러리
   ================================================================ */
#home-gallery,
#gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #c4cfe0, #9aaec7);
  cursor: pointer;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: var(--white);
  padding: 24px 14px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.gallery-item:hover .gallery-caption { transform: translateY(0); }

/* 홈 갤러리 — API 카드 (gallery.php 연동) */
.gallery-preview-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #c4cfe0, #9aaec7);
  display: block;
  text-decoration: none;
  cursor: pointer;
}
.gallery-preview-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-preview-card:hover img { transform: scale(1.06); }
.gallery-preview-card .gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
  color: #fff;
  padding: 24px 14px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  transform: translateY(0);
}
.gallery-preview-nothumb {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

/* ================================================================
   사역자 카드
   ================================================================ */
#staff-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.staff-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 260px;
  flex-shrink: 0;
}

.staff-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,0.13); }

.staff-photo-wrap {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #c4cfe0, #9aaec7);
  overflow: hidden;
}

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

.staff-info      { padding: 22px 18px; }
.staff-name      { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.staff-title     { font-size: 0.9rem; color: var(--gold); font-weight: 600; margin-bottom: 7px; }
.staff-ministry  { font-size: 0.82rem; color: var(--text-light); margin-bottom: 12px; }
.staff-intro     { font-size: 0.87rem; color: var(--text-mid); line-height: 1.65; }

/* ================================================================
   교회 소개 — 연혁
   ================================================================ */
#church-history { margin-top: 12px; }

.history-item {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.history-year  { font-size: 1.05rem; font-weight: 700; color: var(--gold); min-width: 62px; }
.history-event { color: var(--text-mid); font-size: 0.95rem; }

/* ================================================================
   오시는 길
   ================================================================ */
.location-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  min-height: 360px;
}

.map-placeholder {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dde5f0, #c4cfe0);
  border-radius: var(--radius);
  color: var(--text-mid);
  text-align: center;
  gap: 10px;
}

.map-icon    { font-size: 2.5rem; }
.map-msg     { font-weight: 600; font-size: 1rem; }
.map-addr    { font-size: 0.875rem; color: var(--text-light); }

.location-info h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin: 24px 0 10px; }
.location-info h3:first-child { margin-top: 0; }

.info-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 14px;
}

.info-box .label { font-size: 0.78rem; color: var(--text-light); letter-spacing: 0.04em; margin-bottom: 4px; }
.info-box .value { font-size: 1.05rem; font-weight: 700; color: var(--navy); }

.info-box a.value { color: var(--navy); }
.info-box a.value:hover { color: var(--gold); }

#transit-list { display: flex; flex-direction: column; gap: 0; }
#transit-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-mid);
}

/* ================================================================
   오시는 길 요약 (홈)
   ================================================================ */
.location-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 32px 36px;
  background: var(--navy);
  border-radius: var(--radius);
  color: var(--white);
}

.location-summary .info p:first-child { font-size: 0.8rem; color: var(--gold); margin-bottom: 4px; }
.location-summary .info p:last-child  { font-size: 1rem; font-weight: 500; }

/* ================================================================
   푸터
   ================================================================ */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

.footer-church-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
}

.footer-info {
  font-size: 0.875rem;
  line-height: 2;
  color: rgba(255,255,255,0.65);
}

.footer-social {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.65);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.social-btn:hover {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  border-color: var(--gold);
}
.social-btn svg { width: 18px; height: 18px; display: block; }

.footer-links { padding-top: 6px; }
.footer-links h4 { font-size: 0.82rem; color: var(--gold); letter-spacing: 0.05em; margin-bottom: 14px; }

.footer-links ul { display: flex; flex-direction: column; gap: 8px; }

.footer-links li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-links li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

/* ================================================================
   반응형 — 모바일 (900px 이하)
   ================================================================ */
@media (max-width: 900px) {

  /* 모바일 메뉴 */
  #menu-toggle { display: flex; }

  #nav-menu {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: rgba(18, 32, 64, 0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 16px;
    gap: 4px;
    overflow-y: auto;
    z-index: 999;
  }

  #nav-menu.open { display: flex; }

  #nav-menu > li > a {
    font-size: 1.1rem;
    padding: 16px 18px;
    border-radius: 10px;
    color: rgba(255,255,255,0.9);
  }

  .sub-menu {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
    margin: 4px 6px;
    padding: 4px 0;
    display: none;
  }

  .sub-menu { display: none !important; }

  .sub-menu li a {
    color: rgba(255,255,255,0.75);
    padding: 12px 28px;
    font-size: 1rem;
  }

  .sub-menu li a:hover { color: var(--white); background: rgba(255,255,255,0.08); }

  /* 레이아웃 조정 */
  .home-about     { grid-template-columns: 1fr; gap: 36px; }
  .location-grid  { grid-template-columns: 1fr; }
  .footer-inner   { grid-template-columns: 1fr; gap: 32px; }

  /* 목사 — 모바일: 사진+이름 윗줄 / 인사말 아랫줄 전체 폭 */
  .pastor-section {
    grid-template-columns: 140px 1fr;
    grid-template-rows: auto auto;
    gap: 12px 16px;
  }
  .pastor-photo-wrap { grid-column: 1; grid-row: 1; aspect-ratio: auto; }
  .pastor-photo-wrap img { height: auto; object-fit: fill; }
  .pastor-meta  { grid-column: 2; grid-row: 1; }
  .pastor-intro { grid-column: 1 / -1; grid-row: 2; }
  .pastor-name  { font-size: 1.2rem; }

  #sermon-list,
  #media-video-list    { grid-template-columns: 1fr; }

  /* 홈 갤러리 1열, 갤러리 페이지는 2열 유지 */
  #home-gallery        { grid-template-columns: 1fr; }
  #gallery-grid        { grid-template-columns: repeat(2, 1fr); }

  #worship-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .worship-row,
  .worship-row:nth-child(-n+2),
  .worship-row:nth-child(n+3) {
    grid-column: span 1;
  }

  /* 섹션 타이틀 — 텍스트 왼쪽, 금색 밑줄도 왼쪽 */
  .section-title           { text-align: left; }
  .section-title h2::after { margin-left: 0; }

  /* 소개 텍스트 안 버튼 중앙 정렬 */
  .home-about-text .btn,
  .pastor-text .btn { display: block; text-align: center; }

  /* 히어로 — 모바일에서 브라우저 주소창 포함 화면 꽉 채움 */
  .hero { min-height: 0 !important; height: 100vh !important; height: 100svh !important; }

  /* 히어로 화살표 — 모바일은 터치 슬라이딩으로 대체 */
  .hero-arrow { display: none !important; }

  /* 히어로 콘텐츠 — 이미지 세로 중간 위치 */
  .hero-content { padding-top: calc(var(--header-h) + 20px); padding-bottom: 60px; }

  /* 히어로 버튼 — 가로 배열, 여백 축소 */
  .hero-buttons      { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .hero-buttons .btn { padding: 10px 18px; min-width: unset; font-size: 0.875rem; }

  .location-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .section { padding: 64px 0; }
}

@media (max-width: 520px) {
  #home-worship-times { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .worship-card { padding: 22px 12px; }
  .worship-time { font-size: 1.1rem; letter-spacing: -0.002em; white-space: nowrap; }

  #staff-list { gap: 16px; }
  .staff-card { width: calc(50% - 8px); flex-shrink: 1; }
  .staff-info { padding: 14px 12px; }
  .staff-name { font-size: 1rem; }

  #home-sermons,
  #sermon-list,
  #media-video-list { grid-template-columns: 1fr; }

  #worship-list   { grid-template-columns: 1fr; }
  #sanctuary-list { grid-template-columns: 1fr; }

  #home-gallery   { grid-template-columns: 1fr; }
  #gallery-grid   { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .section { padding: 52px 0; }
  .section-title { margin-bottom: 36px; }
}

/* ================================================================
   히어로 디자인 조정
   ================================================================ */

/* 파란색 오버레이 완전 제거 */
.hero-overlay {
  background: transparent !important;
}

/* 히어로 슬로건 및 구분선 숨김 */
#hero-slogan,
.hero-divider {
  display: none !important;
}

/* 히어로 두 번째, 세 번째 버튼 색상 — 예배 안내(btn-primary) 글씨색과 동일하게 */
.hero-buttons .btn-outline {
  color: var(--navy-dark) !important;
  border-color: var(--navy-dark) !important;
}
.hero-buttons .btn-outline:hover {
  background: rgba(18, 32, 64, 0.1) !important;
  border-color: var(--navy-dark) !important;
}

/* 텍스트 가독성을 위한 그림자 */
.hero-church-name {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55), 0 1px 5px rgba(0, 0, 0, 0.35) !important;
}

/* ================================================================
   DEV 플레이스홀더 스타일 (임시 개발용 — 실제 이미지 넣으면 자동 교체됨)
   ================================================================ */

.img-placeholder {
  border: 2px dashed #aaa;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  text-align: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  min-height: 120px;
}
.img-placeholder .ph-tag  { font-size: 0.7rem; font-weight: 700; color: #cc0000; letter-spacing: 0.08em; margin-bottom: 8px; }
.img-placeholder .ph-file { font-size: 0.85rem; font-weight: 600; color: #333; margin-bottom: 4px; word-break: break-all; }
.img-placeholder .ph-use  { font-size: 0.78rem; color: #555; margin-bottom: 3px; }
.img-placeholder .ph-size { font-size: 0.7rem; color: #888; }

/* 히어로 배경 — JS 슬라이더가 slide div를 직접 관리 */
.hero-bg {
  background: none !important;
  opacity: 1 !important;
  overflow: hidden;
}

/* ── 히어로 슬라이더 ── */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* 하단 점(dot) 인디케이터 */
.hero-dots {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}
.hero-dot.s-active {
  background: var(--gold);
  transform: scale(1.35);
}

/* 좌우 화살표 */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  pointer-events: auto;
}
.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.7);
}
.hero-arrow-prev { left: 22px; }
.hero-arrow-next { right: 22px; }

@media (max-width: 520px) {
  .hero-arrow { width: 36px; height: 36px; font-size: 1.2rem; }
  .hero-arrow-prev { left: 10px; }
  .hero-arrow-next { right: 10px; }
  .hero-dots { bottom: 28px; }
}

/* ================================================================
   갤러리 라이트박스
   ================================================================ */
#gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.78);
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}
#gallery-lightbox.lb-open {
  display: flex;
}
#lb-img {
  max-width: 70vw;
  max-height: 72vh;
  border-radius: 10px;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.55);
  object-fit: contain;
  cursor: default;
  display: block;
}
#lb-caption {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.52);
  padding: 6px 22px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
}
.lb-close,
.lb-nav {
  position: absolute;
  background: rgba(0, 0, 0, 0.42);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 1;
}
.lb-close:hover,
.lb-nav:hover { background: rgba(0, 0, 0, 0.7); }

.lb-close {
  top: 16px;
  right: 20px;
  width: 42px;
  height: 42px;
  font-size: 1.5rem;
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  font-size: 1.9rem;
}
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

@media (max-width: 900px) {
  #lb-img  { max-width: 90vw; max-height: 70vh; }
  .lb-nav  { width: 40px; height: 40px; font-size: 1.5rem; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}

/* 히어로 플레이스홀더 — 이미지 없을 때만 JS가 표시 */
#hero-ph {
  display: none;
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: rgba(0, 0, 0, 0.6);
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  padding: 14px 28px;
  text-align: center;
  width: 90%;
  max-width: 560px;
  pointer-events: none;
}
#hero-ph .ph-tag  { display: block; font-size: 0.72rem; font-weight: 700; color: #ffcc55; letter-spacing: 0.1em; margin-bottom: 8px; }
#hero-ph .ph-file { display: block; font-size: 0.85rem; font-weight: 600; color: #fff; margin-bottom: 3px; }
#hero-ph .ph-use  { display: block; font-size: 0.78rem; color: rgba(255,255,255,0.75); margin-top: 6px; }
#hero-ph .ph-size { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.55); margin-top: 3px; }

/* ================================================================
   플로팅 SNS / TOP 위젯
   ================================================================ */
#float-widget {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#float-sns-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#float-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.float-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: inherit;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transition: transform 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overflow: hidden;
  flex-shrink: 0;
}
/* 마우스가 있는 기기에서만 hover 확대 적용 (모바일 터치 후 크기 달라붙는 현상 방지) */
@media (hover: hover) {
  .float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  }
}
.float-sns-btn {
  background: var(--float-color, var(--navy));
  color: #fff;
}
.float-sns-btn svg { display: block; }
#float-toggle-btn {
  display: none;
  background: var(--float-color, var(--navy));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  min-width: 46px;
  min-height: 46px;
}
#float-top {
  background: #fff;
  color: var(--float-color, var(--navy));
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}
#float-phone {
  display: none;
  background: var(--float-color, var(--navy));
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  align-items: center;
  justify-content: center;
}
@keyframes floatBtnSlideUp {
  0%   { transform: translateY(18px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 767px) {
  #float-widget { right: 16px; bottom: 20px; gap: 6px; align-items: flex-end; }
  #float-controls { flex-direction: column; gap: 6px; }
  #float-toggle-btn { display: flex; min-width: 44px; min-height: 44px; }
  #float-phone { display: flex; }
  #float-sns-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    gap: 6px;
  }
  #float-widget.sns-open #float-sns-list { max-height: 280px; }
  #float-widget.sns-open .float-sns-btn {
    animation: floatBtnSlideUp 0.36s ease-out both;
  }
  #float-widget.sns-open .float-sns-btn:nth-child(2) { animation-delay: 0.07s; }
  #float-widget.sns-open .float-sns-btn:nth-child(3) { animation-delay: 0.14s; }
  #float-widget.sns-open .float-sns-btn:nth-child(4) { animation-delay: 0.21s; }
  #float-widget.sns-open .float-sns-btn:nth-child(5) { animation-delay: 0.28s; }
  #float-widget.sns-open .float-sns-btn:nth-child(6) { animation-delay: 0.35s; }
  #float-widget.sns-open .float-sns-btn:nth-child(7) { animation-delay: 0.42s; }
  #float-widget.sns-open .float-sns-btn:nth-child(8) { animation-delay: 0.49s; }
  .float-btn { width: 44px; height: 44px; }
}

/* ================================================================
   챗봇 위젯
   ================================================================ */
/* 챗봇 토글 버튼 — float-widget 안 TOP 위에 삽입, .float-btn 공유 */
#chatbot-toggle {
  background: var(--navy);
  color: #fff;
}

#chatbot-box {
  position: fixed;
  bottom: 24px;
  right: 76px;   /* float-widget 왼쪽에 표시 */
  z-index: 8900;
  display: none;
  flex-direction: column;
  width: 300px; height: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}
#chatbot-head {
  background: var(--navy);
  color: #fff;
  padding: 13px 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 0.92rem;
  flex-shrink: 0;
}
#chatbot-close {
  background: none; border: none;
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem; cursor: pointer;
  padding: 0 2px; line-height: 1;
  transition: color 0.15s;
}
#chatbot-close:hover { color: #fff; }

#chatbot-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px 11px;
  display: flex; flex-direction: column; gap: 9px;
  background: #f6f8fb;
}
.cb-msg {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.cb-bot {
  background: #fff; color: #333;
  border-radius: 4px 14px 14px 14px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.07);
  align-self: flex-start;
}
.cb-user {
  background: var(--navy); color: #fff;
  border-radius: 14px 4px 14px 14px;
  align-self: flex-end;
}

#chatbot-foot {
  display: flex; gap: 6px;
  padding: 9px 10px;
  border-top: 1px solid #eee;
  background: #fff; flex-shrink: 0;
}
#chatbot-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #dde;
  border-radius: 20px;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
#chatbot-input:focus { border-color: var(--navy); }
#chatbot-send {
  padding: 8px 13px;
  background: var(--navy); color: #fff;
  border: none; border-radius: 20px;
  font-size: 0.83rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background 0.18s;
}
#chatbot-send:hover { background: #2a4a8c; }

/* 모바일: 전체화면 모달 — iOS 키보드/스크롤 문제 완전 해결 */
@media (max-width: 767px) {
  #chatbot-box {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 9999;
  }
  #chatbot-input { font-size: 16px; } /* iOS 자동 확대 방지 */
}

/* 챗봇 링크 버튼 */
.cb-link {
  display: inline-block;
  margin: 4px 0 2px 0;
  padding: 6px 14px;
  background: var(--navy);
  color: #fff;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
  transition: background 0.18s;
}
.cb-link:hover { background: #2a4a8c; color: #fff; }
