/* ==========================================================
   Thymos Press Slider
   Slider orizzontale a tre colonne + lightbox accessibile
   ========================================================== */

.thymos-press-slider {
	--th-press-gap: 24px;
	--th-press-per-view: 3;
	--th-press-speed: 650ms;
	--th-press-image-ratio: 0.68;
	--th-press-nav-color: #d4e4f3;
	--th-press-nav-hover: #faf9f6;

	position: relative;
	width: 100%;

	box-sizing: border-box;
	overflow: hidden;

	outline: none;
}

.thymos-press-slider,
.thymos-press-slider *,
.thymos-press-lightbox,
.thymos-press-lightbox * {
	box-sizing: border-box;
}

.thymos-press-slider:focus-visible {
	outline: 2px solid var(--th-press-nav-color);
	outline-offset: 4px;
}

.thymos-press-slider__viewport {
	position: relative;
	touch-action: pan-y;
	user-select: none;
	width: 100%;
	overflow: hidden;
}

.thymos-press-slider__track {
	display: flex;
	align-items: flex-start;
	gap: var(--th-press-gap);
	width: 100%;
	min-width: 0;
	will-change: transform;
	transform: translate3d(0, 0, 0);
	transition: transform var(--th-press-speed) cubic-bezier(0.16, 1, 0.3, 1);
}

.thymos-press-slider__item {
	flex: 0 0 calc(
		(100% - ((var(--th-press-per-view) - 1) * var(--th-press-gap))) /
		var(--th-press-per-view)
	);
	min-width: 0;
}

.thymos-press-slider__media {
	position: relative;
	width: 100%;
	aspect-ratio: var(--th-press-image-ratio);
	overflow: hidden;
	background-color: #d9d9d9;
}

.thymos-press-slider__image-button {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: inherit;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	cursor: zoom-in;
	overflow: hidden;
}


.thymos-press-slider.has-no-thymos-press-lightbox .thymos-press-slider__image-button {
	cursor: default;
}

.thymos-press-slider.has-no-thymos-press-lightbox .thymos-press-slider__zoom {
	display: none;
}

.thymos-press-slider__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms ease;
}

.thymos-press-slider__image-button:hover .thymos-press-slider__image,
.thymos-press-slider__image-button:focus-visible 
.thymos-press-slider.has-no-thymos-press-lightbox .thymos-press-slider__image-button {
	cursor: default;
}

.thymos-press-slider.has-no-thymos-press-lightbox .thymos-press-slider__zoom {
	display: none;
}

.thymos-press-slider__image {
	transform: scale(1.018);
}

.thymos-press-slider__image-button:focus-visible {
	outline: 3px solid var(--th-press-nav-color);
	outline-offset: -3px;
}

.thymos-press-slider__zoom {
	position: absolute;
	top: 16px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(255, 255, 255, 0.42);
	border-radius: 50%;
	color: #670627;
	background: rgba(250, 249, 246, 0.88);
	box-shadow: 0 12px 30px rgba(17, 16, 15, 0.18);
	opacity: 0;
	transform: translateY(-6px) scale(0.9);
	transition: opacity 260ms ease, transform 320ms cubic-bezier(0.16, 1, 0.3, 1), background-color 260ms ease;
	pointer-events: none;
}

.thymos-press-slider__zoom svg {
	display: block;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.thymos-press-slider__image-button:hover .thymos-press-slider__zoom,
.thymos-press-slider__image-button:focus-visible .thymos-press-slider__zoom {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.thymos-press-slider__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 24px;
	color: #670627;
	font-family: var(--th-font-body, "Instrument Sans", system-ui, sans-serif);
	font-size: 14px;
	font-weight: 700;
	text-align: center;
}

.thymos-press-slider__meta {
	margin-top: 16px;
	text-align: left;
}

.thymos-press-slider__magazine {
	margin: 0;
	color: #faf9f6;
	font-family: var(--th-font-heading, "TheSeasons", Georgia, serif);
	font-size: clamp(21px, 1.7vw, 30px);
	font-weight: 400;
	line-height: 1.08;
}

.thymos-press-slider__date {
	margin-top: 5px;
	color: #d4e4f3;
	font-family: var(--th-font-body, "Instrument Sans", system-ui, sans-serif);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
}

.thymos-press-slider__navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 30px;
}

.thymos-press-slider__navigation[hidden] {
	display: none;
}

.thymos-press-slider__bullets {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.thymos-press-slider__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	min-width: 38px;
	min-height: 38px;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	color: var(--th-press-nav-color) !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: color 220ms ease, opacity 220ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.thymos-press-slider__arrow svg {
	display: block;
	width: 28px;
	height: 28px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.thymos-press-slider__arrow:hover:not(:disabled),
.thymos-press-slider__arrow:focus-visible:not(:disabled) {
	color: var(--th-press-nav-hover) !important;
}

.thymos-press-slider__arrow--prev:hover:not(:disabled),
.thymos-press-slider__arrow--prev:focus-visible:not(:disabled) {
	transform: translateX(-3px);
}

.thymos-press-slider__arrow--next:hover:not(:disabled),
.thymos-press-slider__arrow--next:focus-visible:not(:disabled) {
	transform: translateX(3px);
}

.thymos-press-slider__arrow:focus-visible {
	outline: 2px solid var(--th-press-nav-color);
	outline-offset: 1px;
}

.thymos-press-slider__arrow:disabled {
	opacity: 0.28;
	cursor: default;
}

.thymos-press-slider__bullet {
	display: block;
	width: 50px;
	height: 25px;
	margin: 0;
	padding: 0 !important;
	border: 3px solid var(--th-press-nav-color) !important;
	border-radius: 999px;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color 280ms ease, border-color 280ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease;
}

.thymos-press-slider__bullet:hover,
.thymos-press-slider__bullet:focus-visible {
	border-color: var(--th-press-nav-hover) !important;
	transform: scaleX(1.06);
}

.thymos-press-slider__bullet:focus-visible {
	outline: none;
}

.thymos-press-slider__bullet.is-active {
	border-color: var(--th-press-nav-color) !important;
	background-color: var(--th-press-nav-color) !important;
}

.thymos-press-slider__bullet:not(.is-active) {
	opacity: 0.98;
}

/* Lightbox */
html.thymos-press-lightbox-open,
body.thymos-press-lightbox-open {
	overflow: hidden !important;
}

.thymos-press-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 88px;
	visibility: hidden;
	opacity: 0;
	background: rgba(17, 16, 15, 0.9);
	backdrop-filter: blur(8px);
	transition: opacity 240ms ease, visibility 240ms ease;
}

.thymos-press-lightbox.is-open {
	visibility: visible;
	opacity: 1;
}

.thymos-press-lightbox__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: min(1320px, 100%);
	height: min(900px, calc(100vh - 64px));
	outline: none;
}

.thymos-press-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
}

.thymos-press-lightbox__image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 0;
	flex: 1 1 auto;
}

.thymos-press-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 150px);
	width: auto;
	height: 100%;
	object-fit: contain;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.thymos-press-lightbox__caption {
	flex: 0 0 auto;
	margin-top: 14px;
	color: #faf9f6;
	text-align: center;
}

.thymos-press-lightbox__magazine {
	font-family: var(--th-font-heading, "TheSeasons", Georgia, serif);
	font-size: clamp(20px, 2vw, 30px);
	line-height: 1.05;
}

.thymos-press-lightbox__date {
	margin-top: 4px;
	color: #d4e4f3;
	font-family: var(--th-font-body, "Instrument Sans", system-ui, sans-serif);
	font-size: 14px;
}

.thymos-press-lightbox__close,
.thymos-press-lightbox__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 !important;
	border: 1px solid rgba(212, 228, 243, 0.55) !important;
	border-radius: 50%;
	color: #d4e4f3 !important;
	background: rgba(103, 6, 39, 0.62) !important;
	background-image: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: color 220ms ease, border-color 220ms ease, background-color 220ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease;
}

.thymos-press-lightbox__close:hover,
.thymos-press-lightbox__close:focus-visible,
.thymos-press-lightbox__arrow:hover:not(:disabled),
.thymos-press-lightbox__arrow:focus-visible:not(:disabled) {
	color: #faf9f6 !important;
	border-color: #faf9f6 !important;
	background: rgba(138, 20, 31, 0.92) !important;
}

.thymos-press-lightbox__close:focus-visible,
.thymos-press-lightbox__arrow:focus-visible {
	outline: 2px solid #d4e4f3;
	outline-offset: 3px;
}

.thymos-press-lightbox__close {
	position: absolute;
	top: 20px;
	right: 22px;
	z-index: 4;
	width: 48px;
	height: 48px;
}

.thymos-press-lightbox__close svg,
.thymos-press-lightbox__arrow svg {
	display: block;
	width: 25px;
	height: 25px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.thymos-press-lightbox__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 54px;
	height: 54px;
	transform: translateY(-50%);
}

.thymos-press-lightbox__arrow--prev {
	left: 22px;
}

.thymos-press-lightbox__arrow--next {
	right: 22px;
}

.thymos-press-lightbox__arrow--prev:hover:not(:disabled),
.thymos-press-lightbox__arrow--prev:focus-visible:not(:disabled) {
	transform: translate(-4px, -50%);
}

.thymos-press-lightbox__arrow--next:hover:not(:disabled),
.thymos-press-lightbox__arrow--next:focus-visible:not(:disabled) {
	transform: translate(4px, -50%);
}

.thymos-press-lightbox__arrow:disabled {
	display: none;
}

@media (max-width: 1024px) {
	.thymos-press-slider {
		padding: 18px 22px 16px;
	}

	.thymos-press-slider__zoom {
		opacity: 1;
		transform: none;
	}

	.thymos-press-lightbox {
		padding: 24px 72px;
	}
}

@media (max-width: 767px) {
	.thymos-press-slider {
		--th-press-gap: 16px;
		padding: 16px 18px 14px;
	}

	.thymos-press-slider__magazine {
		font-size: 24px;
	}

	.thymos-press-slider__date {
		font-size: 14px;
	}

	.thymos-press-slider__navigation {
		gap: 8px;
		margin-top: 24px;
	}

	.thymos-press-slider__bullets {
		gap: 7px;
	}

	.thymos-press-slider__bullet {
		width: 38px;
		height: 20px;
		border-width: 2px !important;
	}

	.thymos-press-slider__arrow {
		width: 34px;
		height: 34px;
		min-width: 34px;
		min-height: 34px;
	}

	.thymos-press-slider__zoom {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
	}

	.thymos-press-lightbox {
		padding: 70px 14px 20px;
	}

	.thymos-press-lightbox__dialog {
		height: calc(100vh - 90px);
	}

	.thymos-press-lightbox__image {
		max-height: calc(100vh - 185px);
	}

	.thymos-press-lightbox__close {
		top: 12px;
		right: 12px;
		width: 44px;
		height: 44px;
	}

	.thymos-press-lightbox__arrow {
		top: auto;
		bottom: 14px;
		width: 46px;
		height: 46px;
		transform: none;
	}

	.thymos-press-lightbox__arrow--prev {
		left: 14px;
	}

	.thymos-press-lightbox__arrow--next {
		right: 14px;
	}

	.thymos-press-lightbox__arrow--prev:hover:not(:disabled),
	.thymos-press-lightbox__arrow--prev:focus-visible:not(:disabled) {
		transform: translateX(-3px);
	}

	.thymos-press-lightbox__arrow--next:hover:not(:disabled),
	.thymos-press-lightbox__arrow--next:focus-visible:not(:disabled) {
		transform: translateX(3px);
	}

	.thymos-press-lightbox__caption {
		padding-right: 58px;
		padding-left: 58px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.thymos-press-slider__track,
	.thymos-press-slider__image,
	.thymos-press-slider__zoom,
	.thymos-press-slider__arrow,
	.thymos-press-slider__bullet,
	.thymos-press-lightbox,
	.thymos-press-lightbox__close,
	.thymos-press-lightbox__arrow {
		transition-duration: 0.01ms !important;
	}
}
