@charset "utf-8";

/* ========================================
   공통 레이아웃 골격 (header / wrap / footer)
======================================== */

/* 스티키 푸터: body를 세로 flex로, #wrap이 남는 공간 차지 */
body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}

#wrap {
    flex: 1 0 auto;
    width: 100%;
    padding-top: var(--space-50);
}

.sub-header + #wrap {
    padding-top: 0;
}

/* <main class="wrap ..."> — 여러 페이지(index/timetable/seats/faq)가 공통으로 쓰는 페이지 컨테이너 */
.wrap {
}

.sub-wrap {
}

/* <section class="sec ..."> — 모든 페이지의 섹션 공통 래퍼 */
.sec {
}

/* ========================================
   header
======================================== */
.site-header {
    position: relative;
    z-index: 100;
    width: 100%;
    background: #ffffff;
    border-bottom: 0.1rem solid var(--color-line-gray);
    padding: 0 2rem;
}

.site-header__inner {
    padding: 18px 0;
    max-width: var(--layout-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3.2rem;
}

/* 로고 */
.site-header__logo {
    flex: 0 0 auto;
    margin: 0;
}

.site-header__logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.site-header__logo-icon {
    width: 3.2rem;
    height: 3.2rem;
    display: block;
    box-shadow: 0px 15px 16px 0px #16306B33;
}

.site-header__logo-text {
    font-family: 'Pretendard';
    font-size: var(--fs-22);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

/* 데스크톱 네비게이션 */
.site-nav__list {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__list a {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font-family: 'Pretendard';
    font-size: var(--fs-16);
    font-weight: 600;
    color: var(--color-primary-50);
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.site-nav__list a:hover {
    color: var(--color-primary);
    background: var(--color-bg);
}

.site-nav__list li.is-active a {
    color: var(--color-primary);
    background: var(--color-light-blue);
}

/* 모바일 전용 요소는 데스크톱에서 숨김 */
.site-header__menu-toggle,
.site-nav__backdrop,
.site-nav__head,
.site-nav__close {
    display: none;
}

/* ========================================
   sub-header (노선/날짜 슬롯)
======================================== */
.sub-header {
    width: 100%;
    padding: var(--space-50) 2rem var(--space-25);
    background: var(--color-bg);
}

.sub-header__inner {
    max-width: var(--layout-max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.sub-header__back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: 'Pretendard';
    width: var(--space-25);
    height: var(--space-25);
}

.sub-header__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sub-header__route {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    font-family: 'Pretendard';
}

.sub-header__date {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.6rem;
    border: 0.1rem solid var(--color-txt-purple);
    border-radius: 999px;
    font-size: var(--fs-14);
    font-weight: 500;
}

.sub-header__date span {
    color: var(--color-txt-purple);
    font-size: var(--fs-14-8);
    font-weight: 500
}

.sub-header__date img {
    width: 1.4rem;
    height: 1.4rem;
    object-fit: contain;
}

.sub-header__actions {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: var(--space-18);
    min-height: 4.4rem;
}

.sub-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    border-radius: 999px;
    font-family: 'Pretendard';
    white-space: nowrap;
    background: #fff;
    box-shadow: 0px 10px 14px 0px rgba(0, 0, 0, 0.05);
}

.sub-header__badge span {
    font-size: var(--fs-15-8);
    font-weight: 600;
    color: var(--color-txt-purple);
}

.sub-header__badge img {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    margin-top: -3px;
}

.sub-header__badge:hover {
    color: var(--color-primary);
    border-color: var(--color-point);
}

/* ========================================
   footer
======================================== */
.site-footer {
    flex: 0 0 auto;
    width: 100%;
    background: #ffffff;
    border-top: 0.1rem solid var(--color-line-gray);
}

.site-footer__inner {
    max-width: var(--layout-max-width);
    width: 100%;
    margin: 0 auto;
    padding: 4rem var(--container-padding-x) 5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
}

.site-footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.site-footer__logo img {
    width: 2.8rem;
    height: 2.8rem;
}

.site-footer__logo span {
    font-family: 'Pretendard';
    font-size: var(--fs-18);
    font-weight: 800;
    color: var(--color-primary);
}

.site-footer__desc {
    font-family: 'Pretendard';
    font-size: var(--fs-14);
    font-weight: 500;
    line-height: 1.6;
    color: var(--color-primary-50);
}

.site-footer__policy {
    display: inline-flex;
    align-items: center;
    gap: 1.2rem;
}

.site-footer__policy a {
    font-family: 'Pretendard';
    font-size: var(--fs-14);
    font-weight: 600;
    color: var(--color-primary);
}

.site-footer__policy-sep {
    width: 0.1rem;
    height: 1.2rem;
    background: var(--color-line-gray);
}

.site-footer__copy {
    font-family: 'Pretendard';
    font-size: var(--fs-13);
    color: var(--color-primary-50);
}

/* ========================================
   반응형
======================================== */
@media (max-width: 1024px) {
    .site-header__inner {
        gap: 1.6rem;
    }
}

@media (max-width: 768px) {
    .site-header {
    }

    .site-header__inner {
        justify-content: space-between;
    }

    /* 햄버거 버튼 노출 */
    .site-header__menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        gap: 0.4rem;
        width: 4rem;
        height: 4rem;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .site-header__menu-toggle span {
        display: block;
        width: 2.2rem;
        height: 0.2rem;
        border-radius: 999px;
        background: var(--color-primary);
    }

    /* 네비게이션 → 상단 드롭다운 패널 (헤더 로고/햄버거와 같은 위치에 로고/닫기버튼이 오도록) */
    .site-nav {
        position: fixed;
        inset: 0;
        z-index: 200;
        visibility: hidden;
        pointer-events: none;
    }

    .site-nav.is-open {
        visibility: visible;
        pointer-events: auto;
    }

    .site-nav__backdrop {
        display: block;
        position: absolute;
        inset: 0;
        border: 0;
        background: rgba(13, 28, 45, 0.5);
        opacity: 0;
        transition: opacity 0.22s ease;
        cursor: pointer;
    }

    .site-nav.is-open .site-nav__backdrop {
        opacity: 1;
    }

    .site-nav__panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 100dvh;
        overflow-y: auto;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        transform: translateY(-100%);
        transition: transform 0.24s ease;
        box-shadow: 0 0.8rem 2.4rem rgba(13, 28, 45, 0.12);
    }

    .site-nav.is-open .site-nav__panel {
        transform: translateY(0);
    }

    /* 헤더의 .site-header__inner(padding: 18px 0)와 .site-header(mobile padding-left/right)를 그대로 맞춰서
       로고/닫기버튼이 헤더의 로고/햄버거버튼과 같은 좌표에 오도록 함 */
    .site-nav__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: calc(1.8rem + env(safe-area-inset-top)) 0.7rem 1.8rem 2rem;
    }

    .site-nav__logo {
        display: inline-flex;
        align-items: center;
        gap: 0.8rem;
        font-family: 'Pretendard';
        font-size: var(--fs-22);
        font-weight: 800;
        color: var(--color-primary);
    }

    .site-nav__logo img {
        width: 3.2rem;
        height: 3.2rem;
        box-shadow: 0px 15px 16px 0px #16306B33;
    }

    /* 헤더의 .site-header__menu-toggle과 동일한 4rem 박스 크기로 맞춰 X 위치가 햄버거 위치와 일치하도록 함 */
    .site-nav__close {
        position: relative;
        display: inline-flex;
        width: 4rem;
        height: 4rem;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .site-nav__close span {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 1.8rem;
        height: 0.2rem;
        border-radius: 999px;
        background: var(--color-primary);
    }

    .site-nav__close span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
    .site-nav__close span:last-child  { transform: translate(-50%, -50%) rotate(-45deg); }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 2rem 0.8rem 2rem;
    }

    .site-nav__list li {
        border-bottom: 0.1rem solid #16306B;
    }

    .site-nav__list li:last-child {
        border-bottom: 0;
    }

    .site-nav__list a {
        width: 100%;
        padding: 2.5rem 0.2rem;
        border-radius: 0;
        font-size: var(--fs-18);
        color: var(--color-primary);
        font-weight: 500;
    }

    .site-nav__list li.is-active a {
        background: transparent;
    }

    /* 모바일에서 body 스크롤 잠금 */
    body.is-nav-open {
        overflow: hidden;
    }

    .sub-header__inner {
        flex-wrap: wrap;
    }

    .site-footer__inner {
        padding: 3.2rem var(--container-padding-x-mobile) 4rem;
    }
}

/* ========================================
   header.php 나머지 태그/클래스 (빈 선택자)
   - 데스크톱 기본 상태에서는 선언이 없고 모바일 미디어쿼리 안에서만 실제 스타일이 있는 항목의
     기본(비-미디어쿼리) 선택자, 그리고 아직 어디에도 스타일이 없는 항목을 모두 포함.
   - $header_slot 분기별로 다르게 나오는 요소 포함:
     type === 'plain'        → .sub-header 자체가 렌더링되지 않음
     type === 'route_search' → .sub-header__route, __from, __arrow, __to, __date, (옵션)__actions
     type === 'home_link'    → .sub-header__home
======================================== */
.sub-header__back span {width: 100%;height: 100%;display: block;}

.sub-header__back span img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.site-nav {
}

.site-nav__panel {
}

.site-nav__logo {
}

.icon-chevron-left {
}

.sub-header__from {font-size: var(--fs-25);color: var(--color-primary);font-weight: 600;}

.sub-header__arrow {
    display: inline-flex;
    align-items: center;
}

.sub-header__arrow img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.sub-header__to {font-size: var(--fs-25);color: var(--color-primary);font-weight: 600;}

.sub-header__home {
    display: inline-flex;
    align-items: center;
    color: var(--color-txt-purple);
    font-family: 'Pretendard';
    font-size: var(--fs-25);
    font-weight: 600;
}
