.photo-gallery > div {
	display: flex;
}

.photo-gallery a,
.photo-gallery img {
	display: block;
}

[data-page="portfolio"] p + ul {
	margin-top: 20px;
}

.photo-gallery.carousel {
	position: relative;
	margin: 20px 0 30px;
}

.photo-gallery.carousel > div {
	gap: 20px;
	overflow: hidden;
}

.photo-gallery.carousel a {
	flex: 0 0 220px;
	height: 160px;
	box-sizing: border-box;
	overflow: hidden;
	border: 1px solid #aeafb2;
	border-radius: 5px;
}

.photo-gallery.carousel img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.photo-gallery a:hover img {
	filter: brightness(.8);
}

.photo-gallery :focus-visible,
.photo-viewer > button:focus-visible {
	outline: 2px solid #007cc3;
	outline-offset: -2px;
}

.photo-gallery.carousel > button {
	position: absolute;
	top: calc(50% - 25px);
	width: 50px;
	height: 50px;
	border: 0;
	border-radius: 50%;
	background: url(stampsoft/i/arrows_carousel_grey_quadro.png);
	cursor: pointer;
}

.photo-gallery.carousel > .prev {
	left: -100px;
}

.photo-gallery.carousel > .next {
	right: -100px;
	background-position: right top;
}

@media (max-width: 1420px) {
	.photo-gallery.carousel > .prev {
		left: 8px;
	}

	.photo-gallery.carousel > .next {
		right: 8px;
	}
}

[data-page="fotogalereya"] .photo-gallery {
	margin: 16px 0;
}

[data-page="fotogalereya"] .photo-gallery > div {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 8px;
}

[data-page="fotogalereya"] .photo-gallery a {
	aspect-ratio: 4 / 3;
	border: 1px solid #e0e5ea;
	border-radius: 4px;
	background: #f5f7f9;
	overflow: hidden;
}

[data-page="fotogalereya"] > .photo-gallery:first-child a {
	aspect-ratio: 3 / 4;
}

[data-page="fotogalereya"] .photo-gallery img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.photo-viewer {
	position: fixed;
	inset: 0;
	margin: auto;
	max-width: calc(100% - 24px);
	max-height: calc(100% - 24px);
	padding: 48px 42px 12px;
	border: 0;
	border-radius: 8px;
	box-sizing: border-box;
	background: #fff;
}

.photo-viewer::backdrop {
	background: #000b;
}

.photo-viewer img {
	display: block;
	max-width: min(100%, 1100px);
	max-height: calc(100vh - 84px);
	object-fit: contain;
}

.photo-viewer > button {
	position: absolute;
	border: 0;
	border-radius: 4px;
	padding: 6px 10px;
	background: #edf1f4;
	color: #193958;
	cursor: pointer;
}

.photo-viewer > .close {
	right: 12px;
	top: 10px;
}

.photo-viewer > .prev,
.photo-viewer > .next {
	top: 50%;
	font-size: 24px;
}

.photo-viewer > .prev {
	left: 6px;
}

.photo-viewer > .next {
	right: 6px;
}
