﻿.header-style1{
    position: fixed;
    z-index: 999;
    top: 0;
    display: block;
    width: 100%;
    transition: all .3s linear;
    box-sizing: border-box;
    padding: 25px 0;
    background-color: #fff;
}
.header-box{
    width: 1280px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    font-size: 0;
}
.header-logo-box{
    width: 310px;
    max-width: 100%;
    display: inline-block;
    position: relative;
    vertical-align: middle;
}
.header-logo-box span:nth-child(2){
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}
.header-menu-box{
    width: calc(100% - 310px);
    display: inline-block;
    vertical-align: middle;
    font-size: 0;
}
.header-menu{
    width: 100%;
    display: block;
    text-align: right;
}
.header-menu> li{
    display: inline-block;
    vertical-align: middle;
    position: relative;
    margin-left: 80px;
}
.header-link-box{
    display: block;
    position: absolute;
    right: 0;
    top: 0;
}

.header-menu-title{
    font-size: 18px;
    line-height: 50px;
    display: block;
    font-weight: bold;
    color: #FFF;
    letter-spacing: 0.06em;
    position: relative;
    transition: all .3s linear;
}
.header-language .header-menu-title{
    color: #fefefe;
}
.header-menu-title:after{
    /* content: ''; */
    width: 100%;
    height: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #FFF;
    transform: scaleX(0);
    transition: all .2s linear;
}
div.header-menu-title{
    cursor: context-menu;
}
.header-menu-list-box{
    position: absolute;
    top: 100%;
    left: calc(50% - 80px);
    width: 160px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    padding: 10px 0;
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
    transform-origin: top;
    transform: scaleY(0.8);
}
.header-menu-list-title{
    font-size: 18px;
    line-height: 50px;
    display: block;
    font-weight: bold;
    color: #000;
    letter-spacing: 0.06em;
    position: relative;
    transition: all .3s linear;
}


@media only screen and (min-width: 1001px){
    #index .header-style1,
    #productDesign .header-style1,
    #about .header-style1,
    #product-service .header-style1,
    #digital-teams .header-style1,
    #digital-service .header-style1,
    #transportation-teams .header-style1,
    #transportation-service .header-style1,
    #contact .header-style1{
        backdrop-filter: blur(5px);
        background-color: transparent;
    }
    .noheader{
        transform: translateY(-100%);
    }
    /* body:not(#index):not(#productDesign):not(#about):not(#product-service) .header-style1, */
    .header2,
    #index .header2,
    #productDesign .header2,
    #about .header2,
    #product-service .header2,
    #digital-teams .header2,
    #digital-service .header2,
    #transportation-teams .header2,
    #transportation-service .header2,
    #contact .header2{
        top: 0;
        padding: 0;
        background-color: #fff;
        box-shadow: 0 0 10px rgba(0,0,0,.15);
    }
    body:not(#index):not(#productDesign):not(#about):not(#product-service):not(#digital-teams):not(#digital-service):not(#transportation-teams):not(#transportation-service):not(#contact) .header-logo-box span:nth-child(1),
    .header2 .header-logo-box span:nth-child(1){
        opacity: 0;
    }
    body:not(#index):not(#productDesign):not(#about):not(#product-service):not(#digital-teams):not(#digital-service):not(#transportation-teams):not(#transportation-service):not(#contact) .header-logo-box span:nth-child(2),
    .header2 .header-logo-box span:nth-child(2){
        opacity: 1;
    }
    body:not(#index):not(#productDesign):not(#about):not(#product-service):not(#digital-teams):not(#digital-service):not(#transportation-teams):not(#transportation-service):not(#contact) .header-menu-title,
    .header2 .header-menu-title{
        color: #000;
    }
    .header-menu> li.active .header-menu-title,
    .header-menu> li:hover .header-menu-title{
        color: #fefefe;
    }
    .header-menu> li.active .header-menu-title:after,
    .header-menu> li:hover .header-menu-title:after{
        transform: scaleX(1);
    }
    body:not(#index):not(#productDesign):not(#about):not(#product-service):not(#digital-teams):not(#digital-service):not(#transportation-teams):not(#transportation-service):not(#contact) .header-menu> li.active .header-menu-title,
    .header2 .header-menu> li.active .header-menu-title,
    body:not(#index):not(#productDesign):not(#about):not(#product-service):not(#digital-teams):not(#digital-service):not(#transportation-teams):not(#transportation-service):not(#contact) .header-menu> li:hover .header-menu-title,
    .header2 .header-menu> li:hover .header-menu-title{
        color: #ffd200;
    }
    body:not(#index):not(#productDesign):not(#about):not(#product-service):not(#digital-teams):not(#digital-service):not(#transportation-teams):not(#transportation-service):not(#contact) .header-menu> li.active .header-menu-title:after,
    .header2 .header-menu> li.active .header-menu-title:after,
    body:not(#index):not(#productDesign):not(#about):not(#product-service):not(#digital-teams):not(#digital-service):not(#transportation-teams):not(#transportation-service):not(#contact) .header-menu> li:hover .header-menu-title:after,
    .header2 .header-menu> li:hover .header-menu-title:after{
        background-color: #ffd200;
    }
    .header2 .header-menu-list-box{
        background-color: #fff;
    }
    .header-menu-list-title:hover{
        color: #ffd200;
    }
    .header-service:hover .header-menu-list-box{
        top: 100%;
        opacity: 1;
        pointer-events: all;
        transform: scaleY(1);
    }
    .header-about:hover .header-menu-list-box{
        top: 100%;
        opacity: 1;
        pointer-events: all;
        transform: scaleY(1);
    }
}

.rwd-menu-list-back{
    display: none;
}
.mask{
    width: 100%;
    height: 100vh;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

.mask.active{
    display: block;
}

.rwd-menu{
    width: 30px;
    max-width: 100%;
    position: absolute;
    right: 20px;
    z-index: 99999;
    display: none;
    top: calc(50% - 9px);
}
.rwd-menu span{
    width: 100%;
    display: block;
    margin: 0 auto;
    height: 3px;
    border-radius: 2px;
    background-color: #fefefe;
    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 (max-width: 1500px){
    .header-box{
        width: 1300px;
    }
}
@media only screen and (max-width: 1300px){
    .header-box{
        width: 1000px;
    }
    .header-menu> li{
        margin-left: 50px;
    }
    .header-logo-box{
        width: 180px;
    }
    .header-menu-box {
        width: calc(100% - 180px);
    }
}
@media only screen and (max-width: 1000px){
    .header-style1{
        background-color: rgba(0, 0, 0, 0.15);
        padding: 0;
    }
    .header-logo-box {
        width: 100%;
        margin-left: 0;
        text-align: center;
        box-sizing: border-box;
        padding: 8px 0;
    }
    .rwd-menu{
        display: block;
    }
    .header-style1 .rwd-menu{
        display: block;
    }

    .rwd-header-menu-sytle1 .header-menu{
        width: 100%;
        height: 100vh;
        padding-top: 55px;
        box-sizing: border-box;
        position: fixed;
        top: 0;
        left: 100%;
        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;
        text-align: center;
        background-color: rgba(0, 0, 0, 0.6);
        opacity: 0;
        transition: all .3s ease;
    }
    .rwd-header-menu-sytle1 .header-menu.active{
        left: 0%;
        opacity: 1;
    }
    .header-menu-title{
        line-height: 30px;
    }
    .rwd-header-menu-sytle1.header2 .header-menu{
        width: 100%;
    }
    
    .rwd-header-menu-sytle1 .header-menu> li{
        display: block;
        margin: 0;
        margin-bottom: 3vh;
    }
    .rwd-header-menu-sytle1 .header-menu> li:last-child{
        margin-bottom: 0;
    }
    .header-menu-title:after{
        background-color: #fff;
    }
    .header-menu-list-box{
        transform: none;
        position: static;
        opacity: 1;
        pointer-events: all;
        background-color: transparent;
        width: initial;
        padding-top: 2px;
        box-sizing: border-box;
        border-top: 4px solid #fff;
        margin-top: 4px;
        box-shadow: none;
    }
    .header-menu-list-title{
        line-height: 1.8;
        color: #fff;
    }
    
    li.active .header-menu-list-title,
    .header-menu-list-title:hover{
        color: #ffd200;
    }
    @media only screen and (max-height: 600px){
        .header-menu-title{
            display: inline-block;
        }
        .rwd-header-menu-sytle1 .header-menu{
            min-height: 100vh;
            overflow: auto;
            display: block;
            padding-bottom: 55px;
        }
        .header-menu-list-box{
            width: 200px;
            display: block;
            margin: 0 auto;
            margin-top: 4px;
            padding-bottom: 0;
        }
        .rwd-header-menu-sytle1 .header-menu> li{
            margin-bottom: 20px;
        }
    }
}
@media only screen and (max-width: 500px){
    .header-menu-title{
        line-height: 36px;
        font-size: 20px;
    }
    .rwd-header-menu-sytle1 .header-menu> li{
        margin-bottom: 2vh;
    }
    .header-logo-box a{
        width: 95px;
        display: inline-block;
    }
    .rwd-header-menu-sytle1 .header-menu{
        padding: 48.5px 0;
    }
}