﻿header{
    width: 100%;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    background-color: #FFF;
    font-family: 'Roboto',"微軟正黑體";
}
.hongxin-loading{
    width: 0%;
    display: block;
    height: 2px;
    background-color: #36BF36;
}
.header-box{
    width: 1200px;
    max-width: 100%;
    display: block;
    margin:  0 auto;
    position: relative;
    padding: 5px 0;
    font-size: 0;
}
.header-logo{
    width: 180px;
    max-width: 100%;
    display: block;
    float: left;
    transition: all .3s linear;
}
.header-menu{
    display: block;
    float: right;
    text-align: right;
}



.header-menu li{
    font-size: 16px;
    display: inline-block;
    height: 64px;
    line-height: 64px;
    padding:0 20px ;
    letter-spacing: 1px;
    transition: all .3s linear;
}
header{
    box-shadow: rgba(0,0,0,0.5) 1px 1px 2px;
}
.header2{
    box-shadow: rgba(0,0,0,0.4) 2px 2px 2px;
    transition: all .3s linear;
}

.header2 .header-menu li{
/*     height: 50px;
    line-height: 50px; */
    padding: 0 15px;
}
.header2 .header-menu li a:after{
    bottom: 8px;
}
.header-menu li:last-child{
    padding-right: 0;
}

.header-menu li:first-child{
    padding-left: 0;
}

.header-menu li a{
    position: relative;
    display: block;
    transition: all .3s linear;
}

.header-menu li a:after{
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background-color: #36BF36;
    position: absolute;
    bottom: 15px;
    left: 0;
    transform: scale(0);
    transition: all .3s linear;

}
/* Search */
.header-search{
    transition: all .3s linear;
    cursor: pointer;
}
.header-info-search-box{
    display: inline-block;
    vertical-align: middle;
    width: 250px;
    max-width: 100%;
    position: absolute;
    background-color: #eee;
    border: 1px solid #eee;
    box-sizing: border-box;
    bottom: 21px;
    right: -1px;
    opacity: 0;
    border-radius: 25px;
    pointer-events: none;
    transition: all .3s linear;
    max-width: 100%;
}
.header-info-search-box.active{
    right: -270px;
    pointer-events: inherit;
    opacity: 1;
}
.header-info-search{
    width: calc( 100% - 50px );
    display: block;
    background-color: #eee;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
    height: 40px;
    border-radius: 5px;
    border: 0;
    color: #555;
}
.header-info-search-box:focus-within{
    /* outline: 3px solid #333; */
    background-color: #fff;
    /* box-shadow: rgba(0, 0, 0, 0.6) 2px 2px 2px; */
}
.header-info-search-box:focus-within .header-info-search{
    background-color: #fff;
}
.header-info-search-box i{
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    color: #555;
    width: 30px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
}
.header-info-search-box span{
    position: absolute;
    right: 10px;
    top: 0;
    font-size: 18px;
    font-weight: bold;
    color: #555;
    height: 40px;
    line-height: 40px;
    cursor: pointer;
}
.header-info-search-box ::-webkit-input-placeholder {
    color: #000;
}
.header-info-search-box ::-moz-placeholder {
    color: #d1d1d1;
}
.header-info-search-box :-ms-input-placeholder {
    color: #d1d1d1;
}
.header-info-search-box :-moz-placeholder {
    color: #d1d1d1;
}
.header-search:hover{
    color: #36bf36;
}
/* Search */
.rwd-menu{
    width: 30px;
    max-width: 100%;
    position: absolute;
    right: 20px;
    z-index: 99999;
    display: none;
    top: calc(50% - 7px);
}
.rwd-menu span{
    width: 100%;
    display: block;
    margin: 0 auto;
    height: 2px;
    background-color: #36BF36;
    position: relative;
}

/*漢堡樣式1*/
.rwd-menu-style1> span:nth-child(even){
    margin: 4px auto;
    transition: all .4s linear;
}
.rwd-menu-style1> span:nth-child(1){
    transform: scale(1);
    transform-origin: left;
    transition: all .4s linear;
}
.rwd-menu-style1> span:nth-child(3){
    transform: scale(1);
    transform-origin: right;
    transition: all .4s linear;
}
.rwd-menu-style1> span:nth-child(4){
    top: -19px;
    transform:  scale(0,1) rotate(-45deg);
}
.rwd-menu-style1> span:nth-child(4){
    display: none;
}
.rwd-menu-style1 .rwd-menu-bth-line{
    transform: rotate(-45deg);
}
.rwd-menu-style1 .rwd-menu-bth-line2{
    transform: rotate(45deg);
}
.rwd-menu-style1 .rwd-menu-bth-line,
.rwd-menu-style1 .rwd-menu-bth-line2{
    position: absolute;
    top: 6px;
    left:0;
    width: 100%;
}
.rwd-menu-style1 .rwd-menu-bth-line span,
.rwd-menu-style1 .rwd-menu-bth-line2 span{
    transform:  scale(0,1);
    transition: all .5s ease;
    position: relative;
}
.rwd-menu-style1.active .rwd-menu-bth-line span,
.rwd-menu-style1.active .rwd-menu-bth-line2 span{
    transform:  scale(1,1) ;
    transition-delay: .1s;
}
.rwd-menu-style1.active> span:nth-child(1),
.rwd-menu-style1.active> span:nth-child(2),
.rwd-menu-style1.active> span:nth-child(3){
    transform: scale(0,1);
}
.rwd-menu-style1.active> span:nth-child(odd){
    transform: scale(0);
    transition: all .4s linear;
    transition-delay: 0s;
}

/*漢堡樣式2*/

.rwd-menu-style2> span:nth-child(4){
    display: none;
}
.rwd-menu-style2> span:nth-child(2){
    display: block;
    margin: 4px auto;
}
.rwd-menu-style2{
    width: 25px;
}
.rwd-menu-style2> span{
    transition: all 0.3s ease-in-out;
}
.rwd-menu-style2 .rwd-menu-bth-line,
.rwd-menu-style2 .rwd-menu-bth-line2{
    display: none;
}
.rwd-menu-style2.active{
    animation: smallbig 0.6s forwards;
}
.rwd-menu-style2.active> span:nth-child(1){
    -webkit-transform: translateY(7px) rotate(45deg);
    -ms-transform: translateY(7px) rotate(45deg);
    -o-transform: translateY(7px) rotate(45deg);
    transform: translateY(7px) rotate(45deg);
}
.rwd-menu-style2.active> span:nth-child(2){
    opacity: 0;
}
.rwd-menu-style2.active> span:nth-child(3){
    -webkit-transform: translateY(-5px) rotate(-45deg);
    -ms-transform: translateY(-5px) rotate(-45deg);
    -o-transform: translateY(-5px) rotate(-45deg);
    transform: translateY(-5px) rotate(-45deg);
}

.rwd-menu-style2.active> span:nth-child(1),
.rwd-menu-style2.active> span:nth-child(2),
.rwd-menu-style2.active> span:nth-child(3) {
    -webkit-transition-delay: 0.2s;
    -o-transition-delay: 0.2s;
    transition-delay: 0.2s;
}



@keyframes smallbig{
    0%, 100%{
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        -o-transform: scale(1);
        transform: scale(1);
    }

    50%{
        -webkit-transform: scale(0);
        -ms-transform: scale(0);
        -o-transform: scale(0);
        transform: scale(0);
    }
}

@media only screen and (min-width: 1000px){
    .header-menu li:hover a:after,
    .header-menu li.active a:after{
        transform: scaleX(1);
    }
    .header-menu li:hover a,
    .header-menu li.active a{
        font-weight: bold;
        letter-spacing: 2px;
        color: #36bf36;
    }

}
@media only screen and (max-width: 1220px){
    .header-box{
        width: 95%;
    }

    .header-menu li{
        font-size: 16px;
        padding: 0 15px;
        height: 58px;
        line-height: 58px;
    }
}
@media only screen and (max-width: 1000px){
    .header2 .rwd-menu{
        top: 20px;
    }
    .header-box{
        width: 100%;
        padding: 0;
    }
    .header-logo{
        padding: 5px 0;
        padding-left: 20px;
        float: none;
        /* width: 100%; */
        box-sizing: border-box;
    }
    .header2 .header-logo{
        /* width: 100%; */
    }
/*     .header-logo a{
        width: 290px;
        display: block;
        transition: all .3s linear;
    } */

    .header2 .header-logo a{
        /* width: 250px; */
        display: block;
    }
    .header-menu{
        width: 100%;
        float: none;
        text-align: center;
    }

    .header-menu li,
    .header2 .header-menu li{
        width: 100%;
        display: block;
        padding: 0;
    }
    .header2 {
        box-shadow:none;
        transition: all .3s linear;
    }


    .header2 .header-logo{
        /* box-shadow: rgba(0, 0, 0, 0.7) 0px 2px 2px; */
    }
    .header-menu{
        box-shadow: rgba(0, 0, 0, 0.7) 0px 2px 2px;
    }
    .header-menu li a:after{
        display: none;
    }
    .rwd-menu{
        display: block;
    }
    .header-style1 .rwd-menu{
        display: block;
    }

    .rwd-header-menu-sytle1 .header-menu{
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 3;
        display:         flex;
        display: -webkit-flex;
        align-items: center;
        -webkit-align-items: center;
        justify-content: center;
        -webkit-justify-content: center;
        flex-direction:column;
        background-color: #f5f5f5;
        transition: none;
    }

    .rwd-header-menu-sytle1.header2 .header-menu{
        width: 100%;
    }

    .rwd-header-menu-sytle1 .header-menu> li{
        display: block;
        margin: 0;
        margin-bottom: 20px;
    }
    .rwd-header-menu-sytle1 .header-menu> li:last-child{
        margin-bottom: 0;
     }
    .rwd-header-menu-sytle2 .header-menu-box.active .header-menu{
        top: 0;
    }
    .rwd-header-menu-sytle2 .header-menu{
        width: 100%;
        height: 100vh;
        position: fixed;
        top: calc(-100% - 100px);
        left: 0;
        z-index: 3;
        display:         flex;
        display: -webkit-flex;
        align-items: center;
        -webkit-align-items: center;
        justify-content: center;
        -webkit-justify-content: center;
        flex-direction:column;
        background-color: #f5f5f5;
        transition: all .5s ease;
    }
    .header-search-block{
        position: absolute;
        top: 0;
        z-index: 4;
        transition: all 1s linear;
    }
    .header-search{
        display: none;
    }
    .header-info-search-box{
        position: relative;
        right: 0;
        top: 10px;
    }
    .header-info-search-box.active{
        right: 0;
        opacity: 1;
    }
}
@media only screen and (max-width: 750px){
    .header-menu li{
        height: 55px;
        line-height: 55px;
    }
}

@media only screen and (max-width: 550px){
    .header2 .header-logo a{
        width: 230px;
    }
    .header-logo a{
        width: 220px;
    }
}

