/* ==========================================
   1. 환경 설정 및 변수
   ========================================== */
:root {
    --primary-orange: #E67E22;
    --apple-black: #1d1d1f;
    --apple-grey: #86868b;
    --apple-bg: #f5f5f7;
    --white: #ffffff;
    --radius-button: 980px;
    --radius-card: 24px;
    --container-width: 1200px;
}

/* ==========================================
   2. 기본 초기화 및 타이포그래피
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--apple-black);
    line-height: 1.47;
    letter-spacing: -0.022em;
    background-color: var(--white);
}

h1 {
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    word-break: keep-all;
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    word-break: keep-all;
}

p {
    font-size: clamp(17px, 2vw, 21px);
    color: var(--apple-grey);
    line-height: 1.6;
    word-break: keep-all;
}

/* ==========================================
   3. 레이아웃 및 공통 컴포넌트
   ========================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 22px;
    width: 100%;
}

/* 상단바 (Header) */
.header {
    height: 80px;
    background-color: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.main-nav a {
    text-decoration: none;
    color: var(--apple-black);
    font-size: 16px;
    font-weight: 500;
}

/* ==========================================
   4. 섹션 공통 구조 (Seamless 디자인)
   ========================================== */
.snap-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    /* 섹션 간 간격 완전 제거 */
    overflow: hidden;
    position: relative;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 40px;
}

.hero-layout-reverse {
    flex-direction: row-reverse;
}

.hero-content {
    flex: 1;
    z-index: 10;
    padding: 120px 0;
}

/* 글자 영역에만 상하 여백 부여 */
.hero-image {
    flex: 1.2;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* 배경색 테마 */
.bg-white {
    background-color: var(--white);
}

.bg-grey {
    background-color: var(--apple-bg);
}

.bg-dark {
    background-color: var(--apple-black);
    color: var(--white);
}

/* ==========================================
   5. 섹션별 특수 스타일
   ========================================== */

/* [SEC 01] 웬디 메인 히어로 - 바닥 밀착 */
.hero-wendy {
    align-items: flex-end;
}

.hero-wendy .hero-layout {
    align-items: flex-end;
}

.hero-wendy .hero-image {
    align-items: flex-end;
    line-height: 0;
}

/* 이미지 아래 틈 제거 */
.hero-wendy .hero-image img {
    margin-bottom: -1px;
    vertical-align: bottom;
}

/* [SEC 02] 브랜드 인트로 - 미니멀리즘 */
.intro-section {
    background-color: #FFF5EA;
    min-height: 80vh;
}

.floating-logo {
    max-width: 450px !important;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.08));
    animation: floating 4s ease-in-out infinite;
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25px);
    }
}

/* [SEC 03] 서비스 카드 그리드 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 100px 0;
}

.card {
    background: #f5f5f7;
    border-radius: var(--radius-card);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
}

.card .tag {
    color: var(--apple-grey);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
}

.card h3 {
    font-size: 32px;
    margin: 15px 0;
    font-weight: 700;
}

/* --- [SEC 04] PHOTO MARQUEE --- */
.photo-marquee-section {
    padding: 120px 0;
    background-color: #ffffff;
    overflow: hidden;
}

.marquee-title {
    margin-bottom: 60px;
    text-align: center;
}

.marquee-wrapper {
    display: flex;
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    gap: 24px;
    animation: scroll-marquee 40s linear infinite;
    /* 40초 동안 한 바퀴 흐름 */
}

.marquee-track img {
    width: 380px;
    /* 고정 너비 */
    height: 280px;
    /* 고정 높이 */
    object-fit: cover;
    border-radius: 24px;
    /* 애플 스타일 둥근 모서리 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

.marquee-track img:hover {
    transform: scale(1.05);
    /* 살짝 커지는 효과 */
    cursor: pointer;
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }

    /* (이미지 너비 380px + 간격 24px) * 사진 6장 = 2424px 만큼 이동 */
    100% {
        transform: translateX(-2424px);
    }
}

/* ==========================================
   6. 최종 모바일 대응 (모든 예외처리 통합)
   ========================================== */
@media (max-width: 1024px) {
    .header {
        height: 60px;
    }

    .main-nav {
        display: none;
    }

    .snap-section {
        padding: 60px 0 !important;
    }

    /* 모바일은 가독성을 위해 여백 부활 */

    .hero-layout,
    .hero-layout-reverse {
        flex-direction: column-reverse;
        text-align: center;
        gap: 20px;
    }

    /* 모바일 대응 */
    @media (max-width: 1024px) {
        .marquee-track img {
            width: 280px;
            height: 200px;
        }

        @keyframes scroll-marquee {
            0% {
                transform: translateX(0);
            }

            100% {
                transform: translateX(-1824px);
            }

            /* 모바일용 계산값 */
        }
    }
}

/* ============================================================
   [공통] 지점 안내 및 문의 섹션 (Location & Inquiry)
   유치원, 호텔 페이지 공통 사용
   ============================================================ */

.inquiry-section {
    padding: 100px 0;
    background-color: #FAF9F6;
    /* 오십케이 시그니처 베이지 */
}

.kinder-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.inquiry-header {
    text-align: center;
    margin-bottom: 60px;
}

.kinder-sec-title {
    font-size: 36px;
    font-weight: 800;
    color: #1d1d1f;
    margin-bottom: 15px;
}

.kinder-sec-desc {
    font-size: 18px;
    color: #666;
}

/* 지점 카드 그리드 */
.branch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3개 나란히 */
    gap: 30px;
}

.branch-card {
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.branch-card:hover {
    transform: translateY(-10px);
}

/* 이미지 박스 */
.branch-img-box {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.branch-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.branch-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #E67E22;
    color: #fff;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
}

/* 카드 본문 */
.branch-body {
    padding: 30px;
    flex-grow: 1;
}

.branch-body h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.branch-addr {
    font-size: 15px;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.5;
    word-break: keep-all;
}

.branch-hash {
    font-size: 14px;
    color: #E67E22;
    font-weight: 600;
}

/* 하단 버튼 영역 */
.branch-footer {
    padding: 0 30px 30px;
    display: flex;
    gap: 10px;
}

.btn-detail,
.btn-chat {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s;
}

.btn-detail {
    background: #f4f4f4;
    color: #1d1d1f;
}

.btn-chat {
    background: #FEE500;
    /* 카카오톡 노란색 */
    color: #1d1d1f;
}

.btn-detail:hover {
    background: #e0e0e0;
}

.btn-chat:hover {
    background: #fada00;
}

/* 모바일 반응형 */
@media (max-width: 1024px) {
    .branch-grid {
        grid-template-columns: 1fr;
        /* 모바일은 1줄씩 */
    }

    .inquiry-section {
        padding: 60px 0;
    }

    .kinder-sec-title {
        font-size: 28px;
    }
}
