﻿.traffic-box{
    width: 100%;
    display: block;
    position: relative;
    background-color: #f5f5f5;
}
.traffic-all-box {
    width: 1200px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    font-size: 0;
    box-sizing: border-box;
    padding-top: 20px;
    padding-bottom: 40px;
}

.traffic-class{
    width: 180px;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
    border: 1px solid #d1d1d1;
    margin-right: 24px;
    position: relative;
    text-align: center;
    transition: all .3s linear;
}
.traffic-class:nth-child(6n){
    margin-right: 0;
}
.traffic-class::after{
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(0);
    background-color: #601986;
    transition: all .3s linear;
}
.traffic-class p{
    font-size: 18px;
    font-family: 'Noto Serif TC';
    font-weight: 600;
    color: #888888;
    line-height: 58px;
    letter-spacing: 0.06em;
    position: relative;
    z-index: 1;
    transition: all .3s linear;
}
.traffic-class-border-box{
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    pointer-events: none;
}
.traffic-class-border-box span{
    position: absolute;
    display: block;
    transition: all .3s linear;
}
.traffic-class-border-box span:nth-child(1){
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-top: 1px solid #601986;
    border-left: 1px solid #601986;
}
.traffic-class-border-box span:nth-child(2){
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-bottom: 1px solid #601986;
    border-right: 1px solid #601986;
}
.traffic-class.active,
.traffic-class:hover{
    border-width: 0;
}
.traffic-class.active:after,
.traffic-class:hover:after{
    transform: scale(1);
}
.traffic-class.active p,
.traffic-class:hover p{
    color: #fff;
}
.traffic-class.active .traffic-class-border-box span,
.traffic-class:hover .traffic-class-border-box span{
    width: calc(100% - 1px);
    height: calc(100% - 1px);
}
.traffic-info-box{
    margin-top: 60px;
}
.traffic-info{
    background-color: #fff;
    margin-bottom: 40px;
}
.traffic-info:last-child{
    margin-bottom: 0;
}
.traffic-info-title{
    background-color: #601986;
    width: 100%;
    display: block;
    color: #fff;
    font-size: 24px;
    letter-spacing: 0.06em;
    font-family: 'Noto Serif TC';
    font-weight: 600;
    line-height: 60px;
    box-sizing: border-box;
    padding: 0 20px;
}
.traffic-info-edit-box{
    width: 100%;
    display: block;
    box-sizing: border-box;
    padding: 20px;
    font-size: 16px;
    letter-spacing: 0.06em;
    color: #555;
    line-height: 2;
}
.traffic-info-map{
    width: 100%;
    height: 300px;
    display: block;
}



@media only screen and (max-width: 1200px){
    .traffic-all-box{
        width: 1000px;
    }
    .traffic-class{
        width: 150px;
        margin-right: 20px;
    }
    .traffic-class p{
        font-size: 16px;
    }
}
@media only screen and (max-width: 1000px){
    .traffic-all-box{
        width: 750px;
    }
    .traffic-class:nth-child(n){
        width: 240px;
        margin-right: 15px;
    }
    .traffic-class:nth-child(3n){
        margin-right: 0;
    }
    .traffic-class:nth-child(n + 4){
        margin-top: 15px;
    }
}
@media only screen and (max-width: 750px){
    .traffic-all-box{
        width: 550px;
    }
    .traffic-class:nth-child(n){
        width: 170px;
        margin-right: 20px;
    }
    .traffic-class:nth-child(3n){
        margin-right: 0;
    }
    .traffic-class:nth-child(n + 4){
        margin-top: 20px;
    }
    .traffic-info-title{
        font-size: 20px;
    }
}
@media only screen and (max-width: 550px){
    .traffic-all-box{
        width: 95vw;
        padding-top: 0;
    }
    .traffic-class:nth-child(n){
        width: calc((100% - 10px) / 2);
        margin-right: 10px;
    }
    .traffic-class:nth-child(2n){
        margin-right: 0;
    }
    .traffic-class:nth-child(n + 3){
        margin-top: 10px;
    }
    .traffic-class p{
        font-size: 14px;
        line-height: 38px;
    }
    .traffic-info-title{
        font-size: 18px;
        line-height: 40px;
        padding: 0 10px;
    }
    .traffic-info-edit-box{
        padding: 10px;
        font-size: 14px;
    }
}



/*animation*/
/*<-------------動畫------------->*/
@media only screen and (min-width: 1001px){
    .traffic-class,
    .traffic-info{
        opacity: 0;
    }
    .traffic-class-box.anima .traffic-class{
        animation: fade 1s ease 0s 1 both;
    }
    .traffic-info.anima{
        animation: fadeInUp 1s ease 0s 1 both;
    }
}
