/* Hesperia — home photo strip (marquee + lightbox) */

.hesp-photo-strip {
	--hesp-strip-h: clamp(160px, 22vw, 240px);
	--hesp-strip-cols: 4.5;
	--hesp-strip-speed: 55s;
	margin: 0.75rem 0 2rem;
	/* Full-bleed dentro il box beige paddato */
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	box-sizing: border-box;
}

.hesp-photo-strip__viewport {
	overflow: hidden;
	width: 100%;
	height: var(--hesp-strip-h);
	touch-action: pan-y;
}

.hesp-photo-strip__track {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	width: max-content;
	height: 100%;
	gap: 0;
	animation: hesp-photo-strip-marquee var(--hesp-strip-speed) linear infinite;
	will-change: transform;
}

.hesp-photo-strip:hover .hesp-photo-strip__track,
.hesp-photo-strip:focus-within .hesp-photo-strip__track {
	animation-play-state: paused;
}

.hesp-photo-strip__item {
	flex: 0 0 calc(100vw / var(--hesp-strip-cols));
	width: calc(100vw / var(--hesp-strip-cols));
	display: block;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	line-height: 0;
	overflow: hidden;
	position: relative;
}

.hesp-photo-strip__item img {
	display: block;
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: 50% 50% !important;
	pointer-events: none;
	user-select: none;
}

@media (max-width: 900px) {
	.hesp-photo-strip {
		--hesp-strip-cols: 3.2;
		--hesp-strip-h: clamp(140px, 28vw, 200px);
	}
}

@media (max-width: 600px) {
	.hesp-photo-strip {
		--hesp-strip-cols: 2.2;
	}
}

@keyframes hesp-photo-strip-marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hesp-photo-strip__track {
		animation: none;
		overflow-x: auto;
		width: 100%;
		-webkit-overflow-scrolling: touch;
	}
}

/* Lightbox gallery */
.hesp-photo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem 4.5rem;
	background: rgba(20, 16, 12, 0.9);
	cursor: zoom-out;
}

.hesp-photo-lightbox[hidden] {
	display: none !important;
}

.hesp-photo-lightbox__stage {
	margin: 0;
	max-width: min(92vw, 1200px);
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	cursor: default;
}

.hesp-photo-lightbox__img {
	max-width: 100%;
	max-height: calc(88vh - 2rem);
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hesp-photo-lightbox__counter {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.85rem;
	letter-spacing: 0.12em;
	font-family: Inter, system-ui, sans-serif;
}

.hesp-photo-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.hesp-photo-lightbox__close:hover,
.hesp-photo-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.22);
}

.hesp-photo-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.hesp-photo-lightbox__nav:hover,
.hesp-photo-lightbox__nav:focus-visible {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.5);
	outline: none;
}

.hesp-photo-lightbox__nav--prev {
	left: 1rem;
}

.hesp-photo-lightbox__nav--next {
	right: 1rem;
}

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

@media (max-width: 700px) {
	.hesp-photo-lightbox {
		padding: 1rem 0.75rem 3.5rem;
	}

	.hesp-photo-lightbox__nav {
		top: auto;
		bottom: 1rem;
		transform: none;
	}

	.hesp-photo-lightbox__nav--prev {
		left: calc(50% - 3.5rem);
	}

	.hesp-photo-lightbox__nav--next {
		right: calc(50% - 3.5rem);
	}
}

/* Spazio titolo → fascia: riduce il margine della linea dorata Elementor */
body.home .elementor-element-61084b19 {
	margin-bottom: 0 !important;
}

body.home .elementor-element-61084b19::after {
	margin-bottom: 1.25rem !important;
}
