:root {
    --gold: #c5a059;
    --gold-light: #dfc28d;
    --navy: #112236;
    --dark: #1e2329;
    --bg-light: #fbf9f5;
    --bg-card: #f4efea;
    --gray-text: #6e747e;
    --shadow-soft: 0 15px 35px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 45px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: var(--dark);
    background: var(--bg-light);
    line-height: 1.85;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

section {
    padding: 120px 8%;
}

/* ==========================================
   HEADER & NAV (유리 같은 글래스모피즘)
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    background: rgba(17, 34, 54, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
}

.logo {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-family: 'Noto Serif KR', serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.cross {
    font-size: 22px;
    color: var(--gold);
    line-height: 1;
    opacity: 0.9;
}

nav {
    display: flex;
    gap: 36px;
}

nav a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.01em;
    position: relative;
    white-space: nowrap;
}

nav a:hover,
nav a.active {
    color: #ffffff;
    opacity: 1;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    opacity: 0;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
    opacity: 1;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh; /* 모바일 브라우저 주소창 높이 대응 */
    min-height: 580px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 확장 시 이미지가 넘어가지 않도록 방지 */
}

/* 히어로 배경 이미지 자동 확대/축소 효과 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("image/hero.jpg") center center/cover no-repeat;
    z-index: 0;
    animation: heroScale 20s infinite alternate ease-in-out;
    transform-origin: center center;
}

@keyframes heroScale {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.12); /* 12% 천천히 확대 */
    }
}

.hero .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    padding: 0 20px;
}

.hero-small {
    letter-spacing: 4px;
    font-size: 13px;
    color: var(--gold-light, #dfc28d);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero h1 {
    font-family: 'Noto Serif KR', serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 20px;
    word-break: keep-all;
}

.hero-description {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.7;
    word-break: keep-all;
}

.scroll-down {
    margin-bottom: 15px;
    letter-spacing: 3px;
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
}

/* 모바일 화면 폰트 크기 반응형 조절 */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 32px;
        line-height: 1.4;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-small {
        font-size: 11px;
        letter-spacing: 3px;
        margin-bottom: 12px;
    }
}

/* ==========================================
   BUTTON & COMMON
   ========================================== */
.button {
    display: inline-block;
    padding: 14px 34px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--dark);
    border: 1px solid rgba(30, 35, 41, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(4px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 14px;
    margin-top: 24px;
    letter-spacing: -0.01em;
}

.button:hover {
    background: var(--dark);
    color: #ffffff;
    border-color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header span {
    color: var(--gold);
    letter-spacing: 4px;
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.9;
}

.section-header h2 {
    margin: 12px 0 14px;
    font-size: 40px;
    font-family: 'Noto Serif KR', serif;
    font-weight: 300;
    color: var(--dark);
    word-break: keep-all;
}

.section-header p {
    color: var(--gray-text);
    font-size: 15px;
    font-weight: 300;
    word-break: keep-all;
}

/* ==========================================
   INDEX SECTIONS
   ========================================== */
.about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image img {
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s ease;
}

.about-text span {
    color: var(--gold);
    letter-spacing: 4px;
    font-size: 12px;
    opacity: 0.9;
}

.about-text h2 {
    font-family: 'Noto Serif KR', serif;
    font-size: 38px;
    font-weight: 300;
    margin: 16px 0 20px;
    line-height: 1.4;
    word-break: keep-all;
}

.about-text p {
    color: var(--gray-text);
    font-size: 16px;
    line-height: 1.9;
    font-weight: 300;
    word-break: keep-all;
}

.sermon {
    background: #ffffff;
}

.sermon-grid {
    display: flex;
    justify-content: center;
}

.sermon-card {
    width: 100%;
    max-width: 820px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.sermon-card img {
    height: 420px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.sermon-card:hover img {
    transform: scale(1.02);
}

.sermon-text {
    padding: 36px;
    text-align: center;
}

.sermon-text h3 {
    font-size: 24px;
    font-family: 'Noto Serif KR', serif;
    font-weight: 400;
    margin-bottom: 8px;
    word-break: keep-all;
}

.sermon-text p {
    color: var(--gray-text);
    font-size: 14px;
    opacity: 0.8;
}

.worship {
    background: var(--bg-light);
}

.worship h2 {
    font-family: 'Noto Serif KR', serif;
    font-size: 40px;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 300;
    word-break: keep-all;
}

.worship-list {
    max-width: 780px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px 48px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.worship-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.worship-list div:last-child {
    border-bottom: none;
}

.worship-list strong {
    font-size: 17px;
    font-weight: 500;
    color: var(--navy);
}

.worship-list span {
    color: var(--gray-text);
    font-weight: 300;
}

.community h2 {
    text-align: center;
    font-family: 'Noto Serif KR', serif;
    font-size: 40px;
    margin-bottom: 50px;
    font-weight: 300;
    word-break: keep-all;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1140px;
    margin: 0 auto;
}

.community-grid article {
    background: #ffffff;
    border-radius: 16px;
    padding: 60px 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
}

.community-grid article:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(197, 160, 89, 0.3);
}

.community-grid h3 {
    font-size: 20px;
    font-family: 'Noto Serif KR', serif;
    font-weight: 400;
    word-break: keep-all;
}

.pastor {
    max-width: 1140px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 60px;
    align-items: center;
}

.pastor-image img {
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.pastor-text span {
    color: var(--gold);
    letter-spacing: 4px;
    font-size: 12px;
}

.pastor-text h2 {
    margin: 14px 0 20px;
    font-family: 'Noto Serif KR', serif;
    font-size: 36px;
    font-weight: 300;
    word-break: keep-all;
}

.pastor-text p {
    color: var(--gray-text);
    line-height: 1.9;
    font-weight: 300;
    word-break: keep-all;
}

.location {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 60px;
    align-items: center;
    background: var(--bg-card);
}

.location-info span {
    color: var(--gold);
    letter-spacing: 4px;
    font-size: 12px;
}

.location-info h2 {
    margin: 14px 0 24px;
    font-size: 36px;
    font-family: 'Noto Serif KR', serif;
    font-weight: 300;
    word-break: keep-all;
}

.location-info p {
    margin: 8px 0;
    color: var(--gray-text);
    font-weight: 300;
    word-break: keep-all;
}

.map {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.map iframe {
    width: 100%;
    height: 400px;
    border: 0;
    display: block;
    filter: saturate(0.9) contrast(1.05);
}

/* ==========================================
   ABOUT PAGE
   ========================================== */
.page-banner {
    background: linear-gradient(180deg, var(--navy) 0%, #172d47 100%);
    color: white;
    text-align: center;
    padding: 170px 20px 70px;
}

.page-banner h1 {
    font-family: 'Noto Serif KR', serif;
    font-size: 42px;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.about-detail {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.about-block {
    background: #ffffff;
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
}

.about-block span {
    color: var(--gold);
    letter-spacing: 3px;
    font-size: 12px;
    opacity: 0.9;
}

.about-block h2 {
    font-family: 'Noto Serif KR', serif;
    font-size: 30px;
    font-weight: 300;
    margin: 12px 0 24px;
    color: var(--navy);
    word-break: keep-all;
}

.about-block p {
    color: var(--gray-text);
    font-size: 16px;
    line-height: 1.9;
    font-weight: 300;
    word-break: keep-all;
}

.vision-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.vision-list li {
    background: var(--bg-light);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 400;
    color: var(--dark);
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    word-break: keep-all;
}

.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.history-list li {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 16px;
    color: var(--gray-text);
    font-weight: 300;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding-bottom: 16px;
    word-break: keep-all;
}

.history-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.history-list strong {
    color: var(--navy);
    font-family: 'Noto Serif KR', serif;
    font-size: 18px;
    min-width: 65px;
    font-weight: 500;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--navy);
    color: white;
    padding: 70px 8% 45px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.footer-info {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-info h4 {
    color: var(--gold-light);
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 300;
    word-break: keep-all;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 30px;
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   MOBILE & TABLET OPTIMIZATION (오류 수정 핵심)
   ========================================== */
@media (max-width: 900px) {
    section {
        padding: 70px 5%;
    }

    /* 상단 네비게이션 모바일 최적화 */
    header {
        padding: 15px 5%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        background: rgba(17, 34, 54, 0.85); /* 모바일 가독성 증대 */
    }

    nav {
        width: 100%;
        display: flex;
        gap: 18px;
        overflow-x: auto; /* 메뉴가 넘칠 경우 부드러운 스크롤 */
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    nav::-webkit-scrollbar {
        display: none; /* 스크롤바 숨김 */
    }

    nav a {
        font-size: 14px;
    }

    /* 히어로 영역 폰트 반응형 적용 */
    .hero h1 {
        font-size: 32px;
        line-height: 1.4;
    }

    .hero-description {
        font-size: 15px;
    }

    .section-header h2,
    .worship h2,
    .community h2 {
        font-size: 30px;
    }

    /* 1열 레이아웃 변경 */
    .about,
    .pastor,
    .location {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .sermon-card img {
        height: 240px;
    }

    .sermon-text {
        padding: 24px 18px;
    }

    /* 예배 시간 표 모바일 감싸기 */
    .worship-list {
        padding: 15px 22px;
    }

    .worship-list div {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px 0;
    }

    .community-grid,
    .vision-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .community-grid article {
        padding: 35px 20px;
    }

    /* 소개 페이지 모바일 대응 */
    .page-banner {
        padding: 140px 20px 50px;
    }

    .page-banner h1 {
        font-size: 30px;
    }

    .about-block {
        padding: 30px 20px;
    }

    .history-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .map iframe {
        height: 280px;
    }

    .footer-info {
        flex-direction: column;
        gap: 20px;
    }
}
