/* =========================================================
   라파선교회 raphaministry.com — 공통 스타일 (시안 approved-support-banner 기준)
   팔레트: GMI 실측 톤 / 서체: Noto Sans KR
   ========================================================= */
:root {
  --c-accent: #209DCB;
  --c-accent-deep: #17789D;
  --c-accent-dark: #136683;
  --c-accent-soft: #7ECFEC;
  --c-ink: #303236;
  --c-text: #4B4E53;
  --c-muted: #7E8082;
  --c-line: #E5E6E8;
  --c-bg: #FFFFFF;
  --c-bg-alt: #F5F6F7;
  --overlay-blue: rgba(32, 157, 203, 0.85);
  --overlay-blue-light: rgba(32, 157, 203, 0.82);
  --container: 1280px;
  --gutter: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  word-break: keep-all;
}
img { max-width: 100%; display: block; }
a { color: var(--c-accent-deep); text-decoration: none; }
a:hover { color: var(--c-accent); }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 접근성 ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--c-accent-deep); color: #fff; padding: 12px 20px; font-size: 14px;
}
.skip-link:focus { left: 0; color: #fff; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c-accent); outline-offset: 2px;
}
.map-frame { position: relative; width: 100%; padding-top: 42%; border-radius: 6px; overflow: hidden; border: 1px solid var(--c-line); }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 768px) { .map-frame { padding-top: 70%; } }

/* ---------- 헤더 / GNB ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand__name { font-size: 22px; font-weight: 900; color: var(--c-accent-deep); }
.brand__en { font-size: 10px; letter-spacing: 2px; color: var(--c-muted); }
.gnb { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.gnb a { color: var(--c-text); padding: 6px 0; }
.gnb a:hover { color: var(--c-accent-deep); }
.gnb a.is-active { color: var(--c-accent-deep); border-bottom: 2px solid var(--c-accent-deep); }
.btn-donate {
  display: inline-flex; align-items: center; height: 42px; padding: 0 22px;
  background: var(--c-accent); color: #fff !important; font-weight: 700; border-radius: 4px;
}
.btn-donate:hover { background: var(--c-accent-deep); }
.gnb-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.gnb-toggle span { display: block; width: 22px; height: 2px; background: var(--c-ink); margin: 5px 0; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 30px; font-size: 16px; border-radius: 4px; cursor: pointer;
}
.btn--primary { background: var(--c-accent); color: #fff !important; font-weight: 700; }
.btn--primary:hover { background: var(--c-accent-deep); }
.btn--white { background: #fff; color: var(--c-accent-deep) !important; font-weight: 700; }
.btn--outline-light { border: 1px solid rgba(255,255,255,0.6); color: #fff !important; }
.btn--outline { border: 1px solid #C5C9CC; color: var(--c-ink) !important; }

/* ---------- 히어로 슬라이더 ---------- */
.hero { position: relative; height: 560px; overflow: hidden; background: var(--c-ink); }
.hero--sub { height: 460px; }
.hero__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,30,42,0.72) 0%, rgba(10,30,42,0.35) 55%, rgba(10,30,42,0.05) 100%); }
.hero__overlay--center { background: linear-gradient(180deg, rgba(10,30,42,0.45) 0%, rgba(10,30,42,0.72) 100%); }
.hero__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.hero__content--center { align-items: center; text-align: center; }
.hero__eyebrow {
  display: inline-flex; align-self: flex-start; align-items: center;
  height: 32px; padding: 0 16px; background: var(--c-accent); color: #fff;
  font-size: 13px; font-weight: 700; border-radius: 4px;
}
.hero__content--center .hero__eyebrow { align-self: center; }
.hero h1 { font-size: 44px; line-height: 1.4; font-weight: 900; color: #fff; }
.hero p { font-size: 17px; line-height: 1.8; color: rgba(255,255,255,0.85); max-width: 580px; }
.hero__dots { position: absolute; left: 0; right: 0; bottom: 28px; }
.hero__dots-inner { display: flex; gap: 10px; }
.hero__dots--center .hero__dots-inner { justify-content: center; }
.hero__dot { width: 28px; height: 4px; background: rgba(255,255,255,0.4); border: none; cursor: pointer; padding: 0; }
.hero__dot.is-active { background: var(--c-accent); }

/* ---------- 섹션 공통 ---------- */
.section { padding: 88px 0; }
.section--alt { background: var(--c-bg-alt); }
.section--line { border-bottom: 1px solid var(--c-line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 44px; gap: 20px; flex-wrap: wrap; }
.section-title { font-size: 30px; font-weight: 700; color: var(--c-ink); }
.section-sub { font-size: 15px; color: var(--c-muted); margin-top: 8px; }
.section-more { font-size: 15px; color: var(--c-accent-deep); font-weight: 500; white-space: nowrap; }

/* ---------- 카드 ---------- */
.card-grid { display: grid; gap: 24px; }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 14px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 6px; padding: 30px 26px;
}
.card h3 { font-size: 18px; font-weight: 700; color: var(--c-ink); }
.card p { font-size: 14px; line-height: 1.8; color: var(--c-muted); }
.card__icon { color: var(--c-accent); }
.card__num { font-size: 15px; color: var(--c-accent); font-weight: 700; }

/* ---------- 사진 + 반투명 블루 블럭 ---------- */
.photo-band { position: relative; overflow: hidden; background: var(--c-accent-deep); }
.photo-band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-band__tint { position: absolute; inset: 0; background: var(--overlay-blue); }
.photo-band__content { position: relative; }
.photo-band h2 { color: #fff; }
.photo-band p { color: rgba(255,255,255,0.85); }

/* ---------- 흐름 스트립 ---------- */
.flow-strip {
  display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap;
  margin-top: 52px; padding: 24px; background: #fff; border: 1px solid var(--c-line);
  border-radius: 6px; font-size: 17px; font-weight: 700; color: var(--c-ink);
}
.flow-strip .arrow { color: var(--c-accent); }

/* ---------- 타임라인 ---------- */
.timeline { display: flex; flex-direction: column; }
.timeline__row { display: grid; grid-template-columns: 110px 24px 1fr; gap: 20px; }
.timeline__year { font-size: 20px; font-weight: 700; color: var(--c-accent-deep); text-align: right; }
.timeline__year--now { color: var(--c-accent); }
.timeline__rail { display: flex; flex-direction: column; align-items: center; }
.timeline__dot { width: 12px; height: 12px; background: var(--c-accent-deep); margin-top: 6px; }
.timeline__dot--now { background: var(--c-accent); }
.timeline__line { width: 2px; flex-grow: 1; background: var(--c-line); }
.timeline__body { display: flex; flex-direction: column; gap: 6px; padding-bottom: 40px; }
.timeline__body h3 { font-size: 17px; font-weight: 700; color: var(--c-ink); }
.timeline__body p { font-size: 14px; color: var(--c-muted); }
.badge-now {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  background: var(--c-accent); color: #fff; font-size: 12px; border-radius: 3px; font-weight: 500;
}

/* ---------- 푸터 ---------- */
.site-footer { background: var(--c-ink); color: rgba(255,255,255,0.7); padding: 56px 0 44px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.site-footer .ft { display: block; font-size: 14px; color: #fff; font-weight: 500; margin-bottom: 12px; }
.site-footer .brand__name { color: #fff; font-size: 20px; }
.site-footer li { font-size: 13px; line-height: 2.0; }
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 32px; padding-top: 20px; font-size: 12px; }

/* ---------- 페이지 히어로(서브) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--c-accent-deep); }
.page-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__tint { position: absolute; inset: 0; background: var(--overlay-blue-light); }
.page-hero__content { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 76px 0 60px; }
.page-hero__crumb { font-size: 13px; letter-spacing: 1px; color: rgba(255,255,255,0.7); }
.page-hero h1 { font-size: 38px; line-height: 1.45; font-weight: 900; color: #fff; }
.page-hero p { font-size: 16px; line-height: 1.9; color: rgba(255,255,255,0.85); max-width: 680px; }

/* ---------- 서브 내비 ---------- */
.sub-nav { background: #fff; border-bottom: 1px solid var(--c-line); position: sticky; top: 76px; z-index: 90; }
.sub-nav__inner { display: flex; gap: 28px; overflow-x: auto; }
.sub-nav a { display: inline-flex; align-items: center; height: 54px; font-size: 15px; font-weight: 500; color: var(--c-text); white-space: nowrap; border-bottom: 2px solid transparent; }
.sub-nav a.is-active { color: var(--c-accent-deep); border-bottom-color: var(--c-accent-deep); }

/* ---------- 번호 사역 리스트 ---------- */
.mini-num { font-size: 14px; color: var(--c-accent); font-weight: 700; }
.quote-line { font-size: 19px; line-height: 1.8; color: var(--c-accent-deep); font-weight: 700; text-align: center; }

/* ---------- 영상 ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.video-item { display: flex; flex-direction: column; gap: 12px; }
.video-item .frame { position: relative; width: 100%; padding-top: 56.25%; background: var(--c-ink); }
.video-item iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-item span { font-size: 15px; font-weight: 500; color: var(--c-ink); }

/* ---------- 계좌 박스 ---------- */
.account-box { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 24px; padding: 34px 38px; background: #fff; border-radius: 6px; }
.account-box__label { font-size: 13px; letter-spacing: 2px; color: var(--c-accent); font-weight: 500; }
.account-box__num { font-size: 25px; font-weight: 900; color: var(--c-ink); }
.account-box__holder { font-size: 15px; color: var(--c-muted); }
.account-box__note { font-size: 14px; color: var(--c-muted); text-align: right; }

@media (max-width: 768px) {
  .page-hero h1 { font-size: 27px; }
  .sub-nav { top: 76px; }
  .video-grid { grid-template-columns: 1fr; }
  .account-box { flex-direction: column; align-items: flex-start; }
  .account-box__note { text-align: left; }
}

/* ---------- 스크롤 리빌 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease-out, transform 0.9s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__slide { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 34px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .gnb {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--c-line); padding: 8px 0;
  }
  .gnb.is-open { display: flex; }
  .gnb a { padding: 14px 24px; }
  .gnb a.is-active { border-bottom: none; background: var(--c-bg-alt); }
  .gnb .btn-donate { margin: 10px 24px; justify-content: center; }
  .gnb-toggle { display: block; }
  .hero { height: 520px; }
  .hero h1 { font-size: 27px; }
  .card-grid--4, .card-grid--3, .card-grid--2 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .timeline__row { grid-template-columns: 64px 20px 1fr; gap: 12px; }
  .timeline__year { font-size: 16px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- 사진 게시판 ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.photo-grid img { display: block; width: 100%; border-radius: 6px; }

@media (max-width: 768px) {
  .photo-grid { grid-template-columns: 1fr; }
}

/* ---------- 사진 라이트박스 ---------- */
/* 썸네일: 확대 가능하다는 신호 */
.photo-grid a { display: block; overflow: hidden; border-radius: 6px; }
.photo-grid a img { cursor: zoom-in; transition: transform 0.25s ease, filter 0.25s ease; }
.photo-grid a:hover img { transform: scale(1.015); filter: brightness(1.03); }
.lb-group a { display: block; }

/* 오버레이 */
.lb {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}
.lb.is-open {
  opacity: 1; visibility: visible;
  transition: opacity 0.24s ease, visibility 0s linear 0s;
}
.lb__backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 15, 19, 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
}

/* 스테이지 + 이미지 */
.lb__stage {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; max-width: 100%;
}
.lb__figure {
  position: relative; display: block;
  transform: scale(0.97);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lb.is-open .lb__figure { transform: scale(1); }
.lb__img {
  display: block; width: auto; height: auto;
  max-width: min(1600px, 92vw); max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* 좌/우 절반 투명 내비 존 */
.lb__zone { position: absolute; top: 0; bottom: 0; z-index: 2; width: 50%; background: transparent; }
.lb__zone--prev { left: 0; cursor: w-resize; }
.lb__zone--next { right: 0; cursor: e-resize; }

/* 원형 버튼 */
.lb__btn {
  position: absolute; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.15s ease;
}
.lb__btn:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.lb__btn:active { transform: scale(0.94); }
.lb__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb__close { right: 18px; top: 18px; top: max(18px, env(safe-area-inset-top)); }
.lb__nav { top: 50%; margin-top: -22px; }
.lb__nav--prev { left: 18px; }
.lb__nav--next { right: 18px; }

/* 카운터 */
.lb__counter {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%);
  bottom: 20px; bottom: max(20px, env(safe-area-inset-bottom));
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* 사진이 1장뿐이면 내비·카운터 숨김 */
.lb--single .lb__nav,
.lb--single .lb__zone,
.lb--single .lb__counter { display: none; }

@media (max-width: 640px) {
  .lb { padding: 12px; }
  .lb__nav { display: none; }
  .lb__close { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .lb, .lb__figure, .lb__img, .lb__btn, .photo-grid a img { transition: none; }
}
