.carousel {
     position: relative;
    max-width: 1200px;
    margin: 0 auto;

}

.carousel-viewport {
    overflow: hidden;
}

.cards-track {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    transition: transform .4s ease;
padding-bottom: 2px;
}

/* Desktop: 4 Karten sichtbar */

.card {
    flex: 0 0 calc((100% - 2.5rem) / 3);
    border: 1px solid rgba(0,0,0,.1);
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
min-height: 500px;
}

/* Header mit rechter Schräge */

.card-header {
    display: inline-flex;
    align-items: center;

    align-self: flex-start;

    height: 26px;
    padding: 2px 40px 2px 16px;

    font-size: 1.6rem;
    
    line-height: 1.3;
    text-transform: none;
    white-space: nowrap;

    color: #fff;

    background: linear-gradient(
        315deg,
        transparent 20px,
        #D80E16 0
    ) top left;
}

.card-content {
    flex: 1;
    padding: 1rem;
}

.card-section {
    padding-top: .85rem;
    margin-top: .85rem;
    border-top: 1px solid #ddd;
}

.card-section:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.card-section h3 {
    margin: 0 0 .35rem;
    font-size: 2rem;
    line-height: 1.25;
}

.card-section p {
    margin: 0 0 .6rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.card-section time {
    display: block;
    font-size: 1.4rem;
    color: #555759;
}

/* Pfeilnavigation mit Border-Trick */

.carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 10;

    width: 0;
    height: 0;
    padding: 0;

    border: 0;
    background: transparent;

    cursor: pointer;
    transform: translateY(-50%);
    transition:
        opacity .2s ease,
        filter .2s ease;
}

/* Pfeil nach links */

.carousel-arrow--previous {
    left: -60px;

    border-top: 30px solid transparent;
    border-right: 30px solid #000;
    border-bottom: 30px solid transparent;
    border-left: 20px solid transparent;
}

/* Pfeil nach rechts */

.carousel-arrow--next {
    right: -60px;

    border-top: 30px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 30px solid transparent;
    border-left: 30px solid #000;
}

/* Linker Pfeil */

.carousel-arrow--previous:hover:not(:disabled) {
    border-right-color: #D80E16;
}

/* Rechter Pfeil */

.carousel-arrow--next:hover:not(:disabled) {
    border-left-color: #D80E16;
}

.carousel-arrow:focus-visible {
    outline: 3px solid #777;
    outline-offset: 6px;
}

.carousel-arrow:disabled {
    opacity: .2;
    cursor: not-allowed;
}

/* Dots */

.dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 1rem;
}

.dot {
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #ccc;
    cursor: pointer;
}

.dot:hover {
    background: #999;
}

.dot:focus-visible {
    outline: 3px solid #777;
    outline-offset: 3px;
}

.dot.is-active {
    background: #111;
}

/* Mobil: 2 Karten sichtbar */

@media (max-width: 768px) {
    body {
        padding: 1rem 2.75rem;
    }

 .carousel{
        width:calc(100% - 40px);
        margin:0 auto;

    }
    .cards-track {
        gap: .9rem;
    }

    .card {
        flex-basis: 100%;
    }

    .card-content {
        padding: .85rem;
    }

    .card-section h3 {
        font-size: 1.4rem;
    }

    .card-section p {
        font-size: 1.3rem;
    }

    .carousel-arrow--previous {
        left: -43px;

        border-top-width: 20px;
        border-right-width: 20px;
        border-bottom-width: 20px;
        border-left-width: 12px;
    }

    .carousel-arrow--next {
        right: -43px;

        border-top-width: 20px;
        border-right-width: 12px;
        border-bottom-width: 20px;
        border-left-width: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cards-track,
    .carousel-arrow {
        transition: none;
    }
}