#header{
    width: 100%;
    position: absolute;
    left: 0;
    transition: background-color .5s;
    z-index: 90;
}

#header.hover{
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

#header.hover .h02{
    opacity: 1;
    visibility: visible;
}

#header.hover ul.mainmenu>li p{
    color: #111;
    font-family: 'Pretendard-Medium', sans-serif;
}

#header.hover ul.mainmenu>li:last-child p{
    color: #fff;
}

.h01{
    width: 100%;
    height: 90px;
    padding-left: 3%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu_contact{
    height: 100%;
    display: flex;
}

ul.mainmenu{
    width: 1080px;
    height: 100%;
    display: flex;
}

ul.mainmenu>li{
    width: 176px;
    height: 100%;
    cursor: pointer;
    position: relative;
}

ul.mainmenu>li p{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    font-family: 'Pretendard-Medium', sans-serif;
}

ul.mainmenu>li:hover p{
    color: #54aea2 !important;
}

ul.submenu{
    width: max-content;
    position: absolute;
    background-color: #fff;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 25px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s, visibility .5s;
}

ul.mainmenu>li:hover ul.submenu{
    opacity: 1;
    visibility: visible;
}

ul.submenu li{
    width: 100%;
    text-align: center;
    margin-top: 25px;
    font-size: 16px;
    color: #555;
    font-family: 'Pretendard-Regular', sans-serif;
    cursor: pointer;
}

ul.submenu li:hover{
    color: #54aea2;
}

ul.submenu li:first-child{
    margin-top: 0;
}

ul.mainmenu>li:last-child{
    width: 200px;
    height: 100%;
    background-color: #54aea2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    font-family: 'Pretendard-Medium', sans-serif;
}

ul.mainmenu>li:last-child:hover p{
    color: #fff !important;
}

ul.mainmenu>li:last-child ul.submenu{
    width: 100%;
}

.h02{
    width: 100%;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: flex-end;
    padding-bottom: 60px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s, visibility .5s;
}

.submenu_box{
    width: 880px;
    margin-right: 200px;
    display: flex;
}

/* sub3 하위 메뉴 추가*/
.h_sub3 {
    position: relative;
}

.sub_down li a {
    display: block;
    padding: 5px;
    white-space: nowrap;
    color: #555;
    font-family: 'Pretendard-Regular', sans-serif;
    cursor: pointer;
    font-size: 16px;
}

.sub_down {
    position: absolute;
    top: 0;
    left: 120%;  /* 오른쪽으로 붙이기 */
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 20px;
}

.h_sub3:hover .sub_down {
    opacity: 1;
    visibility: visible;
}
.sub_down li:hover a{
    color: #54aea2;
}
