header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    box-sizing: border-box;
    box-shadow: 0 0.2vh 0.5vh rgba(0, 0, 0, 0.1);
    font-family: 'Pretendard', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header a,
header a:link,
header a:visited,
header a:hover,
header a:active {
    color: inherit;
    text-decoration: none;
    background: none;
    outline: none;
    border: none;
    box-shadow: none;
    cursor: inherit;
}

header a {
    text-decoration: none;
}

header .top {
    display: flex;
    justify-content: center;
    padding-top: 0.93rem;
    padding-right: 1rem;
    width: 100%;
}

header .top a {
    font-weight: 500;
    font-size: 0.8rem;
    margin-left: auto;
    cursor: pointer;
}

.header--black .top a {
    color: white;
}

.header--white .top a {
    color: #1e1e1e !important;
}

header .top .user-profile {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    align-items: center;
    position: relative;
}

header .top .user-profile p {
    color: #eeeeee;
}

.header--white .top .user-profile p {
    color: #1e1e1e;
}

header .top .user-profile .user-dropdown .dropdown-toggle{
    cursor: pointer;
    height: 1.5rem;
    background-color: transparent;
    border: none;
}

header .top .user-profile .user-dropdown .dropdown-toggle img{
    width: 100%;
    height: 100%;
    filter: invert(100%);
}

header .top .user-profile .user-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

header .top .user-profile .user-dropdown .dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
}

header .top .user-profile .user-dropdown .dropdown-menu li a:hover {
    background-color: #f0f0f0;
}

/* 열릴 때 */
header .top .user-profile .user-dropdown.open .dropdown-menu {
    display: block;
}



header .bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    width: 1905px;
}

header .menu-container > ul > li > a {
    font-weight: 500;
    font-size: 1.1rem;
    color: white;
}

.header--white .menu-container > ul > li > a {
    font-weight: 500;
    font-size: 1.1rem;
    color: #1e1e1e;
}

header .bottom nav > ul {
    display: flex;
    flex-direction: row;
    align-items: center;
}

header .bottom nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

header .bottom nav ul li {
    position: relative;
    display: inline-block;
    padding: 1rem 1.8rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #222222;
}

header .bottom nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 calc(var(--vh, 1vh) * 0.6) calc(var(--vh, 1vh) * 0.9) rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: max-content;
    opacity: 0.8;
}

header .bottom nav ul li:hover > ul {
    display: block;
}

header .bottom nav ul li ul li {
    display: block;
    padding: 0.6rem 1.2vw;
    white-space: nowrap;
    color: #222222;
    font-size: 1.2rem;
    font-weight: 500;
}

header .bottom nav ul li ul li ul {
    left: 100%;
    top: 0;
    opacity: 1;
}

/* 호버 시 밑줄 효과 */
header .bottom nav ul li,
header .bottom nav > ul > li > a {
    position: relative;
    transition: color 0.3s ease;
}

header .bottom nav > ul > li > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0.15rem;
    bottom: -0.5rem;
    left: 50%;
    background-color: #62e7e7;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

header .bottom nav > ul > li:hover > a::after {
    width: 100%;
}

header .bottom nav > ul > li > a.active::after {
    width: 100%;
}

/* 하위 메뉴(2단, 3단 등) hover/active 효과 */
header .bottom nav ul li ul li:hover,
header .bottom nav ul li ul li:focus,
header .bottom nav ul li ul li.active {
    background-color: #cef4f4;
    color: #61E5E5FF;
}

header .bottom .menu-container {
    display: flex;
    gap: 3.125vw;
}

header .bottom .logo-container img {
    width: 18rem;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-toggle img {
    cursor: pointer;
}

.menu-open-icon {
    width: 2.5rem;
    height: 2.5rem;
    filter: invert(100%);
}

.menu-close-icon {
    width: 3rem;
    height: 3rem;
    display: none;
}

/* 모바일 메뉴 스타일 */
header .mobile-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    padding: 3rem 7vw;
    z-index: 150;
    transition: transform 0.3s;
    transform: translateX(100%);
}

header .mobile-menu.open {
    display: flex;
    transform: translateX(0);
}

header .mobile-menu a {
    color: #222;
    text-decoration: none;
    font-size: 1.3rem;
    margin: 1rem 0;
    font-weight: 500;
}

.header--black {
    background-color: #1e1e1e;
}

.header--white {
    color: #1e1e1e !important;
}

@media (max-width: 1920px) {
    header .top {
        width: 100%;
    }

    header .bottom {
        width: 100%;
    }

    header .bottom {
        gap: calc(128 / 1905 * 100vw); /* 160px */
    }
    header .menu-container > ul > li > a {
        /*font-size: calc(15 / 1920 * 100vw); !* 24px *!*/
    }

    header .bottom nav ul li {
        padding: calc(16 / 1920 * 100vw) calc(28.8 / 1920 * 100vw); /* 1rem 1.8rem */
        font-size: 6px;
    }
}

/* 노트북 & 테블릿 가로 (1024px ~ 1279px) */
@media all and (min-width:1024px) and (max-width:1279px) {

}

/* 테블릿 가로 (768px ~ 1023px) */
@media all and (min-width:768px) and (max-width:1023px) {
    header .bottom .logo-container img {
        width: 14rem;
    }

    header .menu-container > ul > li > a {
        font-size: 0.9rem;
    }

    header .bottom nav ul li ul li {
        font-size: 0.9rem;
    }
}

/* 모바일 가로 & 테블릿 세로 (480px ~ 767px) */
@media all and (min-width:480px) and (max-width:767px) {

}

@media (max-width: 767px) {
    header {
        flex-direction: row;
    }

    header .top {
        display: none;
    }

    header .bottom {
        padding: 0.5rem 4vw 0.4rem;
        justify-content: space-between;
        width: 100%;
    }

    header .bottom .menu-container {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    header .mobile-menu.open {
        padding: 3rem 0;
    }

    header nav {
        overflow: scroll;
    }

    header nav a, .menu-item > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 1rem;
        position: relative;
    }

    header nav .menu-item > a.open {
        color: #60E0E0;
    }

    header nav .menu-item > a::after {
        content: '';
        width: 10px;
        height: 10px;
        border-top: 2px solid #121212;
        border-right: 2px solid #121212;
        display: inline-block;
        transform: rotate(135deg);
        position: absolute;
        bottom: 0.5rem;
        left: 90%;
    }

    header nav .menu-item > a.open::after {
        transform: rotate(-45deg);
        border-top: 2px solid #60E0E0;
        border-right: 2px solid #60E0E0;
        top: 0.5rem;
    }

    header nav .menu-item ul {
        display: none;
        width: 100vw;
        background-color: #f0f0f0;
        list-style: none;
    }

    header nav .menu-item ul li {
        padding: 0.2rem 0.5rem;
    }

    header nav .menu-item ul li a {
        display: flex;
        align-items: center;
        padding: 0 1rem;
    }
}

/* 모바일 세로 (~ 479px) */
@media all and (max-width:479px) {
    header .bottom {
        gap: 8rem;
    }

    header .bottom .logo-container img {
        width: 14rem;
    }
}