.slider {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: var(--shadow)
}

.slide,
.project-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s;
    z-index: 0;
}

/* Bild und Caption innerhalb des project-slide */
.project-slide figure {
    margin: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

.project-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay-Beschriftung unten — dezent, gut lesbar, mit leichter Auf-Animation */
.project-slide .caption {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1.1rem 1.25rem;
    color: #fff;
    background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.45) 40%, rgba(0,0,0,0.72) 100%);
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    backdrop-filter: blur(6px); /* optional, wirkt nur in unterstützten Browsern */
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none; /* Caption blockiert keine Klicks auf den Slider */
    transform: translateY(8px);
    opacity: 0;
    transition: transform .45s ease, opacity .45s ease;
    max-width: 70%;
}

/* sichtbar wenn Slide aktiv ist */
.project-slide.show .caption {
    transform: translateY(0);
    opacity: 1;
}

/* Typographie */
.project-slide .caption h3 {
    margin: 0 0 .25rem 0;
    font-size: 1.18rem;
    line-height: 1.15;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.project-slide .caption p {
    margin: 0;
    font-size: .98rem;
    line-height: 1.35;
    color: rgba(255,255,255,0.95);
}

/* Mobile: Caption breiter und kompakter */
@media (max-width: 700px) {
    .project-slide .caption {
        left: .6rem;
        right: .6rem;
        bottom: .6rem;
        padding: .9rem;
        max-width: 100%;
    }
    .project-slide .caption h3 { font-size: 1rem; }
    .project-slide .caption p { font-size: .9rem; }
}

/* Sichtbarkeits-Klassen (bereits vorhanden) */
.slide.show,
.project-slide.show {
    opacity: 1;
    z-index: 1;
}

.slide img,
.project-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider::before {
    content: '';
    display: block;
    padding-top: 56%
}