/********/
/* GRID */
/********/
.cc-news-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    grid-gap: 0 2rem;
}

.cc-news-wrapper.sidebar {
    grid-template-columns: 1fr 2fr;
}

/**********/
/* FILTER */
/**********/
.cc-news-filter {
    margin-bottom: 40px;
    margin-top: 35px;
}

.cc-news-checkboxFilter {
    display: flex;
    flex-flow: column;
}

.cc-news-checkboxFilter > label {
    margin-left: 20px;
}

.cc-news-checkboxFilter > [type="checkbox"] {
    position: relative;
    z-index: 0;
    -webkit-appearance: none;
}

.cc-news-checkboxFilter > [type="checkbox"] + label {
    cursor: pointer;
}

.cc-news-checkboxFilter > [type="checkbox"] + label::before {
    width: 15px;
    height: 15px;
    border-radius: 5px;
    border: 2px solid var(--link-text-hover);
    background-color: #fff;
    display: block;
    content: "";
    float: left;
    margin-right: 10px;
    z-index: 5;
    position: relative;
    top: 6px;
}

.cc-news-checkboxFilter > [type="checkbox"]:hover + label::before {
    box-shadow: inset 0 0 0 3px #fff;
    background-color: var(--link-text-hover);
    opacity: 0.5;
}

.cc-news-checkboxFilter > [type="checkbox"]:checked + label::before {
    box-shadow: inset 0 0 0 3px #fff;
    background-color: var(--link-text-hover);
}

.cc-news-yearsFilter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.cc-news-years {
    margin-right: 10px;
    cursor: pointer;
}

.cc-news-years:last-child {
    margin-right: 0;
}

/*************/
/* ITEM GRID */
/*************/
.cc-news-ajax-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 0 1.5rem;
}

.cc-news-itemWrapper {
    padding-top: 20px; /*fix for now */
    margin-bottom: 30px;
    display: grid;
    justify-content: flex-start;
    display: flex; /* Make it flex */
    flex-direction: column; /* Make images and text go above one another */
    justify-content: space-between; /* If the parent is bigger than image + text, add space between them */
}

.news-categories {
    min-height: 50px;
    flex: 0 0 auto;
}

.contentWrapper {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    margin-top: auto;
}

.childWrapper {
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
}

.news-categories .news-cat-title h3 {
    color: #707070;
    font-weight: 500;
}

.cc-news-itemWrapper .title {
    max-height: 104px;
    flex: 1 0 auto;
}

.cc-news-itemWrapper h1 {
    margin-top: 20px;
    margin-bottom: 15px;
    line-height: 30px;
    display: -webkit-box;
}

.cc-news-itemWrapper .image-link {
    margin-top: auto;
}

.cc-news-itemWrapper .childWrapper img {
    border-radius: 5px;
    width: 450px;
    height: 200px !important;
    object-fit: cover;
    transition: opacity .5s ease-out;
    -moz-transition: opacity .5s ease-out;
    -webkit-transition: opacity .5s ease-out;
    -o-transition: opacity .5s ease-out;
    opacity: 1;
}

.cc-news-itemWrapper img:hover {
    opacity: 0.75 !important;
    cursor: pointer;
}

.cc-news-itemWrapper .contentWrapper > p {
    height: 85px;
    color: black !important;
    max-width: 100%;
    margin: 0 0 25px 4px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box !important;
    padding: 0;
}

.cc-news-itemWrapper a {
    margin-bottom: 10px;
    color: var(--btn-text-color);
    border: 2px solid var(--btn-border);
    background: var(--btn-background);
    border-radius: 4px;
    box-sizing: border-box;
    display: inline-block;
    padding: 7px 20px;
    font-size: 14px;
    font-weight: 700;
    max-width: 150px;
    text-align: center;
    transition: opacity .45s;
}

.cc-news-itemWrapper a:hover {
    opacity: 0.87;
}

@media screen and (max-width: 1300px) {
    .cc-news-wrapper.sidebar {
        display: grid;
        grid-template-rows:  3fr;
        grid-template-columns:1fr;
    }

    .cc-news-itemWrapper img {
        width: 100% !important;
        height: 20vh !important;
    }

    .cc-news-filter {
        margin-bottom: 20px;
    }

    .cc-news-checkboxFilter {
        /*flex-flow:row;*/
        flex-flow: wrap;
    }

    .cc-news-checkboxFilter > [type="checkbox"] {
        position: absolute;
    }

    .cc-news-checkboxFilter > label {
        margin-left: 0;
        margin-right: 20px;
    }
}

@media screen and (max-width: 1299px) {
    .cc-news-itemWrapper > h1 {
        font-size: 20px !important;
    }
}

@media screen and (max-width: 999px) {
    .cc-news-wrapper.sidebar .cc-news-ajax-wrapper {
        grid-template-columns: 1fr;
    }

    .cc-news-itemWrapper > img {
        width: 100% !important;
    }
}

/**********/
/* SLIDER */
/**********/
.news_slider_prevNextControls > .goToPrevSlide {
    position: absolute;
    top: 40%;
    left: -3%;
}

.news_slider_prevNextControls > .goToNextSlide {
    position: absolute;
    top: 40%;
    right: -3%;
}

.news-slider > div.slick-list .slick-slide {
    padding-right: 20px;
    margin-left: 20px;
}

.news-slider > div.slick-list .slick-slide > .cc-news-itemWrapper > a {
    margin-bottom: 15px;
}

.slick-slider .cc-news-itemWrapper > p {
    height: 85px;
    color: black !important;
    max-width: 100%;
    margin: 0 0 25px 4px;
    /* truncate */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    padding: 0;
}


@media screen and (max-width: 1430px) {
    .cc-news-ajax-wrapper > .cc-news-itemWrapper {
        min-width: unset;
    }
}

@media screen and (max-width: 1000px) {
    .home .cc-news-ajax-wrapper {
        grid-template-columns: repeat(1, 1fr);
    }
}
