@import url('https://fonts.googleapis.com/earlyaccess/notosanstc.css');

/* ---------- reset ---------- */

* {
    box-sizing: border-box;
}

body {
    font-size: 17px;
    font-family: 'Noto Sans TC', sans-serif, 'Microsoft JhengHei', arial;
    padding: 0;
    margin: 0;
}

ul,
li {
    margin: 0;
    padding: 0;
    list-style: none;
}

a:link,
a:visited,
a:hover,
a:active,
input,
select,
button {
    font-family: inherit;
    color: inherit;
    text-decoration: none;
    outline: none;
}

figure,
figcaption {
    margin: 0;
    padding: 0;
}

img {
    border: none;
    outline: none;
    max-width: 100%;
}

p {
    margin-top: 0;
}

.clear:after {
    content: '';
    display: block;
    clear: both;
}


/* top */

#top {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background: #efe7d1;
}

#logo {
    position: absolute;
    width: 100px;
    left: 20px;
    top: 20px;
}

h1 {
    font-size: 2em;
    letter-spacing: 0.3em;
    margin: 0 0 0.8em;
}

h2 {
    font-size: 1.4em;
    letter-spacing: 0.2em;
    margin: 1em 0;
    text-align: center;
}

.container {
    position: relative;
    max-width: 1024px;
    width: 92%;
    margin: auto;
}

.wrapper {
    padding: 6em 0;
}

.wrapper-600 {
    max-width: 600px;
    margin: auto;
}

.wrapper-900 {
    max-width: 900px;
    margin: auto;
}

.mapwrapper {
    position: relative;
    padding-bottom: 65%;
    background-image: url('../images/mapbg.png');
    background-position: center;
    background-size: cover;
}

.mapwrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #f7f3e8;
}
.mapwrapper a {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0.4em 0.8em;
    background: #ce6368;
    color: white;
    border: solid 1px white;
    box-shadow: 0 0 8px rgba(0, 0, 0, .6);
    cursor: pointer;
}
.mapwrapper.load:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50%;
    left: 50%;
    margin-left: -25px;
    margin-top: -25px;
    background: url('../images//loading.svg');
    -webkit-animation: setRotate 2s linear infinite;
    -moz-animation: setRotate 2s linear infinite;
    animation: setRotate 2s linear infinite;
}

.taiwandata {
    margin: 20px 0;
}

.taiwandata>div {
    margin: 0.5em 0;
}

.taiwandata>ul {
    display: flex;
    justify-content: center;
    padding: 0;
}

.taiwandata>ul li {
    width: calc(20% - 40px);
    margin: 0 20px;
    padding: 10px 0;
    border: solid 1px #333;
    background: white;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
}

.taiwandata>ul li div:last-child {
    font-size: 1.2em;
}

.scroll-down {
    position: absolute;
    width: 30px;
    height: 55px;
    left: 50%;
    bottom: 1.5em;
    margin-left: -15px;
    border: 2px solid #333;
    border-radius: 15px;
}

.scroll-down:before {
    content: "";
    position: absolute;
    width: 4px;
    height: 9px;
    top: 8px;
    left: 11px;
    border-radius: 2px;
    background: #333;
    -webkit-animation-name: scrollDown;
    animation-name: scrollDown;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-duration: 1.5s;
    animation-duration: 1.5s;
}


/* map */

#map {
    position: relative;
    height: 100vh;
    width: 100%;
}

#taiwan-map {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

path {
    stroke: white;
    stroke-width: 0.25px;
    cursor: pointer;
    opacity: 1;
    transition: .5s;
}

iframe {
    display: block;
    margin: 0 auto;
    padding: 0;
    border: none;
}

#board {
    position: absolute;
    left: calc(50% + 512px);
    top: 50%;
    text-align: center;
    transform: translate(-100%, 0);
}

#map-city {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 0.3em;
}

.total_sum {
    min-width: 11em;
    padding: 0.6em;
    margin-top: 0.5em;
    border: solid 1px #333;
    background: white;
}

#total_sum {
    font-size: 2.4em;
    font-weight: 500;
    letter-spacing: 0.1em;
}

#map small {
    position: absolute;
    left: calc(50% + 512px);
    bottom: 5%;
    transform: translate(-100%, 0);
    white-space: nowrap;
}


/* covid19-news */

.covid19-news {
    background: #f7f3e8;
}

.covid19-news .hide,
.covid19-news a.button.hide {
    display: none;
}

.covid19-news li {
    border-bottom: solid 1px #333;
    padding: 1em 0;
    color: #333;
}

.covid19-news li>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.covid19-news li small {
    background: #ce6368;
    color: white;
    padding: 0.2em 0.6em;
}

.covid19-news li a {
    color: #ce6368;
}

.covid19-news li h3 {
    font-size: 1.1em;
    margin: 0.2em 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.covid19-news li p {
    margin-bottom: 0;
    display: block;
    display: -webkit-box;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 40.8px;
}

.covid19-news a.button {
    display: block;
    text-align: center;
    background: #ce6368;
    color: white;
    border: none;
    padding: 0.8em;
    margin-top: 1em;
}


/* chart */

.chartwrapper {
    position: relative;
    padding-bottom: 65%;
}

#chart {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.confirmed-form {
    width: 100%;
    max-width: 600px;
    margin: 1em auto;
    border-spacing: 0;
    border-collapse: collapse;
}

.confirmed-form td,
.confirmed-form th {
    padding: 0.4em 0.6em;
    text-align: center;
}

.confirmed-form th {
    border-top: solid 1px #ccc;
    border-bottom: solid 1px #ccc;
}

.confirmed-form tbody {
    border-bottom: solid 1px #ccc;
}

#chartToLeft, #chartToRight {
    position: absolute;
    width: 22px;
    bottom: 0;
    cursor: pointer;
}

#chartToLeft {
    left: 0;
    transform: translate(-100%, 0);
}

#chartToRight {
    right: 0;
    transform: translate(100%, 0);
}


/* article */

.thematicnews-slider.slick-slider {
    padding: 0;
}

.thematicnews-slider h4 {
    position: absolute;
    padding: 0.5em;
    margin: 0;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, .7);
    color: white;
}

.thematicnews-slider li {
    cursor: pointer;
    margin: 10px;
    position: relative;
}

.thematic-tag {
    position: absolute;
    top: 0;
    left: 0;
    padding: 5px 8px;
    color: white;
    z-index: 1;
    font-size: 1.2em;
    font-weight: 500;
}

li[data-target="thematicnews1"] .thematic-tag,
.thematicnews1 a.readmore {
    background: #a71b5a;
}

.articlebox .d-box div.thematicnews1>ol li {
    color: #a71b5a;
}

li[data-target="thematicnews2"] .thematic-tag,
.thematicnews2 a.readmore {
    background: #0b64a9;
}

.articlebox .d-box div.thematicnews2>ol li {
    color: #0b64a9;
}

li[data-target="thematicnews3"] .thematic-tag,
.thematicnews3 a.readmore {
    background: #31a7b9;
}

.articlebox .d-box div.thematicnews3>ol li {
    color: #31a7b9;
}

li[data-target="thematicnews4"] .thematic-tag,
.thematicnews4 a.readmore {
    background: #d82c2c;
}

.articlebox .d-box div.thematicnews4>ol li {
    color: #d82c2c;
}

li[data-target="thematicnews5"] .thematic-tag,
.thematicnews5 a.readmore {
    background: #8ea520;
}

.articlebox .d-box div.thematicnews5>ol li {
    color: #8ea520;
}

li[data-target="thematicnews6"] .thematic-tag,
.thematicnews6 a.readmore {
    background: #479ecf;
}

.articlebox .d-box div.thematicnews6>ol li {
    color: #479ecf;
}

li[data-target="thematicnews7"] .thematic-tag,
.thematicnews7 a.readmore {
    background: #cb739d;
}

.articlebox .d-box div.thematicnews7>ol li {
    color: #cb739d;
}

.thematicnews-slider li div {
    padding-bottom: 75%;
    position: relative;
    background-position: center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

#thematicnews .slick-next:before {
    content: url('../images/right2.png');
    width: 30px;
    height: 60px;
    top: 10px;
    right: 4px;
    opacity: .9;
}

#thematicnews .slick-prev:before {
    content: url('../images/left2.png');
    width: 30px;
    height: 60px;
    top: 10px;
    left: 4px;
    opacity: .9;
}

#thematicnews .slick-next,
#thematicnews .slick-prev {
    background: rgba(0, 0, 0, .7);
    border-radius: 0;
    width: 40px;
    height: 80px;
    margin-top: -50px;
}


/* slider */

.myslider-list {
    padding: 2% 60px;
}

.myslider-list li {
    padding: 0 20px;
}

.myslider-list li figure {
    width: 100%;
}

.myslider-list li figure div {
    position: relative;
    padding-bottom: 75%;
    background-position: center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

.myslider-list li.media-slider figure div:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
    transition: .5s;
}

.myslider-list li.media-slider figure div:after {
    content: '►';
    position: absolute;
    text-align: center;
    width: 50px;
    line-height: 50px;
    height: 50px;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    font-size: 1.5em;
    margin: auto;
    color: white;
    border: solid 2px white;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, .5);
    text-shadow: 0 0 15px rgba(0, 0, 0, .5);
    opacity: .6;
    transition: .5s;
}

.myslider-list li figcaption {
    margin: 1em 0;
    font-family: sans-serif, 'Noto Sans TC';
    font-size: 17px;
}

.myslider-list li a {
    color: black;
    display: block;
}


/* footer */

footer {
    padding: 2em 0;
    text-align: center;
}

@media (hover: hover) {
    path:hover {
        opacity: .5;
    }
}

@media screen and (max-width: 1024px) {
    #board {
        left: 50%;
        top: auto;
        bottom: 4em;
        padding: 30px 20px 0 20px;
        transform: translate(-50%, 0);
    }
    #map small {
        left: 50%;
        bottom: 1em;
        transform: translate(-50%, 0);
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 16px;
    }
    .wrapper {
        padding: 3em 0;
    }
    #logo {
        width: 80px;
    }
    h1 {
        letter-spacing: 0;
        margin-top: 30%;
        font-size: 1.8em;
    }
    h2 {
        letter-spacing: 0;
    }
    .scroll-down {
        display: none;
    }
    .taiwandata {
        display: block;
    }
    .taiwandata>div {
        width: 100%;
        text-align: center;
    }
    .taiwandata>ul {
        flex-wrap: wrap;
    }
    .taiwandata>ul li {
        width: calc(50% - 20px);
        margin: 10px;
    }
    .myslider-list {
        padding: 8% 5%;
        overflow: hidden;
    }
    .myslider-list li {
        margin: 0 10px;
        padding: 0;
    }
    .chartwrapper {
        padding-bottom: 100%;
    }
    #chartToLeft, #chartToRight {
        width: 15px;
        bottom: 7px;
    }
    #chartToLeft {
        left: 0;
        transform: translate(100%, 0);
    }
    #chartToRight {
        right: 4px;
    }
    .mapwrapper {
        padding-bottom: 120%;
    }
}