/* SW Uniform Images — cornice condivisa e slider */

/* --- Cornice: formato fisso, immagine mai deformata --------------------- */

.sw-uni-frame {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: var(--sw-uni-ratio, 16 / 9);
	overflow: hidden;
	border-radius: var(--sw-uni-radius, 0);
	background: var(--sw-uni-bg, #111);
	line-height: 0;
}

.sw-uni-frame::before {
	content: "";
	display: var(--sw-uni-backdrop, block);
	position: absolute;
	inset: -10%;
	background-image: var(--sw-uni-src);
	background-size: cover;
	background-position: center;
	filter: blur(var(--sw-uni-blur, 26px)) saturate(1.15);
	transform: scale(1.08);
	z-index: 0;
}

.sw-uni-frame::after {
	content: "";
	display: var(--sw-uni-backdrop, block);
	position: absolute;
	inset: 0;
	background: var(--sw-uni-bg, #111);
	opacity: var(--sw-uni-dim, .55);
	z-index: 1;
}

.sw-uni-frame > img,
.sw-uni-frame > picture,
.sw-uni-frame > a {
	position: relative;
	z-index: 2;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	min-height: 0 !important;
	background: transparent !important;
}

.sw-uni-frame img {
	width: 100% !important;
	height: 100% !important;
	object-fit: var(--sw-uni-fit, contain) !important;
	object-position: var(--sw-uni-pos, center center) !important;
	aspect-ratio: auto !important;
	border-radius: 0 !important;
}

/* --- Slider ------------------------------------------------------------- */

.sw-uni-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: var(--sw-uni-radius, 0);
	background: var(--sw-uni-bg, #111);
}

.sw-uni-track {
	display: flex;
	width: 100%;
	transition: transform var(--sw-uni-fade, 800ms) cubic-bezier(.22, .61, .36, 1);
	will-change: transform;
}

.sw-uni-slide {
	position: relative;
	flex: 0 0 100%;
	min-width: 100%;
}

.sw-uni-slide .sw-uni-frame {
	border-radius: 0;
}

.sw-uni-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: .25em;
	padding: clamp(14px, 4vw, 34px);
	color: #fff;
	line-height: 1.35;
	background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
	text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.sw-uni-caption strong {
	font-size: clamp(1.05rem, 2.2vw, 1.6rem);
	font-weight: 600;
	letter-spacing: .01em;
}

.sw-uni-caption span {
	font-size: clamp(.85rem, 1.4vw, 1rem);
	opacity: .9;
}

.sw-uni-nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	color: #fff;
	background: rgba(0, 0, 0, .35);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	opacity: .75;
	transition: opacity .2s ease, background .2s ease;
}

.sw-uni-nav:hover,
.sw-uni-nav:focus-visible {
	opacity: 1;
	background: rgba(0, 0, 0, .6);
}

.sw-uni-nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.sw-uni-nav svg {
	width: 22px;
	height: 22px;
}

.sw-uni-prev { left: 12px; }
.sw-uni-next { right: 12px; }

.sw-uni-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	z-index: 4;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.sw-uni-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	background: rgba(255, 255, 255, .45);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}

.sw-uni-dot.is-active {
	background: #fff;
	transform: scale(1.35);
}

.sw-uni-dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

@media (max-width: 600px) {
	.sw-uni-nav { width: 36px; height: 36px; }
	.sw-uni-nav svg { width: 18px; height: 18px; }
	.sw-uni-prev { left: 6px; }
	.sw-uni-next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.sw-uni-track { transition: none; }
}
