/* 오버레이 z-index가 999999인 상황 가정 */

/* 메뉴가 열렸을 때 헤더를 오버레이 위로 올림 */
body.menu-open #header {
    position: fixed;
    /* 이미 쓰는 값이면 유지 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000000;
    /* 오버레이 위에 보이게 */
    overflow: visible;
    pointer-events: none;
    /* 헤더 전체 클릭 차단 → 닫기 버튼이 눌림 */
}

/* 로고 자체는 필요 시 위치/클릭 보장 */
body.menu-open #header .logo {
    position: relative;
    /* z-index가 먹도록 */
    z-index: 100000001;
    /* 선택 사항: 헤더보다 한 단계 더 */
}
/* 메뉴 열렸을 때 nav/util만 숨김 */
body.menu-open #header .header_flex .nav,
body.menu-open #header .header_flex .util {
    visibility: hidden;
    /* 공간은 유지, 화면에만 안 보이게 */
    opacity: 0;
    /* 부드럽게 사라지는 느낌 원하면 트랜지션 추가 가능 */
    pointer-events: none;
    /* 클릭/포커스 차단 */
}

/* (선택) 부드러운 전환 원하면 */
#header .header_flex .nav,
#header .header_flex .util {
    transition: opacity 0.28s ease;
}

/* 전체 화면 배경(오버레이) */
.fx-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* inset 호환 대체 */
    z-index: 999999;
    background: rgba(0,0,0, 1);

    /* 펼쳐놓기 */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.56s cubic-bezier(.22,.61,.36,1), visibility 0s linear 0.36s;
}
.fx-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.36s cubic-bezier(.22,.61,.36,1), visibility 0s;
}

/* 중앙 정렬 셸 */
.fx-shell {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
}

/* GNB 기본 */
.fx-gnb {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fx-gnb li {
    margin: 12px 0;
}
.fx-gnb li a {
    color: #fff;
    text-decoration: none;
    font-size: 41px;
    font-weight: 900;
    display: block;
    line-height: 60px;

}

/* 닫기 버튼 */
.fx-close {
    position: absolute;
    top: 25px;
    right: 40px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    z-index: 1000000011;
    /* 헤더보다 위 */
}

/* 햄버거 버튼 */
.fx-hamburger {
    position: relative;

    z-index: 2100;
    width: 38px;
    height: 30px;
    padding: 6px;
    border: 0;
    background: none;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}
.fx-hamburger span {
    height: 3px;
    background: #0e4294;
    border-radius: 3px;
    transition: background-color 0.2s;
}
#header .header_flex .util .flex .login.active .fx-hamburger span {
    background: #000;
}
/* 오버레이 열렸을 때 햄버거 색상 반전 */
body.menu-open .fx-hamburger span {
    background: #fff;
}

/* 대메뉴 플립 효과 */
.fx-link.flip-animate {
    perspective: 1000px;
    display: inline-block;
}
.fx-link.flip-animate span {
    position: relative;
    display: block;
    transition: transform 0.3s;
    line-height: inherit;
    transform-origin: 50% 0;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}
.fx-link.flip-animate span:before {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    content: attr(data-hover);
    transform: rotateX(-90deg);
    transform-origin: 50% 0;
    text-align: left;
    transition: color 0.3s;
    color: #000;
    display: inline-block;
    box-sizing: border-box;
}
.fx-link.flip-animate:focus span,
.fx-link.flip-animate:hover span {
    transform: rotateX(90deg) translateY(-0.6em);
}
.fx-link.flip-animate:focus span:before,
.fx-link.flip-animate:hover span:before {
    color: #9980e1;
}

/* 애니메이션 */
.fx-reveal {
    position: relative;
    overflow: hidden;
    clip-path: inset(100% 0 0 0);
    will-change: clip-path;
}

body.menu-open .fx-reveal {
    animation: fxMaskUp 0.68s cubic-bezier(.22,.61,.36,1) forwards;
}

@keyframes fxMaskUp {
    from {
        clip-path: inset(100% 0 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.fx-gnb .fx-depth1 {
    transform: translateY(24px);
    will-change: transform;
}

body.menu-open .fx-gnb .fx-depth1 {
    animation: fxRise 0.64s cubic-bezier(.22,.61,.36,1) forwards;
}
body.menu-open .fx-gnb .fx-depth1:nth-child(1) {
    animation-delay: 0.02s;
}
body.menu-open .fx-gnb .fx-depth1:nth-child(2) {
    animation-delay: 0.06s;
}
body.menu-open .fx-gnb .fx-depth1:nth-child(3) {
    animation-delay: 0.10s;
}
body.menu-open .fx-gnb .fx-depth1:nth-child(4) {
    animation-delay: 0.14s;
}
body.menu-open .fx-gnb .fx-depth1:nth-child(5) {
    animation-delay: 0.18s;
}
/* 더 있으면 계속 추가 */

@keyframes fxRise {
    from {
        transform: translateY(24px);
    }
    to {
        transform: translateY(0);
    }
}

/* .fx-gnb .fx-depth1 > .fx-link{ display:inline-block; position:relative; overflow:hidden; line-height:1.2; height:1.2em; } */
.fx-gnb .fx-depth1 > .fx-link {
    display: inline-block;
    position: relative;
    overflow: hidden;
}

/* 카피라이트 추가 */

/* copy 기본 상태: 아래로 내려간 상태 */
.copy {
    transform: translateY(24px);
    opacity: 0;
    will-change: transform, opacity;
    color: #393939;
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    font-size: 14px;
    margin-top: 70px;

}

/* 열릴 때: 위로 올라오면서 나타남 */
body.menu-open .copy {
    animation: fxCopyUp 0.64s cubic-bezier(.22,.61,.36,1) forwards;
    animation-delay: 0.20s;
    /* 메뉴 항목들 끝나고 살짝 늦게 */
}

/* 닫힐 때: 다시 아래로 내려가며 사라짐 */
body.menu-closing .copy {
    animation: fxCopyDown 0.58s cubic-bezier(.22,.61,.36,1) forwards;
}

@keyframes fxCopyUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
@keyframes fxCopyDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(24px);
        opacity: 0;
    }
}

/* 애니메이션 마감 */

/* === 아코디언(depth2) 부드러운 전환 === */
.fx-gnb .fx-depth2 {
    overflow: hidden;
    height: 0;
    transition: height 0.56s cubic-bezier(.22,.61,.36,1), transform 0.56s cubic-bezier(.22,.61,.36,1);
    will-change: height, transform;
    margin: 0;
    padding: 0;
    display: flex;
    transform: translateY(12px);
}

.fx-gnb .fx-depth2.is-open {
    transform: translateY(0);

}

.fx-gnb .fx-depth2 .fx-depth2-item {
    list-style: none;
}
.fx-gnb .fx-depth2 .fx-depth2-item a {
    padding: 2px 16px;
    color: rgba(255, 255, 255, 1);
    font-size: 18px;
    line-height: 32px;
    text-decoration: none;
    font-weight: 600;
}
.fx-gnb .fx-depth2 .fx-depth2-item:first-child a {
    padding-left: 6px;
}

/* 대메뉴 드롭다운 아이콘(옵션) */
.fx-gnb .fx-depth1.has-sub > .fx-link::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.56s cubic-bezier(.22,.61,.36,1);

    /*  arr없애기 */
    display: none;
}
.fx-gnb .fx-depth1.has-sub.open > .fx-link::after {
    transform: rotate(-135deg) translateY(2px);
}

/* (선택) 서브 아이템 미세 시차 */
.fx-gnb .fx-depth2 .fx-depth2-item {
    transform: translateY(12px);
    transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}
.fx-gnb .fx-depth2.is-open .fx-depth2-item {
    transform: translateY(0);
}
.fx-gnb .fx-depth2.is-open .fx-depth2-item:nth-child(1) {
    transition-delay: 0.03s;
}
.fx-gnb .fx-depth2.is-open .fx-depth2-item:nth-child(2) {
    transition-delay: 0.06s;
}
.fx-gnb .fx-depth2.is-open .fx-depth2-item:nth-child(3) {
    transition-delay: 0.09s;
}

/* 모션 줄이기 접근성 */
@media (prefers-reduced-motion: reduce) {
    .fx-overlay {
        transition: none;
    }
    .fx-gnb .fx-depth2 {
        transition: none;
        transform: none;
    }
    .fx-gnb .fx-depth2 .fx-depth2-item {
        transition: none;
        transform: none;
    }
}
@media(max-width:991px) {
    .fx-close {
        position: absolute;
        right: 17px;
        top: 7px;
        font-size: 26px;
    }
 

    .fx-gnb {
        padding-left: 20px;
        padding-right: 20px;
    }
    .fx-gnb li {
        margin: 12px 0;
    }
    .fx-gnb li a {
        color: #fff;
        text-decoration: none;
        font-size: 22px;
        font-weight: 900;
        display: block;
        line-height: 26px;

    }
    .fx-gnb .fx-depth2 {
        display: block;

    }
    .fx-gnb .fx-depth2 .fx-depth2-item a {
        padding: 0 10px;
        color: rgba(255, 255, 255, 1);
        font-size: 15px;
        line-height: 20px;
        text-decoration: none;
        font-weight: 600;
    }
    .fx-gnb .fx-depth2 .fx-depth2-item:first-child a {
        padding-left: 10px;
    }
    .copy {
        transform: translateY(24px);
        opacity: 0;
        will-change: transform, opacity;
        color: #393939;
        font-family: 'Poppins', 'Noto Sans KR', sans-serif;
        font-size: 13px;
        line-height: 20px;
        margin-top: 40px;
        padding-left: 20px;
        padding-right: 20px;
      

    }
}
