/* ==================================== 헤더 (PC) ==================================== */
header {
    position: sticky;
    top: 0;
    z-index: 99;
}

#header_wrap {
    /* box-shadow: 0px 6px 6px 0px #0000000A; */
    background: #fff;
    border-bottom: 1px solid #E6EAEC;
}

.header_area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    gap: 24px;
}

/* 로고 */
.h_logo {
    flex-shrink: 0;
    display: flex;
    width: 122px;
}


/* GNB */
.gnb {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.gnb_dim {
    display: none;
}

.gnb_inner {
    display: flex;
    align-items: center;
    gap: 46px;
}

.gnb_head {
    display: none;
}

.gnb_menu {
    /* order: 1; */
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.gnb_menu li.is_mobile {
    display: none;
}

.gnb_menu a {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    transition: background 0.2s;
}

.gnb_menu a:hover {
    background: #f5f5f5;
}

.gnb_auth {
    /* order: 2; */
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn_logout {
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
}

.btn_auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 100px;
    background: linear-gradient(166deg, #2b2420 0%, #191310 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

/* 햄버거 (PC 숨김) */
.gnb_toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #222;
    font-size: 26px;
    cursor: pointer;
}

body.scroll-lock {
    overflow: hidden;
}

/* ==================================== 헤더 (모바일 / 태블릿) ==================================== */
@media screen and (max-width: 1023px) {
    .header_area {
        height: 56px;
    }


    /* 햄버거 노출 */
    .gnb_toggle {
        display: flex;
    }

    /* GNB → 전체화면 오버레이 + 우측 슬라이드 드로어 */
    .gnb {
        position: fixed;
        inset: 0;
        z-index: 600;
        display: block;
        visibility: hidden;
        transition: visibility 0.3s;
    }

    .gnb.active {
        visibility: visible;
    }

    .gnb_dim {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .gnb.active .gnb_dim {
        opacity: 1;
    }

    /* 슬라이드 패널 (오른쪽 → 왼쪽) */
    .gnb_inner {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 340px;
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        background: #fff;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .gnb.active .gnb_inner {
        transform: translateX(0);
    }

    /* 드로어 상단 닫기 */
    .gnb_head {
        /* order: 1; */
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 9px 16px;
        background-color: #fff;
        position: sticky;
        top: 0;
    }

    .gnb_close {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #222;
        font-size: 26px;
        cursor: pointer;
    }

    .gnb_auth {
        width: 100%;
        margin-top: auto;
        padding: 24px 16px;
        flex-direction: column;
    }

    .btn_logout {
        color: var(--error-color);
    }

    .btn_auth {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .btn_auth.is_pc {
        display: none;
    }

    /* 메뉴 : 세로 나열 */
    .gnb_menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        width: 100%;
        padding: 12px 16px;
    }

    .gnb_menu li.is_mobile {
        display: block;
    }

    .gnb_menu a {
        padding: 14px 12px;
        border-radius: 8px;
        font-size: 16px;
    }

    .gnb_menu a:hover {
        background-color: transparent;
    }

    /* 2depth : 부모 토글 */
    .gnb_dep_toggle {
        justify-content: space-between;
    }

    .gnb_dep_toggle i {
        font-size: 20px;
        color: #9aa1ac;
        transition: transform 0.25s;
    }

    .gnb_dep_item.open>.gnb_dep_toggle i {
        transform: rotate(180deg);
    }

    /* 2depth : 하위 목록 (접힘 → 펼침) */
    .gnb_dep {
        list-style: none;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.25s ease;
    }

    .gnb_dep_item.open>.gnb_dep {
        max-height: 400px;
    }

    .gnb_dep a {
        padding: 12px 12px 12px 24px;
        font-size: 15px;
        color: #5e5e5e;
    }
}