.wp-block-asca-g-elements-hero-carousel.aw-hero-carousel {
	position: relative;
	inline-size: 100%;
	max-block-size: var(--aw-hero-carousel-max-height, 600px);
	overflow: hidden;
}

.aw-hero-carousel__viewport {
	position: relative;
	inline-size: 100%;
	overflow: hidden;
}

.aw-hero-carousel__track {
	display: flex;
	flex-wrap: nowrap;
	inline-size: 100%;
	margin: 0;
	padding: 0;
	transition: transform 300ms ease;
	will-change: transform;
}

.aw-hero-carousel__slide {
	flex: 0 0 100%;
	min-inline-size: 100%;
	max-block-size: var(--aw-hero-carousel-max-height, 600px);
}

.aw-hero-carousel__slide > * {
	block-size: 100%;
	max-block-size: var(--aw-hero-carousel-max-height, 600px);
}

.aw-hero-carousel__slide .wp-block-cover,
.aw-hero-carousel__slide .wp-block-cover__inner-container,
.aw-hero-carousel__slide .aw-hero-carousel__content-shell {
	min-block-size: min(var(--aw-hero-carousel-min-height, 560px), var(--aw-hero-carousel-max-height, 600px)) !important;
	max-block-size: var(--aw-hero-carousel-max-height, 600px) !important;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__cover .wp-block-cover__inner-container {
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: 100%;
	padding-block: clamp(2rem, 5vw, 4rem);
}

.aw-pattern-hero-slideshow {
	--asca-alias-slide-title-font-family: var(--wp--preset--font-family--titillium-web);
	--asca-alias-slide-title-font-size: clamp(2rem, 5vw, 4rem);
	--asca-alias-slide-title-line-height: 1.1;
	--asca-alias-slide-title-font-weight: 700;
	--asca-alias-slide-title-letter-spacing: -0.03em;
	--asca-alias-slide-text-font-family: var(--wp--preset--font-family--titillium-web);
	--asca-alias-slide-text-font-size: clamp(1rem, 1.35vw, 1.125rem);
	--asca-alias-slide-text-line-height: 1.5;
	--asca-alias-slide-text-font-weight: 600;
	--asca-alias-slide-text-color: var(--wp--preset--color--dark-3);
}

.aw-pattern-hero-slideshow .aw-hero-carousel__content-shell {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	inline-size: min(100%, 1280px);
	margin-inline: 0;
	padding-inline: clamp(0.5rem, 3vw, 2rem);
	box-sizing: border-box;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	inline-size: fit-content;
	min-inline-size: min(36rem, 100%);
	max-inline-size: 100%;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__title {
	display: inline-block;
	inline-size: fit-content;
	max-inline-size: 100%;
	box-sizing: border-box;
	font-family: var(--asca-alias-slide-title-font-family);
	font-size: var(--asca-alias-slide-title-font-size);
	line-height: var(--asca-alias-slide-title-line-height);
	font-weight: var(--asca-alias-slide-title-font-weight);
	letter-spacing: var(--asca-alias-slide-title-letter-spacing);
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0.2rem;
	padding-right: 2rem;
	padding-bottom: 0.2rem;
	padding-left: 2rem;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__intro-box {
	inline-size: 100%;
	min-inline-size: 0;
	max-inline-size: none;
	contain: inline-size;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.9);
}

.aw-pattern-hero-slideshow .aw-hero-carousel__text {
	inline-size: 100%;
	min-inline-size: 0;
	max-inline-size: none;
	color: var(--asca-alias-slide-text-color);
	font-family: var(--asca-alias-slide-text-font-family);
	font-size: var(--asca-alias-slide-text-font-size);
	line-height: var(--asca-alias-slide-text-line-height);
	font-weight: var(--asca-alias-slide-text-font-weight);
}

.aw-pattern-hero-slideshow .aw-hero-carousel__actions {
	display: flex;
	justify-content: flex-end;
	inline-size: 100%;
	margin-block-start: 1.25rem;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__actions > .wp-block-group__inner-container {
	display: flex;
	justify-content: flex-end;
	inline-size: 100%;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__actions .wp-block-asca-g-elements-bt-discover.aw-button--discover {
	margin-inline-start: 0;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__button .wp-block-button__link {
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.aw-pattern-hero-slideshow .aw-hero-carousel__button .wp-block-button__link::after {
	content: "\f35a";
	display: inline-block;
	margin-inline-start: 0.5rem;
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 0.95em;
	line-height: 1;
}

.aw-hero-carousel__nav {
	position: absolute;
	inset-block: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: clamp(2.25rem, 3vw, 3rem);
	block-size: 100%;
	border: 0;
	border-radius: 0;
	background: rgba(0, 0, 0, 0.12);
	color: #fff;
	cursor: pointer;
	opacity: 1;
	transition: background-color 160ms ease, opacity 160ms ease;
}

.aw-hero-carousel__nav-icon,
.aw-hero-carousel__nav-icon i {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: clamp(1.5rem, 2vw, 2rem);
}

.aw-hero-carousel__nav:hover,
.aw-hero-carousel__nav:focus-visible {
	background: rgba(0, 0, 0, 0.3);
}

.aw-hero-carousel__nav--prev {
	inset-inline-start: 0;
}

.aw-hero-carousel__nav--next {
	inset-inline-end: 0;
}

.aw-hero-carousel__pagination {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 1.25rem;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	justify-content: center;
	padding-inline: 1rem;
}

.aw-hero-carousel__dot {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	inline-size: 2.75rem;
	block-size: 2.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	transition: transform 160ms ease;
}

.aw-hero-carousel__dot-indicator {
	inline-size: 1rem;
	block-size: 1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary-main, #3169b1);
	opacity: 0.35;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
	transition: opacity 160ms ease, transform 160ms ease;
}

.aw-hero-carousel__dot:hover .aw-hero-carousel__dot-indicator,
.aw-hero-carousel__dot:focus-visible .aw-hero-carousel__dot-indicator {
	opacity: 0.7;
	transform: scale(1.08);
}

.aw-hero-carousel__dot.is-active .aw-hero-carousel__dot-indicator {
	opacity: 1;
}

.aw-hero-carousel__pause {
	position: absolute;
	inset-block-start: 1rem;
	inset-inline-end: calc(clamp(2.25rem, 3vw, 3rem) + 1rem);
	z-index: 4;
	min-inline-size: 2.75rem;
	min-block-size: 2.75rem;
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 0.25rem;
	padding: 0.5rem 0.75rem;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.aw-hero-carousel__pause:hover,
.aw-hero-carousel__pause:focus-visible {
	background: rgba(0, 0, 0, 0.82);
}

@media (prefers-reduced-motion: reduce) {
	.aw-hero-carousel__track {
		transition: none;
	}
}

.aw-hero-carousel.is-single-slide .aw-hero-carousel__nav,
.aw-hero-carousel.is-single-slide .aw-hero-carousel__pagination {
	display: none;
}

@media (max-width: 781px) {
	.aw-hero-carousel__nav {
		inline-size: 2.75rem;
	}

	.aw-pattern-hero-slideshow .aw-hero-carousel__cover .wp-block-cover__inner-container {
		padding-block: 2rem;
	}

	.aw-pattern-hero-slideshow .aw-hero-carousel__content-shell {
		padding-inline: 1rem;
	}

	.aw-pattern-hero-slideshow .aw-hero-carousel__content,
	.aw-pattern-hero-slideshow .aw-hero-carousel__intro-box,
	.aw-pattern-hero-slideshow .aw-hero-carousel__text,
	.aw-pattern-hero-slideshow .aw-hero-carousel__title {
		max-inline-size: 100%;
		inline-size: 100%;
	}

	.aw-pattern-hero-slideshow .aw-hero-carousel__content {
		margin-inline-start: 0;
	}
}

/* Swipe orizzontale gestito dal componente; scroll verticale e zoom restano nativi. */
@media (max-width: 600px) and (orientation: portrait) {
	.aw-hero-carousel { touch-action: pan-y pinch-zoom; }
	.wp-block-asca-g-elements-hero-carousel.aw-hero-carousel,
	.aw-hero-carousel__slide,
	.aw-hero-carousel__slide > * { max-block-size: none; }
	.aw-hero-carousel__slide .wp-block-cover,
	.aw-hero-carousel__slide .wp-block-cover__inner-container,
	.aw-hero-carousel__slide .aw-hero-carousel__content-shell {
		min-block-size: clamp(24rem, 65svh, 34rem) !important;
		max-block-size: none !important;
	}
	.aw-pattern-hero-slideshow .aw-hero-carousel__cover .wp-block-cover__inner-container { padding-block: 1.5rem 2.5rem; }
	.aw-pattern-hero-slideshow .aw-hero-carousel__content-shell { padding-inline: var(--aw-mobile-gutter, 1rem); }
	.aw-pattern-hero-slideshow .aw-hero-carousel__title { font-size: clamp(2rem, 8vw, 2.75rem); padding-inline: 1rem; }
	.aw-pattern-hero-slideshow .aw-hero-carousel__intro-box { padding: 1rem; margin-top: .75rem; }
	.aw-hero-carousel .aw-hero-carousel__nav,
	.aw-hero-carousel .aw-hero-carousel__pagination { display: none; }
	/* Il comando pausa resta raggiungibile da tastiera senza coprire la slide al touch. */
	.aw-hero-carousel__pause:not(:focus-visible) { clip-path: inset(50%); width: 1px; height: 1px; min-inline-size: 0; min-block-size: 0; padding: 0; overflow: hidden; }
	.aw-hero-carousel.is-paused::after {
		content: attr(data-pause-label);
		position: absolute;
		inset-inline-end: 1rem;
		inset-block-end: .5rem;
		padding: .15rem .5rem;
		background: rgb(0 0 0 / 65%);
		color: #fff;
		font-size: .875rem;
		pointer-events: none;
	}
}

/* Caricamento delle immagini: segnaposto con colore medio e miniatura sfocata
 * dell'immagine (vedi Asca_Hero_Carousel_Media), poi dissolvenza dell'immagine vera. */
.aw-hero-carousel .wp-block-cover.aw-hero-lqip {
	background-color: var(--aw-hero-lqip-color, var(--wp--preset--color--light-2, #ebebeb));
}

.aw-hero-carousel .wp-block-cover.aw-hero-lqip::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: var(--aw-hero-lqip, none);
	background-position: center;
	background-size: cover;
	filter: blur(24px);
	transform: scale(1.12);
	pointer-events: none;
}

/* La dissolvenza si attiva solo quando lo script inline e in esecuzione: senza
 * JavaScript le immagini restano visibili come prima. */
.aw-hero-carousel.is-lqip-ready .wp-block-cover__image-background {
	opacity: 0;
	transition: opacity 450ms ease;
}

.aw-hero-carousel.is-lqip-ready .wp-block-cover__image-background.is-loaded {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.aw-hero-carousel.is-lqip-ready .wp-block-cover__image-background {
		transition: none;
	}
}
