#theader { z-index: 990; position: fixed; top: 0; left: 0; width: 100%; height: 100px; background-color: rgba(0, 0, 0, 0.9);  transition: background-color 0.3s; }
#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: 122px; }

#theader #tnav { position: relative; left: 30px; display: flex; flex-wrap: nowrap; float: right; height: 100%; }
#theader #tnav a { position: relative; display: block; height: 100%; padding: 0 30px; }
#theader #tnav a span { position: relative; top: 50%; transform: translateY(-50%); display: block; text-align: center; font-weight: 700; font-size: 20px; color: #fff; transition: color 0.2s; }
#theader #tnav a span::after { display: block; content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background-color: #be1d2d; transition: width 0.3s; }
#theader #tnav a:hover span { color: #be1d2d; }
#theader #tnav a:hover span::after { width: 100%; }

@media (max-width: 1660px) {
    #theader { height: 90px; }

    #theader .logo img { width: 109.8px; }

    #theader #tnav { left: 25px; }
    #theader #tnav a { padding: 0 25px; }
    #theader #tnav a span { font-weight: 600; font-size: 18px; }
}
@media (max-width: 1440px) {
    #theader { height: 80px; }
    #theader .logo img { width: 97.6px; }
}
@media (max-width: 1279px) {
    #theader { height: 70px; }

    #theader .logo img { width: 85.4px; }

    #theader #tnav { left: 20px; }
    #theader #tnav a { padding: 0 20px; }
    #theader #tnav a span { font-size: 16px; }
}
@media (max-width: 1024px) {
    #theader { height: 60px; }
    #theader .contwrap { width: 100%; max-width: 100%; }
    #theader .logo { margin-left: 40px; }
    #theader .logo img { width: 70px; }

    #theader #tnav { position: absolute; top: 60px; left: 0; width: 100%; display: none; float: none; height: initial; background-color: rgba(0, 0, 0, 0.85); border-top: 1px solid #ddd; box-shadow: 0 4px 4px -4px #ddd; }
    #theader.active #tnav { display: block; }
    #theader #tnav a { height: inherit; padding: 15px 5px; }
    #theader #tnav a span { top: initial; transform: translateY(0); font-weight: 500; font-size: 15px; color: #fff; }
    #theader #tnav a span::after { display: none !important; }
    #theader #tnav a:hover { background-color: #ddd; }
}
@media (max-width: 767px) {
    #theader .logo { margin-left: 30px; }
}
@media (max-width: 460px) {
    #theader .logo { margin-left: 20px; }
}

/* hambtn */
#theader .hambtn { display: none; position: absolute; top: 50%; transform: translateY(-50%); right: 20px; width: 27px; height: 20px; cursor: pointer; }
#theader .hambtn li { position: absolute; width: 100%; height: 3px; background-color: #fff; transform-origin: center; }

#theader .hambtn li:first-child { top: 0%; transform: translateY(-50%); animation: mo_bar1 forwards linear 0.4s; }
#theader .hambtn li:nth-child(2) { top: 40%; transform: translateY(-50%); animation: mo_bar2 forwards linear 0.4s; }
#theader .hambtn li: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 .hambtn li:first-child { top: 0%; transform: translateY(-50%); animation: mo_bar1_on forwards linear 0.4s; }
#theader.active .hambtn li:nth-child(2) { top: 40%; transform: translateY(-50%); animation: mo_bar2_on forwards linear 0.4s; }
#theader.active .hambtn li: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: 1023px) {
    #theader .hambtn { display: block; }   
}



.custom_fix {
    z-index: 9999;
    position: fixed;
    top: 55%;
    transform: translateY(-50%);
    right: 0px;
}


.custom_fix a img {
    width: 90px;
    height: 101px;
}

.custom_fix .top_btn{
    background: #000;
    color: #fff;
    width: 100%;

}

@media (max-width: 800px) {
    .custom_fix a img {
        width: 70px;
        height: auto;
    }
}

@media (max-width: 450px) {
    .custom_fix a img {
        width: 60px;
        height: auto;
    }

    #top_btn p{
        font-size: 13px !important;
    }
}

