.portfolio-section{
    display: flex;
}
/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%; /* Passen Sie die maximale Breite des Containers an */
    flex-direction: column; /* Projekte vertikal für schmale Bildschirme */
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    padding: 0 1rem;
}

/* Carousel */
.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 1rem; /* Optional: Abstand zwischen den Karten */
}

/* Karten (Items) */
.card {
    flex: 0 0 auto; /* Exakte Breite: 1/4 des Containers */
    width: auto; /* Sicherstellen, dass nur drei Elemente sichtbar sind */
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
    transition: width 0.3s ease; /* Sanfte Größenänderung */
}

.carousel:hover > :not(:hover){
    filter: blur(5px);
    opacity: 0.5;
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.card-description {
    padding: 1rem;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
}

.carousel-button.prev {
    left: -40px;
    display: block;
}

.carousel-button.next {
    right: -40px;
    display: block;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

@media (max-width: 768px) {
    .carousel {
        flex-direction: row; /* Horizontales Scrollen */
    }

    .card {
        flex: 0 0 90%; /* Zeigt ein Projekt an */
        margin: 0 auto;
    }

    .carousel-container {
        padding: 1rem;
    }

    .carousel-button {
        display: none; /* Entfernt Buttons für einfaches Scrollen */
    }
}