﻿.index-news-box{
    width: 100%;
    display: block;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: 14.375rem;
}
.index-news-all-box{
    width: 1000px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    font-size: 0;
    position: relative;
    z-index: 1;
}
.index-news-category-box{
    position: relative;
    margin-top: 70px;
}
.index-news-category-box::after{
    content:'';
    width: calc(100vw - ((100vw - 100%) / 2));
    height: 100%;
    background-color: #00286e;
    position: absolute;
    top: 0;
    right: 0;
}
.index-news-category-all-box{
    position: relative;
    z-index: 1;
}
.index-news-category{
    width: 160px;
    height: 80px;
    display: inline-flex;
    display: -webkit-inline-flex;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
    flex-direction:column;
    vertical-align: top;
    box-sizing: border-box;
    padding-left: 0.2em;
    font-size: 1.125rem;
    letter-spacing: 0.2em;
    line-height: 1.2;
    background-color: #00286e;
    color: #fff;
    border: 12px solid #00286e;
    font-family: "Noto Sans TC";
    margin-right: 8px;
    transition: all .3s linear
}
.index-news-category:nth-child(6n){
    margin-right: 0;
}

.index-news-info{
    width: 300px;
    display: inline-block;
    vertical-align: top;
    margin-right: 50px;
    margin-top: 70px;
}
.index-news-info:nth-child(3n){
    margin-right: 0;
}
.index-news-info-img{
    width: 100%;
    height: calc((220 / 300) * 300px);
    display: block;
    overflow: hidden;
    position: relative;
}
.index-news-info-title{
    font-family: "Noto Sans TC";
    font-weight: 700;
    font-size: 1rem;
    color: #000;
    letter-spacing: 0.06em;
    line-height: 1.625;
    margin-top: 20px;
    overflow : hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.index-news-info-date{
    width: 100%;
    display: block;
    margin-top: 15px;
}
.index-news-info-date p{
    font-family: "Roboto";
    font-size: 1rem;
    color: #666;
    letter-spacing: 0.06em;
    line-height: 1.625;
    display: inline-block;
    vertical-align: middle;
}
.index-news-info-date p:nth-child(2){
    margin: 0 15px;
}
.index-news-info-date span{
    font-family: "Noto Sans TC";
    font-size: 1rem;
    color: #666;
    letter-spacing: 0.06em;
    line-height: 1.625;
    display: inline-block;
    vertical-align: middle;
}
.index-news-more-box{
    margin-top: 40px;
}
.index-news-more{
    width: 300px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    text-align: center;
    background-color: #00286e;
    font-family: "Noto Sans TC";
    font-size: 1.125rem;
    line-height: 3.75rem;
    color: #fff;
    letter-spacing: 0.06em;
    box-sizing: border-box;
    padding-left: 0.06em;
    position: relative;
    transition: all 0.3s linear;
}
.index-news-more span{
    position: absolute;
    right: 15px;
}





@media only screen and (max-width: 1200px){
    .index-news-box{
        padding-top: 10rem;
    }
}
@media only screen and (max-width: 1000px){
    .index-news-box{
        padding-top: 5rem;
    }
    .index-news-all-box{
        width: 750px;
    }
    
    .index-news-category-box{
        box-sizing: border-box;
        margin-top: 30px;
    }
    .index-news-category-box::after{
        display: none;
    }
    .rwd-index-news-category{
        width: 100%;
        height: 50px;
        display: flex;
        display: -webkit-flex;
        align-items: center;
        -webkit-align-items: center;
        justify-content: center;
        -webkit-justify-content: center;
        flex-direction: column;
        vertical-align: top;
        box-sizing: border-box;
        padding-left: 0.2em;
        font-size: 1rem;
        letter-spacing: 0.2em;
        line-height: 1.2;
        color: #000;
        font-family: "Noto Sans TC";
        font-weight: 700;
        z-index: 1;
        position: relative;
        border: 1px solid #000;
    }
    .rwd-index-news-category:after{
        content: '';
        width: 0px;
        height: 0px;
        margin: 0 auto;
        border-right: 8px solid transparent;
        border-top: 10px solid #000;
        border-left: 8px solid transparent;
        display: block;
        position: absolute;
        bottom: calc(50% - 5px);
        right: 20px;
        box-sizing: border-box;
    }
    .index-news-category-all-box{
        position: absolute;
        width: 100%;
        background-color: #fff;
        left: 0;
        box-sizing: border-box;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
        border: 1px solid #000;
        border-top: none;
        max-height: 40vh;
        overflow: auto;
        display: none;
        box-sizing: border-box;
        padding: 5px 0;
    }
    .index-news-category:nth-child(n){
        width: 100%;
        height: initial;
        margin-right: 0;
        background-color: #fff;
        color: #00286e;
        border: none;
        padding: 10px 0;
        font-size: 1rem;
    }

    .index-news-info:nth-child(n){
        width: 350px;
        margin-right: 50px;
    }
    .index-news-info:nth-child(2n){
        margin-right: 0px;
    }
    .index-news-info-img {
        height: calc((220 / 300) * 350px);
    }
    .index-news-category:hover{
        background-color: #00286e;
        color: #fff;
    }
    .index-news-category.active{
        background-color: #000;
        color: #fff;
    }
    
}
@media only screen and (max-width: 768px){
    .index-news-box{
        padding-top: 2.5rem;
    }
    .index-news-all-box{
        width: 550px;
    }
    .index-news-category-box{
        box-sizing: border-box;
        padding: 10px;
        margin-top: 30px;
    }
    .index-news-category-box::after{
        width: 100%;
    }
    .rwd-index-news-category{
        width: 100%;
        height: 40px;
        display: flex;
        display: -webkit-flex;
        align-items: center;
        -webkit-align-items: center;
        justify-content: center;
        -webkit-justify-content: center;
        flex-direction: column;
        vertical-align: top;
        box-sizing: border-box;
        padding-left: 0.06em;
        font-size: 1rem;
        letter-spacing: 0.06em;
        line-height: 1.2;
        background-color: #fff;
        color: #00286e;
        font-family: "Noto Sans TC";
        z-index: 1;
        position: relative;
    }
    .rwd-index-news-category:after{
        content: '';
        width: 0px;
        height: 0px;
        margin: 0 auto;
        border-right: 8px solid transparent;
        border-top: 10px solid #00286e;
        border-left: 8px solid transparent;
        display: block;
        position: absolute;
        bottom: calc(50% - 5px);
        right: 20px;
        box-sizing: border-box;
    }
    .index-news-category-all-box{
        position: absolute;
        width: 100%;
        background-color: #fff;
        top: calc(100% - 10px);
        left: 0;
        box-sizing: border-box;
        border: 10px solid #00286e;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
        max-height: 40vh;
        overflow: auto;
        display: none;
    }
    .index-news-category:nth-child(n){
        width: 100%;
        height: initial;
        margin-right: 0;
        background-color: #fff;
        color: #00286e;
        border: none;
        padding: 10px 0
    }
    .index-news-info:nth-child(n){
        width: 260px;
        margin-right: 30px;
        margin-top: 50px;
    }
    .index-news-info:nth-child(2n){
        margin-right: 0px;
    }
    .index-news-info-img {
        height: calc((220 / 300) * 260px);
    }
}
@media only screen and (max-width: 550px){
    .index-news-all-box{
        width: calc(100vw - 40px);
    }
    .index-news-category-box{
        box-sizing: border-box;
        padding: 5px;
        margin-top: 10px;
    }
    .index-news-category-all-box{
        top: calc(100% - 5px);
        border: 5px solid #00286e;
    }
    .index-news-info:nth-child(n){
        width: calc(((100vw - 40px) - 10px) / 2);
        margin-right: 10px;
        margin-top: 20px;
    }
    .index-news-info:nth-child(2n){
        margin-right: 0px;
    }
    .index-news-info-img {
        height: calc((220 / 300) * (((100vw - 40px) - 10px) / 2));
    }
    .index-news-info-title{
        line-height: 1.4;
        margin-top: 5px;
    }
    .index-news-info-date{
        margin-top: 5px;
    }
    .index-news-info-date p,
    .index-news-info-date span{
        font-size: 0.875rem;
        line-height: 1.4;
    }
    .index-news-info-date p:nth-child(2){
        margin: 0 5px
    }
    .index-news-more-box{
        margin-top: 20px;
    }
    .index-news-more{
        width: 200px;
        font-size: 1rem;
        line-height: 2.5rem;
    }
}
@media only screen and (max-width: 400px){
    .index-news-info:nth-child(n){
        width: 100%;
        margin-top: 10px;
    }
    .index-news-info-img {
        height: calc((220 / 300) * (100vw - 40px));
    }
}



@media only screen and (min-width: 1001px){
    .index-news-category:hover,
    .index-news-category.active{
        background-color: #fff;
        color: #00286e;
    }
    
    .index-news-category-box::after,
    .index-news-category-all-box{
        opacity: 0;
    }
    .index-news-category-box.anima::after{
        animation: fadeInLeft 1.4s ease 0s 1 both;
    }
    .index-news-category-box.anima .index-news-category-all-box{
        animation: fade 1.4s ease .8s 1 both;
    }
}
@media only screen and (min-width: 769px){
    .index-news-info:hover .main-bg{
        transform: scale(1.1);
    }
    .index-news-more:hover{
        color: #fff;
        background-color: #000;
    }

    .index-news-info,
    .index-news-more{
        opacity: 0;
    }
    .index-news-info.anima{
        animation: fadeInUp 1.4s ease 0s 1 both;
    }
    .index-news-more.anima{
        animation: fadeInLeft 1.4s ease 0s 1 both;
    }
}