#theader { z-index: 995; position: absolute; top: 0; left: 0; width: 100%; height: 100px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
#theader .contwrap { height: 100%; }

#theader .logo { position: relative; display: block; float: left; height: 100%; writing-mode: vertical-lr; text-align: center; }
#theader .logo img { display: inline-block; width: 289px; }

#theader #tnav { position: relative; display: flex; flex-wrap: nowrap; float: right; height: 100%; }
#theader #tnav .menu1 { position: relative; display: flex; flex-wrap: nowrap; height: 100%; }
#theader #tnav .menu1 > li { position: relative; height: 100%; }
#theader #tnav .menu1 > li > a { position: relative; display: block; height: 100%; padding: 0 30px; }
#theader #tnav .menu1 > li > a::after { display: block; content: ''; position: absolute; left: 50%; bottom: 0px; transform: translateX(-50%); width: 0; height: 2px; background-color: #af2127; transition: width 0.3s; }
#theader #tnav .menu1 > li:hover > a::after { width: 100%; }
#theader #tnav .menu1 > li > a > span { position: relative; top: 50%; transform: translateY(-50%); display: block; text-align: center; font-weight: 700; font-size: 18px; color: #000; }
#theader #tnav .lang { position: relative; margin-left: 50px; height: 100%; }
#theader #tnav .lang .lang_wrap { position: relative; top: 50%; transform: translateY(-50%); padding: 10px 20px; display: inline-block; border: 1px solid #cbc9c2; border-radius: 100px; }
#theader #tnav .lang .lang_wrap a { position: relative; display: inline-block; font-weight: 700; font-size: 13px; color: #000; }
#theader #tnav .lang .lang_wrap a:first-of-type { padding-right: 10px; }
#theader #tnav .lang .lang_wrap a:last-of-type { padding-left: 10px; }
#theader #tnav .lang .lang_wrap a::after { display: none; content: ''; position: absolute; top: 55%; right: 0; transform: translateY(-50%); width: 1px; height: 80%; background-color: #000; }
#theader #tnav .lang .lang_wrap a:first-of-type::after { display: block; }


@media (max-width: 1680px) {
    #theader { height: 90px; }

    #theader .logo img { width: 260px; }

    #theader #tnav .menu1 > li > a { padding: 0 25px; }
    #theader #tnav .lang { margin-left: calc(15px + 2vw); }
    #theader #tnav .lang .lang_wrap { padding: 9px 18px; }
}
@media (max-width: 1280px) {
    #theader { height: 80px; }

    #theader .logo img { width: 220px; }
    
    #theader #tnav .menu1 > li > a { padding: 0 20px; }
    #theader #tnav .menu1 > li > a > span { font-weight: 600; font-size: 16px; }

    #theader #tnav .lang { margin-left: 0px; }
    #theader #tnav .lang .lang_wrap { padding: 8px 15px; }
    #theader #tnav .lang .lang_wrap a { font-weight: 500; }
}
@media (max-width: 1024px) {
    #theader { position: fixed; height: 70px; }
    #theader .contwrap { width: 100%; max-width: 100%; }

    #theader.scrollh { background-color: rgba(255, 255, 255, 0.9); box-shadow: 0 4px 4px -4px #000; }
    #theader.active { background-color: rgba(255, 255, 255, 0.9); box-shadow: none; }
    #theader.scrollh.active { box-shadow: none; }

    #theader .logo { margin-left: 20px; }
    #theader .logo img { width: 190px; }
    
    #theader #tnav { position: absolute; left: 0; top: 70px; display: none; width: 100%; height: initial; background-color: rgba(255, 255, 255, 0.9); box-shadow: 0 4px 4px -4px #000; }
    #theader.active #tnav { display: block; }
    #theader #tnav .menu1 { display: block; height: initial; }
    #theader #tnav .menu1 > li { height: initial; }
    #theader #tnav .menu1 > li > a { height: initial; padding: 13px 5px;  transition: background-color 0.3s; }
    #theader #tnav .menu1 > li > a::after { display: none; }
    #theader #tnav .menu1 > li > a:hover { background-color: #dfdfdf; }
    #theader #tnav .menu1 > li > a > span { top: initial; transform: translateY(0); font-weight: 500; font-size: 15px; color: #000; }
    #theader #tnav .lang { padding: 10px 0; text-align: center; margin-left: 0; height: initial; border-top: 1px solid #ddd; }
    #theader #tnav .lang .lang_wrap { top: initial; transform: translateY(0); padding: 5px 10px; }
    #theader #tnav .lang .lang_wrap a { font-weight: 500; font-size: 13px; color: #000; }
    #theader #tnav .lang .lang_wrap a:first-of-type { padding-right: 7px; }
    #theader #tnav .lang .lang_wrap a:last-of-type { padding-left: 7px; }
}


/* theader hambtn */
#theader .ham_btn { display: none; position: absolute; top: 50%; transform: translateY(-50%); right: 20px; width: 27px; height: 20px; cursor: pointer; }
#theader .ham_btn div { position: absolute; width: 100%; height: 3px; background-color: #000; transform-origin: center; }
#theader.active .ham_btn div, #theader.scrollh .ham_btn div { background-color: #af2127; }
#theader .ham_btn div:first-child { top: 0%; transform: translateY(-50%); animation: mo_bar1 forwards linear 0.4s; }
#theader .ham_btn div:nth-child(2) { top: 40%; transform: translateY(-50%); animation: mo_bar2 forwards linear 0.4s; }
#theader .ham_btn div:last-child { top: 80%; transform: translateY(-50%); animation: mo_bar3 forwards linear 0.4s; }
@keyframes mo_bar1 { 
    0% { top: 50%; transform: translateY(-50%) rotateZ(45deg); }
    50% { top: 50%; transform: translateY(-50%) rotateZ(0deg); }
    100% { top: 0%; transform: translateY(-50%); }
}
@keyframes mo_bar2 {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 1; }
}
@keyframes mo_bar3 {
    0% { top: 50%; transform: translateY(-50%) rotateZ(-45deg); }
    50% { top: 50%; transform: translateY(-50%) rotateZ(0deg); }
    100% { top: 80%; transform: translateY(-50%); }
}

#theader.active .ham_btn div:first-child { top: 0%; transform: translateY(-50%); animation: mo_bar1_on forwards linear 0.4s; }
#theader.active .ham_btn div:nth-child(2) { top: 40%; transform: translateY(-50%); animation: mo_bar2_on forwards linear 0.4s; }
#theader.active .ham_btn div:last-child { top: 80%; transform: translateY(-50%); animation: mo_bar3_on forwards linear 0.4s; }
@keyframes mo_bar1_on {
    0% { top: 0%; transform: translateY(-50%); }
    50% { top: 50%; transform: translateY(-50%); }
    100% { top: 50%; transform: translateY(-50%) rotateZ(45deg); }
}
@keyframes mo_bar2_on {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes mo_bar3_on {
    0% { top: 80%; transform: translateY(-50%); }
    50% { top: 50%; transform: translateY(-50%); }
    100% { top: 50%; transform: translateY(-50%) rotateZ(-45deg); }
}
@media (max-width: 1024px) {
    #theader .ham_btn { display: block; }
}
