/* Referenz-Raster: video + images in one 3-column grid (measured on the old
   vc_gallery: 30px gap, 3:2 tiles, square corners). */
.rg {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.rg-cell {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 0;
    min-width: 0;
}
.rg-image a {
    display: block;
    width: 100%;
    height: 100%;
}
.rg .rg-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
}
.rg .rg-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}
/* Format B: the video fills its 3:2 cell edge to edge, same top and bottom as the image cells */
body.referenz-format-b .rg .rg-video video {
    object-fit: cover;
}
/* Format A: video full width in 16:9 above the images */
body.referenz-format-a .rg .rg-video {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
}
@media (max-width: 690px) {
    .rg {
        grid-template-columns: minmax(0, 1fr);
    }
}
