/* ==========================================================================
   청주샘물교회 홈페이지 스타일
   - 로고의 파랑(성전)과 하늘색(샘물)을 기본 색으로 씁니다.
   - 색은 아래 :root 변수만 바꾸면 사이트 전체에 반영됩니다.
   ========================================================================== */

:root {
  --blue-900: #0b2f5b;
  --blue-800: #0d4282;
  --blue-700: #0b5cad;
  --blue-600: #1474c4;
  --aqua-400: #2fa8e0;
  --aqua-100: #e6f4fb;
  --aqua-50: #f3f9fd;
  --red: #d7262e;
  --ink: #1d2733;
  --ink-soft: #4a5868;
  --ink-mute: #5f6b7a; /* 흰·연하늘 배경에서 대비 4.5:1 이상 */
  --accent-text: #1a73b8; /* 작은 제목 글자용 — 하늘색(aqua-400)은 글자로 쓰기엔 옅어 대신 씁니다 */
  --line: #dde6ee;
  --white: #fff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(11, 47, 91, 0.08);
  --container: 1160px;
  --header-h: 76px;
}

/* ----- 기본 ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  word-break: keep-all;
  overflow-wrap: break-word;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
}

button {
  font: inherit;
  cursor: pointer;
}

/* 아이폰에서 단추를 빠르게 여러 번 누를 때 「두 번 탭 확대」로 화면이 커지는 것을 막습니다.
   손가락 두 개로 벌려 확대하는 기능은 그대로 둡니다. */
a,
button,
input,
select,
label,
.photo-stage {
  touch-action: manipulation;
}

:focus-visible {
  outline: 3px solid var(--aqua-400);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ----- 버튼 ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--blue-700);
  border-radius: 999px;
  background: var(--blue-700);
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  background: var(--blue-800);
  border-color: var(--blue-800);
}

.btn--outline {
  background: transparent;
  color: var(--blue-700);
}

.btn--outline:hover {
  background: var(--blue-700);
  color: var(--white);
}

.btn--light {
  background: var(--white);
  border-color: var(--white);
  color: var(--blue-800);
}

.btn--light:hover {
  background: var(--aqua-100);
  border-color: var(--aqua-100);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

.btn--sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
}

.btn i {
  font-size: 1.15em;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--blue-700);
  font-weight: 600;
}

.link-more:hover {
  text-decoration: underline;
}

/* ----- 헤더 ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(11, 47, 91, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.logo img {
  width: auto;
  height: 58px;
}

.nav ul {
  display: flex;
  gap: 4px;
}

.nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--blue-700);
  background: var(--aqua-50);
}

.nav a[aria-current="page"] {
  color: var(--blue-700);
  background: var(--aqua-100);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--aqua-50);
  color: var(--blue-800);
  font-size: 24px;
  align-items: center;
  justify-content: center;
}

/* ----- 모바일 메뉴 ------------------------------------------------------ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
}

.drawer.is-open {
  visibility: visible;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 47, 91, 0.45);
  opacity: 0;
  transition: opacity 0.25s;
}

.drawer.is-open .drawer-overlay {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--white);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s;
}

.drawer.is-open .drawer-panel {
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.drawer-head img {
  height: 44px;
  width: auto;
}

.drawer-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--aqua-50);
  color: var(--blue-800);
  font-size: 22px;
}

.drawer-nav a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 600;
}

.drawer-nav a[aria-current="page"] {
  color: var(--blue-700);
}

.drawer-foot {
  margin-top: auto;
  padding-top: 24px;
  font-size: 14px;
  color: var(--ink-mute);
  line-height: 1.8;
}

.drawer-foot strong {
  display: block;
  color: var(--ink);
}

/* ----- 첫 화면 (홈) ----------------------------------------------------- */
/* 배경 사진 위에 글을 가운데 둡니다. 사진 전체를 중립 흰색으로 고르게 덮어
   글이 잘 읽히고, 아래 파랑 계열 섹션과 색 온도가 어긋나지 않게 합니다 */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(250, 251, 252, 0.72), rgba(250, 251, 252, 0.72)),
    url("../images/church/hero.webp") center / cover no-repeat,
    #f5f7f9;
}

/* .container 의 좌우 여백 규칙(모바일)이 위아래 여백까지 덮어쓰지 않도록 .hero 를 붙여 씁니다 */
.hero .hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 110px;
  padding-bottom: 170px;
}

/* 제목 위 교회 이름 — 제목과 다투지 않을 만큼만 또렷하게 */
.hero-eng {
  color: var(--accent-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 5.6vw, 64px);
  font-weight: 800;
  line-height: 1.3;
  color: var(--blue-900);
}

.hero-desc {
  max-width: 760px;
  margin-top: 24px;
  font-size: 18px;
  color: var(--ink-soft);
}

.hero-desc cite {
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

/* 물결 장식 */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 110px;
  pointer-events: none;
}

/* ----- 서브 페이지 머리 ------------------------------------------------- */
.page-head {
  position: relative;
  overflow: hidden;
  padding: 64px 0 104px;
  color: var(--white);
  background: linear-gradient(160deg, var(--blue-900), var(--blue-700));
  text-align: center;
}

.page-head .container {
  position: relative;
  z-index: 1;
}

.page-head p {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.8;
}

.page-head h1 {
  margin-top: 6px;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
}

.page-head .wave {
  height: 70px;
}

/* ----- 섹션 ------------------------------------------------------------- */
.section {
  padding: 88px 0;
}

.section--tint {
  background: var(--aqua-50);
}

.section-head {
  margin-bottom: 40px;
}

.section-head--center {
  text-align: center;
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
}

.section-head h2 {
  font-size: clamp(26px, 3.2vw, 34px);
}

.section-head .lead {
  margin-top: 12px;
  color: var(--ink-soft);
}

/* ----- 교회 소개 (홈) --------------------------------------------------- */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.intro-text h2 {
  margin-bottom: 20px;
  font-size: clamp(26px, 3.2vw, 34px);
}

.intro-text p {
  color: var(--ink-soft);
  font-size: 17px;
}

.intro-text p + p {
  margin-top: 16px;
}

.intro-text .link-more {
  margin-top: 24px;
}

.verse-card {
  position: relative;
  padding: 40px 36px;
  border-radius: var(--radius);
  background: var(--aqua-100);
  color: var(--blue-900);
}

.verse-card::before {
  content: "\201C";
  position: absolute;
  top: 6px;
  left: 22px;
  font-size: 80px;
  line-height: 1;
  color: var(--aqua-400);
  opacity: 0.4;
  font-family: Georgia, serif;
}

.verse-card blockquote {
  margin: 0;
  font-size: 18px;
  line-height: 1.85;
}

.verse-card cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-weight: 700;
  color: var(--blue-700);
}

/* ----- 예배 안내 카드 --------------------------------------------------- */
/* 카드 높이는 내용만큼 — 항목이 적은 카드를 억지로 늘려 빈 공간을 만들지 않습니다 */
.worship-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.worship-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.worship-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--aqua-50);
  font-size: 17px;
  color: var(--blue-900);
}

.worship-card h3 .ph {
  font-size: 22px;
  color: var(--blue-700);
}

.worship-card ul {
  padding: 4px 28px;
}

/* 왼쪽 예배 이름, 오른쪽 시간 · 그 아래 장소 */
.worship-card li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--line);
}

.worship-card li:last-child {
  border-bottom: 0;
}

.worship-name {
  font-weight: 700;
  color: var(--ink);
}

.worship-time {
  font-weight: 700;
  color: var(--blue-700);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.worship-time a:hover {
  text-decoration: underline;
}

/* 장소 글이 길어도 시간 칸을 넓히지 않도록 두 칸을 다 쓰고 오른쪽에 붙입니다 */
.worship-sub {
  grid-column: 1 / -1;
  color: var(--ink-mute);
  font-size: 14px;
  text-align: right;
}

.note {
  margin-top: 16px;
  color: var(--ink-mute);
  font-size: 14px;
}

/* ----- 카드 공통 -------------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ----- 공지사항 · 주보 목록 (관리자 페이지에서 불러옴) ----------------- */
.notice-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

/* 글 보기 창을 여는 <button> 이라 기본 버튼 모양을 지웁니다 */
.post-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  text-align: left;
  transition: background 0.25s ease, padding-left 0.25s ease;
}

.post-row:last-child {
  border-bottom: 0;
}

/* 마우스를 올리면 배경이 옅어지고 글자가 살짝 들어갑니다 */
.post-row:hover,
.post-row:focus-visible {
  padding-left: 30px;
  background: var(--aqua-50);
}

.post-row-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 600;
  transition: color 0.25s ease;
}

.post-row:hover .post-row-title {
  color: var(--blue-700);
}

.post-row-arrow {
  flex-shrink: 0;
  color: var(--ink-mute);
  font-size: 16px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.post-row:hover .post-row-arrow {
  transform: translateX(4px);
  color: var(--blue-700);
}

/* ----- 창(모달) 공통 ---------------------------------------------------- */
/* 창 뒤 배경 — 파란 기 없는 짙은 회색으로 덮습니다 (흐림 효과 없이 또렷하게) */
dialog::backdrop {
  background: rgba(24, 28, 34, 0.62);
}

dialog[open] {
  animation: dialog-in 0.25s ease;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

/* 닫기 단추 — 둥근 네모. 올리거나 키보드로 고르면 바깥에 고리가 생깁니다 */
.modal-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--blue-900);
  color: var(--white);
  font-size: 20px;
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.modal-close i {
  transition: transform 0.3s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  outline: 0;
  background: var(--blue-800);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--aqua-400);
}

.modal-close:hover i,
.modal-close:focus-visible i {
  transform: rotate(90deg);
}

/* 글 보기 창 */
.post-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 24px 60px rgba(11, 47, 91, 0.28);
  overflow: hidden;
}

.post-dialog[open] {
  display: flex;
  flex-direction: column;
}

.post-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--aqua-50), var(--white));
}

/* 글이 길어 본문이 스크롤돼도 아래 단추 줄은 늘 보이게 둡니다 */
.post-dialog-foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px 18px;
  border-top: 1px solid var(--line);
}

/* 이전·다음 칼럼 — 제목까지 보여 주어 어디로 넘어가는지 알 수 있게 합니다 */
.post-nav {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.post-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: inherit;
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.post-nav-btn:hover {
  border-color: var(--blue-700);
  background: var(--aqua-50);
}

.post-nav-btn--next {
  grid-column: 2;
  text-align: right;
  align-items: flex-end;
}

.post-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-mute);
  font-size: 12px;
}

.post-nav-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--blue-900);
  font-size: 14px;
  font-weight: 700;
}

.post-share {
  flex-shrink: 0;
}

.post-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.post-share:hover {
  border-color: var(--blue-700);
  background: var(--aqua-50);
}

.post-share.is-copied {
  border-color: #b7e4c7;
  background: #e7f7ee;
  color: #157347;
}

.post-dialog-kind {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
}

.post-dialog-head h2 {
  margin-top: 4px;
  font-size: 22px;
  color: var(--blue-900);
}

.post-dialog-body {
  padding: 26px 28px 32px;
  overflow-y: auto;
  color: var(--ink-soft);
  font-size: 16px;
}

.post-dialog-body > * + * {
  margin-top: 12px;
}

.post-dialog-body ul,
.post-dialog-body ol {
  padding-left: 1.3em;
}

.post-dialog-body ul {
  list-style: disc;
}

.post-dialog-body ol {
  list-style: decimal;
}

.post-dialog-body li + li {
  margin-top: 4px;
}

.post-dialog-body a {
  color: var(--blue-700);
  text-decoration: underline;
}

.post-dialog-body img {
  margin: 8px auto;
  border-radius: var(--radius-sm);
}

.post-dialog-body .post-img-link {
  display: block;
  text-decoration: none;
  cursor: zoom-in;
}

.post-dialog-body .post-img-link img {
  transition: box-shadow 0.25s ease;
}

.post-dialog-body .post-img-link:hover img {
  box-shadow: 0 0 0 3px var(--aqua-400);
}

.post-dialog-body hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.notice-status {
  padding: 28px 0;
  border-top: 2px solid var(--blue-800);
  color: var(--ink-mute);
  text-align: center;
}

/* ----- 영상(설교) 카드 -------------------------------------------------- */
/* 영상 창을 여는 <button> 이라 기본 버튼 모양을 지웁니다 */
.video-card,
.sermon-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: inherit;
  text-align: left;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.video-card:hover,
.sermon-card:hover,
.video-card:focus-visible,
.sermon-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--aqua-100);
  overflow: hidden;
}

/* 유튜브 큰 썸네일(4:3)의 위아래 검은 띠는 16:9 칸에 맞춰 잘라 냅니다 */
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb i {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 52px;
  color: var(--white);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.25s ease;
}

.video-card:hover .video-thumb i {
  transform: translate(-50%, -50%) scale(1.12);
}

.video-title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

/* 성경 본문 — 설교 제목 아래 작게 */
.video-sub {
  display: block;
  margin-top: 4px;
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 600;
}

.sermon-featured-actions {
  justify-content: flex-start;
  margin-top: 24px;
}

.sermon-featured-thumb {
  cursor: pointer;
}

/* 지난 설교 목록 — 썸네일 없이 글만 있는 카드 */
.sermon-card {
  gap: 10px;
  padding: 24px 24px 22px;
}

.sermon-card:hover {
  border-color: var(--aqua-400);
}

.sermon-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--ink-mute);
  font-size: 14px;
}

.sermon-card-top > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sermon-card .video-title {
  font-size: 19px;
}

.sermon-card .video-sub {
  margin-top: -4px;
}

.sermon-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--blue-700);
  font-size: 15px;
  font-weight: 700;
}

.sermon-card-cta i {
  font-size: 20px;
  transition: transform 0.25s ease;
}

.sermon-card:hover .sermon-card-cta i {
  transform: translateX(4px);
}

/* 설교 영상 창 — 영상만 띄웁니다. 창이 낮으면 16:9 영상이 잘리지 않게 폭을 먼저 줄입니다 */
.video-dialog {
  width: min(960px, calc(100vw - 32px), calc((100vh - 48px) * 16 / 9));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.video-dialog-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* 닫기 단추 — 영상 오른쪽 위에 반투명 동그라미로 얹습니다 */
.video-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 22, 30, 0.66);
  color: var(--white);
  font-size: 20px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.video-close:hover,
.video-close:focus-visible {
  outline: 0;
  background: rgba(16, 22, 30, 0.92);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
}

.video-dialog-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ----- 탭 · 검색 -------------------------------------------------------- */
.board-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 600;
}

.tabs button[aria-selected="true"] {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: var(--white);
}

.search {
  position: relative;
  width: 280px;
  max-width: 100%;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
}

.search .ph {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-mute);
}

[hidden] {
  display: none !important;
}

/* ----- 사람 소개 -------------------------------------------------------- */
/* ----- 인사말 ----------------------------------------------------------- */
.greeting {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}

.greeting-photo img {
  border-radius: var(--radius);
}

.greeting-photo figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--ink-soft);
}

.greeting-text p {
  color: var(--ink-soft);
  font-size: 17px;
}

.greeting-text p + p {
  margin-top: 18px;
}

.greeting-text .sign {
  margin-top: 28px;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

/* ----- 비전 카드 -------------------------------------------------------- */
.value-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}

.value-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--aqua-100);
  color: var(--blue-700);
  font-size: 26px;
}

.value-card h3 {
  font-size: 19px;
}

.value-card p {
  margin-top: 8px;
  color: var(--ink-soft);
}

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

.map-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.info-list > li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.info-list > li:first-child {
  padding-top: 0;
}

.info-list .ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--aqua-100);
  color: var(--blue-700);
  font-size: 20px;
}

.info-list h3 {
  font-size: 16px;
}

.info-list p {
  color: var(--ink-soft);
  font-size: 15px;
}

/* ----- 헌금 계좌 -------------------------------------------------------- */
.account-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 32px 36px;
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--blue-800), var(--blue-600));
  color: var(--white);
}

.account-box .bank {
  font-size: 15px;
  opacity: 0.85;
}

.account-box .number {
  margin: 4px 0;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.account-box .holder {
  font-size: 15px;
  opacity: 0.85;
}

.copy-btn.is-copied {
  background: #e7f7ee;
  border-color: #e7f7ee;
  color: #157347;
}

/* ----- 카드 제목 ------------------------------------------------------- */
.card h3 {
  font-size: 19px;
  margin-bottom: 12px;
}

/* ----- 교회소식 탭 · 쪽 번호 ------------------------------------------ */
.news-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.board-tools--end {
  justify-content: flex-end;
}

/* 교회소식 탭 안의 글 목록은 읽기 좋은 폭으로 가운데 둡니다 */
/* 글이 몇 건뿐이어도 푸터가 바로 따라 올라와 텅 빈 페이지처럼 보이지 않도록 본문 높이를 잡아 둡니다 */
.tab-panel {
  min-height: 420px;
}

.tab-panel > .board-tools,
.tab-panel > .notice-list,
.tab-panel > .notice-status {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.gallery-lead {
  margin-bottom: 28px;
  color: var(--ink-soft);
  text-align: center;
}

.pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 32px;
}

.pager-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 600;
}

.pager-btn[aria-current="page"] {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: var(--white);
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ----- 주보 보기 -------------------------------------------------------- */
/* 날짜 고르기 — 연 · 월 · 일 세 칸을 한 상자로 묶습니다 */
.bulletin-bar {
  display: flex;
  max-width: 360px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

.bulletin-bar select {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 30px 0 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%235f6b7a' d='M213.7 101.7l-80 80a8 8 0 0 1-11.4 0l-80-80a8 8 0 0 1 11.4-11.4L128 164.7l74.3-74.4a8 8 0 0 1 11.4 11.4z'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  appearance: none;
  cursor: pointer;
}

.bulletin-bar select:last-child {
  border-right: 0;
}

.bulletin-bar select:hover:not(:disabled) {
  background-color: var(--aqua-50);
}

.bulletin-bar select:disabled {
  opacity: 1;
  cursor: default;
}

.bulletin-title {
  margin: 24px 0 20px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--blue-900);
}

/* 주보 면을 화면 높이에 맞춰 나란히 놓고 옆으로 밀어 봅니다.
   화면 폭에 맞춰 줄이면 글씨가 너무 작아지기 때문입니다. */
.bulletin-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius);
  background: var(--aqua-50);
  cursor: grab;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scroll-padding-left: 18px;
}

.bulletin-scroll::-webkit-scrollbar {
  display: none;
}

.bulletin-scroll.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

/* max-content — 끝까지 밀었을 때 오른쪽에도 왼쪽과 같은 여백이 남게 합니다 */
/* 면 사이 간격 없이 이어 붙여 펼친 주보 한 장처럼 보이게 합니다.
   그림자도 면마다가 아니라 묶음 전체에 한 번만 드리웁니다. */
.bulletin-pages {
  display: flex;
  gap: 0;
  width: max-content;
  margin: 0 auto;
  padding: 18px;
  filter: drop-shadow(0 3px 12px rgba(11, 47, 91, 0.14));
}

.bulletin-page {
  flex-shrink: 0;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--white);
  overflow: hidden;
  /* 면의 왼쪽 끝에 맞춰 멈춥니다 (가운데 맞춤이면 화면보다 넓은 면에서 처음부터 살짝 밀린 채 시작합니다) */
  scroll-snap-align: start;
}

.bulletin-page img {
  display: block;
  width: auto;
  height: auto;
  max-height: min(72vh, 820px);
  max-width: calc(min(100vw, var(--container)) - 160px);
  user-select: none;
  -webkit-user-drag: none;
}

/* 바깥쪽 모서리만 둥글게 — 맨 앞 면의 왼쪽, 맨 끝 면의 오른쪽 */
.bulletin-page:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.bulletin-page:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.bulletin-page:only-child {
  border-radius: var(--radius-sm);
}

.bulletin-arrows {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

/* 넘길 수 있는 쪽은 진한 남색, 끝에 닿은 쪽은 연한 회색 */
.bulletin-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--blue-900);
  color: var(--white);
  font-size: 20px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.bulletin-arrow:hover:not(:disabled) {
  background: var(--blue-700);
  transform: scale(1.06);
}

.bulletin-arrow:disabled {
  background: #e4e9ee;
  color: #a3adb8;
  cursor: default;
}

.bulletin-pdf {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 260px;
  min-height: 160px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--aqua-50);
  color: var(--blue-700);
  font-weight: 700;
}

.bulletin-pdf .ph {
  font-size: 28px;
}

/* ----- 샘물 사진첩 ------------------------------------------------------ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.album-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.album-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--aqua-100);
  overflow: hidden;
}

/* 세로 사진도 칸을 늘리지 않고 4:3 안에 꽉 채워 잘라 보입니다 */
.album-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(11, 47, 91, 0.75);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

.album-title {
  padding: 16px 20px 18px;
  font-size: 17px;
  font-weight: 700;
}

/* 사진 크게 보기 */
.photo-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  overflow: auto;
}

.photo-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 24px;
  border-bottom: 1px solid var(--line);
}

.photo-dialog-head h2 {
  flex: 1;
  font-size: 18px;
}

.photo-counter {
  color: var(--ink-mute);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* 사진마다 가로세로 비율이 달라도 창 높이가 출렁이지 않게 무대 높이를 고정합니다 */
.photo-stage {
  position: relative;
  height: min(70vh, 640px);
  background: #0d1b2a;
}

.photo-full {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--blue-900);
  font-size: 22px;
}

.photo-nav--prev {
  left: 12px;
}

.photo-nav--next {
  right: 12px;
}

.photo-caption {
  padding: 16px 24px 20px;
  color: var(--ink-soft);
}

/* ----- 신앙칼럼 --------------------------------------------------------- */
.column-count {
  margin-bottom: 14px;
  color: var(--ink-mute);
  font-size: 15px;
}

.column-count strong {
  color: var(--blue-700);
}

/* 최신 칼럼 — 두 칸 너비로 넓게, 미리보기 세 줄 */
/* .column-card 기본 여백보다 뒤에 와도 이기도록 두 이름을 함께 씁니다 */
.column-card.column-card--latest {
  grid-column: 1 / -1;
  padding: 32px 36px 28px;
  background: linear-gradient(135deg, var(--aqua-50), var(--white) 60%);
}

.column-card--latest .column-title {
  font-size: 24px;
}

.column-card--latest .column-excerpt {
  -webkit-line-clamp: 3;
  font-size: 16px;
}

.column-latest {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--blue-700);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.column-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* 글 보기 창을 여는 <button> 이라 기본 버튼 모양을 지웁니다 */
.column-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  overflow: hidden; /* 큰 사진이 둥근 모서리 밖으로 나가지 않게 */
  padding: 26px 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: inherit;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.column-card:hover,
.column-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--aqua-400);
  box-shadow: var(--shadow);
}

/* 사진이 있는 칼럼 — 오른쪽에 작은 정사각형 사진.
   사진이 있어도 카드 높이가 글만 있는 카드와 비슷해서 목록이 고르게 보입니다 */
.column-card--photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  grid-auto-rows: auto;
  column-gap: 24px;
  row-gap: 10px;
  align-content: start;
}

.column-card--photo > :not(.column-thumb) {
  grid-column: 1;
}

/* 그리드 칸 안에서도 미리보기가 두 줄에서 끊기도록 상자 모양을 다시 지정합니다 */
.column-card--photo .column-excerpt {
  display: -webkit-box;
}

.column-thumb {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  display: block;
  position: relative;
  width: 112px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--aqua-100);
  overflow: hidden;
}

.column-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 최신 칼럼에 사진이 있으면 — 왼쪽 사진, 오른쪽 글 */
.column-card--latest.column-card--photo {
  display: grid;
  /* 사진은 카드 폭의 약 3분의 1 — 글(미리보기)이 주인공이 되도록 */
  grid-template-columns: 30% minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 32px;
  row-gap: 10px;
  align-content: start;
}

/* 그리드 칸 안에서도 미리보기가 세 줄에서 끊기도록 상자 모양을 다시 지정합니다 */
.column-card--latest.column-card--photo .column-excerpt {
  display: -webkit-box;
  align-self: start;
}

.column-card--latest.column-card--photo > :not(.column-thumb) {
  grid-column: 2;
}

.column-card--latest.column-card--photo .column-thumb {
  grid-column: 1;
  grid-row: 1 / -1;
  width: auto;
  margin: -32px 0 -28px -36px;
  aspect-ratio: auto;
  min-height: 240px;
  border-radius: 0;
}

.column-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--ink-mute);
  font-size: 14px;
}

.column-when {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.column-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--blue-900);
}

/* 본문 미리보기 — 두 줄까지만 */
.column-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 15px;
}

/* 메인 「최근 말씀」 아래 — 이번 주 신앙칼럼 띠 */
.home-column {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.home-column:hover,
.home-column:focus-visible {
  transform: translateY(-3px);
  border-color: var(--aqua-400);
  box-shadow: var(--shadow);
}

.home-column-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-column-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
}

.home-column-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue-900);
}

.home-column-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 15px;
}

.home-column-more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-700);
  font-weight: 700;
  white-space: nowrap;
}

.home-column-more i {
  transition: transform 0.25s ease;
}

.home-column:hover .home-column-more i {
  transform: translateX(4px);
}

/* ----- 메인 팝업 -------------------------------------------------------
   포스터 그림 크기에 맞춰 창 폭이 정해집니다. 화면보다 크면 화면에 맞춰 줄입니다. */
.popup-dialog {
  width: max-content;
  max-width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.popup-dialog[open] {
  position: fixed;
  display: flex;
  flex-direction: column;
}

.popup-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 12px 12px 20px;
}

.popup-title {
  flex: 1;
  font-size: 18px;
  color: var(--blue-900);
}

/* 제목이 없으면(그림만 올린 경우) 빈 줄을 만들지 않고 닫기 단추를 그림 오른쪽 위에 얹습니다 */
.popup-head:has(.popup-title[hidden]) {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1;
  padding: 0;
}

.popup-head:has(.popup-title[hidden]) + .popup-body {
  padding-top: 16px;
}

.popup-head:has(.popup-title[hidden]) .modal-close {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.popup-body {
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px;
}

/* 그림은 창 폭에 맞추고, 세로로 긴 포스터는 화면 높이 안에 들어오게 줄입니다 */
.popup-body img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 200px);
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.popup-text {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 15px;
}

.popup-link {
  margin-top: 14px;
}

/* PC — 포스터 속 일시·장소 글자가 또렷하도록 화면 높이에 맞춰 크게 보여 줍니다.
   (위아래로 뒤 화면이 조금 보일 만큼만 여백을 남깁니다) */
@media (min-width: 641px) {
  .popup-body img {
    max-height: calc(100vh - 140px);
  }
}

.popup-foot {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px 14px;
}

.popup-hide {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-mute);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.popup-hide:hover {
  border-color: var(--blue-700);
  color: var(--blue-700);
}

/* ----- 불러오는 중 자리표시 · 부드럽게 나타나기 -------------------------- */
.skeleton {
  pointer-events: none;
}

.skeleton-bar,
.skeleton-block {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, #e9eef3 0%, #f4f7fa 50%, #e9eef3 100%) 0 0 / 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-bar {
  height: 14px;
}

.skeleton-bar--lg {
  height: 20px;
}

.post-row.skeleton {
  padding-top: 25px;
  padding-bottom: 25px;
}

.album-card.skeleton .album-title {
  padding-top: 20px;
  padding-bottom: 22px;
}

.sermon-card.skeleton {
  gap: 14px;
  min-height: 170px;
}

/* 주보 면 자리 — 받아지기 전까지 세로로 긴 종이(A4) 크기만큼 비워 둡니다 */
.bulletin-page.skeleton {
  height: min(72vh, 820px);
  aspect-ratio: 1 / 1.414;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -100% 0;
  }
}

/* 받아 온 목록이 자리표시를 대신할 때 살짝 떠오르며 나타납니다 */
.reveal > * {
  animation: reveal-in 0.4s ease both;
}

.reveal > *:nth-child(2) {
  animation-delay: 0.05s;
}

.reveal > *:nth-child(3) {
  animation-delay: 0.1s;
}

.reveal > *:nth-child(n + 4) {
  animation-delay: 0.15s;
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* 사진은 다 받아진 뒤 서서히 */
.img-fade {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.img-fade.is-loaded {
  opacity: 1;
}

/* ----- 글줄 속 링크 누르는 영역 ----------------------------------------
   전화번호처럼 글 사이에 끼인 링크는 높이를 키우면 줄 간격이 벌어지므로,
   겉모습은 그대로 두고 손가락이 닿는 영역만 위아래로 넓힙니다. */
.worship-time a,
.info-list a,
.footer-info a,
.note .link-more {
  position: relative;
}

.worship-time a::after,
.info-list a::after,
.footer-info a::after {
  content: "";
  position: absolute;
  inset: -14px -6px;
}

.note .link-more {
  min-height: 0;
}

.note .link-more::after {
  content: "";
  position: absolute;
  inset: -12px -4px;
}

/* ----- 위로가기 --------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(11, 47, 91, 0.16);
  color: var(--blue-700);
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover i {
  transform: translateY(-2px);
}

.to-top i {
  position: relative;
  transition: transform 0.2s ease;
}

/* 원 테두리 — 12시 방향부터 시계 방향으로 채워집니다 */
.to-top svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.to-top circle {
  fill: none;
  stroke-width: 2.5;
}

.to-top-track {
  stroke: var(--line);
}

.to-top-bar {
  stroke: var(--blue-700);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

/* ----- 바닥 띠 (CTA) ---------------------------------------------------- */
/* 앞 섹션(연하늘)과 색이 살짝 다른 띠가 이어져 보이지 않도록 흰 배경으로 둡니다 */
.cta {
  padding: 64px 0;
  background: var(--white);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta h2 {
  font-size: clamp(22px, 2.8vw, 28px);
  color: var(--blue-900);
}

.cta p {
  margin-top: 6px;
  color: var(--ink-soft);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ----- 푸터 ------------------------------------------------------------- */
/* 아래 여백은 위로가기 단추(아래 24px + 높이 52px)가 맨 아래 줄을 가리지 않을 만큼 둡니다 */
.site-footer {
  padding: 56px 0 88px;
  background: var(--blue-900);
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
}

/* 칸 너비는 내용 길이에 맞추고, 남는 공간은 칸 사이에 고르게 나눕니다 */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 40px;
}

.footer-logo img {
  height: 64px;
  width: auto;
}

.footer-intro {
  margin-top: 18px;
  color: var(--white);
  line-height: 1.8;
}

.site-footer h2 {
  margin-bottom: 18px;
  color: var(--white);
  font-size: 20px;
}

.site-footer address {
  font-style: normal;
}

/* 바로가기 — » 표시와 함께 */
.footer-links li + li {
  margin-top: 2px;
}

/* 줄 사이 간격 대신 링크 자체를 44px 높이로 두어 손가락으로 누르기 쉽게 합니다 */
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.footer-links a i {
  font-size: 14px;
  transition: transform 0.25s ease;
}

.footer-links a:hover i {
  transform: translateX(3px);
}

/* 교회 안내 — 아이콘 + 글 */
.footer-info li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}

.footer-info li + li {
  margin-top: 14px;
}

.footer-info i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 19px;
  color: var(--aqua-400);
}

/* 헌금 계좌 */
.footer-account {
  line-height: 1.9;
}

.footer-account strong {
  color: var(--white);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.footer-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-600);
  color: var(--white);
  font-weight: 600;
  transition: background 0.25s ease;
}

.footer-copy:hover {
  background: var(--blue-800);
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.sns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sns a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--white);
  font-size: 22px;
}

.sns a:hover {
  border-color: var(--red);
  background: var(--red);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* 관리자 페이지 바로가기 — 방문자 눈에 띄지 않게 작고 옅게 둡니다 */
.admin-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  transition: background 0.25s ease, color 0.25s ease;
}

.site-footer .admin-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  text-decoration: none;
}

/* ----- 404 -------------------------------------------------------------- */
.notfound {
  padding: 120px 0;
  text-align: center;
}

.notfound strong {
  display: block;
  font-size: 88px;
  line-height: 1;
  color: var(--blue-600);
}

.notfound h1 {
  margin-top: 16px;
  font-size: 26px;
}

.notfound p {
  margin: 12px 0 28px;
  color: var(--ink-soft);
}

/* ==========================================================================
   반응형
   ========================================================================== */
@media (max-width: 1024px) {
  .nav,
  .header-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero .hero-inner {
    padding-top: 72px;
    padding-bottom: 130px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .section {
    padding: 64px 0;
  }

  .intro,
  .location,
  .greeting {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .greeting-photo {
    max-width: 400px;
    margin: 0 auto;
  }

  .grid-3,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .container {
    padding: 0 16px;
  }

  .logo img {
    height: 46px;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .site-footer {
    padding-bottom: 76px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .worship-grid {
    grid-template-columns: 1fr;
  }

  .column-grid {
    grid-template-columns: 1fr;
  }

  .column-card {
    padding: 22px 20px 20px;
  }

  .column-card--latest .column-title {
    font-size: 21px;
  }

  /* 모바일에서는 칼럼 카드에 사진 없이 글만 보여 줍니다 (사진은 글을 열면 본문에 나옵니다) */
  .column-thumb {
    display: none;
  }

  .column-card--latest.column-card--photo {
    display: flex;
  }

  .column-card.column-card--latest {
    padding: 22px 20px 20px;
  }

  .tab-panel {
    min-height: 320px;
  }

  /* 모바일 — 한 면이 화면 폭을 거의 채우고 다음 면 끝이 살짝 보이게 (옆으로 밀 수 있다는 표시) */
  .bulletin-pages {
    padding: 12px;
  }

  .bulletin-scroll {
    scroll-padding-left: 12px;
  }

  .bulletin-page img {
    max-width: none;
    height: min(62vh, 480px);
    max-height: none;
  }

  .bulletin-page.skeleton {
    height: min(62vh, 480px);
  }


  .home-column {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
  }

  /* 모바일 글 보기 창 아래 — 이전·다음은 한 줄에 둘, 링크 복사는 그 아래 */
  .post-dialog-foot {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
  }

  .post-share {
    justify-content: center;
  }

  /* 사진첩은 모바일에서도 2열 · 정사각형 사진으로 한눈에 */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .album-thumb {
    aspect-ratio: 1 / 1;
  }

  .album-title {
    padding: 12px 14px 14px;
    font-size: 15px;
  }

  .album-count {
    right: 8px;
    bottom: 8px;
    padding: 2px 8px;
    font-size: 12px;
  }

  .photo-stage {
    height: min(60vh, 460px);
  }

  .worship-card h3 {
    padding: 16px 20px;
  }

  .worship-card ul {
    padding: 4px 20px;
  }

  .search {
    width: 100%;
  }

  .account-box {
    padding: 26px 22px;
  }

  .account-box .btn {
    width: 100%;
  }

  .cta-actions,
  .cta-actions .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
