/* Gutenberg 2: independent hero and header, inspired by the Ortheo composition. */
.ag2-native-header,
.ag2-hero,
.ag2-hero-slider {
	--ag2-blue: #3c378c;
	--ag2-blue-dark: #302c70;
	--ag2-fuchsia: #c60972;
	--ag2-fuchsia-dark: #9b0051;
	--ag2-pink: #fad0e4;
}

.ag2-native-header.antoniana-native-header {
	--ag2-logo-wash-x: calc(max(0px, calc(50% - 720px)) + clamp(24px, 6.25vw, 96px) + 94px);
	--ag2-nav-band-height: 100px;
	--ag2-topbar-height: 34px;
	position: absolute;
	top: var(--wp-admin--admin-bar--height, 0px) !important;
	right: 0;
	left: 0;
	z-index: 100;
	background: transparent;
	box-shadow: none;
}

/* A full-width glass layer keeps the logo, links and dropdowns sharp. */
.ag2-native-header .antoniana-native-main::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	box-sizing: border-box;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.42);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	content: "";
	pointer-events: none;
}

/* Keep the wash on the full-width menu band so it cannot be clipped. */
.ag2-native-header .antoniana-native-main::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: -1;
	height: var(--ag2-nav-band-height);
	background: radial-gradient(ellipse 265px 95px at var(--ag2-logo-wash-x) 50%,
		rgba(255, 255, 255, 0.72) 0%,
		rgba(255, 255, 255, 0.66) 30%,
		rgba(255, 255, 255, 0.34) 58%,
		rgba(255, 255, 255, 0.1) 80%,
		rgba(255, 255, 255, 0) 100%);
	content: "";
	pointer-events: none;
}

.ag2-native-header .antoniana-native-topbar {
	background: var(--ag2-blue-dark);
	border-bottom: 1px solid rgba(198, 9, 114, 0.28);
}

.ag2-native-header .antoniana-native-topbar-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	column-gap: 12px;
}

.ag2-native-header .antoniana-native-topbar-copy {
	grid-column: 2;
	font-size: 12px;
	font-weight: 500;
}

.ag2-native-header .ag2-topbar-colori {
	justify-self: end;
	margin: 0;
	font-size: 12px;
	font-weight: 650;
}

.ag2-topbar-colori a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ag2-native-header .antoniana-native-main {
	position: fixed;
	top: var(--ag2-sticky-top, calc(var(--wp-admin--admin-bar--height, 0px) + var(--ag2-topbar-height)));
	right: 0;
	left: 0;
	z-index: 1;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	padding-inline: calc(max(0px, calc(50% - 720px)) + clamp(24px, 6.25vw, 96px));
	min-height: 100px;
}

.ag2-native-header .antoniana-native-logo img {
	filter: none;
}

.ag2-native-header .wp-block-antoniana-classic-menu {
	--antoniana-menu-navy: var(--ag2-blue);
	--antoniana-menu-pink: var(--ag2-blue-dark);
	--antoniana-menu-pale: rgba(60, 55, 140, 0.08);
}

.ag2-native-header .wp-block-antoniana-classic-menu a {
	color: var(--ag2-blue) !important;
	text-decoration: none;
}

.ag2-native-header .wp-block-antoniana-classic-menu a:hover,
.ag2-native-header .wp-block-antoniana-classic-menu a:focus-visible {
	color: var(--ag2-blue-dark) !important;
	background: rgba(60, 55, 140, 0.08);
	text-decoration: none;
}

.ag2-native-header .wp-block-antoniana-classic-menu a:focus-visible {
	outline: 2px solid var(--ag2-blue);
	outline-offset: 3px;
}

.ag2-native-header .antoniana-search-link .wp-block-button__link {
	color: var(--ag2-blue);
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(60, 55, 140, 0.4);
	box-shadow: none;
}

.ag2-native-header .antoniana-search-link .wp-block-button__link:hover,
.ag2-native-header .antoniana-search-link .wp-block-button__link:focus-visible {
	color: var(--ag2-blue-dark);
	background: rgba(60, 55, 140, 0.08);
	border-color: var(--ag2-blue);
}

.ag2-hero {
	position: relative;
	display: flex;
	box-sizing: border-box;
	width: 100%;
	max-width: none !important;
	min-height: min(960px, calc(100svh - var(--wp-admin--admin-bar--height, 0px)));
	margin: 0 !important;
	padding: 210px clamp(24px, 6.25vw, 96px) 56px;
	isolation: isolate;
	overflow: hidden;
	background: #fcfbfa;
	color: var(--ag2-blue);
}

.ag2-hero .ag2-hero-image,
.ag2-hero .ag2-hero-video {
	position: absolute;
	inset: var(--ag2-photo-top, 100px) 0 0 36%;
	z-index: -2;
	width: auto;
	height: auto;
	margin: 0 !important;
}

.ag2-hero .ag2-hero-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	object-position: center top;
}

.ag2-hero::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, #fcfbfa 36%, rgba(252, 251, 250, .94) 42%, transparent 70%),
		linear-gradient(0deg, rgba(252, 251, 250, .85), transparent 16%);
	content: "";
	pointer-events: none;
}

.ag2-hero .ag2-hero-inner {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: space-between;
	gap: 96px;
	width: 100%;
	max-width: 1248px;
	margin: 0 auto !important;
}

.ag2-hero .ag2-hero-top {
	margin: 0 !important;
}

.ag2-hero .ag2-hero-title {
	max-width: 1080px;
	margin: 0 !important;
	color: var(--ag2-blue);
	font-size: clamp(48px, 4.7vw, 76px);
	font-weight: 650;
	line-height: 1.08;
	letter-spacing: -0.045em;
	text-align: left;
	text-shadow: none;
}

.ag2-hero .ag2-hero-intro {
	max-width: min(42vw, 610px);
	margin: 18px 0 0 !important;
	color: #30374c;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	text-align: left;
}

/* Preserve the contrast of the lettering where it crosses a photograph. */
.ag2-hero-slider .ag2-hero :is(.ag2-hero-title, .ag2-hero-intro),
.ag2-hero-controls .ag2-hero-choice {
	text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 0 5px #fff, 0 0 7px #fff;
}

.ag2-hero .ag2-hero-actions {
	margin: 24px 0 0 !important;
	gap: 14px;
	align-items: center;
}

.ag2-hero-actions .wp-block-button__link {
	display: inline-flex;
	min-height: 56px;
	padding: 15px 24px;
	align-items: center;
	justify-content: center;
	gap: 18px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 650;
	line-height: 1.4;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 160ms ease, color 160ms ease;
}

.ag2-hero-primary .wp-block-button__link {
	background: var(--ag2-fuchsia);
	color: #fff;
}

.ag2-hero-primary .wp-block-button__link:hover {
	background: var(--ag2-fuchsia-dark);
	color: #fff;
}

.ag2-hero-secondary .wp-block-button__link {
	background: var(--ag2-blue);
	color: #fff;
	border-color: var(--ag2-blue);
}

.ag2-hero-secondary .wp-block-button__link:hover {
	background: var(--ag2-blue-dark);
	border-color: var(--ag2-blue-dark);
	color: #fff;
}

.ag2-hero-actions .wp-block-button__link:focus-visible {
	outline: 3px solid var(--ag2-blue);
	outline-offset: 5px;
}

.ag2-hero .ag2-hero-bottom {
	display: flex;
	margin: 0 !important;
	align-items: flex-end;
	justify-content: space-between;
	gap: 48px;
}

.ag2-hero .ag2-hero-description {
	flex: 1;
	max-width: 650px;
	margin: 0 !important;
	color: #30374c;
	font-size: 19px;
	line-height: 1.5;
	text-shadow: none;
}

.ag2-hero .ag2-service-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: stretch;
	gap: clamp(8px, 1.1vw, 16px);
	width: min(48vw, 600px);
	margin: 0 !important;
}

@keyframes ag2-service-enter {
	from {
		opacity: 0;
		transform: translateY(-22px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Keep the existing staggered entrance when the visitor allows motion. */
@media (prefers-reduced-motion: no-preference) {
	.ag2-hero-slider[data-ready] > .ag2-hero-slide.is-active .ag2-service-grid > .ag2-service-card {
		animation: ag2-service-enter 560ms cubic-bezier(0.22, 1, 0.36, 1) 160ms both;
	}

	.ag2-hero-slider[data-ready] > .ag2-hero-slide.is-active .ag2-service-grid > .ag2-service-card:nth-child(2) {
		animation-delay: 340ms;
	}

	.ag2-hero-slider[data-ready] > .ag2-hero-slide.is-active .ag2-service-grid > .ag2-service-card:nth-child(3) {
		animation-delay: 520ms;
	}

	.ag2-hero-slider[data-ready] > .ag2-hero-slide.is-active .ag2-service-grid > .ag2-service-card:focus-within {
		animation: none;
	}
}

.ag2-hero .ag2-service-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0 !important;
	color: var(--ag2-blue-dark);
}

.ag2-hero .ag2-service-card > a {
	display: block;
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 1px solid #dcdbe5;
	border-radius: 8px;
	background: #fff;
}

.ag2-hero .ag2-service-card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ag2-hero .ag2-service-card figcaption {
	margin: 7px 0 0;
	padding: 0 2px;
	color: inherit;
	font-size: clamp(13px, 1.12vw, 17px);
	font-weight: 600;
	font-style: normal;
	line-height: 1.25;
	text-align: center;
	text-shadow: 0 0 4px white, 0 0 8px white, 0 0 12px white;
}

.ag2-hero .ag2-service-card a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.ag2-hero .ag2-service-card:hover > a,
.ag2-hero .ag2-service-card:focus-within > a {
	border-color: var(--ag2-blue);
	box-shadow: 0 4px 16px rgba(47, 42, 108, .14);
}
.ag2-hero .ag2-service-card a:focus-visible { outline: 3px solid var(--ag2-blue); outline-offset: 2px; }
#specializzazioni, #cerca-nel-sito { scroll-margin-top: 120px; }

.ag2-hero .ag2-hero-proof {
	flex: 0 0 320px;
	margin: 0 !important;
	padding: 24px;
	border: 1px solid rgba(60, 55, 140, 0.2);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.86);
	box-shadow: inset 3px 0 0 var(--ag2-blue);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.ag2-hero .ag2-hero-proof-label {
	margin: 0 0 22px !important;
	color: var(--ag2-fuchsia);
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.15em;
}

.ag2-hero .ag2-hero-proof-row {
	display: flex;
	margin: 0 !important;
	align-items: center;
	gap: 18px;
}

.ag2-hero .ag2-hero-proof-number {
	margin: 0 !important;
	color: var(--ag2-blue);
	font-size: 66px;
	font-weight: 650;
	line-height: 0.95;
}

.ag2-hero .ag2-hero-proof-copy {
	margin: 0 !important;
	color: var(--ag2-blue);
	font-size: 17px;
	font-weight: 650;
	line-height: 1.35;
}

.ag2-hero .ag2-hero-proof-copy span {
	display: inline-block;
	margin-top: 8px;
	font-size: 12px;
	font-weight: 450;
	line-height: 1.5;
}

@media (max-width: 1024px) {
	.ag2-native-header.antoniana-native-header {
		--ag2-logo-wash-x: 109px;
		--ag2-topbar-height: 38px;
	}

	.ag2-native-header .antoniana-native-main {
		padding-inline: 24px;
	}

	.ag2-hero {
		min-height: min(880px, 100svh);
		padding: 190px 40px 48px;
	}

	.ag2-hero .ag2-hero-inner {
		gap: 56px;
	}

	.ag2-hero .ag2-hero-title {
		font-size: clamp(38px, 4.85vw, 54px);
	}

	.ag2-hero .ag2-hero-bottom {
		gap: 32px;
	}

	.ag2-hero .ag2-hero-description {
		font-size: 17px;
	}

	.ag2-hero .ag2-hero-proof {
		flex-basis: 280px;
		padding: 20px;
	}
}

@media (max-width: 767px) {
	.ag2-native-header .antoniana-native-topbar-inner {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.ag2-native-header.antoniana-native-header {
		--ag2-nav-band-height: 88px;
		--ag2-topbar-height: 42px;
	}

	.ag2-native-header .antoniana-native-topbar-copy {
		grid-column: 1;
		font-size: 10px;
	}

	.ag2-native-header .antoniana-native-main {
		min-height: 88px;
	}

	.ag2-hero {
		min-height: 100svh;
		padding: 174px 24px 32px;
	}

	.ag2-hero .ag2-hero-image,
	.ag2-hero .ag2-hero-video {
		inset: 130px 0 0;
	}

	.ag2-hero .ag2-hero-image img {
		object-position: 66% top;
	}

	.ag2-hero::before {
		background: linear-gradient(90deg, rgba(252, 251, 250, .97), rgba(252, 251, 250, .84) 44%, rgba(252, 251, 250, .24)),
			linear-gradient(0deg, rgba(252, 251, 250, .92), transparent 26%);
	}

	.ag2-hero .ag2-hero-inner {
		gap: 68px;
	}

	.ag2-hero .ag2-hero-title {
		font-size: clamp(38px, 10vw, 54px);
		line-height: 1.08;
		letter-spacing: -0.04em;
	}

	.ag2-hero .ag2-hero-actions {
		margin-top: 22px !important;
		gap: 10px;
	}

	.ag2-hero .ag2-hero-intro {
		max-width: 36ch;
		margin-top: 16px !important;
		font-size: 15px;
	}

	.ag2-hero-actions .wp-block-button__link {
		min-height: 50px;
		padding: 13px 20px;
		font-size: 14px;
	}

	.ag2-hero .ag2-hero-bottom {
		flex-direction: column;
		align-items: stretch;
		gap: 28px;
	}

	.ag2-hero .ag2-hero-description {
		font-size: 16px;
		line-height: 1.5;
	}

	.ag2-hero .ag2-service-grid { width: 100%; max-width: 540px; }
	.ag2-hero .ag2-service-card figcaption { padding-inline: 0; font-size: clamp(12px, 3.2vw, 15px); letter-spacing: -.015em; hyphens: auto; overflow-wrap: anywhere; }

	.ag2-hero .ag2-hero-proof {
		flex-basis: auto;
		padding: 18px 20px;
	}

	.ag2-hero .ag2-hero-proof-label {
		margin-bottom: 12px !important;
	}

	.ag2-hero .ag2-hero-proof-number {
		font-size: 48px;
	}
}

/* Keep every native block selectable in the editor. */
.editor-styles-wrapper .ag2-native-header.antoniana-native-header {
	position: relative;
	top: 0 !important;
	background: #242b38;
}

.editor-styles-wrapper .ag2-native-header .antoniana-native-main {
	position: relative;
	top: 0;
}

.editor-styles-wrapper .ag2-hero {
	min-height: 740px;
	padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
	.ag2-hero-actions .wp-block-button__link {
		transition: none;
	}
}

/* Overlapping grid cells reserve the tallest slide's space without layout jumps. */
.ag2-hero-slider {
	position: relative;
	display: grid;
	width: 100%;
	max-width: none !important;
	margin: 0 !important;
	background: #f5f6fa;
	isolation: isolate;
	touch-action: pan-y;
}

.ag2-hero-slider > .ag2-hero-slide {
	grid-area: 1 / 1;
	padding-bottom: 116px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 650ms ease, visibility 650ms;
}

/* Overlapping slides are all in the viewport. Keep native lazy images in reserve
   until their slide is prepared; grid and aspect-ratio wrappers retain their size. */
.ag2-hero-slider > .ag2-hero-slide:not(.ag2-hero-slide--intro)[aria-hidden="true"]:not([data-primed]) img[loading="lazy"] {
	display: none;
}

.ag2-hero-slider:not([data-ready]) > .ag2-hero-slide:first-of-type,
.ag2-hero-slider > .ag2-hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

@media (max-width: 1024px) {
	.ag2-hero-slide--intro .ag2-hero-image img { object-position: left top; }
}

.ag2-hero-slide--piede .ag2-hero-image img {
	object-position: center 57%;
}

.ag2-hero-slide--noleggio .ag2-hero-image img {
	object-position: center 5%;
}

.ag2-hero-controls {
	position: absolute;
	right: clamp(24px, 6.25vw, 96px);
	bottom: 28px;
	left: clamp(24px, 6.25vw, 96px);
	z-index: 5;
	display: flex;
	max-width: 1248px;
	margin: 0 auto;
	align-items: center;
	gap: 12px;
	color: var(--ag2-blue);
}

.ag2-hero-progress {
	position: absolute;
	right: 0;
	bottom: -2px;
	left: 0;
	height: 2px;
	overflow: hidden;
	border-radius: 2px;
	background: rgba(60, 55, 140, 0.16);
	pointer-events: none;
}

.ag2-hero-progress-fill {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	background: var(--ag2-fuchsia);
	transform: scaleX(0);
	transform-origin: left center;
}

.ag2-hero-controls button {
	box-sizing: border-box;
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(60, 55, 140, 0.35);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.42);
	color: var(--ag2-blue);
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.ag2-hero-controls button:hover,
.ag2-hero-controls button:focus-visible {
	background: rgba(60, 55, 140, 0.08);
	border-color: var(--ag2-blue);
	color: var(--ag2-blue);
}

/* Previous, next and playback share the same light outlined treatment. */
.ag2-hero-controls > .ag2-hero-control {
	background: rgba(255, 255, 255, 0.42);
	border-color: rgba(60, 55, 140, 0.35);
	color: var(--ag2-blue);
	font-size: 18px;
}

.ag2-hero-controls button:focus-visible {
	outline: 3px solid var(--ag2-blue);
	outline-offset: 4px;
}

.ag2-hero-choices {
	display: flex;
	flex: 1;
	gap: 22px;
	margin-left: 12px;
}

.ag2-hero-choices .ag2-hero-choice {
	position: relative;
	gap: 10px;
	padding: 0 4px;
	border-width: 0 0 2px;
	border-color: transparent;
	border-radius: 0;
	background: transparent;
	color: var(--ag2-blue);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.ag2-hero-choices .ag2-hero-choice:hover,
.ag2-hero-choices .ag2-hero-choice:focus-visible {
	border-color: transparent;
}

.ag2-hero-choices .ag2-hero-choice[aria-current="true"] {
	color: var(--ag2-blue-dark);
}

.ag2-hero-choice[aria-current="true"] > span:first-child {
	color: var(--ag2-fuchsia);
}

@media (min-width: 1025px) and (max-height: 900px) {
	.ag2-hero-slider > .ag2-hero-slide {
		padding-top: 184px;
		padding-bottom: 96px;
	}

	.ag2-hero-slider .ag2-hero-inner {
		gap: 48px;
	}

	.ag2-hero-slider .ag2-hero-title {
		font-size: clamp(48px, 4.7vw, 76px);
	}
}

@media (max-width: 1024px) {
	.ag2-hero-controls {
		right: 40px;
		left: 40px;
	}

	.ag2-hero-choices {
		gap: 12px;
	}
}

@media (max-width: 767px) {
	.ag2-hero-slider > .ag2-hero-slide {
		padding-bottom: 104px;
	}

	.ag2-hero-slide--noleggio .ag2-hero-image img {
		object-position: 72% top;
	}

	.ag2-hero-slider .ag2-hero-inner {
		gap: 48px;
	}

	.ag2-hero-controls {
		right: 24px;
		bottom: 24px;
		left: 24px;
		gap: 8px;
	}

	.ag2-hero-choices {
		gap: 0;
		margin-left: 0;
		justify-content: center;
	}

	.ag2-hero-choices .ag2-hero-choice {
		min-width: 36px;
	}

	.ag2-hero-choice-label {
		display: none;
	}
}

/* Gutenberg exposes every slide for editing; only the frontend rotates. */
.editor-styles-wrapper .ag2-hero-slider {
	display: block;
}

.editor-styles-wrapper .ag2-hero-slider .ag2-hero-slide {
	margin-bottom: 24px !important;
	padding-bottom: 56px;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	.ag2-hero-slider > .ag2-hero-slide {
		transition: none;
	}
}

.ag2-hero-slide--evidenza .ag2-hero-image img { object-position: 54% center; }

@media (max-width: 767px) {
	.ag2-hero-slide--noleggio .ag2-hero-image,
	.ag2-hero-slide--evidenza .ag2-hero-image {
		top: 40%;
		bottom: auto;
		aspect-ratio: 4 / 3;
		mask-image: linear-gradient(to bottom, transparent, black 13%, black 87%, transparent);
	}
	.ag2-hero-slide--noleggio::before,
	.ag2-hero-slide--evidenza::before {
		background: linear-gradient(90deg, rgb(252 251 250 / .94), rgb(252 251 250 / .65) 43%, transparent 85%);
	}
}


.ag2-hero-slider .ag2-hero-video { pointer-events: none; }
.ag2-hero-slider .ag2-hero-video video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 54% center;
	opacity: 0;
}
.ag2-hero-slider .ag2-hero-video video.is-playing { opacity: 1; }
.editor-styles-wrapper .ag2-hero .ag2-hero-video {
	position: relative;
	inset: auto;
	z-index: auto;
	width: min(320px, 100%);
	height: auto;
	pointer-events: auto;
}
.editor-styles-wrapper .ag2-hero .ag2-hero-video video { opacity: 1; }
