.news-carousel {
    margin: 24px 0;
    position: relative;
}

/* Viewport: hide scrollbar */
.news-carousel_viewport {
    overflow-x: auto;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: touch;
    padding: 6px 16px 18px; /* was 6px 2px 18px */
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
}

    .news-carousel_viewport::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Edge */
    }

    .news-carousel_viewport.is-animating {
        scroll-snap-type: none !important;
    }

.card-news {
    flex: 0 0 calc((100% - 22px) / 2);
    min-width: 300px; /* prevents absurd shrinking */
    scroll-snap-align: start;
    border-radius: var(--umbraco-border-radius);
    background: #fff;
    overflow: hidden;
    max-width: 340px;
    min-height: 530px;

    a {
        color: var(--umbraco-body-secondary-color);
    }
}

    .card-news:hover {
        .card-img-cover:before {
            opacity: 0.7;
        }
    }

.news-carousel {
 
    .card-img-cover:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 225px;
        background-image: url(/media/qixextri/nieuws_afbeelding-hover-blauw75_tekengebied-1.png);
        background-size: cover;
        background-position: center;
        z-index: 2;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .image-container {
        height: 225px;
        min-height: 225px;
        max-height: 225px;
        overflow: hidden;
        position: relative;
    }

    img.card-img-top {
        display: block;
        margin: 0;
        width: 100%;
        height: 225px;
        object-fit: cover;
    }
}

.card-news {
    .card-title {
        font-weight: 700;
        overflow: hidden;
        max-height: 80px;
        min-height: 75px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }
    .card-new-summery {
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-height: 110px;
        min-height: 110px;
    }
}

.card-news {
    position: relative;
}

.card-news .card-body {
    display: flex;
    flex-direction: column;
}

.card-news .badge {
    align-self: flex-start;
}

.card-news .card-body > .mt-3 {
    margin-top: auto !important;
}

.card-news .card-body a::after {
    content: "";
    position: absolute;
    inset: 0;
}

/* Track */
.news-carousel_track {
    display: flex;
    gap: 22px;
    padding: 0; /* viewport already pads */
}

.news-carousel_ctrl {
    pointer-events: auto;
    border: 1px solid rgba(0,0,0,.25);
    background: rgba(255,0,0,.92);
    font-size: 22px;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #ff0000;
    border-radius: 6px;
    z-index: 1;

    .fa {
        color: #fff;
    }
}


    .news-carousel_ctrl:disabled {
        opacity: .4;
        cursor: default;
        box-shadow: none;
    }

.news-carousel_ctrl {
    transition: transform 180ms cubic-bezier(.2,.8,.2,1), background 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms cubic-bezier(.2,.8,.2,1);
}

    .news-carousel_ctrl:hover {
        transform: scale(1.06);
        background: rgba(255,0,0,1);
        box-shadow: 0 10px 22px rgba(0,0,0,.22);

        .fa {
            color: #000;
        }
    }

/* Overlay controls */
.news-carousel_controls {
    position: absolute;
    left: -22px; /* push outside */
    right: -22px; /* push outside */
    top: 60%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0;
    z-index: 5;
}

.news-overview {
    .card-news {
        max-width: unset;
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .news-overview .card-news, .card-news {
        flex: 0 0 85vw;
        min-width: 0;
    }
}

@media (min-width: 992px) {
    .news-overview .card-news, .card-news {
        flex: 0 0 45vw;
        min-width: 0;
        max-width: unset;
    }
}

@media (min-width: 1200px) {
    .card-news {
        flex: 0 0 calc((100% - 22px) / 2);
        min-width: 300px;
        max-width: 340px;
    }
}
