/* Grid-Layout */
.ds-gallery {
    display: flex;
    flex-wrap: wrap; /* this enables wrapping */
    align-items: flex-start;
    gap: 0.5rem;
    --ds-gap: 10px;
    --ds-cols: 0; /* 0 = auto (unbegrenzt) */
    width: 100%;
    flex-flow: row wrap;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

/* Items & Bilder */
.ds-gallery__item {
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.ds-gallery__item img {
    display: block;
    height: calc(var(--padding-horizontal) * 3);
    width: auto !important;
    border: 10px solid var(--color-text, #111);
    box-sizing: border-box;
    height: 30vh !important;
}

/* Optional: verhindert, dass 25vw in schmalen Containern zu groß ist */
/* .ds-gallery[data-cols="0"]{
    grid-template-columns: repeat(auto-fit, minmax(min(25vw, 320px), 1fr));
} */

/* Mobile Fallback: bei sehr schmalen Screens erzwungen einspaltig */
@media (max-width: 480px) {
    .ds-gallery__item {
        width: 100%;
        object-fit: cover;
    }

    .ds-gallery__item img {
        /*width: 100%;
        height: auto;
        object-fit: cover;*/
    }
}

/* Download-Hinweis */
.ds-gallery__item a {
    cursor: alias;
    text-decoration: none;
}

.ds-gallery-square {
    aspect-ratio: 1/1;
    width: 25vw;
    overflow: hidden;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    border: 1rem solid var(--color-text);
    grid-gap: 1rem;
}
