/* Slideshow Container */
.slideshow-container {
    position: relative;
    width: 100%;
    max-width: clamp(600px, 80%, 900px);
    margin: 0 auto 30px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Einzelne Slides - mit aspect-ratio statt fester Höhe für bessere Responsivität */
.slide {
    display: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    animation-duration: 1s;
    position: relative;
}

/* Bilder in Slides - verbesserte responsive Darstellung */
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.slide.active {
    display: block;
    animation: fadeIn 1s;
}

/* Fade-Animation */
@keyframes fadeIn {
    from {
        opacity: 0.4
    }

    to {
        opacity: 1
    }
}

/* Vor/Zurück-Buttons - optimiert für Touch-Geräte */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: clamp(12px, 2vw, 16px);
    color: white;
    font-weight: bold;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    border-radius: 0 5px 5px 0;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s;
    /* Verbesserte Touch-Fläche */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Beschreibungstext für Slides - verbesserte Lesbarkeit */
.slide-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: clamp(10px, 2vw, 15px);
    text-align: center;
    z-index: 2;
    /* Stellt sicher, dass der Text über dem Bild liegt */
}

.slide-text h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
}

.slide-text p {
    margin: 0;
    font-size: clamp(0.85rem, 1vw, 1rem);
    text-align: center;
}

/* Slideshow-Anpassungen spezifisch für Container3 */
#container3 .slideshow-container {
    position: relative;
    width: 100%;
    max-width: clamp(600px, 80%, 900px);
    margin: 0 auto 30px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(13, 71, 161, 0.2);
    /* Angepasst an Dunkelblau */
    border: 1px solid rgba(21, 101, 192, 0.1);
    /* Subtiler blauer Rand */
    transition: box-shadow 0.3s ease;
}

#container3:hover .slideshow-container {
    box-shadow: 0 5px 15px rgba(13, 71, 161, 0.3);
    /* Verstärkter Schatten beim Hover */
}

/* Überlagerung für die Slides im Container3 */
#container3 .slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            rgba(227, 242, 253, 0.05),
            /* Sehr leichter Farbton des Hellblau oben */
            rgba(13, 71, 161, 0.3));
    /* Dunkelblau-Farbton unten für besseren Text-Kontrast */
    z-index: 1;
}

/* Anpassung der Navigations-Buttons für Container3 */
#container3 .prev,
#container3 .next {
    background-color: rgba(21, 101, 192, 0.7);
    /* Mittelblau aus Container3 */
    transition: all 0.3s ease;
}

#container3 .prev:hover,
#container3 .next:hover {
    background-color: rgba(13, 71, 161, 0.9);
    /* Dunkelblau beim Hover */
    transform: translateY(-50%) scale(1.05);
}

/* Anpassung des Textbereichs für Container3 */
#container3 .slide-text {
    background: linear-gradient(to top,
            rgba(13, 71, 161, 0.85),
            /* Dunkelblau mit hoher Transparenz */
            rgba(13, 71, 161, 0.6) 60%,
            rgba(13, 71, 161, 0) 100%);
    /* Auslaufender Gradient nach oben */
    backdrop-filter: blur(3px);
    /* Leichter Unschärfe-Effekt für moderne Browser */
}

#container3 .slide-text h3 {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

#container3 .slide-text p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Punkt-Indikatoren für die Slideshow */
.dots-container {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: rgba(0, 0, 0, 0.8);
}

#container3 .dot {
    background-color: rgba(21, 101, 192, 0.3);
}

#container3 .dot.active {
    background-color: rgba(21, 101, 192, 0.8);
}

/* Responsive Anpassungen für kleine Bildschirme */
@media (max-width: 768px) {
    .slideshow-container {
        margin-bottom: 40px;
        max-width: 90%;
    }

    .slide {
        aspect-ratio: 4 / 3;
        /* Kompakteres Seitenverhältnis für mobile Geräte */
    }

    .slide-text {
        padding: 10px;
    }

    .slide-text h3 {
        font-size: 1.1rem;
    }

    .slide-text p {
        font-size: 0.85rem;
    }

    .prev,
    .next {
        padding: 10px;
        font-size: 0.9rem;
        min-width: 36px;
        min-height: 36px;
    }

    .dot {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* Mittlere Bildschirme (Laptops, Desktops) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .slideshow-container {
        max-width: 800px;
    }
}

/* Größere Bildschirme (größere Desktops) */
@media (min-width: 1600px) and (max-width: 1919px) {
    .slideshow-container {
        max-width: 1000px;
        margin-bottom: 40px;
    }

    .slide-text {
        padding: 18px;
    }

    .slide-text h3 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .slide-text p {
        font-size: 1.1rem;
    }
}

/* Sehr große Bildschirme (4K und größer) */
@media (min-width: 1920px) {
    .slideshow-container {
        max-width: 1200px;
        margin-bottom: 50px;
    }

    .slide-text {
        padding: 20px;
    }

    .slide-text h3 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .slide-text p {
        font-size: 1.2rem;
    }

    .prev,
    .next {
        padding: 20px;
        font-size: 1.4rem;
        min-width: 50px;
        min-height: 50px;
    }

    .dot {
        width: 12px;
        height: 12px;
        margin: 0 6px;
    }
}

/* Für sehr kleine mobile Bildschirme */
@media (max-width: 480px) {
    .slideshow-container {
        max-width: 100%;
        margin-left: 10px;
        margin-right: 10px;
        border-radius: 5px;
    }

    .slide {
        aspect-ratio: 1 / 1;
        /* Quadratisches Format für sehr kleine Bildschirme */
    }

    .slide-text {
        padding: 8px;
    }

    .slide-text h3 {
        font-size: 1rem;
        margin-bottom: 3px;
    }

    .slide-text p {
        font-size: 0.8rem;
    }

    .prev,
    .next {
        padding: 8px;
        font-size: 0.8rem;
        min-width: 30px;
        min-height: 30px;
    }

    .dot {
        width: 6px;
        height: 6px;
        margin: 0 2px;
    }
}