/* Griglia di foto a tutta larghezza con ingrandimento. */
.few-gallery-grid-wrap {
	width: 100%;
	overflow: visible;
}

.few-gallery-grid {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	display: grid;
	gap: 0;
	background: var(--gray-dark, #222);
}

.few-grid--cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.few-grid--cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.few-grid--cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.few-gallery-grid__item {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--gray);
	aspect-ratio: 36/24;
}

.few-gallery-grid__item::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(0 0 0 / 0.65), transparent);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.few-gallery-grid__item:is(:hover, :focus-visible)::after {
	opacity: 1;
}

.few-gallery-grid__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.few-gallery-grid__item:hover img {
	transform: scale(1.03);
}

.few-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 100000;
}

.few-lightbox.is-open {
	display: block;
}

.few-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.78);
}

.few-lightbox__dialog {
	position: absolute;
	inset: 4vh 4vw;
	display: flex;
	align-items: center;
	justify-content: center;
}

.few-lightbox__img {
	max-width: 100%;
	max-height: 88vh;
	object-fit: contain;
	box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45);
}

.few-lightbox__close,
.few-lightbox__nav {
	position: absolute;
	border: 0;
	background: none !important;
	color: #fff;
	cursor: pointer;
}

.few-lightbox__close {
	top: 30px;
	right: 30px;
	position: fixed;
	width: 48px;
	height: 48px;
	font-size: 2.5rem;
	line-height: 1;
	color: var(--primary) !important;

	&:is(:hover, :focus, :active) {
		color: var(--primary-dark) !important;
	}
}

.few-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 4rem;
	font-size: 3rem;
	line-height: 1;
}

.few-lightbox__nav--prev {
	left: 0;
}

.few-lightbox__nav--next {
	right: 0;
}

.few-lightbox__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -32px;
	text-align: center;
	color: #fff;
	font-size: 14px;
}

body.few-lightbox-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.few-grid--cols-3,
	.few-grid--cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.few-lightbox__dialog {
		inset: 6vh 3vw;
	}
}
