/* 方塊顯示 */

.main-wrapper, .sub-wrapper {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
}

.main-wrapper {
    margin-bottom: 20px;
    width: 100%;
}

.sub-wrapper {
    flex-direction: column;
}

.main-container, .sub-container {
    height: 100%;
}

.main-container {
    flex: 1;
}

.main-wrapper .left {
    flex-basis: 75%;
    margin-right: 5px;
}

.main-wrapper .right {
    flex-basis: 25%;
}

.main-wrapper .right .sub-wrapper .sub-container {
    height: calc(100% / 3);
}

.sub-container:not(:last-child) {
    margin-bottom: 5px;
}

.sub-container {
    overflow: hidden;
    position: relative;
}

.sub-container .background-img {
    width: 100%;
    height: 100%;
    background-image: url("https://via.placeholder.com/1000");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-transition: -webkit-transform 0.3s ease;
    -moz-transition: -moz-transform 0.3s ease;
    transition: transform 0.3s ease;
}

.sub-container .background-img::before {
    bottom: 0;
    content: "";
    display: block;
    height: 100%;
    width: 100%;
    position: absolute;
    background: -moz-linear-gradient( top, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
    /* FF3.6+ */
    background: -webkit-gradient( linear, left top, left bottom, color-stop(40%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0.7)));
    /* Chrome,Safari4+ */
    background: -webkit-linear-gradient( top, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
    /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient( top, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
    /* Opera 11.10+ */
    background: -ms-linear-gradient( top, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
    /* IE10+ */
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.7) 100%);
    -webkit-transition: background-color 0.3s ease;
    -moz-transition: background-color 0.3s ease;
    -o-transition: background-color 0.3s ease;
    transition: background-color 0.3s ease;
}

.sub-container:hover .background-img {
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    transform: scale(1.2);
}

.sub-container:hover .background-img::before {
    background-color: rgba(0, 0, 0, 0.1);
}

.sub-container .info {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    color: #fff;
    padding: 0 10px;
}

.sub-wrapper .sub-container .info {
    padding: 0 5px;
}

.sub-container .info .title {
    font-size: 1.5em;
    font-weight: bold;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    max-height: 1.43em;
}

.sub-container .info .title * {
    color: #fff;
}

.sub-container .info .desc {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.86em;
    margin-bottom: 2px;
    color: #ccc;
}

.sub-wrapper .sub-container .info .title {
    font-size: 1em;
}

.sub-wrapper .sub-container .info .desc {
    font-size: 0.86em;
}

@media only screen and (max-width: 992px) {
    .sub-container .info {
        padding: 0 5px;
    }
    .sub-container .info .title {
        font-size: 1em;
        font-weight: bold;
    }
}

@media only screen and (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
    }
    .main-wrapper .main-container {
        margin-right: 0;
        margin-bottom: 5px;
    }
    .main-wrapper .left {
        flex-basis: 25%;
    }
    .main-wrapper .right {
        flex-basis: 75%;
    }
}