:root {
    --headerHeight: 7rem;
}

#header {
    --GNBmarginX: 37.5rem;
    width: 100%;
    height: var(--headerHeight);
    background-color: #fff;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 16px 0 rgba(0, 0, 0, 0.04);
    padding: 0 5rem;
    position: fixed;
    top: var(--bannerHeight, 0px);
    transition: 0.2s ease-in-out;
    z-index: 999;
}
#header a {
    z-index: 2;
    position: relative;
    display: flex;

    &[data-env]::after {
        content: attr(data-env);
        position: absolute;
        bottom: 0;
        right: 0;
        display: block;
        width: 36px;
        line-height: 18px;
        transform: translateX(calc(100% + 5px));
        font-weight: 700;
        font-size: 10px;
        text-align: center;
        color: #fff;
        border-radius: 9px 9px 9px 0;
    }

    &[data-env='DEV']::after {background-color: #22b57d;}
}
#header nav {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    padding: 0 5rem;
    z-index: 1;
}
#header nav::before {
    /* GNB 가운데 정렬을 위한 요소 */
    content: "";
    flex: 1 1 var(--GNBmarginX);
}

#gnb {
    display: flex;
    flex-grow: 1;
    height: 100%;
    justify-content: center;
    align-items: center;
    min-width: 54rem;
    margin: 0 auto;
}
#gnb:has(.active)::before {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: calc(100dvh - var(--headerHeight) - var(--bannerHeight, 0px));
    background-color: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}
#gnb li {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
}
#gnb li .menu {
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
    color: #121212;
}
#gnb li .menu.curPage, #gnb li .menu:hover {
    font-weight: 700;
    color: #006ffb;
}
#gnb li .drop-down {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 0;
    top: var(--headerHeight);
    width: 100%;
    background: #fff;
}
#gnb li .drop-down .drop-down-container {
    width: calc(100% - 40px);
    max-width: 120rem;
    height: 35rem;
    margin: 0 auto;
    display: flex;
    padding: 4rem 0;
    /* 고객지원 ,이용사례 */
}
#gnb li .drop-down .drop-down-container span {
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
    color: #5a6e81;
}
#gnb li .drop-down .drop-down-container .menu-list {
    display: flex;
    flex-direction: column;
    margin-right: 2.35rem;
    flex-basis: 28rem;
}
#gnb li .drop-down .drop-down-container .menu-list:nth-child(2) {
    flex-grow: 1;
    margin-right: 8.55rem;
}
#gnb li .drop-down .drop-down-container .menu-list div {
    display: flex;
    height: 23rem;
    flex-direction: column;
    flex-wrap: wrap;
    row-gap: 3rem;
    margin-top: 2rem;
    padding-top: 3rem;
    border-top: solid 1px #e5e8eb;
}
#gnb li .drop-down .drop-down-container .menu-list a {
    font-weight: 500;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
    color: #121212;
    display: block;
    width: 25rem;
    height: 20px;
    padding-left: 3.75rem;
    background: left no-repeat;
}
#gnb li .drop-down .drop-down-container .menu-list a.taxinvoice {
    background-image: url("/images/_layouts/header/ic_taxinvoice.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.cashreceipt {
    background-image: url("/images/_layouts/header/ic_cashreceipt.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.ntscrawling {
    background-image: url("/images/_layouts/header/ic_ntscrawling.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.companystatus {
    background-image: url("/images/_layouts/header/ic_companystatus.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.accounttransaction {
    background-image: url("/images/_layouts/header/ic_accounttransaction.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.accountholder {
    background-image: url("/images/_layouts/header/ic_accountholder.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.companyinfo {
    background-image: url("/images/_layouts/header/ic_companyinfo.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.invoice {
    background-image: url("/images/_layouts/header/ic_invoice.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.kakaotalk {
    background-image: url("/images/_layouts/header/ic_kakaotalk.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.textmessage {
    background-image: url("/images/_layouts/header/ic_textmessage.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.fax {
    background-image: url("/images/_layouts/header/ic_fax.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.notice {
    background-image: url("/images/_layouts/header/ic_notice.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.inquiry {
    background-image: url("/images/_layouts/header/ic_inquiry.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.faq {
    background-image: url("/images/_layouts/header/ic_faq.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.download {
    background-image: url("/images/_layouts/header/ic_download.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.customer {
    background-image: url("/images/_layouts/header/ic_customer.svg");
}
#gnb li .drop-down .drop-down-container .menu-list a.review {
    background-image: url("/images/_layouts/header/ic_review.svg");
}
#gnb li .drop-down .drop-down-container .side-menu {
    margin-left: auto;
    display: flex;
    flex: 0 0 22rem;
    flex-direction: column;
}
#gnb li .drop-down .drop-down-container .side-menu span {
    height: 11rem;
    background: url("/images/_layouts/header/sidebar_bg1.webp") bottom/contain no-repeat;
}
#gnb li .drop-down .drop-down-container .side-menu span.dev {
    background-image: url("/images/_layouts/header/sidebar_bg2.webp");
}
#gnb li .drop-down .drop-down-container .side-menu a {
    margin-top: 1.2rem;
    flex-direction: column;
}
#gnb li .drop-down .drop-down-container .side-menu b {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: #121212;
    margin-bottom: 0.5rem;
    display: block;
}
#gnb li .drop-down .drop-down-container .side-menu p {
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1.5;
    letter-spacing: -0.03em;
    color: #5a6e81;
    margin-bottom: 1rem;
}
#gnb li .drop-down .drop-down-container:has(.side-menu:nth-child(2)) .menu-list {
    flex-grow: 1;
}
#gnb li .drop-down .drop-down-container:has(.side-menu:nth-child(2)) .menu-list div {
    flex-direction: row;
    height: auto;
    margin-right: 6.2rem;
    row-gap: 3rem;
}
#gnb li .drop-down .bar {
    border-top: solid 1px #e7ebf5;
    height: 5rem;
    background-color: #f5f7fa;
}
#gnb li .drop-down .bar div {
    width: calc(100% - 40px);
    max-width: 120rem;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}
#gnb li .drop-down .bar span {
    font-weight: 500;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: #5a6e81;
}
#gnb li .drop-down .bar span ~ span {
    margin-left: 1.6rem;
    padding-left: 1.7rem;
    position: relative;
}
#gnb li .drop-down .bar span ~ span::before {
    content: "";
    display: block;
    width: 1px;
    height: 1rem;
    background: #e5e8eb;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}
#gnb li.active .menu {
    font-weight: 700;
    color: #006ffb;
}
#gnb li.active .drop-down {
    opacity: 1;
    visibility: visible;
}

#sub-navi {
    display: none;
}

#gnb-right-section {
    flex: 1 1 var(--GNBmarginX);
    display: flex;
    justify-content: end;
    align-items: center;
    height: 100%;
    padding-right: 10rem;
}
#gnb-right-section a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 8rem;
    height: 3.6rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.4rem;
    padding-bottom: 0.2rem;
}
#gnb-right-section #sign-in {
    background: #006ffb;
    color: #fff;
    margin-right: 1rem;
}
#gnb-right-section #sign-up {
    background: #e6ebef;
    color: #283b5b;
}

#person-info[data-person-name=""] {
    display: none;
}
#person-info {
    display: flex;
    justify-content: end;
    align-items: center;
    height: 100%;
    flex: 1 1 var(--GNBmarginX);
    min-width: 0;
}
#person-info div {
    display: flex;
    align-items: center;
    margin-right: 2rem;
    min-width: 0;
}
#person-info div p {
    height: 2.2rem;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    line-height: 2rem;
    color: #333;
    background: url("/images/_layouts/header/ic_torso.svg") left top 1px no-repeat;
    padding-left: 2.4rem;
    display: flex;
    gap: 0.3rem;
    min-width: 0;
}
#person-info div p b {
    color: #0076ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#person-info div a {
    display: block;
    height: 2.2rem;
    position: relative;
    font-weight: 500;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    line-height: 2rem;
    color: #3f5168;
    padding-left: 1.1rem;
    margin-left: 1rem;
}
#person-info div a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 1px;
    height: 1.2rem;
    background: #dedede;

}
#person-info > a {
    margin-right: 10rem;
    flex: 0 0 8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.4rem;
    padding-bottom: 0.2rem;
    background: #006ffb;
    color: #fff;
}

#language-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 5rem;
    z-index: 2;
}
#language-btn:has(.hidden) {
    overflow: hidden;
}

#language-switcher {
    height: 100%;
    padding-left: 2rem;
    font-weight: 500;
    font-size: 1.4rem;
    padding-right: 1.4rem;
    position: relative;
    z-index: 2;
    background: url("/images/_layouts/header/ic_global.svg") left center no-repeat, url("/images/_layouts/header/ic_up.svg") right center no-repeat #fff;
    transition: background 0.2s;
}
#language-switcher:has(+ .hidden) {
    background-image: url("/images/_layouts/header/ic_global.svg"), url("/images/_layouts/header/ic_down.svg");
}

#language-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: -4px;
    height: 3.9rem;
    background: #fff;
    z-index: 3;
    border: solid 1px #c8cdd4;
    border-radius: 10px;
    box-shadow: 0 3px 6px 0 rgba(10, 83, 137, 0.16);
    transition: height 0.3s ease-in-out;
    overflow: hidden;
}
#language-menu li {
    margin: 1rem 0;
    padding: 0 2rem;
    font-weight: 500;
    font-size: 1.4rem;
    color: #adb4be;
}
#language-menu li ~ li {
    margin-top: 0.5rem;
}
#language-menu li.active {
    color: #000;
}
#language-menu.hidden {
    height: 0;
}

#hamburger-btn {
    display: none;
}

@media (max-width: 1350px) {
    #header,
    #header nav {
        padding: 0 2rem;
    }
    #language-btn {
        right: 2rem;
    }
}
@media (max-width: 1300px) {
    #header nav {
        overflow-y: scroll;
        background: #fff;
        top: var(--headerHeight);
        min-height: calc(100dvh - var(--bannerHeight, 0px) - var(--headerHeight));
        flex-direction: column;
        justify-content: stretch;
        padding: 0 0 10.8rem;
        border-top: solid 1px #d4def2;
        right: unset;
        left: 100%;
        transition: left 0.2s ease-out;
    }
    #header nav:has(#gnb.shown) {
        left: 0;
    }
    #header nav:has(#gnb.shown)::before {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        z-index: 1;
        background-color: rgba(0, 0, 0, 0.5);
        -webkit-backdrop-filter: blur(1px);
        backdrop-filter: blur(1px);
    }
    #gnb {
        order: 1;
        flex-grow: unset;
        height: auto;
        display: none;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        background: #fff;
        max-width: unset;
        min-width: unset;
        gap: 0;
        position: relative;
        z-index: 2;
        margin: 0;
    }
    #gnb:has(.active)::before {
        content: none;
    }
    #gnb.shown {
        display: flex;
    }
    #gnb li {
        height: 66px;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }
    #gnb li:has(.drop-down) {
        background: url("/images/_layouts/header/ic_drop-down.svg") right 2rem top calc(3.3rem - 3px) no-repeat;
    }
    #gnb li:has(.drop-down).active {
        background-image: url("/images/_layouts/header/ic_drop-up.svg");
    }
    #gnb li .menu {
        font-weight: 700;
        color: #121212;
        line-height: 6.6rem;
        padding-left: 2rem;
        align-self: stretch;
        border-bottom: solid 1px #d4def2;
    }
    #gnb li .menu:hover, #gnb li .menu.curPage {
        color: #121212;
    }
    #gnb li .drop-down {
        position: relative;
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.2s ease-out;
    }
    #gnb li .drop-down .drop-down-container {
        width: 100%;
        max-width: unset;
        flex-direction: column;
        overflow: hidden;
        border-bottom: solid 1px #d4def2;
        background: #f9fafc;
        height: auto;
        padding: 0 2rem;
        /* 고객지원 ,이용사례 */
    }
    #gnb li .drop-down .drop-down-container span {
        color: #768393;
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }
    #gnb li .drop-down .drop-down-container .menu-list {
        margin-bottom: 3rem;
        margin-right: 0;
        flex-basis: auto;
    }
    #gnb li .drop-down .drop-down-container .menu-list:first-child {
        margin-top: 3rem;
    }
    #gnb li .drop-down .drop-down-container .menu-list:nth-child(2) {
        margin-right: 0;
    }
    #gnb li .drop-down .drop-down-container .menu-list div {
        height: auto;
        flex-direction: row;
        margin-top: 0;
        border-top: 0;
        padding-top: 0;
        padding-right: 0;
    }
    #gnb li .drop-down .drop-down-container .menu-list div a {
        width: auto;
        flex: 0 0 20rem;
    }
    #gnb li .drop-down .drop-down-container:has(.side-menu:nth-child(2)) .menu-list div {
        margin-right: 0;
        row-gap: 2.5rem;
    }
    #gnb li .drop-down .drop-down-container:has(.side-menu:nth-child(2)) span {
        display: none;
    }
    #gnb li .drop-down .drop-down-container .side-menu {
        display: none;
    }
    #gnb li .drop-down .bar {
        display: none;
    }
    #gnb li.active {
        height: auto;
    }
    #gnb li.active .menu {
        color: #121212;
    }
    #gnb li.active .drop-down {
        grid-template-rows: 1fr;
        top: unset;
    }
    #sub-navi {
        order: 2;
        margin-top: 3rem;
        padding: 0 2rem;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1rem;
        font-weight: 500;
        font-size: 1.5rem;
        letter-spacing: -0.04em;
        color: #768393;
    }
    #sub-navi a:hover {
        transition: color 0.2s;
        color: #121212;
    }
    #gnb-right-section {
        justify-content: space-between;
        padding: 0 1.6rem;
        background: #f1f4f7;
        position: fixed;
        bottom: 1rem;
        left: 1rem;
        width: calc(100dvw - 2rem);
        height: 7.8rem;
        border: solid 1rem #fff;
        border-radius: 1.5rem;
        z-index: 2;
        transform: translateY(100%);
        background-clip: padding-box;
    }
    #gnb-right-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: -2rem;
        display: block;
        width: 100dvw;
        height: 3rem;
        transform: translateY(-100%);
        background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,1) 2rem, rgba(255,255,255,1));
    }
    #gnb-right-section::after {
        content: '';
        position: absolute;
        top: -1rem;
        left: -2rem;
        display: block;
        width: 100dvw;
        border: solid 2rem #fff;
        border-top-width: 1rem;
        box-sizing: border-box;
        height: 8.8rem;
        pointer-events: none;
    }
    #gnb.shown ~ #gnb-right-section {
        transition: transform 0.2s 0.2s ease-in-out;
        transform: translateY(0);
    }
    #gnb-right-section a {
        border-radius: unset;
        padding-bottom: 0.2rem;
        width: auto;
        height: 2rem;
    }
    #gnb-right-section #sign-in {
        gap: 3px;
        margin-right: 0;
        color: #0076ff;
        letter-spacing: -0.03em;
        padding-right: 2.6rem;
        background: url("/images/_layouts/header/ic_link.svg") right/contain no-repeat transparent;
    }
    #gnb-right-section #sign-in::after {
        content: '후 이용해 주세요';
        color: #121212;
    }
    #gnb-right-section #sign-up {
        color: #768393;
        background: unset;
    }
    #person-info {
        justify-content: space-between;
        padding: 0 1.6rem;
        background: #fff;
        border-top: solid 1px #d4def2;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        box-shadow: 0 -4px 16px 0 rgb(53 57 75 / 10%);
        position: fixed;
        bottom: 0;
        left: 0;
        width: inherit;
        height: 5.8rem;
        z-index: 2;
        transform: translateY(100%);
    }
    #gnb.shown ~ #person-info {
        transition: transform 0.2s 0.2s ease-in-out;
        transform: translateY(0);
    }
    #person-info div {
        max-width: unset;
    }
    #person-info div p b {
        max-width: unset;
    }
    #person-info > a {
        flex: 0 0 10rem;
        margin-right: 0;
        gap: 0.5rem;
        height: 3.8rem;
        letter-spacing: -0.03em;
    }
    #person-info > a::after {
        content: '>';
    }
    #language-btn {
        order: 3;
        margin-top: 2.5rem;
        padding: 0 2rem;
        position: relative;
        top: unset;
        right: unset;
        transform: unset;
        margin-bottom: 5rem;
        display: none; /* 영문화하면 제거 필요함. */
    }
    #language-btn:has(.hidden) {
        overflow: unset;
    }
    #language-switcher {
        display: none;
    }
    #language-menu {
        position: static;
        background: none;
        z-index: unset;
        border: 0;
        border-radius: unset;
        box-shadow: unset;
        overflow: unset;
        transition: none;
        height: auto;
        display: flex;
    }
    #language-menu.hidden {
        height: unset;
    }
    #language-menu li {
        color: #c8cdd4;
        margin-top: 0;
        padding: 0;
    }
    #language-menu li ~ li {
        margin-top: 0;
        margin-bottom: 0;
        margin-left: 1.5rem;
        padding-left: 1.6rem;
        background: url("/images/_layouts/header/ic_split.svg") left center no-repeat;
    }
    #hamburger-btn {
        display: block;
        z-index: 2;
        margin-left: auto;
        width: 24px;
        height: 24px;
        background: url("/images/_layouts/header/ic_hamburger-btn.svg") no-repeat;
    }
}
@media (max-width: 480px) {
    #header {
        padding: 0 16px;
    }
    #gnb li:has(.drop-down) {
        background-position: right 16px top calc(3.3rem - 3px);
    }
    #gnb li .menu {
        padding-left: 16px;
    }
}