#theader { z-index: 995; position: absolute; top: 0; left: 0; width: 100%; height: 90px; border-bottom: 1px solid rgba(255, 255, 255, 0.5); background-color: transparent; }
#theader .swrap { height: 100%; }

#theader .logo { position: relative; display: block; float: left; height: 100%; writing-mode: vertical-lr; text-align: center; }
#theader .logo img { width: 286px; }
#theader .logo .img1 { display: inline-block; }
#theader .logo .img2 { display: none; }
#theader.active .logo .img1, #theader.scrollh .logo .img1 { display: none; }
#theader.active .logo .img2, #theader.scrollh .logo .img2 { display: inline-block; }

#theader #tnav { position: relative; display: block; float: right; height: 100%; }
#theader #tnav .menu1 { position: relative; height: 100%; display: flex; flex-wrap: nowrap; }
#theader #tnav .menu1 > li { position: relative; height: 100%; }
#theader #tnav .menu1 > li > a { position: relative; height: 100%; display: block; padding: 0 20px; }
#theader #tnav .menu1 > li > a > span { z-index: 5; position: relative; display: block; top: 50%; transform: translateY(-50%); text-align: center; font-weight: 300; font-size: 20px; color: #fff; }

#theader #tnav .menu1 > li > a::after { z-index: 1; display: block; content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%; background-color: rgba(51, 60, 80, 0.4); transition: top 0.3s; }
#theader #tnav .menu1 > li > a:hover::after { top: 0; }

@media (max-width: 1660px) {
    #theader { height: 85px; }

    #theader .logo img { width: 270px; }

    #theader #tnav .menu1 > li > a > span { font-size: 18px; }
}
@media (max-width: 1230px) {
    #theader { height: 80px; }

    #theader .logo img { width: 250px; }

    #theader #tnav .menu1 > li > a { padding: 0 17px; }
    #theader #tnav .menu1 > li > a > span { font-size: 16px; }
}
@media (max-width: 1024px) {
    #theader { position: fixed; height: 70px; }
    #theader.scrollh { box-shadow: 0 4px 4px -4px #000; }
    #theader.active, #theader.scrollh { background-color: rgba(255, 255, 255, 0.9); }
    #theader.active, #theader.active.scrollh { box-shadow: none; }
    #theader .swrap { width: 100%; max-width: 100%; }

    #theader .logo { margin-left: 20px; } 
    #theader .logo img { width: 235px; }

    #theader #tnav { display: none; position: absolute; top: 70px; left: 0; width: 100%; height: initial; float: none; background-color: rgba(255, 255, 255, 0.9); border-top: 1px solid #ddd; box-shadow: 0 4px 4px -4px #000; }
    #theader.active #tnav { display: block; }
    #theader #tnav .menu1 { height: initial; display: block; }
    #theader #tnav .menu1 > li { height: initial; }
    #theader #tnav .menu1 > li > a { height: initial; padding: 15px 5px; }
    #theader #tnav .menu1 > li > a::after { display: none; }
    #theader #tnav .menu1 > li > a > span { top: initial; transform: translateY(0); font-weight: 500; font-size: 15px; color: #000; }
    #theader #tnav .menu1 > li > a:hover { background-color: #dfdfdf; }
}


/* theader hambtn */
#theader .ham_btn { display: none; position: absolute; top: 51%; transform: translateY(-50%); right: 20px; width: 27px; height: 20px; cursor: pointer; }
#theader .ham_btn div { position: absolute; width: 100%; height: 3px; background-color: #fff; transform-origin: center; }
#theader.active .ham_btn div, #theader.scrollh .ham_btn div { background-color: #166cac; }
#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; }
}