:root {
    --header-height: 80px;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-red: #F74443;
    --content-width: 1200px;
}

*, *::before, *::after {box-sizing: border-box;}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

/* 언어 변경 시 스크롤 복원 전 콘텐츠 숨김 */
html.is-scroll-restoring body {
    visibility: hidden;
}

body {
    font-family: 'Pretendard', "Noto Sans KR", "Noto Sans JP", Arial, sans-serif;
    margin: 0;
    padding-top: var(--header-height);
    color: #171717;
    background: #fff;
}

body.is-menu-open {
    overflow: hidden;
}

.d-pc {
    display: block;
}

.d-mb {
    display: none;
}

@media (max-width: 767px) {
    .d-pc {
        display: none;
    }

    .d-mb {
        display: block;
    }
}

/* 스크린리더 전용 텍스트 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* PC 고정 헤더 */
.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    background: var(--color-black);
    color: var(--color-white);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(calc(100% - 40px), 1680px);
    height: 100%;
    margin: auto;
}

.site-header-logo {
    width: 200px;
    height: 50px;
}

.site-header-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s;
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: -6px;
    left: 0;
    height: 2px;
    background: currentColor;
    content: "";
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.2s, transform 0.2s;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--color-red);
}

.site-nav a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 0 0 auto;
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 17px;
    font-size: 16px;
    font-weight: 600;
}

.language-switch a {
    color: #A4A4A4;
}

.language-switch a.is-active,
.language-switch a:hover {
    color: var(--color-white);
}

.apply-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 11px 35px;
    color: #171717;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    border: 0;
    background: var(--color-white);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, transform 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .apply-button:hover {
        color: var(--color-white);
        background: var(--color-red);
        transform: translateY(-2px);
    }
}

.mobile-menu-button,
.mobile-menu,
.mobile-menu-backdrop,
.mobile-apply-bar {
    display: none;
}

/* 노트북 */ 
@media (max-width: 1280px) {
    .site-header-logo {
        width: 160px;
        height: 40px;
    }

    .site-nav {
        gap: 30px;
    }

    .site-nav a {
        font-size: 14px;
    }

    .apply-button {
        min-width: 100px;
        padding: 9px 20px;
        font-size: 16px;
    }
}

/* 태블릿 / 모바일: 전체 화면 메뉴 슬라이드 */
@media (max-width: 1023px) {
    :root {
        --header-height: 70px;
    }

    body {
        padding-bottom: 56px;
    }

    .site-nav,
    .language-desktop,
    .apply-desktop {
        display: none;
    }

    .site-header-inner {
        width: calc(100% - 40px);
    }

    .mobile-menu-button {
        display: flex;
        width: 24px;
        height: 24px;
        padding: 0;
        border: 0;
        background: url(../../assets/images/icon/menu.svg) no-repeat center/contain;
        cursor: pointer;
    }

    .mobile-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 110;
        /* width: min(100%, 460px); */
        width: 100%;
        height: 100dvh;
        overflow-y: auto;
        padding: 0 20px;
        background: #000;
        color: var(--color-white);
        transform: translateX(100%);
        visibility: hidden;
        transition: none;
    }

  /* 열릴 때에만 슬라이드 모션 적용. 닫을 때는 즉시 숨김 */
    .mobile-menu.is-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.32s ease;
    }

    .mobile-menu-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        min-height: 70px;
        flex: 0 0 auto;
    }

    .menu-head-actions {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .mobile-menu-close {
        display: flex;
        width: 24px;
        height: 24px;
        padding: 0;
        border: 0;
        background: url(../../assets/images/icon/close.svg) no-repeat center/contain;
        cursor: pointer;
    }

    .mobile-nav-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 40px;
        flex: 1 0;
        padding: 60px 0;
    }

    .mobile-menu-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
    }

    .mobile-menu-nav a {
        display: block;
        color: var(--color-white);
        font-size: 20px;
        font-weight: 600;
        text-decoration: none;
        text-align: center;
    }

    .mobile-menu-nav a.is-active {
        color: var(--color-red);
    }

    .apply-mobile {
        display: flex;
        width: 160px;
        min-height: 46px;
    }

    .mobile-apply-bar {
        display: block;
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 90;
        height: 56px;
        background: #000;
    }
    
    .mobile-apply-bar button {
        width: 100%;
        height: 100%;
        border: 0;
        background: #000;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
    }
}

/* ==========================================================
    Footer
========================================================== */
.site-footer {
    background: #F7F7F8;
}
.site-footer-inner {
    padding: 32px 0;
    width: min(calc(100% - 40px), 1680px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px 10px;
}
.footer-logo-wrap {
    width: 172px;
    height: 42px;
}
.footer-logo-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.copyright {
    font-size: 14px;
    color: #5A5C63;
}
@media (max-width: 767px) {
    .site-footer-inner {
        padding: 28px 0;
    }
    .footer-logo-wrap {
        width: 131px;
        height: 32px;
    }
    .copyright {
        font-size: 11px;
    }
}