/* =========================================================
   상단 헤더 · 메뉴바 (모든 페이지) - 2026.11 리뉴얼
   - 메뉴 동작(common.js header · m_nav)은 그대로, 모양만 바꿈
   ========================================================= */

/* ---------- 헤더 바탕 ---------- */
#header { transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease; }
body[role=sub] #header { border-bottom-color: #ececec; }
#header.fixed,
body[role=sub] #header.fixed { border-bottom-color: transparent; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
#header.show { border-bottom-color: #ececec; box-shadow: 0 24px 48px -12px rgba(0,0,0,.14); }

/* ---------- PC 메뉴 ---------- */
@media (min-width: 1025px) {
    #gnb > ul > li > a {
        position: relative;
        display: inline-block;
        padding: 32px 0;
        font-size: 19px;
        font-weight: 500;
        letter-spacing: -.02em;
        transition: color .25s ease;
    }
    /* 금색 밑줄 (마우스 · 현재 메뉴) */
    #gnb > ul > li > a:after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 22px;
        height: 2px;
        background: #9e8621;
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform .3s ease;
    }
    #gnb > ul > li:hover > a:after,
    #gnb > ul > li.is_cur > a:after { transform: scaleX(1); }
    #header.show #gnb > ul > li:hover > a,
    body[role=sub] #gnb > ul > li:hover > a,
    #header.fixed #gnb > ul > li:hover > a,
    body[role=sub] #gnb > ul > li.is_cur > a,
    #header.fixed #gnb > ul > li.is_cur > a,
    #header.show #gnb > ul > li.is_cur > a { color: #9e8621; }

    /* 펼친 하위 메뉴: 칸마다 가는 세로선 */
    #gnb > ul > li > .depth { position: relative; padding-top: 18px; padding-bottom: 56px; }
    #gnb > ul > li + li > .depth:before { content: ""; position: absolute; left: -24px; top: 0; bottom: 34px; width: 1px; background: #f0f0f0; }
    #gnb > ul > li > .depth ul li { padding: 0; }
    #gnb > ul > li > .depth ul li + li { margin-top: 2px; }
    #gnb > ul > li > .depth ul li a {
        position: relative;
        display: inline-block;
        padding: 7px 0;
        font-size: 15px;
        line-height: 1.4;
        color: #777;
        transition: color .2s ease, transform .2s ease;
    }
    #gnb > ul > li > .depth ul li a:before {
        content: "";
        position: absolute;
        left: -12px;
        top: 50%;
        width: 5px;
        height: 1px;
        background: #9e8621;
        opacity: 0;
        transition: opacity .2s ease, left .2s ease;
    }
    #gnb > ul > li > .depth ul li a:hover { color: #9e8621; transform: translateX(6px); }
    #gnb > ul > li > .depth ul li a:hover:before { left: -10px; opacity: 1; }
    #gnb > ul > li > .depth ul li a.is_cur { color: #9e8621; font-weight: 600; }

    /* 펼친 메뉴 아래쪽 띠 (회사 톤) */
    #header.show:after { height: 100%; background: #fff; }
    #header.show .header_btm:before {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 100vw;
        height: 3px;
        margin-left: -50vw;
        background: linear-gradient(90deg, rgba(158,134,33,0) 0%, rgba(158,134,33,.5) 50%, rgba(158,134,33,0) 100%);
        pointer-events: none;
    }
    /* 헤더 아래 구분선 위치 보정 */
    #header:before { background: #f0f0f0; }
}

/* ---------- 모바일 메뉴 버튼 (이미지 대신 세 줄 아이콘) ---------- */
@media (max-width: 1024px) {
    .mobile_btn a,
    body[role=sub] .mobile_btn a,
    #header.fixed .mobile_btn a {
        width: 28px;
        height: 22px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 22' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M2 3h24M2 11h24M9 19h17'/%3E%3C/svg%3E") center / contain no-repeat !important;
    }
    body[role=sub] .mobile_btn a,
    #header.fixed .mobile_btn a {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 22' fill='none' stroke='%23333' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M2 3h24M2 11h24M9 19h17'/%3E%3C/svg%3E") !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    #gnb *, #gnb *:before, #gnb *:after { transition: none !important; }
}

/* =========================================================
   로그인 · 회원가입 · 언어 변경: 테두리 알약 대신 메뉴와 같은 담백한 글자 링크
   ========================================================= */
#header .header_top .util_menu ul li + li { position: relative; margin-left: 0; padding-left: 0; }
#header .header_top .util_menu ul li + li:before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 10px;
    margin: -5px 0 0;
    background: rgba(255,255,255,.4);
}
#header .header_top .util_menu ul li a,
#header .header_top .util_menu ul li a.is_pill {
    position: relative;
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,.85);
}
#header .header_top .util_menu ul li a svg { width: 13px; height: 13px; opacity: .7; }
#header .header_top .util_menu ul li a:after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 3px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform .25s ease;
}
#header .header_top .util_menu ul li a:hover,
#header .header_top .util_menu ul li a.is_pill:hover { background: none; border: 0; box-shadow: none; color: #fff; }
#header .header_top .util_menu ul li a:hover:after { transform: scaleX(1); }

body[role=sub] #header .header_top .util_menu ul li + li:before,
#header.fixed .header_top .util_menu ul li + li:before,
#header.show .header_top .util_menu ul li + li:before { background: #ddd; }
body[role=sub] #header .header_top .util_menu ul li a,
#header.fixed .header_top .util_menu ul li a,
#header.show .header_top .util_menu ul li a,
body[role=sub] #header .header_top .util_menu ul li a.is_pill,
#header.fixed .header_top .util_menu ul li a.is_pill,
#header.show .header_top .util_menu ul li a.is_pill { border: 0; background: none; color: #777; }
body[role=sub] #header .header_top .util_menu ul li a:hover,
#header.fixed .header_top .util_menu ul li a:hover,
#header.show .header_top .util_menu ul li a:hover,
body[role=sub] #header .header_top .util_menu ul li a.is_pill:hover,
#header.fixed .header_top .util_menu ul li a.is_pill:hover,
#header.show .header_top .util_menu ul li a.is_pill:hover { border: 0; background: none; box-shadow: none; color: #9e8621; }

/* 언어 변경도 같은 글자 버튼으로 */
#header .lang .btn-lang {
    height: 28px;
    padding: 0 22px 0 8px;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    color: rgba(255,255,255,.85);
}
#header .lang .btn-lang .lang_ico { width: 13px; height: 13px; opacity: .7; }
#header .lang .btn-lang::after { right: 8px; width: 5px; height: 5px; border-right-width: 1px; border-bottom-width: 1px; }
#header .lang .btn-lang:hover { background: none; color: #fff; }
body[role=sub] #header .lang .btn-lang,
#header.fixed .lang .btn-lang,
#header.show .lang .btn-lang { border: 0; background: none; color: #777; }
body[role=sub] #header .lang .btn-lang:hover,
#header.fixed .lang .btn-lang:hover,
#header.show .lang .btn-lang:hover { border: 0; background: none; color: #9e8621; }
body[role=sub] #header .lang .btn-lang .lang_ico,
#header.fixed .lang .btn-lang .lang_ico,
#header.show .lang .btn-lang .lang_ico { color: inherit; opacity: .7; }
#header .lang .lang-list { border-radius: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
#header .lang .lang-list li a { border-radius: 2px; }

/* 메뉴를 펼칠 때 생기던 가로줄 없애기 (헤더 아래 구분선 · 금색 선) */
#header.show:before,
#header:before { display: none; }
#header.show .header_btm:before { display: none; }
#header.show { border-bottom-color: transparent; }

/* 언어 선택을 로그인 · 회원가입 바로 옆으로 (예전: 화면 오른쪽 끝 구석) */
@media (min-width: 1025px) {
    #header .header_top { display: flex; align-items: center; justify-content: flex-end; }
    #header .header_top .lang {
        position: relative;
        top: auto;
        right: auto;
        width: auto;
        margin: -7px 0 -7px 0;
        padding-left: 1px;
    }
    #header .header_top .lang:before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 10px;
        margin-top: -5px;
        background: rgba(255,255,255,.4);
    }
    body[role=sub] #header .header_top .lang:before,
    #header.fixed .header_top .lang:before,
    #header.show .header_top .lang:before { background: #ddd; }
    #header .header_top .lang .btn-lang { padding-left: 12px; }
    #header .header_top .lang .lang-list { z-index: 5; }
}

/* 언어 목록이 아래 메뉴(고객센터)에 가려 눌리지 않던 문제:
   윗줄(로그인 · 언어)을 메뉴줄보다 위에 쌓고, 펼친 목록은 메뉴 위로 */
@media (min-width: 1025px) {
    #header .header_top { position: relative; z-index: 5; }
    #header .header_btm { z-index: 2; }
    #header .header_top .lang .lang-list { z-index: 20; }
}

/* 로그인 · 회원가입 · 언어 버튼 조금 크게 (글자 13→14 · 언어 12→13 · 아이콘 13→15) */
@media (min-width: 1025px) {
    #header .header_top .util_menu ul li a,
    #header .header_top .util_menu ul li a.is_pill { height: 32px; padding: 0 13px; gap: 6px; font-size: 14px; }
    #header .header_top .util_menu ul li a svg { width: 15px; height: 15px; }
    #header .header_top .util_menu ul li a:after { left: 13px; right: 13px; }
    #header .header_top .util_menu ul li + li:before { height: 12px; margin-top: -6px; }
    #header .lang .btn-lang { height: 32px; padding-right: 24px; font-size: 13px; }
    #header .lang .btn-lang .lang_ico { width: 15px; height: 15px; }
    #header .lang .btn-lang::after { width: 6px; height: 6px; }
    #header .header_top .lang:before { height: 12px; margin-top: -6px; }
    #header .lang .lang-list li a { font-size: 13px; }
}
