/* ========== Header ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: transparent;
    box-sizing: border-box;
    z-index: 1000;
    overflow: hidden;
    padding: 0 40px;
    transition: background 0.3s ease, top 0.3s ease;
}

header:hover {
    background: white;
}

.header-title {
    display: none;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: clamp(8px, 2vw, 20px);
    color: white;
    margin-left: 10px;
}




.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
}



.header-center {
    flex: 1;
    justify-content: center;

}

.text {
    color: white;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    font-size: 14px;
}

.icons {
    display: flex;
    gap: 20px;
}


.icon-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 헤더에 호버했을 때 아이콘 글자 색 블랙 */
header:hover .icon-button span {
    color: #000;
}

/* 헤더에 호버했을 때 nav 메뉴 글자 색 블랙 */
header:hover .nav-menu .nav-item {
    color: #000;
}

/* ========== 메인메뉴(nav-menu) ========== */
.nav-menu {
    position: absolute;
    width: 100%;
    display: flex;
    list-style: none;
    margin: 0;
    height: 80px;
    box-sizing: border-box;
    padding: 0 460px;
    left: 4px;

}


.nav-menu .nav-item {
    flex: 1;
    display: block;
    color: #333;
    cursor: pointer;
    box-sizing: border-box;
    transition: color 0.3s ease;
    text-align: center;
    line-height: 80px;
    color: white;
    font-family: 'Pretendard', sans-serif;
    font-weight: 400;
    font-size: 18px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}



.nav-menu,
.submenu-list {
    transition: transform 0.3s ease;
    transform: scaleX(1);
    transform-origin: center center;
}

.header-wrapper:hover .nav-menu,
.header-wrapper:hover .submenu-list {
    transform: scaleX(1.1);
}


/* ========== 서브메뉴(nav-wrapper) ========== */
.nav-wrapper {
    overflow: hidden;
    background-color: white;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.6s ease, opacity 0.4s ease, visibility 0.4s ease;
    position: fixed;
    top: 80px;
    width: 100%;
    left: 0;
    z-index: 998;
    padding: 0 460px;
    box-sizing: border-box;
    border: 1px solid #ebebeb;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.2);


}

.nav-menu:hover~.nav-wrapper,
.nav-wrapper:hover {
    max-height: 440px;
    opacity: 1;
    visibility: visible;
}

header:hover .header-title {
    color: #000;
}

.submenu-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid #ebebeb;

}

.submenu-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 40px;
    border-right: 1px solid #ebebeb;
    transition: background-color 0.3s ease;
}

.submenu-container:hover {
    background-color: #00317C;
}

.submenu-container:hover {
    background-color: #00317C;
}

.submenu-container:hover .submenu li a {
    color: rgba(255, 255, 255, 0.4);
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0;

}

.submenu li {
    margin-bottom: 15px;
}

.submenu-container:hover .submenu li a:hover {
    color: #FFFFFF;
}


.submenu li a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    text-align: center;
    text-decoration: none;
    color: rgba(34, 34, 34, 0.9);
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}



/* ========== 햄버거 버튼 (모바일) ========== */
.hamburger {
    display: none;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger img {
    width: 30px;
    height: 30px;
}

@media (max-width: 1400px) {
    .icons .text {
        display: none;
    }

    .icon-button img {
        width: clamp(20px, 2.5vw, 24px);
        height: clamp(20px, 2.5vw, 24px);
    }

    .nav-menu {
        padding: 0 clamp(100px, 15vw, 200px);
        gap: clamp(20px, 4vw, 50px);
    }

    .nav-wrapper {
        padding: 0 clamp(100px, 15vw, 200px);
    }

    .submenu-list {
        gap: clamp(20px, 4vw, 50px);
    }

    .header-left img {
        display: none;
    }

    .header-title {
        display: block;
        font-size: clamp(12px, 1.2vw, 18px);
    }
}

@media (max-width: 1050px) {

    .nav-menu {
        display: none;
    }

    .icons {
        display: none;
    }

    header {
        padding: 0 10px;
    }


    .hamburger {
        display: flex;

    }

    .nav-wrapper {
        display: none;
    }

    .nav-wrapper.show {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-height: none;
        opacity: 1;
        visibility: visible;
        background-color: white;
        padding: 0;
        border-top: 1px solid #ebebeb;
    }

    .nav-menu,
    .submenu-list {
        transform: none !important;
        transition: none !important;
    }

    .header-wrapper:hover .nav-menu,
    .header-wrapper:hover .submenu-list {
        transform: none !important;
    }

    .submenu li a {
        font-size: clamp(12px, 1vw, 16px);
    }
}