/* Fotogalerie – web. Barvy a písmo se dědí z šablony (YOOtheme). */

/* ---------- Náhled [galerie-…] ---------- */

.fg-preview {
	display: grid;
	grid-template-columns: repeat(var(--fg-cols, 3), minmax(0, 1fr));
	gap: var(--fg-gap, 8px);
	margin: 0;
}
.fg-preview .fg-hidden { display: none !important; }

/* ---------- Mřížka zobrazeni="mrizka" ---------- */

.fg-gallery {
	display: grid;
	grid-template-columns: repeat(var(--fg-cols-m, 2), minmax(0, 1fr));
	gap: var(--fg-gap, 12px);
	margin: 0 0 1.5em;
}
@media (min-width: 640px) {
	.fg-gallery { grid-template-columns: repeat(var(--fg-cols-t, 3), minmax(0, 1fr)); }
}
@media (min-width: 960px) {
	.fg-gallery { grid-template-columns: repeat(var(--fg-cols, 4), minmax(0, 1fr)); }
}

/* ---------- Společné ---------- */

.fg-preview .fg-item,
.fg-gallery .fg-item {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: var(--fg-ratio, 1 / 1);
	background: rgba(127, 127, 127, .15);
}
.fg-preview .fg-img,
.fg-gallery .fg-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .4s ease;
}
.fg-preview .fg-item:hover .fg-img,
.fg-gallery .fg-item:hover .fg-img { transform: scale(1.05); }

.fg-gallery--natural .fg-item { aspect-ratio: auto; background: none; }
.fg-gallery--natural .fg-img { height: auto; }

/* Ztmavená poslední fotka s počtem */
.fg-more {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	line-height: 1.1;
	text-align: center;
	transition: background .3s ease;
}
.fg-item--more:hover .fg-more { background: rgba(0, 0, 0, .4); }
.fg-more-num { font-size: 1.9em; font-weight: 600; }
.fg-more-label { font-size: .85em; opacity: .9; }

.fg-tabs { margin-bottom: 1.2em; }

@media (prefers-reduced-motion: reduce) {
	.fg-preview .fg-img, .fg-gallery .fg-img, .fg-more { transition: none; }
}
