:root {
    --brand-red: #BA0C2F;
    --brand-navy: #00233C;
    --brand-navy-2: #073B5C;
    --sky-blue: #00AFC4;
    --youth-teal: #5CA59C;
    --cjd-red: #F12327;
    --white: #FFFFFF;
    --soft: #F6F8FB;
    --soft-blue: #EEF4F8;
    --border: #E3E9EF;
    --text: #17212B;
    --muted: #657382;
    --shadow-sm: 0 8px 24px rgba(0, 35, 60, 0.07);
    --shadow-lg: 0 24px 60px rgba(0, 35, 60, 0.15);
    --radius: 18px;
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Noto Sans', 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { font-family: var(--font-body); color: var(--text); background: var(--white); line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 5000; background: var(--brand-navy); color: var(--white); padding: 10px 14px; border-radius: 8px; font-weight: 700; transition: top .2s ease; }
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid #F5B942; outline-offset: 3px; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.container.narrow { width: min(1040px, calc(100% - 40px)); }
.section-padding { padding: 104px 0; }
.section-soft { background: var(--soft); }
.section-heading { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.section-kicker { font-family: var(--font-display); color: var(--brand-red); text-transform: uppercase; letter-spacing: .15em; font-size: .78rem; font-weight: 800; margin-bottom: 10px; }
.section-title { font-family: var(--font-display); color: var(--brand-navy); font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -.035em; line-height: 1.16; }
.section-intro { color: var(--muted); font-size: 1.06rem; margin-top: 18px; }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.95); border-bottom: 1px solid rgba(227,233,239,.9); backdrop-filter: blur(14px); }
.nav-container { width: min(1180px, calc(100% - 40px)); min-height: 82px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand-logo { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--brand-navy); letter-spacing: -.03em; }
.brand-logo span { color: var(--brand-red); }
.logo-subtitle { color: var(--muted); font-size: .67rem; letter-spacing: .04em; margin-top: 4px; }
.nav-menu { display: flex; align-items: center; gap: 29px; }
.nav-menu a { position: relative; font-family: var(--font-display); color: #475569; font-size: .88rem; font-weight: 700; padding: 30px 0; }
.nav-menu a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 21px; height: 2px; background: var(--brand-red); transition: right .25s ease; }
.nav-menu a:hover { color: var(--brand-navy); }
.nav-menu a:hover::after { right: 0; }

.lang-toggle {
    flex: 0 0 auto;
    min-width: 74px;
    height: 36px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--brand-navy);
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.lang-toggle:hover { border-color: var(--brand-red); color: var(--brand-red); background: #FFF9FA; }
html[lang="ko"] .section-kicker,
html[lang="ko"] .scroll-cue { letter-spacing: .08em; }
html[lang="ko"] .hero h1,
html[lang="ko"] .section-title,
html[lang="ko"] .vision-card h3,
html[lang="ko"] .ministry-card h3,
html[lang="ko"] .gallery-caption,
html[lang="ko"] .leadership-info h2,
html[lang="ko"] .email-modal-content h3,
html[lang="ko"] .site-footer h3 { font-family: 'Noto Sans KR', 'Noto Sans', sans-serif; letter-spacing: -.02em; }
html[lang="ko"] .hero h1 { line-height: 1.14; word-break: keep-all; }

.menu-toggle { display: none; width: 42px; height: 42px; background: transparent; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.menu-toggle span { width: 22px; height: 2px; border-radius: 999px; background: var(--brand-navy); transition: transform .25s ease, opacity .25s ease; }
.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 { min-height: min(760px, calc(100vh - 82px)); display: grid; place-items: center; position: relative; overflow: hidden; color: var(--white); background: linear-gradient(90deg, rgba(0,35,60,.93) 0%, rgba(0,35,60,.74) 45%, rgba(0,35,60,.40) 100%), url('photos/hero.jpg') center 46% / cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 75% 30%, rgba(186,12,47,.18), transparent 38%); }
.hero-content { position: relative; z-index: 2; width: min(1180px, calc(100% - 40px)); margin-inline: auto; padding: 92px 0 120px; }
.hero-kicker { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; font-weight: 700; color: #D8E7EF; margin-bottom: 18px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(3rem, 7vw, 5.7rem); line-height: .98; letter-spacing: -.055em; max-width: 800px; font-weight: 800; }
.hero-copy { max-width: 680px; margin-top: 28px; color: #EDF4F7; font-size: clamp(1.05rem, 2vw, 1.27rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border-radius: 10px; font-family: var(--font-display); font-size: .87rem; font-weight: 700; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-red); color: var(--white); }
.btn-primary:hover { background: #9E0B28; }
.btn-secondary { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.5); color: var(--white); backdrop-filter: blur(8px); }
.btn-secondary:hover { background: var(--white); color: var(--brand-navy); }
.btn-dark { background: var(--brand-navy); color: var(--white); }
.btn-dark:hover { background: var(--brand-red); }
.btn-full { width: 100%; }
.scroll-cue { position: absolute; z-index: 2; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--font-display); font-size: .67rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.scroll-cue i { animation: bounce 1.8s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.about-section { background: linear-gradient(180deg, #FFF 0%, #FBFCFD 100%); }
.vision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.vision-card { padding: 34px 30px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.vision-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--soft-blue); color: var(--brand-red); font-size: 1.25rem; margin-bottom: 22px; }
.vision-card h3 { font-family: var(--font-display); color: var(--brand-navy); font-size: 1.25rem; margin-bottom: 9px; }
.vision-card p { color: var(--muted); font-size: .94rem; }

.ministry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.ministry-card { position: relative; background: var(--white); border: 1px solid var(--border); border-radius: 20px; padding: 34px 28px 28px; box-shadow: 0 12px 34px rgba(0,35,60,.05); display: flex; flex-direction: column; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.ministry-card::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 100%; height: 4px; }
.ministry-card.card-cjd::before { background: var(--cjd-red); }
.ministry-card.card-ry::before { background: var(--youth-teal); }
.ministry-card.card-ccc::before { background: var(--sky-blue); }
.ministry-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.logo-img-frame { height: 154px; display: grid; place-items: center; margin-bottom: 18px; }
.logo-img-frame img { display: block; width: auto; height: auto; max-width: 100%; max-height: 138px; object-fit: contain; }
.ministry-card h3 { font-family: var(--font-display); color: var(--brand-navy); font-size: 1.28rem; text-align: center; line-height: 1.3; margin-bottom: 14px; }
.ministry-card > p { color: var(--muted); font-size: .94rem; flex: 1; }
.ministry-meta { list-style: none; background: var(--soft); border-radius: 12px; margin: 22px 0 18px; padding: 14px 16px; display: grid; gap: 10px; }
.ministry-meta li { display: flex; align-items: flex-start; gap: 10px; color: #42505E; font-size: .86rem; }
.ministry-meta i { color: var(--brand-red); width: 15px; margin-top: 4px; }
.ministry-meta strong { color: var(--brand-navy); margin-right: 5px; }
.btn-social { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 45px; border-radius: 10px; color: var(--white); background: #1559A6; font-family: var(--font-display); font-size: .84rem; font-weight: 700; transition: background .2s ease, color .2s ease, transform .2s ease; }
.btn-social:hover { background: var(--brand-red); color: var(--white); transform: translateY(-2px); }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 14px; }
.gallery-item { position: relative; min-width: 0; overflow: hidden; border-radius: 14px; cursor: pointer; background: #DCE4EA; color: var(--white); text-align: left; }
.gallery-item.featured { grid-column: span 2; grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-img-box { position: absolute; inset: 0; }
.gallery-img-box::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 48%, rgba(0,23,60,.74) 100%); }
.gallery-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .35s ease; }
.gallery-item.poster .gallery-img-box img { object-position: center; }
.gallery-caption { position: absolute; z-index: 2; left: 17px; right: 17px; bottom: 15px; font-family: var(--font-display); font-size: .82rem; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.gallery-item:hover .gallery-img-box img { transform: scale(1.055); filter: saturate(1.06); }
.gallery-hint { margin-top: 20px; color: var(--muted); font-size: .86rem; text-align: center; }
.gallery-hint i { color: var(--brand-red); margin-right: 5px; }

.gallery-overlay { position: fixed; inset: 0; z-index: 3000; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 18px; padding: 34px; background: rgba(0,23,60,.94); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.gallery-overlay.active { opacity: 1; visibility: visible; }
.overlay-card { position: relative; width: min(1040px, 100%); max-height: 90vh; margin: auto; padding: 10px 10px 16px; border-radius: 16px; background: var(--white); box-shadow: 0 30px 80px rgba(0,0,0,.4); transform: scale(.96); transition: transform .25s ease; }
.gallery-overlay.active .overlay-card { transform: scale(1); }
.overlay-img { width: 100%; max-height: 76vh; object-fit: contain; border-radius: 10px; background: #EEF2F5; }
.overlay-caption { padding: 12px 10px 0; text-align: center; color: var(--brand-navy); font-family: var(--font-display); font-weight: 700; }
.overlay-close { position: absolute; top: -48px; right: 0; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--white); cursor: pointer; font-size: 1.15rem; }
.lightbox-control { width: 52px; height: 52px; border-radius: 50%; color: var(--white); background: rgba(255,255,255,.12); cursor: pointer; font-size: 1rem; transition: background .2s ease; }
.lightbox-control:hover, .overlay-close:hover { background: rgba(255,255,255,.24); }

.leadership-section { background: linear-gradient(135deg, #F1F5F8 0%, #F8FAFB 100%); overflow: hidden; }
.leadership-container { display: grid; grid-template-columns: 380px 1fr; align-items: center; gap: 80px; }
.leadership-photo-wrap { position: relative; width: 330px; margin-inline: auto; }
.pastor-img-frame { position: relative; z-index: 2; width: 100%; aspect-ratio: 347/486; border-radius: 22px; overflow: hidden; background: #DCE4EA; box-shadow: var(--shadow-lg); }
.pastor-img-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.photo-accent { position: absolute; z-index: 1; width: 78%; height: 76%; right: -34px; bottom: -28px; border-radius: 24px; border: 3px solid var(--brand-red); opacity: .65; }
.leadership-info h2 { font-family: var(--font-display); color: var(--brand-navy); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -.04em; }
.leadership-info h2 span { font-size: .48em; color: var(--muted); font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.leadership-info .role { margin-top: 9px; color: var(--brand-red); font-family: var(--font-display); font-weight: 700; font-size: .9rem; letter-spacing: .04em; }
.leadership-info > p:not(.section-kicker) { max-width: 650px; margin-top: 24px; color: var(--muted); font-size: 1.02rem; }
.contact-email-btn { margin-top: 30px; }

.email-modal-overlay { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 22px; background: rgba(0,23,60,.76); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
.email-modal-overlay.active { opacity: 1; visibility: visible; }
.email-modal-content { width: min(430px, 100%); position: relative; padding: 34px; background: var(--white); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.3); text-align: center; transform: translateY(12px); transition: transform .2s ease; }
.email-modal-overlay.active .email-modal-content { transform: translateY(0); }
.modal-close-btn { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--muted); cursor: pointer; }
.modal-icon { width: 56px; height: 56px; margin: 2px auto 16px; display: grid; place-items: center; border-radius: 50%; color: var(--brand-red); background: #FBECEF; font-size: 1.2rem; }
.email-modal-content h3 { font-family: var(--font-display); color: var(--brand-navy); font-size: 1.35rem; }
.modal-desc { margin: 8px 0 20px; color: var(--muted); font-size: .9rem; }
.email-input-group { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.email-input-group input { width: 100%; min-width: 0; border: 0; background: var(--soft); color: #334155; padding: 12px 13px; outline: none; }
.email-input-group button { flex: 0 0 auto; padding: 0 16px; background: var(--brand-navy); color: var(--white); cursor: pointer; font-weight: 700; font-size: .82rem; }
.email-input-group button.copied { background: #23834A; }

.site-footer { background: var(--brand-navy); color: #B7C4CE; padding: 66px 0 0; border-top: 4px solid var(--brand-red); }
.footer-grid { display: grid; grid-template-columns: 1.05fr .95fr 1.45fr; gap: 58px; padding-bottom: 52px; }
.footer-brand { display: inline-block; font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--white); }
.footer-brand span { color: #E75270; }
.footer-about > p:nth-of-type(1) { color: var(--white); margin-top: 3px; font-size: .83rem; }
.footer-tagline { max-width: 290px; margin-top: 18px; color: #8FA1AF; font-size: .9rem; }
.site-footer h3 { font-family: var(--font-display); color: var(--white); font-size: .95rem; margin-bottom: 16px; }
.footer-location p { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: .9rem; }
.footer-location i { width: 14px; margin-top: 6px; color: #E75270; }
.partner-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.partner-links a { padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(255,255,255,.035); transition: background .2s ease, border-color .2s ease; }
.partner-links a:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.partner-links strong { display: block; color: var(--white); font-size: .84rem; }
.partner-links span { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; color: #8FBFD8; font-size: .77rem; }
.footer-bottom { min-height: 72px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #7E929F; font-size: .78rem; }
.footer-bottom a { color: #A8BAC6; }
.footer-bottom i { margin-left: 5px; }

@media (max-width: 980px) {
    .ministry-grid { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; }
    .ministry-card { display: grid; grid-template-columns: 150px 1fr; column-gap: 26px; }
    .logo-img-frame { grid-row: 1 / span 4; height: 150px; margin: 0; align-self: center; }
    .logo-img-frame img { max-height: 134px; }
    .ministry-card h3 { text-align: left; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-item.featured { grid-column: span 2; }
    .leadership-container { grid-template-columns: 320px 1fr; gap: 50px; }
    .leadership-photo-wrap { width: 280px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-partners { grid-column: span 2; }
}

@media (max-width: 760px) {
    html { scroll-padding-top: 74px; }
    .container, .container.narrow, .nav-container, .hero-content { width: min(100% - 30px, 1180px); }
    .section-padding { padding: 78px 0; }
    .section-heading { margin-bottom: 38px; }
    .nav-container { min-height: 72px; }
    .logo-subtitle { display: none; }
    .menu-toggle { display: flex; order: 4; }
    .lang-toggle { order: 3; min-width: 68px; height: 34px; margin-left: auto; }
    .nav-menu { position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: grid; gap: 0; padding: 8px 15px 16px; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: 0 14px 30px rgba(0,35,60,.1); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease; }
    .nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav-menu a { padding: 13px 10px; border-radius: 8px; }
    .nav-menu a::after { display: none; }
    .nav-menu a:hover { background: var(--soft); }
    .hero { min-height: 670px; background-position: 62% center; }
    .hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,35,60,.08), rgba(0,35,60,.25)); }
    .hero-content { padding: 82px 0 120px; }
    .hero h1 { font-size: clamp(2.7rem, 14vw, 4.3rem); }
    .hero-copy { font-size: 1rem; }
    .hero-actions { flex-direction: column; align-items: stretch; max-width: 360px; }
    .btn { min-height: 50px; }
    .vision-grid { grid-template-columns: 1fr; }
    .vision-card { padding: 28px 25px; }
    .ministry-card { display: flex; padding: 30px 24px 24px; }
    .logo-img-frame { height: 128px; margin-bottom: 16px; }
    .logo-img-frame img { max-height: 116px; }
    .ministry-card h3 { text-align: center; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
    .gallery-item.featured { grid-column: span 2; grid-row: span 1; }
    .gallery-item.wide { grid-column: span 2; }
    .gallery-caption { font-size: .74rem; }
    .gallery-overlay { grid-template-columns: 1fr; padding: 60px 12px 26px; }
    .lightbox-control { position: absolute; z-index: 3; bottom: 24px; }
    .lightbox-prev { left: calc(50% - 62px); }
    .lightbox-next { right: calc(50% - 62px); }
    .overlay-card { align-self: start; max-height: calc(100vh - 160px); }
    .overlay-img { max-height: calc(100vh - 240px); }
    .overlay-close { top: -48px; right: 0; }
    .leadership-container { grid-template-columns: 1fr; gap: 54px; }
    .leadership-photo-wrap { width: min(280px, 78vw); }
    .leadership-info { text-align: center; }
    .leadership-info > p:not(.section-kicker) { margin-inline: auto; }
    .footer-grid { grid-template-columns: 1fr; gap: 38px; }
    .footer-partners { grid-column: auto; }
    .partner-links { grid-template-columns: 1fr; }
    .footer-bottom { min-height: 96px; padding: 18px 0; flex-direction: column; justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
    .gallery-grid { grid-auto-rows: 160px; }
    .gallery-item.poster { grid-column: span 2; }
    .email-modal-content { padding: 30px 20px 22px; }
    .email-input-group input { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
