/* layout/sub-header.css — 부모 컴포넌트 오버라이드
   로드 순서: 부모 archf-* → common → animation → layout/* → page/{슬러그} */

/* ── 서브헤더 ── */

.sub-header {
    background-position: 80% center;
}

.sub-header__overlay {
    background: unset;
}

/* overflow — 브레드크럼 드롭다운이 잘리지 않게 (부모는 hidden)
   padding-top — 오버레이 헤더 높이만큼 빼고 남은 영역 기준으로 중앙 정렬 */
.sub-header--child {
    padding-top: var(--header-height);
    overflow: visible;
}

/* 부모는 inner 상단에 +50px·헤더높이를 더해 비대칭 — 대칭으로 되돌린다 */
.sub-header--child .sub-header__inner,
body.has-header-c .sub-header--child .sub-header__inner,
body.has-header-d .sub-header--child .sub-header__inner {
    padding-top: var(--subheader-padding);
    padding-bottom: var(--subheader-padding);
}

/* 브레드크럼 / 제목 / 설명 좌측 정렬 */
.sub-header--child .sub-header__inner {
    text-align: left;
}

.sub-header__nav {
    position: relative;
    z-index: 3;
    margin-bottom: var(--one-gap-sm);
}

.sub-header--child .sub-header__title {
    margin-bottom: var(--one-gap-sm);
}

.sub-header--child .sub-header__desc {
    margin-bottom: 0;
}

/* ── 스크롤 인디케이터 — 하단 중앙 고정 ── */

.sub-header__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
    color: var(--subheader-title-color, #fff);
}

.sub-header__mouse {
    position: relative;
    display: block;
    width: 20px;
    height: 32px;
    border: 1px solid currentColor;
    border-radius: 12px;
}

/* 안쪽 막대가 위→아래로 흐른다 */
.sub-header__mouse::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    width: 2px;
    height: 6px;
    margin-left: -1px;
    border-radius: 2px;
    background-color: currentColor;
    animation: sub-header-scroll 1.6s ease-in-out infinite;
}

@keyframes sub-header-scroll {
    0%   { transform: translateY(0); opacity: 0; }
    25%  { opacity: 1; }
    75%  { opacity: 1; }
    100% { transform: translateY(11px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sub-header__mouse::before {
        animation: none;
    }
}

.sub-header__scroll-txt {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
}

@media (max-width: 639px) {
    .sub-header__scroll {
        bottom: 24px;
    }
}

/* 서브메뉴 — 서브헤더 맨 아래 고정 */
.sub-header__foot {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
}

/* ── 브레드크럼 ── */

.sub-header__nav .breadcrumb__list {
    /* 부모 기본 0.8125rem(13px). 커스터마이저 '브레드크럼 글자 크기'(:root)보다
       가까운 조상이라 이 값이 이긴다 — 커스터마이저로 돌리려면 이 줄을 지운다 */
    --breadcrumb-font-size: 15px;
    justify-content: flex-start;
}

/* 첫 항목이 아이콘 → 텍스트 */
.breadcrumb__home {
    line-height: 1.4;
}

/* 형제 메뉴 드롭다운 */
.breadcrumb__item--drop {
    position: relative;
}

.breadcrumb__toggle {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    line-height: 1.4;
    cursor: pointer;
}

.breadcrumb__toggle-icon {
    font-size: 0.75em;
    transition: transform 0.2s ease;
}

.breadcrumb__item--drop.is-open .breadcrumb__toggle-icon {
    transform: rotate(180deg);
}

.breadcrumb__drop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 5;
    min-width: 160px;
    margin: 0;
    padding: 8px 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    list-style: none;
    text-align: left;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.breadcrumb__item--drop.is-open .breadcrumb__drop {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* 부모 .breadcrumb__item a 색(흰색)을 이겨야 함 */
.breadcrumb__item .breadcrumb__drop-link {
    display: block;
    padding: 8px 16px;
    color: #555;
    font-weight: 400;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.breadcrumb__item .breadcrumb__drop-link:hover {
    background-color: var(--sub-color03);
    color: var(--main-color);
}

.breadcrumb__drop-item.is-current .breadcrumb__drop-link {
    color: var(--main-color);
}

@media (max-width: 1023px) {
    .sub-header--child {
        padding-top: var(--header-height-sm);
    }
}

@media (max-width: 639px) {
    .breadcrumb__item {
        font-size: 14px;
    }

    .sub-header__nav {
        margin-bottom: 12px;
    }
}
