/* 헤더 — 기본은 흰 배경. 메인(--overlay)은 맨 위에서 투명, 스크롤·마우스 올림·포커스 시 흰 배경 */
.site-header { --header-fg: var(--color-neutral-7); --logo-white: none; --logo-dark: block; position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--site-header-height); background-color: var(--color-neutral-1); border-bottom: 0.4px solid var(--color-neutral-7); transition: top 1s ease, background-color 0.3s ease, border-color 0.3s ease; }
.site-header--overlay:not(.is-scrolled):not(:hover):not(:focus-within) { --header-fg: var(--color-neutral-1); --logo-white: block; --logo-dark: none; background-color: transparent; border-bottom-color: transparent; }
.site-header.is-hidden { top: -100%; }
body.has-header-overlay { padding-top: 0; }

.site-nav { position: relative; display: flex; align-items: center; justify-content: space-between; height: 100%; padding-inline: var(--size-wrap-padding); }
.site-logo { display: flex; align-items: center; }
.site-logo-img--white { display: var(--logo-white); }
.site-logo-img--dark { display: var(--logo-dark); }
.site-logo-img img { display: block; width: auto; height: 40px; }

.nav-toggle, .nav-backdrop, .nav-menu-top { display: none; }
.nav-menu { position: absolute; top: 0; left: 50%; height: 100%; transform: translateX(-50%); }
.nav-list { display: flex; align-items: center; gap: 36px; height: 100%; }
.nav-item { position: relative; display: flex; align-items: center; height: 100%; }
.nav-link { font-family: var(--font-point); font-size: 20px; font-weight: 500; line-height: 1.4; color: var(--header-fg); white-space: nowrap; transition: color 0.3s ease; }
.nav-item--lang .nav-link { font-size: 14px; }

/* PC 드롭다운 */
.nav-sublist { position: absolute; top: 100%; left: 50%; display: none; flex-direction: column; align-items: center; gap: 12px; width: 140px; padding: 24px 10px; transform: translateX(-50%); background-color: var(--color-bg-2); border: 1px solid var(--color-neutral-2); border-top: 0; }
.nav-item.has-children:hover > .nav-sublist, .nav-item.has-children:focus-within > .nav-sublist { display: flex; }
.nav-sublink { font-family: var(--font-point); font-size: 14px; line-height: 1.4; color: var(--color-neutral-7); white-space: nowrap; }

.site-main { flex: 1 0 auto; }

/* 푸터 */
.site-footer { margin-top: auto; background-color: var(--color-neutral-7); color: var(--color-neutral-1); }
.site-footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; min-height: 320px; padding: 80px var(--size-wrap-padding) 40px; }
.site-footer-info { display: flex; flex-direction: column; gap: 20px; max-width: 420px; }
.site-footer-menu { display: flex; gap: 30px; font-family: var(--font-point); font-size: 15px; font-weight: 500; line-height: 1.4; }
.site-footer-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; font-weight: 300; line-height: 1.6; }
.site-footer-meta-item { display: flex; gap: 4px; }
.site-footer-meta-label { color: var(--color-neutral-3); }
.site-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 13px; font-size: 10px; font-weight: 300; line-height: 1.4; }
.site-footer-links { display: flex; gap: 10px; display: none; }
.site-footer-links a { color: var(--color-neutral-3); }
.site-footer-side { display: flex; flex-direction: column; align-items: flex-end; gap: 46px; }
.site-footer-logo img { display: block; width: auto; height: 60px; }

/* 패밀리 사이트 */
.family-site { position: relative; }
.family-site-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 160px; height: 40px; padding: 0 20px; border: 0.4px solid var(--color-neutral-1); background: none; font-size: 14px; text-transform: uppercase; color: var(--color-neutral-4); cursor: pointer; }
.family-site-btn img { display: block; transform: rotate(90deg); transition: transform 0.3s ease; }
.family-site.is-open .family-site-btn img { transform: rotate(-90deg); }
.family-site-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; display: none; padding: 8px 0; background-color: var(--color-neutral-7); border: 0.4px solid var(--color-neutral-1); border-top: 0; }
.family-site.is-open .family-site-list { display: block; }
.family-site-list a { display: block; padding: 6px 20px; text-align: center; font-size: 13px; color: var(--color-neutral-3); }

/* —— Mobile —— */
@media all and (max-width: 767px) {
    .site-nav { padding: 0 15px 0 16px; }
    .site-logo-img img { height: 24px; }

    .nav-toggle { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
    .nav-toggle-icon { display: block; }
    .nav-toggle-icon--white { display: var(--logo-white); }
    .nav-toggle-icon--dark { display: var(--logo-dark); }

    /* 사이드 메뉴 — 전체 화면 */
    .nav-menu { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; transform: none; background-color: var(--color-neutral-1); opacity: 0; visibility: hidden; overflow-y: auto; transition: opacity 0.3s ease, visibility 0.3s ease; }
    .nav-menu.is-open { opacity: 1; visibility: visible; }
    .nav-menu-top { display: block; position: absolute; top: 0; left: 0; right: 0; height: 60px; }
    .nav-close { position: absolute; top: 18px; right: 15px; width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
    .nav-close img { display: block; }
    body.nav-open { overflow: hidden; }

    .nav-list { flex-direction: column; align-items: stretch; gap: 0; width: 343px; max-width: calc(100% - 32px); height: auto; margin: 0 auto; }
    .nav-item { flex-direction: column; align-items: stretch; height: auto; }
    .nav-link { display: flex; align-items: center; justify-content: center; height: 58px; font-size: 24px; font-weight: 400; color: var(--color-neutral-8); }
    .nav-sublist, .nav-item.has-children:hover > .nav-sublist, .nav-item.has-children:focus-within > .nav-sublist { position: static; display: flex; gap: 0; width: 100%; padding: 0; transform: none; background: none; border: 0; }
    .nav-sublink { display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; font-size: 16px; color: var(--color-neutral-5); }

    .site-footer-inner { flex-direction: column; justify-content: flex-start; gap: 0; min-height: 400px; padding: 60px 16px; }
    .site-footer-side { display: contents; }
    .site-footer-logo { order: -1; margin-bottom: 40px; }
    .site-footer-logo img { height: 48px; }
    .site-footer-info { max-width: none; }
    .site-footer-menu { gap: 24px; font-size: 14px; }
    .site-footer-meta { font-size: 11px; }
    .site-footer-bottom { margin-top: 0; }
    .family-site { order: 1; margin-top: 20px; }
    .family-site-btn { width: auto; height: 34px; padding: 0 16px; font-size: 12px; }
    .family-site-list{padding: 0; }
}
