/* =========================================================
   천전교회 홈페이지 통합 CSS
   모바일 좌우 흔들림 방지 적용
   ========================================================= */


/* =========================================================
   1. 기본 설정
   ========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --deep: #173d2d;
    --ink: #153126;
    --muted: #6b766f;
    --line: rgba(21, 49, 38, 0.12);
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f7f7f3;
    color: var(--ink);
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

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

img,
iframe {
    display: block;
    max-width: 100%;
}


/* =========================================================
   2. 상단 헤더
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    width: 100%;
    max-width: 100%;
    padding: 15px max(20px, calc((100vw - 1180px) / 2));

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: var(--deep);
    color: #fff;
}

.brand small {
    display: block;
    font-size: 9px;
    color: #7a867f;
}

.brand strong {
    display: block;
    font: 700 25px "Batang", serif;
}

.main-nav {
    display: flex;
    gap: 26px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 800;
}


/* =========================================================
   3. 메인 이미지
   ========================================================= */

.hero {
    position: relative;

    width: 100%;
    max-width: 100%;
    min-height: 650px;

    display: flex;
    align-items: center;

    overflow: hidden;
    background: #d9e3dc;
}

.hero::before {
    content: "";

    position: absolute;
    inset: -28px;

    background: url("cheonjeon-church.jpg") center / cover no-repeat;
    filter: blur(18px);
    transform: scale(1.08);
    opacity: 0.4;
}

.hero > img {
    position: absolute;
    top: 18px;
    right: 2%;
    bottom: 18px;

    width: 64%;
    height: calc(100% - 36px);

    object-fit: contain;
    object-position: center;

    z-index: 1;
    filter: drop-shadow(0 18px 30px rgba(9, 32, 20, 0.24));
}

.hero-cover {
    position: absolute;
    inset: 0;
    z-index: 2;

    background: linear-gradient(
        90deg,
        rgba(7, 29, 19, 0.9),
        rgba(10, 36, 24, 0.64) 42%,
        rgba(8, 29, 19, 0.18) 72%,
        rgba(8, 29, 19, 0.02)
    );
}

.hero-content {
    position: relative;
    z-index: 3;

    width: min(1180px, calc(100% - 44px));
    max-width: 100%;
    margin: auto;

    color: #fff;
}

.eyebrow,
.label,
.intro > div:first-child > p,
.mission p,
.location-info > p {
    margin: 0 0 12px;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.22em;
}

.hero h1 {
    margin: 0;

    font: 700 clamp(40px, 5vw, 70px) / 1.18 "Batang", serif;
    letter-spacing: -0.04em;
}

.hero-text {
    margin: 18px 0 0;

    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.84);
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.hero-actions a {
    padding: 13px 19px;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.hero-actions a:first-child {
    background: #fff;
    color: var(--deep);
}

.hero-actions a:last-child {
    border: 1px solid rgba(255, 255, 255, 0.45);
}


/* =========================================================
   4. 빠른 메뉴
   ========================================================= */

.quick-links {
    position: relative;
    z-index: 4;

    width: min(1180px, calc(100% - 44px));
    max-width: 100%;
    margin: -38px auto 0;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    overflow: hidden;

    background: #fff;
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(18, 48, 36, 0.12);
}

.quick-links a {
    min-width: 0;
    min-height: 118px;
    padding: 22px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border-right: 1px solid var(--line);
}

.quick-links a:last-child {
    border-right: 0;
}

.quick-links span {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 14px;
    background: #e2ebe3;
    color: var(--deep);
    font-size: 18px;
}

.quick-links b {
    margin-top: 10px;
    font-size: 15px;
}

.quick-links small {
    margin-top: 4px;
    color: var(--muted);
}


/* =========================================================
   5. 공통 섹션 폭
   ========================================================= */

.intro,
.worship-card,
.word-card,
.mission,
.location {
    width: min(1180px, calc(100% - 44px));
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   6. 교회 소개
   ========================================================= */

.intro {
    margin-top: 88px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: end;
}

.intro h2 {
    margin: 0;
    font: 700 clamp(32px, 4vw, 48px) / 1.28 "Batang", serif;
}

.intro > div {
    min-width: 0;
}

.intro > div:last-child p {
    margin: 0;
    color: var(--muted);
    line-height: 1.85;
}

.intro > div:last-child a {
    display: inline-block;
    margin-top: 22px;
    font-weight: 800;
}


/* =========================================================
   7. 예배 안내
   ========================================================= */

.worship-card {
    margin-top: 56px;
    padding: 30px 32px;

    display: grid;
    grid-template-columns: 0.65fr 1.35fr;
    gap: 28px;

    border-radius: 26px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(20, 46, 34, 0.08);
}

.worship-card > div {
    min-width: 0;
}

.worship-card h2,
.word-card h2 {
    margin: 0;
    font: 700 29px "Batang", serif;
}

.schedule div {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    padding: 15px 0;

    border-bottom: 1px solid var(--line);
}

.schedule div:last-child {
    border-bottom: 0;
}


/* =========================================================
   8. 말씀
   ========================================================= */

.word-card {
    margin-top: 22px;
    padding: 30px 32px;

    border-radius: 26px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(20, 46, 34, 0.08);
}

.word-links {
    margin-top: 22px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.word-links a {
    min-width: 0;
    padding: 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;

    border-radius: 18px;
    background: #f2f5f1;
}

.word-links span {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}


/* =========================================================
   9. 도농선교
   ========================================================= */

.mission {
    min-height: 230px;
    margin-top: 22px;
    padding: 36px 38px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    overflow: hidden;

    border-radius: 28px;
    color: #fff;
    background: linear-gradient(135deg, #244e39, #102f22);
}

.mission > div {
    min-width: 0;
}

.mission h2 {
    margin: 0;
    font: 700 clamp(27px, 3.1vw, 42px) / 1.35 "Batang", serif;
}

.mission > a {
    flex: 0 0 auto;
    padding: 13px 17px;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;

    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}


/* =========================================================
   10. 오시는 길
   ========================================================= */

.location {
    margin-top: 72px;
    margin-bottom: 72px;

    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
}

.location > div {
    min-width: 0;
}

.location-info {
    padding: 36px;

    border-radius: 28px;
    background: #f3efe5;
}

.location h2 {
    margin: 0;
    font: 700 34px "Batang", serif;
}

.location address {
    margin: 20px 0 26px;

    font-style: normal;
    line-height: 1.8;
    color: var(--muted);
}

.location-info > a {
    display: inline-block;
    padding: 12px 17px;

    border-radius: 999px;
    background: var(--deep);
    color: #fff;

    font-size: 13px;
    font-weight: 800;
}

.map-wrap {
    min-height: 320px;

    overflow: hidden;

    border-radius: 28px;
    background: #e8eee7;
    box-shadow: 0 14px 34px rgba(20, 46, 34, 0.1);
}

.map-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;

    border: 0;
}


/* =========================================================
   11. 푸터
   ========================================================= */

footer {
    width: 100%;
    max-width: 100%;

    display: flex;
    justify-content: space-between;
    gap: 30px;

    padding: 28px max(20px, calc((100vw - 1180px) / 2));

    background: #102b20;
    color: #dbe5df;
}

footer strong {
    font: 700 22px "Batang", serif;
}

footer p,
footer small {
    margin: 0;

    font-size: 11px;
    color: #aebcb3;
}


/* =========================================================
   12. 태블릿
   ========================================================= */

@media (max-width: 900px) {

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
        justify-content: space-between;
    }

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

    .quick-links a:nth-child(2) {
        border-right: 0;
    }

    .quick-links a:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .intro,
    .worship-card,
    .location {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   13. 모바일
   Galaxy S23 FE 기준
   ========================================================= */

@media (max-width: 640px) {

    body {
        background: #fff;
        font-size: 13px;
    }


    /* 상단 */

    .site-header {
        position: relative;

        gap: 9px;
        padding: 11px 12px 9px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .brand strong {
        font-size: 18px;
    }

    .brand small {
        font-size: 7px;
    }

    .main-nav {
        width: 100%;
        max-width: 100%;

        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
    }

    .main-nav a {
        min-width: 0;
        padding: 7px 0;

        overflow: hidden;

        border-radius: 8px;
        background: #f3f5f2;

        text-align: center;
        font-size: 8px;
        font-weight: 800;
        letter-spacing: -0.04em;
        white-space: nowrap;
    }


    /* 메인 사진: 글/버튼 다음에 사진이 바로 이어지도록 일반 흐름 사용 */

    .hero {
        min-height: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        overflow: hidden;
        background: var(--deep);
    }

    .hero::before {
        display: none;
    }

    .hero-cover {
        display: none;
    }

    .hero-content {
        position: relative;
        order: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 28px 15px 16px;
        color: #fff;
        background: var(--deep);
    }

    .hero > img {
        position: static;
        order: 2;
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
        object-fit: initial;
        object-position: initial;
        transform: none;
        filter: none;
    }

    .eyebrow,
    .label,
    .intro > div:first-child > p,
    .mission p,
    .location-info > p {
        margin-bottom: 9px;
        font-size: 8px;
    }

    .hero h1 {
        max-width: 100%;
        font-size: 20px;
        line-height: 1.25;
        letter-spacing: -0.06em;
    }

    .hero-text {
        margin-top: 12px;
        font-size: 11px;
        line-height: 1.65;
    }

    .hero-actions {
        max-width: 100%;
        flex-wrap: nowrap;
        gap: 8px;
        margin: 17px 0 0;
    }

    .hero-actions a {
        padding: 9px 12px;
        font-size: 10px;
        white-space: nowrap;
    }


    /* 빠른 메뉴 */

    .quick-links {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        margin-top: -18px;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        border-radius: 18px;
    }

    .quick-links a {
        min-width: 0;
        min-height: 92px;
        padding: 13px;
    }

    .quick-links span {
        width: 34px;
        height: 34px;

        border-radius: 11px;
        font-size: 15px;
    }

    .quick-links b {
        margin-top: 7px;
        font-size: 12px;
    }

    .quick-links small {
        margin-top: 2px;
        font-size: 9px;
    }


    /* 공통 폭 */

    .intro,
    .worship-card,
    .word-card,
    .mission,
    .location {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
    }


    /* 교회 소개 */

    .intro {
        margin-top: 58px;

        grid-template-columns: 1fr;
        gap: 22px;
    }

    .intro h2 {
        max-width: 100%;

        font-size: 18px;
        line-height: 1.28;
        letter-spacing: -0.05em;
    }

    .intro > div:last-child p {
        font-size: 11px;
        line-height: 1.7;
    }

    .intro > div:last-child a {
        margin-top: 16px;
        font-size: 11px;
    }


    /* 예배 안내 */

    .worship-card {
        margin-top: 38px;
        padding: 22px 18px;

        grid-template-columns: 1fr;
        gap: 14px;
    }

    .worship-card h2,
    .word-card h2 {
        font-size: 22px;
    }

    .schedule div {
        padding: 12px 0;
    }

    .schedule span,
    .schedule b {
        font-size: 11px;
    }


    /* 말씀 */

    .word-card {
        margin-top: 14px;
        padding: 22px 18px;
    }

    .word-links {
        margin-top: 16px;

        grid-template-columns: 1fr;
        gap: 10px;
    }

    .word-links a {
        min-width: 0;
        padding: 14px;
    }

    .word-links b {
        min-width: 0;
        font-size: 11px;
    }

    .word-links span {
        flex: 0 0 auto;
        font-size: 9px;
    }


    /* 도농선교 */

    .mission {
        min-height: 210px;
        margin-top: 14px;
        padding: 24px 20px;

        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 20px;
    }

    .mission h2 {
        max-width: 100%;

        font-size: 17px;
        line-height: 1.28;
        letter-spacing: -0.05em;
    }

    .mission > a {
        max-width: 100%;
        padding: 10px 13px;

        font-size: 10px;
        white-space: nowrap;
    }


    /* 오시는 길 */

    .location {
        margin-top: 54px;
        margin-bottom: 54px;

        grid-template-columns: 1fr;
        gap: 14px;
    }

    .location-info {
        padding: 24px 19px;
    }

    .location h2 {
        font-size: 22px;
    }

    .location address {
        margin: 16px 0 21px;

        font-size: 11px;
        line-height: 1.75;
    }

    .location-info > a {
        padding: 10px 13px;
        font-size: 10px;
    }

    .map-wrap,
    .map-wrap iframe {
        width: 100%;
        max-width: 100%;
        min-height: 270px;
    }


    /* 푸터 */

    footer {
        flex-direction: column;
        gap: 12px;

        padding: 22px 16px;
    }

    footer strong {
        font-size: 18px;
    }

    footer p,
    footer small {
        font-size: 9px;
        line-height: 1.6;
    }
}
