figure {
    margin: 1em 0;
}

/* Standardbilder und Beschriftungen: 60 % Breite */
figure img {
    display: block;
    width: 60%;
    height: auto;
}

figcaption {
    width: 60%; /* Textbreite = Bildbreite */
    margin-top: 0.5em; /* Etwas Abstand zwischen Bild und Text */
    color: black; /* Sicherstellen, dass der Text sichtbar ist */
    font-size: 0.9rem; /* Angemessene Schriftgröße */
    line-height: 1.4;
}

figcaption h4,
figcaption h5,
figcaption p {
    margin: 0;
}

/* Kleine Bilder durch KLasse .foto30 */
.foto30 img,
.foto30 figcaption {
    width: 30%;
}

/* Bild links, Bildunterschrift rechts */
figure.foto-mit-text-rechts {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

figure.foto-mit-text-rechts a {
    flex: 0 0 50%;
}

figure.foto-mit-text-rechts img {
    width: 100%;
}

figure.foto-mit-text-rechts figcaption {
    flex: 1;
    width: auto;
    margin-top: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Anpassungen für Smartphones */
@media (max-width: 600px) {
    figure img,
    figcaption,
    .foto30 img,
    .foto30 figcaption {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
  
  figure figcaption {
    margin-top: 0.2rem;
    padding-top: 0;
    line-height: 1.2;
  }
    
    figure.foto-mit-text-rechts {
        display: block;
    }

    figure.foto-mit-text-rechts a,
    figure.foto-mit-text-rechts figcaption {
        display: block;
        width: 100%;
    }

    figure.foto-mit-text-rechts figcaption {
        margin-top: 0.5em;
    }
}
