﻿/*-----------------header-style7  menu縮起，右上方三條槓-------------------*/
.header-style7{
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    display: block;
    background-color: #fff;
    transition: all .3s linear;
}
#index .header-style7{
    position: absolute;
    padding-top: 50px;
    background-color: transparent;
}
.header2{ 
    padding-top: 0;
    position: fixed;
    box-shadow: 0 0 5px #555;
}
#index .header2{
    background-color: #fff;
    padding: 5px 0;
    box-shadow: 0 0 5px #555;
    top: 0;
    position: fixed;
}
.header2 .header-menu-box{
    top: calc(50% - 12px);
}
#index .header2 .header-menu-box{
    top: calc(50% - 12px);
}
#index .header-menu-title{
    color: #fff;
}
#index .header2 .header-menu-title{
    color: #555;
}
.header-style7 .header-box{
    width: 97%;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 5px 0;
    position: relative;
    transition: all .3s linear; 
}
.header-style7 .header-logo{
    position: relative;
    z-index: 3;
    width: 170px;
    transition: all .3s linear;
}
.header2 .header-logo{
    width: 130px;
}
.header-style7 .header-menu{
    width: 100%;
    height: 100%;
    display: block;
}

.header-style7 .header-menu li{
    margin-bottom: 20px;
}
.header-style7 .header-menu li:last-child{
    margin-bottom: 0;
}
.header-style7 .rwd-menu{
    display: block;
    cursor: pointer;
    transition: all .3s linear;
}
.header-style7 .header-menu-box.active{
    opacity: 1;
}
/* -------------------------------------------------------------- */
.header2.header-style2 .rwd-menu{
    background-color: #fff;
}
.header2.header-style2 .rwd-menu span{
    background-color: #FFF;
}
.header-menu-list-box li{
    margin-bottom: 30px
}

.header-menu-title{
    font-size: 18px;
    letter-spacing: 1px;
    position: relative;
    font-weight: 600;
    color: #555;
    transition: all .3s linear; 
}
div.header-menu-title{
    cursor: context-menu;
}


.rwd-menu-list-back{
    display: none;
}
.mask{
    width: 100%;
    height: 100vh;
    opacity: 0;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    transition: all .5s linear;
    pointer-events: none;
}

.mask.active{
    opacity: 1;
}

.header-menu-box{
    position: absolute;
    right: 0;
    z-index: 99999;
    top: calc(50% - 12px);
    transition: all .3s linear; 
}
#index .header-menu-box {
    top: 0;
}

.rwd-menu span{
    width: 100%;
    display: block;
    margin: 0 auto;
    height: 2px;
    background-color: #888;
    position: relative;
}
#index .rwd-menu span{
    background-color: #fff;
}

.rwd-header-menu-title{
    display: none;
}


/*漢堡樣式1*/
.rwd-menu-style1> span:nth-child(even){
    margin: 7px 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);
  }
}


/*<---------hover--------->*/
#index .header-menu-title:hover{
    color: #47A5EE;
}





@media only screen and (max-width: 1000px){
    #index .header-style7{
        padding-top: 20px;
    }
    #index .header2{
        padding: 5px 0;
    }
    #index .rwd-menu{
        top: calc(50% - 12px);
    }
    .header-menu-title{
        display: none;
    }
    .rwd-header-menu-title{
        display: block;
    }
    .rwd-header-menu-title span{
        display: block;
        font-weight: bold;
        font-size: 16px;
        font-family: 'Lato', "微軟正黑體";
        color: #fff;
        background-color: #ca483d;
        text-align: center;
        box-sizing: border-box;
        padding: 0 5px;
        height: 26px;
        line-height: 26px;
        letter-spacing: 1px;
        border-radius: 5px;
    }
    .header-style7 .header-logo{
        width: 130px;
    }
}
@media only screen and (max-width: 500px){
    .header-style7 .header-logo{
        width: 80px;
    }
    #index .header-style7{
        padding-top: 10px;
    }
    #index .header2{
        padding: 5px 0;
    }
    #index .header-menu-box{
        top: calc(50% - 12px);
    }
}
