﻿.news {
    background-color: var(--color-secondary-6);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.news__header {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 33px 22px;
}

.news__headline {
    margin: 0;
    font-size: var(--heading-4-font-size);
    line-height: var(--heading-4-line-height);
}

.news__inner {
    width: 100%;
}

.news__scroller {
    display: flex;
    overflow-x: auto;
    margin: 35px calc(var(--grid-gutter) * -1);
}

    .news__scroller::-webkit-scrollbar {
        display: none;
    }

.news__list {
    list-style: none;
    padding: 0 var(--grid-gutter) 15px 0;
    margin: 0 var(--grid-gutter);
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: var(--grid-gap);
}

.news__item {
    display: flex;
    padding: 0;
}

.news__link {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-height: 250px;
    padding: 25px 30px 0;
    background-color: var(--color-white);
    border-radius: 4px 4px 0 0;
    border: 1px solid rgb(226, 226, 226);
    border-bottom: 1px solid var(--color-dark);
    transition: box-shadow ease 200ms;
}

    .news__link:hover,
    .news__link:focus {
        color: var(--color-primary);
        box-shadow: 0px 3px 15px rgba(190, 190, 190, 0.5);
    }

.news__section {
    text-transform: uppercase;
    color: var(--color-dark);
    font-size: 11px;
    line-height: 22px;
    margin: 0 0 auto;
}

.news__title {
    margin: 20px 0 0;
    font-size: var(--heading-5-font-size);
    line-height: var(--heading-5-line-height);
}

.news__date {
    font-size: 14px;
    line-height: 22px;
    color: var(--color-secondary-3);
}

.news__content {
    display: none;
    color: var(--color-secondary-3);
    font-size: 14px;
    line-height: 22px;
    margin-top: auto;
    width: 100%;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .news__content *:last-child {
        margin-bottom: 0;
    }

.news__footer {
    margin: 35px 0 50px;
}

    .news__footer .read-more {
        display: none;
    }

@media (min-width: 768px) {
    .news__link {
        min-height: 220px;
        justify-content: flex-start;
        padding: 20px 25px 0;
    }

    .news__section {
        margin-bottom: 0;
    }

    .news__scroller {
        overflow-x: visible;
        margin: 35px 0;
    }

    .news__list {
        margin: 0;
        padding: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .news--overview .news__list {
        gap: 22px;
    }

    .news__title {
        margin-bottom: 20px;
    }

    .news__date {
        margin-top: auto;
    }

    .news__footer {
        margin: 60px 0 80px;
    }

        .news__footer .links {
            display: none;
        }

        .news__footer .read-more {
            display: flex;
        }
}

@media (min-width: 1024px) {
    .news__scroller {
        margin: 80px 0;
    }

    .news__link {
        min-height: 400px;
        padding: 40px 45px 50px;
        border-top: 0;
        border-left: 0;
        border-right: 0;
    }

    .news__headline {
        font-size: var(--heading-3-font-size);
        line-height: var(--heading-3-line-height);
    }

    .news__title {
        font-size: var(--heading-4-font-size);
        line-height: var(--heading-4-line-height);
    }

    .news__date {
        margin-top: 0;
    }

    .news__content {
        display: -webkit-box;
        font-size: var(--heading-6-font-size);
        line-height: var(--heading-6-line-height);
    }

    .news__footer {
        margin-bottom: 100px;
    }
}

@media (min-width: 1200px) {
    .news__link {
        min-height: 475px;
    }

    .news__title {
        font-size: var(--heading-3-font-size);
        line-height: var(--heading-3-line-height);
    }
}

/* News overview */
.news--overview {
    padding: 30px 0 0;
}

    .news--overview .news__scroller {
        overflow-x: visible;
        margin: 35px 0 50px;
    }

    .news--overview .news__list {
        padding: 0;
        margin: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news--overview .news__section {
        margin-bottom: 0;
    }

    .news--overview .news__title {
        margin-top: 10px;
    }

    .news--overview .news__headline {
        color: var(--color-primary);
    }

        .news--overview .news__headline::after {
            content: '';
            margin: 20px 0 0 1px;
            display: block;
            width: 45px;
            height: 3px;
            background-color: var(--color-primary);
        }

    .news--overview .news__footer .read-more {
        display: flex;
    }

@media (max-width: 599px) {
    .news--overview .news__link {
        min-height: 230px;
        justify-content: flex-start;
        padding: 15px 18px;
    }

    .news--overview .news__title {
        font-size: 16px;
        line-height: 22px;
    }

    .news--overview .news__date {
        font-size: 12px;
        line-height: 16px;
        margin-bottom: 3px;
        margin-top: auto;
    }
}

@media (min-width: 600px) {
    .toggler {
        margin-left: auto;
    }

    .news__header {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news--overview .news__content {
        display: -webkit-box;
    }

    .news--overview .news__link {
        min-height: 325px;
        padding: 35px;
    }
}

@media (min-width: 768px) {
    .news--overview .news__date {
        margin-top: 0;
    }

    .news--overview .news__title {
        margin-bottom: 10px;
        font-size: var(--heading-4-font-size);
        line-height: var(--heading-4-line-height);
    }

    .news--overview .news__headline {
        font-size: 28px;
        line-height: 36px;
    }

        .news--overview .news__headline::after {
            width: 30px;
            height: 4px;
        }
}

@media (min-width: 900px) {
    .news--overview .news__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .news--overview .news__list {
        gap: 30px;
    }

    .news--overview .news__link {
        padding: 40px;
        min-height: 400px;
    }

    .news--overview .news__section {
        margin-bottom: 10px;
    }

    .news--overview .news__headline {
        font-size: 40px;
        line-height: 48px;
    }

        .news--overview .news__headline::after {
            margin: 40px 0 0 1px;
        }
}

@media (min-width: 1200px) {
    .news--overview .news__title {
        font-size: var(--heading-3-font-size);
        line-height: var(--heading-3-line-height);
    }

    .news--overview .news__link {
        padding: 45px;
        min-height: 450px;
    }
}
