/* Block: Galerija (the large image opens in a dialog, see site.css .rw-lightbox) */
.rw-gallery { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.rw-gallery figure { margin: 0; }
.rw-gallery a { display: block; overflow: hidden; border-radius: 14px; background: var(--rw-soft); box-shadow: var(--rw-shadow); aspect-ratio: 16 / 10; cursor: zoom-in; }
.rw-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rw-gallery a:hover img { transform: scale(1.04); }
.rw-gallery figcaption { margin-top: 10px; font-size: .9rem; color: var(--rw-muted); }
.rw-gallery-single a { aspect-ratio: auto; }

@media (min-width: 768px) {
    .rw-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .rw-gallery-single { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
    .rw-gallery:not(.rw-gallery-single):not(:has(> li:nth-child(2):last-child)):not(:has(> li:nth-child(4):last-child)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .rw-gallery:not(.rw-gallery-single) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    /* No lone image in the last row (1.28.0, rule 15) */
    .rw-gallery > li:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; }
    .rw-gallery a { border-radius: 10px; }
    .rw-gallery figcaption { margin-top: 6px; font-size: .8rem; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .rw-gallery:not(.rw-gallery-single):not(:has(> li:nth-child(2):last-child)):not(:has(> li:nth-child(4):last-child)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
