/* Baltic Agro Koduaed – image galleries in posts/pages (WPBakery media grid, [gallery] …, printed by
   balticagro-site/includes/api-editorial.php) and the lightbox of assets/js/gallery.js. Loaded only where a gallery is.
   Selectors are specific enough for The7/WPBakery pages (legacy mode) too. */

.ba-gallery { margin: 28px 0 36px; clear: both; }
.ba-gallery .ba-gallery__list {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
	list-style: none; margin: 0; padding: 0;
}
.ba-gallery--two .ba-gallery__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ba-gallery--one .ba-gallery__list { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
.ba-gallery .ba-gallery__item { margin: 0; padding: 0; min-width: 0; background: none; }
.ba-gallery .ba-gallery__item::marker, .ba-gallery .ba-gallery__item::before { content: none; display: none; }
.ba-gallery .ba-gallery__fig { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ba-gallery .ba-gallery__link {
	position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 8px; background: #eef0e4;
	text-decoration: none; cursor: zoom-in;
}
.ba-gallery .ba-gallery__link:focus-visible { outline: 3px solid var(--ba-green, #426716); outline-offset: 2px; }
.ba-gallery .ba-gallery__img {
	display: block; width: 100%; height: 100%; max-width: none; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px;
	transition: transform .25s ease, filter .25s ease; box-shadow: none; margin: 0;
}
.ba-gallery .ba-gallery__fig > .ba-gallery__img { background: #eef0e4; }
.ba-gallery .ba-gallery__link:hover .ba-gallery__img { transform: scale(1.04); filter: brightness(1.04); }
.ba-gallery .ba-gallery__cap { font-size: 13px; line-height: 1.45; color: var(--ba-text-muted, #6b6b62); margin: 0; }
@media (max-width: 480px) {
	.ba-gallery .ba-gallery__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.ba-gallery--one .ba-gallery__list { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.ba-gallery .ba-gallery__img { transition: none; }
	.ba-gallery .ba-gallery__link:hover .ba-gallery__img { transform: none; }
}
/* The lightbox itself (dialog of gallery.js) is in lightbox.css (also used by product images and single content images). */
