.slider-wrapper {
    position: relative;
    margin: auto;
    display: flex;
    align-items: center;
}

.slider-button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

.slider-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.slider {
    overflow-x: scroll;
    white-space: nowrap;
    width: 100%;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory; /* Slider soll horizontal snappen */
}

.slides {
    display: inline-flex;
    transition: transform 0.3s ease-in-out;
    height: 400px;
    scroll-snap-type: none; /* Verhindert unnötiges Snappen des gesamten Slide-Containers */
}


.slide {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    max-width: 300px;
    height: 400px;
    margin-right: 10px;
    scroll-snap-align: start; /* Jeder Slide rastet am Anfang ein */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Sorgt für gleichmäßige Bilddarstellung */
    display: block;
}


.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    text-align: center;
    padding: 5px 10px;
    font-size: 16px;
}

.caption h3 {
    color: white;
}

/* Scrollbar Styling */
.slider::-webkit-scrollbar {
    height: 8px;
}

.slider::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.slider::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* Anpassungen für mobile Endgeräte */
@media (max-width: 768px) {
    .slide {
        max-width: 200px; /* Kleinere Slide-Breite auf mobilen Geräten */
        margin-right: 5px;
    }

    .caption {
        font-size: 14px; /* Kleinere Schriftgröße für die Bildbeschreibung */
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .slide {
        max-width: 150px; /* Noch kleinere Slide-Breite auf sehr kleinen Geräten */
        margin-right: 5px;
    }

    .caption {
        font-size: 12px; /* Noch kleinere Schriftgröße für bessere Lesbarkeit */
        padding: 3px;
    }
}
