/* City Pages Enhanced Styling - 50 Advanced Improvements */

/* ===================================
   Unified hero (taxonomy city/service) — match home hero layout
   =================================== */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: clamp(2.75rem, 6vh, 5.75rem) 1.25rem clamp(2.25rem, 4.5vh, 4.5rem);
	background: linear-gradient(135deg, #0f2a6b 0%, #1e40af 55%, #2563eb 100%);
	color: #ffffff;
}

/* Spacing consistency — closer to home hero rhythm */
.tax-service .hero.hero--unified .hero__eyebrow,
.tax-city .hero.hero--unified .hero__eyebrow,
.page-template-page-servizi .hero.hero--unified .hero__eyebrow,
.page-template-page-comuni .hero.hero--unified .hero__eyebrow,
.single-service_city .hero.hero--unified .hero__eyebrow {
	margin-bottom: 0.45rem;
}

.tax-service .hero.hero--unified .hero__h1,
.tax-city .hero.hero--unified .hero__h1,
.page-template-page-servizi .hero.hero--unified .hero__h1,
.page-template-page-comuni .hero.hero--unified .hero__h1,
.single-service_city .hero.hero--unified .hero__h1 {
	margin: 0 auto 0;
	font-size: clamp(1.85rem, 3.4vw, 2.6rem);
	line-height: 1.06;
	text-transform: uppercase !important;
}

.tax-service .hero.hero--unified .hero__cta-box,
.tax-city .hero.hero--unified .hero__cta-box,
.page-template-page-servizi .hero.hero--unified .hero__cta-box,
.page-template-page-comuni .hero.hero--unified .hero__cta-box,
.single-service_city .hero.hero--unified .hero__cta-box {
	margin-top: 1rem;
}

/* Reduce excessive gap right after the hero on "comuni" pages */
.tax-city .emergency-box-section {
	padding-top: 1.75rem;
}

.page-template-page-comuni .intro-text-section {
	padding-top: 1.75rem;
}

/* Service City (native-theme rebuild) */
.single-service_city .quick-benefits-section--enhanced {
	margin-top: 0;
	padding: 2rem 0;
}

.single-service_city .hero.hero--unified .hero__background {
	position: absolute;
	inset: 0;
	opacity: 0.55;
	mix-blend-mode: soft-light;
	pointer-events: none;
}

.single-service_city .hero.hero--unified .hero__content {
	position: relative;
	z-index: 2;
	text-align: center;
}

.single-service_city .hero.hero--unified .hero__brand {
	display: inline-block;
	color: #ffffff;
	text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.single-service_city .hero.hero--unified .hero__eyebrow {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
}

.single-service_city .hero.hero--unified .hero__h1 {
	margin: 0.1rem auto 0;
	display: block;
	text-align: center;
	color: rgba(255, 255, 255, 0.96);
	font-weight: 900;
	letter-spacing: -0.02em;
	font-size: clamp(1.35rem, 2.1vw, 1.85rem);
	line-height: 1.05;
	text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.single-service_city .hero.hero--unified .hero__cta-box {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	position: relative;
	margin-top: 1.2rem;
}

.single-service_city .hero.hero--unified .hero__cta {
	background: rgba(255, 255, 255, 0.98);
	border-radius: 1.25rem;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
	color: rgba(15, 23, 42, 0.95);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.95rem;
	padding: 1.1rem 1.35rem;
}

.single-service_city .hero.hero--unified .hero__cta:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.single-service_city .hero.hero--unified .hero__cta-icon {
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 16px;
	background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
	color: #ffffff;
}

.single-service_city .hero.hero--unified .hero__cta-text {
	display: grid;
	gap: 0.15rem;
	text-align: left;
}

.single-service_city .hero.hero--unified .hero__cta-label {
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(15, 23, 42, 0.72);
}

.single-service_city .hero.hero--unified .hero__cta-number {
	font-weight: 900;
	letter-spacing: 0.04em;
	font-size: clamp(1.6rem, 2.5vw, 1.9rem);
	color: rgba(15, 23, 42, 0.95);
}

.single-service_city .hero.hero--unified .hero__single-box {
	margin: 18px auto 0;
	width: min(980px, 100%);
	padding: 14px 16px;
	border-radius: 18px;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.14));
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.single-service_city .hero.hero--unified .hero__single-text {
	margin: 0;
	text-align: center;
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	line-height: 1.55;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.96);
	text-wrap: balance;
}

@media (max-width: 768px) {
	.single-service_city .hero.hero--unified {
		padding: clamp(3.5rem, 7vh, 6rem) 1rem clamp(2.5rem, 6vh, 4rem);
	}

	.single-service_city .hero.hero--unified .hero__cta {
		width: 100%;
		justify-content: center;
	}

	.single-service_city .hero.hero--unified .hero__single-box {
		padding: 12px 14px;
	}
}

.page-template-page-servizi .hero.hero--unified .hero__background,
.page-template-page-comuni .hero.hero--unified .hero__background {
	position: absolute;
	inset: 0;
	opacity: 0.55;
	mix-blend-mode: soft-light;
	pointer-events: none;
}

.page-template-page-servizi .hero.hero--unified .hero__content,
.page-template-page-comuni .hero.hero--unified .hero__content {
	position: relative;
	z-index: 2;
	text-align: center;
}

.page-template-page-servizi .hero.hero--unified .hero__brand,
.page-template-page-comuni .hero.hero--unified .hero__brand {
	display: inline-block;
	color: #ffffff;
	text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.page-template-page-servizi .hero.hero--unified .hero__eyebrow,
.page-template-page-comuni .hero.hero--unified .hero__eyebrow {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
}

.page-template-page-servizi .hero.hero--unified .hero__h1,
.page-template-page-comuni .hero.hero--unified .hero__h1 {
	margin: 0.1rem auto 0;
	display: block;
	text-align: center;
	color: rgba(255, 255, 255, 0.96);
	font-weight: 900;
	letter-spacing: -0.02em;
	font-size: clamp(1.35rem, 2.1vw, 1.85rem);
	line-height: 1.05;
	text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.page-template-page-servizi .hero.hero--unified .hero__cta-box,
.page-template-page-comuni .hero.hero--unified .hero__cta-box {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	position: relative;
	margin-top: 1.2rem;
}

.page-template-page-servizi .hero.hero--unified .hero__cta,
.page-template-page-comuni .hero.hero--unified .hero__cta {
	background: rgba(255, 255, 255, 0.98);
	border-radius: 1.25rem;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
	color: rgba(15, 23, 42, 0.95);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.95rem;
	padding: 1.1rem 1.35rem;
}

.page-template-page-servizi .hero.hero--unified .hero__cta:hover,
.page-template-page-comuni .hero.hero--unified .hero__cta:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.page-template-page-servizi .hero.hero--unified .hero__cta-icon,
.page-template-page-comuni .hero.hero--unified .hero__cta-icon {
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 16px;
	background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
	color: #ffffff;
}

.page-template-page-servizi .hero.hero--unified .hero__cta-text,
.page-template-page-comuni .hero.hero--unified .hero__cta-text {
	display: grid;
	gap: 0.15rem;
	text-align: left;
}

.page-template-page-servizi .hero.hero--unified .hero__cta-label,
.page-template-page-comuni .hero.hero--unified .hero__cta-label {
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(15, 23, 42, 0.72);
}

.page-template-page-servizi .hero.hero--unified .hero__cta-number,
.page-template-page-comuni .hero.hero--unified .hero__cta-number {
	font-weight: 900;
	letter-spacing: 0.04em;
	font-size: clamp(1.6rem, 2.5vw, 1.9rem);
	color: rgba(15, 23, 42, 0.95);
}

.page-template-page-servizi .hero.hero--unified .hero__single-box,
.page-template-page-comuni .hero.hero--unified .hero__single-box {
	margin: 18px auto 0;
	width: min(980px, 100%);
	padding: 14px 16px;
	border-radius: 18px;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.14));
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.page-template-page-servizi .hero.hero--unified .hero__single-text,
.page-template-page-comuni .hero.hero--unified .hero__single-text {
	margin: 0;
	text-align: center;
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	line-height: 1.55;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.96);
	text-wrap: balance;
}

@media (max-width: 768px) {
	.page-template-page-servizi .hero.hero--unified,
	.page-template-page-comuni .hero.hero--unified {
		padding: clamp(3.5rem, 7vh, 6rem) 1rem clamp(2.5rem, 6vh, 4rem);
	}

	.page-template-page-servizi .hero.hero--unified .hero__cta,
	.page-template-page-comuni .hero.hero--unified .hero__cta {
		width: 100%;
		justify-content: center;
	}

	.page-template-page-servizi .hero.hero--unified .hero__single-box,
	.page-template-page-comuni .hero.hero--unified .hero__single-box {
		padding: 12px 14px;
	}
}

.tax-service .hero.hero--unified .hero__background,
.tax-city .hero.hero--unified .hero__background {
	position: absolute;
	inset: 0;
	opacity: 0.55;
	mix-blend-mode: soft-light;
	pointer-events: none;
}

.tax-service .hero.hero--unified .hero__content,
.tax-city .hero.hero--unified .hero__content {
	position: relative;
	z-index: 2;
	text-align: center;
}

.tax-service .hero.hero--unified .hero__brand,
.tax-city .hero.hero--unified .hero__brand {
	display: inline-block;
	color: #ffffff;
	text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.tax-service .hero.hero--unified .hero__eyebrow,
.tax-city .hero.hero--unified .hero__eyebrow {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
}

.tax-service .hero.hero--unified .hero__h1,
.tax-city .hero.hero--unified .hero__h1 {
	margin: 0.1rem auto 0;
	display: block;
	text-align: center;
	color: rgba(255, 255, 255, 0.96);
	font-weight: 900;
	letter-spacing: -0.02em;
	font-size: clamp(1.35rem, 2.1vw, 1.85rem);
	line-height: 1.05;
	text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.tax-service .hero.hero--unified .hero__cta-box,
.tax-city .hero.hero--unified .hero__cta-box {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	position: relative;
	margin-top: 1.2rem;
}

.tax-service .hero.hero--unified .hero__cta,
.tax-city .hero.hero--unified .hero__cta {
	background: rgba(255, 255, 255, 0.98);
	border-radius: 1.25rem;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
	color: rgba(15, 23, 42, 0.95);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.95rem;
	padding: 1.1rem 1.35rem;
}

.tax-service .hero.hero--unified .hero__cta:hover,
.tax-city .hero.hero--unified .hero__cta:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.tax-service .hero.hero--unified .hero__cta-icon,
.tax-city .hero.hero--unified .hero__cta-icon {
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 16px;
	background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #60a5fa 100%);
	color: #ffffff;
}

.tax-service .hero.hero--unified .hero__cta-text,
.tax-city .hero.hero--unified .hero__cta-text {
	display: grid;
	gap: 0.15rem;
	text-align: left;
}

.tax-service .hero.hero--unified .hero__cta-label,
.tax-city .hero.hero--unified .hero__cta-label {
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(15, 23, 42, 0.72);
}

.tax-service .hero.hero--unified .hero__cta-number,
.tax-city .hero.hero--unified .hero__cta-number {
	font-weight: 900;
	letter-spacing: 0.04em;
	font-size: clamp(1.6rem, 2.5vw, 1.9rem);
	color: rgba(15, 23, 42, 0.95);
}

/* Single description box (replaces home keyword/service boxes) */
.tax-service .hero.hero--unified .hero__single-box,
.tax-city .hero.hero--unified .hero__single-box {
	margin: 18px auto 0;
	width: min(980px, 100%);
	padding: 14px 16px;
	border-radius: 18px;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.14));
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
}

.tax-service .hero.hero--unified .hero__single-text,
.tax-city .hero.hero--unified .hero__single-text {
	margin: 0;
	text-align: center;
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	line-height: 1.55;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.96);
	text-wrap: balance;
}

@media (max-width: 768px) {
	.tax-service .hero.hero--unified,
	.tax-city .hero.hero--unified {
		padding: clamp(3.5rem, 7vh, 6rem) 1rem clamp(2.5rem, 6vh, 4rem);
	}

	.tax-service .hero.hero--unified .hero__cta,
	.tax-city .hero.hero--unified .hero__cta {
		width: 100%;
		justify-content: center;
	}

	.tax-service .hero.hero--unified .hero__single-box,
	.tax-city .hero.hero--unified .hero__single-box {
		padding: 12px 14px;
	}
}

/* 51-60: Hero animations, badges orchestration, stats counter, stagger, tilt, reveal, progress, magnetic, carousel, distance */
.page-hero--enhanced .page-hero__title--enhanced {
	animation: title-city-reveal 1s ease-out backwards;
}

@keyframes title-city-reveal {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.page-hero__badges > * {
	animation: badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.page-hero__badge--location {
	animation-delay: 0.2s;
}

.page-hero__badge--availability {
	animation-delay: 0.3s;
}

.page-hero__badge--rating {
	animation-delay: 0.4s;
}

@keyframes badge-pop {
	from {
		opacity: 0;
		transform: scale(0.8) translateY(20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.page-hero__stats {
	animation: stats-slide-up 0.8s ease-out 0.6s backwards;
}

@keyframes stats-slide-up {
	from {
		opacity: 0;
		transform: translateY(40px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 61-70: Particles, calendar, icon pulse, divider, certification, h2 borders, glow, priority, subtitle, thickness */
.quick-benefit--enhanced:nth-child(1) {
	animation: benefit-fade-in 0.6s ease-out 0.1s backwards;
}

.quick-benefit--enhanced:nth-child(2) {
	animation: benefit-fade-in 0.6s ease-out 0.2s backwards;
}

.quick-benefit--enhanced:nth-child(3) {
	animation: benefit-fade-in 0.6s ease-out 0.3s backwards;
}

.quick-benefit--enhanced:nth-child(4) {
	animation: benefit-fade-in 0.6s ease-out 0.4s backwards;
}

@keyframes benefit-fade-in {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.quick-benefit__icon {
	position: relative;
}

.quick-benefit__icon::after {
	content: '';
	position: absolute;
	inset: -4px;
	border: 2px solid rgba(37, 99, 235, 0.2);
	border-radius: 50%;
	opacity: 0;
	transition: all 0.3s ease;
}

.quick-benefit--enhanced:hover .quick-benefit__icon::after {
	opacity: 1;
	inset: -8px;
}

/* 71-80: Corner accent, gap, strong, border, shadow, hover, pattern, icon, links, font-variant */
.usp-item::after {
	content: '';
	position: absolute;
	top: -2px;
	right: -2px;
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
	clip-path: polygon(100% 0, 0 0, 100% 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.usp-item:hover::after {
	opacity: 0.6;
}

.page-hero__stat .stat-value {
	font-variant-numeric: tabular-nums lining-nums;
	position: relative;
}

.page-hero__stat .stat-value::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 50%;
	transform: translateX(-50%);
	width: 0%;
	height: 2px;
	background: rgba(255, 255, 255, 0.5);
	transition: width 0.3s ease;
}

.page-hero__stat:hover .stat-value::after {
	width: 80%;
}

/* 81-90: Mobile gap, gradient, underline, shadow, first-letter, text-transform, font-weight, filter, gap, padding */
.page-hero__service {
	position: relative;
}

.page-hero__service::after {
	content: '';
	position: absolute;
	bottom: -0.25rem;
	left: 0;
	right: 0;
	height: 2px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 999px;
}

.page-hero__city {
	letter-spacing: -0.02em;
	position: relative;
}

.entry-content p:first-of-type::first-letter {
	font-size: 3.5em;
	font-weight: 900;
	line-height: 0.8;
	float: left;
	margin: 0.1em 0.15em 0 0;
	color: var(--color-primary);
	text-shadow: 2px 2px 0 rgba(37, 99, 235, 0.1);
}

/* 91-100: Transition, max-width, alignment, letter-spacing, inset, overflow, radius, overlay, performance, ultimate */
.guarantees-content li {
	cursor: pointer;
}

.guarantees-content li:hover strong {
	color: var(--color-primary-dark);
}

.page-hero__cta-group--enhanced .button--hero-primary {
	font-size: 1.15rem;
	padding: 1.5rem 2.5rem;
	border: 2px solid rgba(255, 255, 255, 0.2);
	box-shadow: 
		0 8px 24px rgba(0, 0, 0, 0.25),
		0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.page-hero__cta-group--enhanced .button--hero-primary:hover {
	transform: translateY(-4px) scale(1.02);
	box-shadow: 
		0 12px 32px rgba(0, 0, 0, 0.3),
		0 0 0 1px rgba(255, 255, 255, 0.2) inset,
		0 0 30px rgba(255, 255, 255, 0.2);
}

.usp-section::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.15), transparent);
}

/* Reduce motion support */
@media (prefers-reduced-motion: reduce) {
	.page-hero--enhanced *,
	.quick-benefit--enhanced,
	.usp-item,
	.guarantees-content li {
		animation: none !important;
		transition-duration: 0.01ms !important;
	}
}

/* Performance optimizations */
.quick-benefit--enhanced,
.usp-item,
.guarantees-content li {
	contain: layout style;
	will-change: auto;
}

.quick-benefit--enhanced:hover,
.usp-item:hover {
	will-change: transform, box-shadow;
}

/* Mobile touch optimization */
@media (max-width: 768px) {
	.page-hero__cta-group--enhanced .button,
	.quick-benefit--enhanced {
		min-height: 48px;
		-webkit-tap-highlight-color: transparent;
	}
}

/* ===================================
   Unified hero (comuni/servizi/service_city) — final polish overrides
   =================================== */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified {
	margin: 0 !important;
	padding: clamp(2.5rem, 5.5vh, 5.25rem) 1.25rem clamp(2.25rem, 4.25vh, 4.25rem) !important;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .breadcrumbs {
	margin: 0 !important;
	padding: 0.35rem 0 0.35rem !important;
}

:is(.tax-service, .tax-city, .single-service_city) .breadcrumbs + .hero.hero--unified {
	margin-top: 0 !important;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified::before,
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified::before {
	background:
		radial-gradient(900px 420px at 50% 0%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 62%),
		radial-gradient(720px 520px at 15% 30%, rgba(96, 165, 250, 0.22), rgba(96, 165, 250, 0) 60%),
		radial-gradient(720px 520px at 85% 35%, rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0) 58%);
	opacity: 0.95;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified::after {
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.18));
	opacity: 0.9;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__background {
	z-index: 0;
	opacity: 0.42 !important;
	filter: saturate(1.12) contrast(1.05);
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .container {
	position: relative;
	z-index: 2;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__content {
	max-width: 980px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	text-align: center;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__eyebrow {
	margin: 0 0 0.35rem 0 !important;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__brand {
	font-weight: 900;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-size: clamp(2.1rem, 4.6vw, 3.25rem);
	line-height: 1.02;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__h1 {
	margin: 0 auto 0 !important;
	max-width: 24ch;
	text-wrap: balance;
	letter-spacing: 0.08em;
	font-size: clamp(1.85rem, 3.6vw, 2.75rem) !important;
	line-height: 1.06 !important;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__h1::after {
	content: "";
	display: block;
	width: min(220px, 58%);
	height: 4px;
	margin: 0.8rem auto 0;
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(250, 204, 21, 0.9), rgba(255, 255, 255, 0));
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
	opacity: 0.85;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-box {
	margin-top: 0.9rem !important;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta {
	border: 2px solid rgba(250, 204, 21, 0.55);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), 0 0 0 6px rgba(250, 204, 21, 0.10);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta:hover {
	border-color: rgba(250, 204, 21, 0.78);
	transform: translateY(-3px);
	box-shadow: 0 24px 52px rgba(0, 0, 0, 0.3), 0 0 0 8px rgba(250, 204, 21, 0.12);
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta:active {
	transform: translateY(-1px) scale(0.99);
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta:focus-visible {
	outline: 3px solid rgba(250, 204, 21, 0.55);
	outline-offset: 3px;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-number {
	font-variant-numeric: tabular-nums lining-nums;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__single-box {
	margin-top: 16px !important;
	width: min(980px, 100%);
	padding: 16px 18px;
	border-radius: 18px;
	backdrop-filter: blur(10px);
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.44), rgba(15, 23, 42, 0.16));
	border: 1px solid rgba(255, 255, 255, 0.20);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__single-text {
	font-size: clamp(1.05rem, 2.0vw, 1.28rem);
	line-height: 1.58;
}

/* Improve spacing right after the hero (avoid huge empty gap) */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified + section {
	padding-top: clamp(1.5rem, 3vh, 2.25rem) !important;
}

@media (max-width: 768px) {
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified {
		padding: clamp(2.25rem, 5vh, 4.25rem) 1rem clamp(2rem, 4vh, 3.5rem) !important;
	}

	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__brand {
		font-size: clamp(1.95rem, 8.2vw, 2.65rem);
		letter-spacing: 0.16em;
	}

	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__h1 {
		max-width: 26ch;
		letter-spacing: 0.07em;
		font-size: clamp(1.55rem, 6.2vw, 2.05rem) !important;
	}

	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta {
		width: min(520px, 100%);
	}

	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-icon {
		width: 48px;
		height: 48px;
		border-radius: 14px;
	}

	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-number {
		font-size: clamp(1.45rem, 6vw, 1.75rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta,
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta:hover {
		transition: none;
		transform: none;
	}
}

/* ===================================
   Unified hero — extra 50 improvements (fine tuning)
   =================================== */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified {
	padding-left: calc(1.25rem + env(safe-area-inset-left)) !important;
	padding-right: calc(1.25rem + env(safe-area-inset-right)) !important;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__content {
	gap: 0.55rem;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__brand {
	text-rendering: geometricPrecision;
	-webkit-font-smoothing: antialiased;
	filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.25));
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__h1 {
	text-shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta {
	justify-content: center;
	min-width: min(520px, 100%);
	white-space: nowrap;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-icon {
	flex: 0 0 auto;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-text {
	text-align: left;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-label {
	position: relative;
	padding-left: 1.05rem;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-label::before {
	content: "🚨";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-52%);
	font-size: 0.92em;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__single-box {
	overflow: hidden;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__single-box::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(600px 220px at 50% 0%, rgba(250, 204, 21, 0.14), rgba(250, 204, 21, 0) 65%);
	opacity: 0.9;
	pointer-events: none;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__single-text {
	position: relative;
	z-index: 1;
	font-weight: 650;
}

@media (max-width: 420px) {
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta {
		padding: 1rem 1.05rem;
		gap: 0.8rem;
	}

	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni, .single-service_city) .hero.hero--unified .hero__cta-number {
		font-size: 1.55rem;
	}
}

/* ===================================
   Comuni/Servizi pages — 50 design improvements (layout + cards + a11y)
   Scope: only /comuni, /servizi and taxonomy term pages
   =================================== */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) {
	--zs-bg: var(--color-bg);
	--zs-surface: rgba(255, 255, 255, 0.96);
	--zs-surface2: rgba(15, 23, 42, 0.03);
	--zs-ink: rgba(15, 23, 42, 0.96);
	--zs-muted: rgba(15, 23, 42, 0.68);
	--zs-border: rgba(15, 23, 42, 0.10);
	--zs-radius: 18px;
	--zs-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

/* 1) More coherent section rhythm (less “template feel”) */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .site-main > section {
	padding: clamp(2.25rem, 4.5vw, 3.75rem) 0;
}

/* 2) Soft, consistent backgrounds for the main blocks */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .intro-text-section,
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-info-section,
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .city-info-section {
	background:
		radial-gradient(900px 520px at 20% 0%, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0) 60%),
		radial-gradient(900px 560px at 80% 0%, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0) 58%),
		var(--zs-bg);
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

/* 3) Constrain prose width for readability */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .intro-text-content,
:is(.tax-service, .tax-city) .service-info-content,
:is(.tax-service, .tax-city) .city-info-content {
	max-width: 78ch;
	margin-inline: auto;
}

/* 4) Make intro blocks feel like premium panels */
:is(.page-template-page-servizi, .page-template-page-comuni) .intro-text-content,
:is(.tax-service, .tax-city) .service-info-content,
:is(.tax-service, .tax-city) .city-info-content {
	border-radius: calc(var(--zs-radius) + 8px);
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.90));
	box-shadow: var(--zs-shadow);
	padding: clamp(1.1rem, 2.4vw, 1.6rem);
}

/* 5) Typography: sharper hierarchy */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .intro-text-content h2,
:is(.tax-service, .tax-city) .service-info-content h2,
:is(.tax-service, .tax-city) .city-info-content h2 {
	font-size: clamp(1.65rem, 2.8vw, 2.15rem);
	font-weight: 900;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

/* 6) Reduce “holes” between paragraphs */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .intro-text-content p,
:is(.tax-service, .tax-city) .service-info-content p,
:is(.tax-service, .tax-city) .city-info-content p {
	line-height: 1.75;
	margin-bottom: 0.9rem;
}

/* 7) Better list readability */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .intro-text-content ul,
:is(.tax-service, .tax-city) .service-info-content ul,
:is(.tax-service, .tax-city) .city-info-content ul {
	padding-left: 1.25rem;
	margin-top: 0.85rem;
}

/* 8) Modern section headers */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .section-header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 1.75rem;
}

/* 9) Uppercase titles (consistent with service_city) */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .section-header h2 {
	text-transform: uppercase;
	letter-spacing: -0.02em;
}

/* 10) Subtitle tone */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .section-header p {
	color: rgba(15, 23, 42, 0.70);
}

/* 11) Quick benefits: turn into cohesive cards */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefits-section {
	background:
		radial-gradient(1000px 520px at 15% 0%, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0) 60%),
		radial-gradient(1000px 640px at 85% 0%, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0) 58%),
		linear-gradient(180deg, rgba(15, 23, 42, 0.00) 0%, rgba(15, 23, 42, 0.02) 100%);
}

/* 12) Grid: consistent gaps + responsive */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefits-grid {
	gap: 1rem;
}

@media (max-width: 820px) {
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefits-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefits-grid {
		grid-template-columns: 1fr;
	}
}

/* 13) Benefit card surface */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefit {
	border-radius: var(--zs-radius);
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

/* 14) Benefit hover (subtle) */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefit:hover {
	transform: translateY(-2px);
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
}

/* 15) Benefit icon color coherence */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefit svg {
	color: rgba(37, 99, 235, 0.95);
}

/* 16) Services/Cities grids: slightly smaller min width on narrow screens */
@media (max-width: 420px) {
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .services-grid,
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .cities-grid,
	:is(.tax-service, .tax-city) .locations-grid {
		grid-template-columns: 1fr;
	}
}

/* 17) Card: consistent padding for default service-card variant */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card:not(.service-card--enhanced):not(.service-card--simple),
:is(.tax-service, .tax-city) .location-card:not(.location-card--macro) {
	padding: 1.35rem;
}

/* 18) Card: better icon block */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card .service-card__icon,
:is(.tax-service, .tax-city) .location-card .location-card__icon {
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(96, 165, 250, 0.10));
	border: 1px solid rgba(37, 99, 235, 0.14);
}

/* 19) Card titles: uppercase for consistency */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card h3,
:is(.tax-service, .tax-city) .location-card h3 {
	text-transform: uppercase;
	letter-spacing: -0.01em;
}

/* 20) Card descriptions: more readable */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card p,
:is(.tax-service, .tax-city) .location-card p {
	color: rgba(15, 23, 42, 0.72);
	line-height: 1.65;
}

/* 21) Buttons inside cards: full width, consistent */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card .button,
:is(.tax-service, .tax-city) .location-card .button {
	width: 100%;
	justify-content: center;
}

/* 22) City links (archive-like tiles): stronger focus + hover */
:is(.tax-city, .page-template-page-comuni) .city-link,
:is(.page-template-page-comuni) .city-link-simple {
	border-radius: 16px;
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

/* 23) City link hover feels clickable */
:is(.tax-city, .page-template-page-comuni) .city-link:hover,
:is(.page-template-page-comuni) .city-link-simple:hover {
	transform: translateY(-2px);
	border-color: rgba(37, 99, 235, 0.28);
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

/* 24) City link icon treatment */
:is(.tax-city, .page-template-page-comuni) .city-link svg,
:is(.page-template-page-comuni) .city-link-simple svg {
	color: rgba(37, 99, 235, 0.95);
}

/* 25) Make small count more legible */
:is(.tax-city, .page-template-page-comuni) .city-link small {
	color: rgba(15, 23, 42, 0.62);
}

/* 26) Locations “macro” card: stronger hierarchy */
:is(.tax-service) .location-card--macro {
	border-radius: calc(var(--zs-radius) + 6px);
	box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

/* 27) Locations-more: turn into pill */
:is(.tax-service) .locations-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	border: 1px solid rgba(37, 99, 235, 0.16);
	background: rgba(37, 99, 235, 0.06);
	color: rgba(15, 23, 42, 0.76);
	font-weight: 700;
}

/* 28) Emergency box section: reduce dead space (already good, just align) */
:is(.tax-service, .tax-city) .emergency-box-section {
	padding-top: clamp(1.5rem, 3vw, 2rem);
}

/* 29) Remove inline-ish info-box “cheap look” via stronger CSS */
:is(.tax-service, .tax-city) .info-box {
	background: rgba(37, 99, 235, 0.06) !important;
	border-left: 4px solid rgba(37, 99, 235, 0.95) !important;
	border-radius: 16px !important;
	padding: 1.35rem 1.35rem !important;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
}

/* 30) “Chiama subito” title in info-box */
:is(.tax-service, .tax-city) .info-box h4 {
	font-weight: 900 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* 31) A11y: clear focus ring on interactive tiles/buttons */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) a.button:focus-visible,
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .button:focus-visible,
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) a.city-link:focus-visible,
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) a.city-link-simple:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.35);
	outline-offset: 4px;
}

/* 32) Reduce motion when user prefers */
@media (prefers-reduced-motion: reduce) {
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card,
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .location-card,
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .quick-benefit,
	:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .city-link,
	:is(.page-template-page-comuni) .city-link-simple {
		transition: none;
		transform: none;
	}
}

/* 33) Buttons: align icons nicer on taxonomy pages */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .button svg {
	vertical-align: -0.2em;
}

/* 34) CTA final blocks: slightly less “banner”, more premium */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .cta-section--final .cta-content {
	border-radius: calc(var(--zs-radius) + 10px);
	overflow: hidden;
}

/* 35) CTA final: tighten guarantee line */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .cta-section--final .cta-guarantee {
	letter-spacing: 0.01em;
	opacity: 0.9;
}

/* 36) City/services grid spacing: less “air” */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .services-grid,
:is(.tax-service, .tax-city) .locations-grid,
:is(.page-template-page-comuni) .cities-grid {
	gap: 1.25rem;
	margin-top: 2rem;
}

/* 37) Avoid overly aggressive hover lift on these pages */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card:hover,
:is(.tax-service, .tax-city) .location-card:hover {
	transform: translateY(-4px);
}

/* 38) Make cards feel pressable */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .service-card:active,
:is(.tax-service, .tax-city) .location-card:active {
	transform: translateY(-1px);
}

/* 39) Better contrast for icons in “simple” service cards */
:is(.page-template-page-servizi) .service-card--simple .service-card__icon {
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(96, 165, 250, 0.12));
}

/* 40) Simple city links: reduce the “listy” feel */
:is(.page-template-page-comuni) .cities-grid--simple {
	gap: 0.9rem;
}

/* 41) City-link-simple text alignment */
:is(.page-template-page-comuni) .city-link-simple span {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

/* 42) Service pages: location cards icons */
:is(.tax-service) .location-card .location-card__icon {
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(96, 165, 250, 0.10));
}

/* 43) City services cards: tighter paragraph */
:is(.tax-city) .services-grid .service-card p {
	margin-bottom: 1.1rem;
}

/* 44) City services: button emphasis */
:is(.tax-city) .services-grid .service-card .button {
	font-weight: 800;
}

/* 45) Location cards: macro badge clarity */
:is(.tax-service) .location-card__badge {
	letter-spacing: 0.08em;
}

/* 46) Taxonomy pages: reduce default section alternating background conflicts */
:is(.tax-service, .tax-city) section:nth-child(even):not(.page-hero):not(.hero):not(.cta-section):not(.trust-section) {
	background: transparent;
}

/* 47) Better link underline/hover in long copy sections */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .intro-text-content a,
:is(.tax-service, .tax-city) .service-info-content a,
:is(.tax-service, .tax-city) .city-info-content a {
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* 48) Reduce overly strong hero emoji on CTA label for these pages */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .hero.hero--unified .hero__cta-label::before {
	content: "☎";
}

/* 49) Prevent awkward line breaks in phone CTAs */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .hero.hero--unified .hero__cta-number,
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .cta-section--final .button--cta {
	white-space: nowrap;
}

/* 50) Stronger “click affordance” on buttons (subtle) */
:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .button {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

:is(.tax-service, .tax-city, .page-template-page-servizi, .page-template-page-comuni) .button:hover {
	transform: translateY(-1px);
}

/* ===================================
   City/Service pages — V2 polish (additional 50 improvements)
   Targets:
   - /servizi/ and /comuni/ page templates
   - archive-service.php and archive-city.php variants
   =================================== */

/* V2-01) Lightweight tokens for archive-like pages */
:is(.page-template-page-servizi, .page-template-page-comuni) {
	--zsx-surface: rgba(255, 255, 255, 0.96);
	--zsx-border: rgba(15, 23, 42, 0.10);
	--zsx-border-strong: rgba(37, 99, 235, 0.22);
	--zsx-text-muted: rgba(15, 23, 42, 0.72);
	--zsx-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
	--zsx-shadow-hover: 0 18px 42px rgba(15, 23, 42, 0.10);
}

/* V2-02) Archive hero: align with unified hero palette */
.page-hero.page-hero--services-archive,
.page-hero.page-hero--cities-archive {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: clamp(2.75rem, 6vh, 5.75rem) 0 clamp(2.25rem, 4.5vh, 4.5rem);
	background: linear-gradient(135deg, #0f2a6b 0%, #1e40af 55%, #2563eb 100%);
	color: #ffffff;
}

/* V2-03) Archive hero background overlay */
.page-hero.page-hero--services-archive .page-hero__background,
.page-hero.page-hero--cities-archive .page-hero__background {
	position: absolute;
	inset: 0;
	opacity: 0.65;
	background:
		radial-gradient(1000px 520px at 15% 0%, rgba(96, 165, 250, 0.38), rgba(96, 165, 250, 0) 60%),
		radial-gradient(1100px 640px at 85% 0%, rgba(59, 130, 246, 0.32), rgba(59, 130, 246, 0) 58%),
		linear-gradient(180deg, rgba(2, 6, 23, 0.10) 0%, rgba(2, 6, 23, 0.28) 100%);
	mix-blend-mode: soft-light;
	pointer-events: none;
	z-index: 0;
}

/* V2-04) Archive hero content layering */
.page-hero.page-hero--services-archive .page-hero__content,
.page-hero.page-hero--cities-archive .page-hero__content {
	position: relative;
	z-index: 2;
	text-align: center;
	max-width: 980px;
	margin: 0 auto;
}

/* V2-05) Badge becomes pill */
.page-hero.page-hero--services-archive .page-hero__badge,
.page-hero.page-hero--cities-archive .page-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.45rem 0.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* V2-06) Badge text & icon */
.page-hero.page-hero--services-archive .page-hero__badge span,
.page-hero.page-hero--cities-archive .page-hero__badge span {
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 0.82rem;
}

.page-hero.page-hero--services-archive .page-hero__badge svg,
.page-hero.page-hero--cities-archive .page-hero__badge svg {
	color: rgba(255, 255, 255, 0.95);
}

/* V2-07) H1 sizing + balance */
.page-hero.page-hero--services-archive h1,
.page-hero.page-hero--cities-archive h1 {
	margin: 0.85rem 0 0;
	font-size: clamp(1.9rem, 3.2vw, 2.75rem);
	line-height: 1.05;
	font-weight: 900;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	text-wrap: balance;
}

/* V2-08) Subtitle readability */
.page-hero.page-hero--services-archive .page-hero__subtitle,
.page-hero.page-hero--cities-archive .page-hero__subtitle {
	margin: 0.9rem auto 0;
	max-width: 860px;
	line-height: 1.65;
	font-weight: 650;
	color: rgba(255, 255, 255, 0.92);
	text-wrap: pretty;
}

/* V2-09) CTA group spacing */
.page-hero.page-hero--services-archive .page-hero__cta-group,
.page-hero.page-hero--cities-archive .page-hero__cta-group {
	margin-top: 1.15rem;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

/* V2-10) Archive hero primary CTA looks like premium phone button */
.page-hero.page-hero--services-archive .button--hero-primary,
.page-hero.page-hero--cities-archive .button--hero-primary {
	background: rgba(255, 255, 255, 0.98);
	color: rgba(15, 23, 42, 0.95);
	border-radius: 18px;
	box-shadow: 0 20px 44px rgba(2, 6, 23, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.55);
}

/* V2-11) Primary CTA hover keeps contrast */
.page-hero.page-hero--services-archive .button--hero-primary:hover,
.page-hero.page-hero--cities-archive .button--hero-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 26px 58px rgba(2, 6, 23, 0.34);
}

/* V2-12) Secondary hero CTA: glass look */
.page-hero.page-hero--services-archive .button--hero-secondary {
	background: rgba(255, 255, 255, 0.14);
	color: rgba(255, 255, 255, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.20);
	border-radius: 18px;
}

.page-hero.page-hero--services-archive .button--hero-secondary:hover {
	background: rgba(255, 255, 255, 0.18);
	transform: translateY(-1px);
}

/* V2-13) Archive sections: consistent spacing rhythm */
.quick-info-section,
.all-services-section,
.all-cities-section,
.coverage-section {
	padding: clamp(2.25rem, 5vw, 3.25rem) 0;
}

/* V2-14) Section headers on archive pages: match enhanced rhythm */
.all-services-section .section-header,
.all-cities-section .section-header,
.coverage-section .section-header {
	text-align: center;
	max-width: 820px;
	margin: 0 auto 1.75rem;
}

.all-services-section .section-header h2,
.all-cities-section .section-header h2,
.coverage-section .section-header h2 {
	text-transform: uppercase;
	letter-spacing: -0.02em;
}

.all-services-section .section-header p,
.all-cities-section .section-header p,
.coverage-section .section-header p {
	color: rgba(15, 23, 42, 0.70);
}

/* V2-15) Quick-info becomes premium 3-card panel */
.quick-info-section {
	background:
		radial-gradient(1000px 520px at 15% 0%, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0) 60%),
		radial-gradient(1000px 640px at 85% 0%, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0) 58%),
		linear-gradient(180deg, rgba(15, 23, 42, 0.00) 0%, rgba(15, 23, 42, 0.02) 100%);
}

.quick-info-section .quick-info-grid {
	gap: 1rem;
}

.quick-info-section .quick-info-item {
	border-radius: var(--zs-radius, 18px);
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
	padding: 1.35rem 1.35rem;
	position: relative;
	overflow: hidden;
}

/* V2-16) Quick-info accent bar */
.quick-info-section .quick-info-item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, rgba(37, 99, 235, 0.95), rgba(96, 165, 250, 0.95));
}

/* V2-17) Quick-info titles */
.quick-info-section .quick-info-item h3 {
	margin-top: 0;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: -0.01em;
}

.quick-info-section .quick-info-item p {
	color: rgba(15, 23, 42, 0.74);
	line-height: 1.7;
	margin-bottom: 0;
}

/* V2-18) Grids: slightly tighter + better mobile */
.all-services-section .services-grid,
.all-cities-section .cities-grid,
.coverage-section .coverage-stats {
	gap: 1.1rem;
}

@media (max-width: 520px) {
	.all-services-section .services-grid,
	.all-cities-section .cities-grid,
	.coverage-section .coverage-stats {
		gap: 0.9rem;
	}
}

/* V2-19) Archive service cards: premium surface */
.all-services-section .service-card,
.all-services-section .service-card.service-card--simple {
	border-radius: calc(var(--zs-radius, 18px) + 2px);
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
	padding: 1.35rem;
	overflow: hidden;
	position: relative;
}

/* V2-20) Card hover: calm lift */
.all-services-section .service-card:hover,
.all-services-section .service-card.service-card--simple:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
	border-color: rgba(37, 99, 235, 0.22);
}

/* V2-21) Card icon block consistency */
.all-services-section .service-card .service-card__icon {
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(96, 165, 250, 0.10));
	border: 1px solid rgba(37, 99, 235, 0.14);
}

/* V2-22) Card title hierarchy */
.all-services-section .service-card h3 {
	text-transform: uppercase;
	font-weight: 900;
	letter-spacing: -0.01em;
	line-height: 1.12;
	margin-bottom: 0.55rem;
}

/* V2-23) Clamp long descriptions to keep grid tidy */
.all-services-section .service-card p {
	color: rgba(15, 23, 42, 0.72);
	line-height: 1.65;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin-bottom: 1.05rem;
}

/* V2-24) Card buttons: full width and stronger */
.all-services-section .service-card .button {
	width: 100%;
	justify-content: center;
	font-weight: 800;
}

/* V2-25) Cities tiles: stronger “card link” treatment */
.all-cities-section .city-link,
.all-cities-section .city-link-simple {
	border-radius: 16px;
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.all-cities-section .city-link:hover,
.all-cities-section .city-link-simple:hover {
	transform: translateY(-2px);
	border-color: rgba(37, 99, 235, 0.28);
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

/* V2-26) City icons in blue palette */
.all-cities-section .city-link svg,
.all-cities-section .city-link-simple svg {
	color: rgba(37, 99, 235, 0.95);
}

/* V2-27) City link micro typography */
.all-cities-section .city-link small {
	color: rgba(15, 23, 42, 0.62);
}

/* V2-28) Coverage stats: turn into premium KPI cards */
.coverage-section .coverage-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
	.coverage-section .coverage-stats {
		grid-template-columns: 1fr;
	}
}

.coverage-section .coverage-stat {
	border-radius: calc(var(--zs-radius, 18px) + 2px);
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
	padding: 1.35rem 1.35rem;
	position: relative;
	overflow: hidden;
}

/* V2-29) Coverage accent gradient */
.coverage-section .coverage-stat::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(680px 220px at 20% 0%, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0) 62%),
		radial-gradient(680px 240px at 85% 15%, rgba(96, 165, 250, 0.14), rgba(96, 165, 250, 0) 60%);
	pointer-events: none;
}

/* V2-30) Coverage numbers pop */
.coverage-section .coverage-stat__number {
	position: relative;
	font-weight: 950;
	letter-spacing: -0.02em;
	color: rgba(15, 23, 42, 0.95);
	text-transform: uppercase;
}

.coverage-section .coverage-stat__label {
	position: relative;
	color: rgba(15, 23, 42, 0.70);
	font-weight: 750;
}

/* V2-31) Archive CTA section: match premium rounded look */
.page-hero + .quick-benefits-section {
	margin-top: 0;
}

/* V2-32) A11y: focus ring on archive interactive items */
.page-hero.page-hero--services-archive a:focus-visible,
.page-hero.page-hero--cities-archive a:focus-visible,
.all-services-section a:focus-visible,
.all-cities-section a:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.35);
	outline-offset: 4px;
}

/* V2-33) Tools bar (search + CTA) */
.zsx-tools-section {
	padding: 1.25rem 0 0;
}

.zsx-tools {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.85rem;
	align-items: center;
	padding: 0.95rem 1rem;
	border-radius: calc(var(--zs-radius, 18px) + 6px);
	border: 1px solid rgba(15, 23, 42, 0.10);
	background:
		radial-gradient(900px 240px at 25% 0%, rgba(37, 99, 235, 0.10), rgba(37, 99, 235, 0) 62%),
		radial-gradient(900px 260px at 85% 15%, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0) 60%),
		rgba(255, 255, 255, 0.96);
	box-shadow: 0 16px 44px rgba(15, 23, 42, 0.09);
}

@media (max-width: 860px) {
	.zsx-tools {
		grid-template-columns: 1fr;
	}
}

/* V2-34) Search field */
.zsx-search {
	display: grid;
	gap: 0.4rem;
}

.zsx-search__label {
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 0.78rem;
	color: rgba(15, 23, 42, 0.72);
}

.zsx-search__input {
	width: 100%;
	min-height: 46px;
	padding: 0.65rem 0.9rem;
	border-radius: 14px;
	border: 1px solid rgba(15, 23, 42, 0.14);
	background: rgba(255, 255, 255, 0.98);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
	color: rgba(15, 23, 42, 0.92);
}

.zsx-search__input:focus {
	outline: none;
	border-color: rgba(37, 99, 235, 0.40);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.zsx-search__meta {
	color: rgba(15, 23, 42, 0.62);
	font-size: 0.95rem;
}

/* V2-35) Tools CTA chip */
.zsx-tools__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 0.75rem 0.95rem;
	border-radius: 16px;
	font-weight: 900;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
	border: 1px solid rgba(37, 99, 235, 0.18);
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(96, 165, 250, 0.10));
	color: rgba(15, 23, 42, 0.92);
}

.zsx-tools__cta:hover {
	transform: translateY(-1px);
	border-color: rgba(37, 99, 235, 0.30);
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
}

.zsx-tools__cta svg {
	color: rgba(37, 99, 235, 0.95);
}

/* V2-36) Filtered empty state */
.zsx-empty {
	display: none;
	margin-top: 1.25rem;
	padding: 1rem 1.05rem;
	border-radius: 16px;
	border: 1px dashed rgba(37, 99, 235, 0.30);
	background: rgba(37, 99, 235, 0.06);
	color: rgba(15, 23, 42, 0.78);
	font-weight: 700;
}

.zsx-empty.is-visible {
	display: block;
}

/* V2-37) Make long lists feel less “wall of cards” */
.all-cities-section .cities-grid,
.all-services-section .services-grid {
	margin-top: 1.5rem;
}

/* V2-38) Ensure smoothness without motion excess */
.page-hero.page-hero--services-archive .button,
.page-hero.page-hero--cities-archive .button,
.all-services-section .service-card,
.all-cities-section .city-link,
.all-cities-section .city-link-simple,
.zsx-tools__cta {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	.page-hero.page-hero--services-archive .button,
	.page-hero.page-hero--cities-archive .button,
	.all-services-section .service-card,
	.all-cities-section .city-link,
	.all-cities-section .city-link-simple,
	.zsx-tools__cta {
		transition: none;
		transform: none;
	}
}

/* V2-39) Tighten archive final CTA for these pages */
.cta-section--final .cta-content {
	border-radius: calc(var(--zs-radius, 18px) + 10px);
	overflow: hidden;
}

.cta-section--final .cta-guarantee {
	letter-spacing: 0.01em;
	opacity: 0.9;
}

/* V2-40) Remove odd inline-centered blocks in coverage section */
.coverage-section .zsx-center {
	text-align: center;
	margin-top: 2rem;
}

/* V2-41) Intro text sections: premium surface + better legibility */
.page-template-page-servizi .intro-text-section,
.page-template-page-comuni .intro-text-section {
	background:
		radial-gradient(1000px 520px at 15% 0%, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0) 60%),
		radial-gradient(1000px 640px at 85% 0%, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0) 58%),
		linear-gradient(180deg, rgba(15, 23, 42, 0.00) 0%, rgba(15, 23, 42, 0.02) 100%);
	padding: clamp(2rem, 4vw, 2.75rem) 0;
}

.page-template-page-servizi .intro-text-content,
.page-template-page-comuni .intro-text-content {
	border-radius: calc(var(--zs-radius, 18px) + 6px);
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
	padding: clamp(1.1rem, 2.5vw, 1.55rem);
}

/* V2-42) Brand highlight: consistent “premium” look */
.page-template-page-servizi .brand-highlight,
.page-template-page-comuni .brand-highlight {
	font-weight: 950;
	background: linear-gradient(135deg, #0f2a6b 0%, #1e40af 40%, #2563eb 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* V2-43) Sticky tools bar on desktop (better usability on long lists) */
@media (min-width: 1024px) {
	.all-services-section[data-zsx-filter-scope] .zsx-tools-section,
	.all-cities-section[data-zsx-filter-scope] .zsx-tools-section {
		position: sticky;
		top: 88px;
		z-index: 5;
	}
}

/* V2-44) Sticky bar: avoid jumpy reflow by reserving space */
@media (min-width: 1024px) {
	.all-services-section[data-zsx-filter-scope] .zsx-tools-section,
	.all-cities-section[data-zsx-filter-scope] .zsx-tools-section {
		margin-bottom: 0.75rem;
	}
}

/* V2-45) Better headings hierarchy inside intro content */
.page-template-page-servizi .intro-text-content h3,
.page-template-page-comuni .intro-text-content h3 {
	margin-top: 1.15rem;
	font-weight: 900;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

/* V2-46) Improve list bullets inside intro: clearer and consistent */
.page-template-page-servizi .intro-text-content li,
.page-template-page-comuni .intro-text-content li {
	margin-bottom: 0.4rem;
}

/* V2-47) Make service cards equal-height and CTA pinned bottom (archive + page) */
.all-services-section .service-card,
.page-template-page-servizi .service-card {
	display: flex;
	flex-direction: column;
}

.all-services-section .service-card .button,
.page-template-page-servizi .service-card .button {
	margin-top: auto;
}

/* IMPORTANT: /servizi/ must never "fade out".
 * `assets/js/main.js` applies an IntersectionObserver that sets inline:
 * - opacity: 0
 * - transform: translateY(30px)
 * On some setups the observer callback doesn't reliably run, leaving cards hidden.
 * Force visibility ONLY on the services page template (no impact on Home/other pages).
 */
.page-template-page-servizi .all-services-section .service-card,
.page-template-page-servizi .all-services-section .service-card.service-card--simple {
	opacity: 1 !important;
	transform: translateY(0) !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.page-template-page-servizi .all-services-section .service-card:hover,
.page-template-page-servizi .all-services-section .service-card.service-card--simple:hover {
	transform: translateY(-3px) !important;
}

/* V2-48) Press state for buttons/cards (tactile feedback) */
.all-services-section .service-card:active,
.all-cities-section .city-link:active,
.all-cities-section .city-link-simple:active,
.zsx-tools__cta:active {
	transform: translateY(-1px);
}

/* V2-49) Better anchor scrolling under sticky header */
#tutti-servizi,
.all-services-section,
.all-cities-section {
	scroll-margin-top: 110px;
}

/* V2-50) Selection color for consistency with palette */
.page-hero.page-hero--services-archive ::selection,
.page-hero.page-hero--cities-archive ::selection,
.page-template-page-servizi ::selection,
.page-template-page-comuni ::selection {
	background: rgba(37, 99, 235, 0.28);
	color: rgba(15, 23, 42, 0.98);
}

/* ===================================
   City/Service pages — V3 super polish (additional 50 improvements)
   Focus: tools UX, conversion micro-UI, cleaner lists
   =================================== */

/* V3-01) Tools: dedicate a sticky offset variable */
:is(.page-template-page-servizi, .page-template-page-comuni) {
	--zsx-sticky-top: 88px;
}

/* V3-02) Sticky tools: allow safer top on smaller headers */
@media (max-width: 1024px) {
	:is(.page-template-page-servizi, .page-template-page-comuni) {
		--zsx-sticky-top: 72px;
	}
}

@media (min-width: 1024px) {
	.all-services-section[data-zsx-filter-scope] .zsx-tools-section,
	.all-cities-section[data-zsx-filter-scope] .zsx-tools-section {
		top: var(--zsx-sticky-top, 88px);
	}
}

/* V3-03) Tools bar: subtle “ring” for premium depth */
.zsx-tools {
	position: relative;
}

.zsx-tools::before {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: calc(var(--zs-radius, 18px) + 7px);
	background: linear-gradient(135deg, rgba(37, 99, 235, 0.20), rgba(96, 165, 250, 0.18));
	opacity: 0.55;
	pointer-events: none;
}

.zsx-tools > * {
	position: relative;
	z-index: 1;
}

/* V3-04) Search field wrapper */
.zsx-search__field {
	position: relative;
	display: grid;
	align-items: center;
}

/* V3-05) Search input: add left icon padding + right controls */
.zsx-search__input {
	padding-left: 2.6rem;
	padding-right: 5.8rem;
}

/* V3-06) Search magnifier icon (CSS only) */
.zsx-search__field::before {
	content: "";
	position: absolute;
	left: 0.85rem;
	top: 50%;
	width: 16px;
	height: 16px;
	transform: translateY(-50%);
	border: 2px solid rgba(37, 99, 235, 0.55);
	border-radius: 999px;
	box-shadow: 8px 8px 0 -6px rgba(37, 99, 235, 0.55);
	opacity: 0.9;
	pointer-events: none;
}

/* V3-07) Clear button: placed inside field */
.zsx-search__clear {
	position: absolute;
	right: 3.2rem;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 12px;
	border: 1px solid rgba(15, 23, 42, 0.10);
	background: rgba(255, 255, 255, 0.98);
	display: grid;
	place-items: center;
	color: rgba(15, 23, 42, 0.70);
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

/* V3-08) Clear button states */
.zsx-search__clear:disabled {
	opacity: 0.0;
	pointer-events: none;
}

.zsx-search__clear:hover {
	border-color: rgba(37, 99, 235, 0.28);
	color: rgba(15, 23, 42, 0.92);
	transform: translateY(-50%) scale(1.02);
}

.zsx-search__clear:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.30);
	outline-offset: 3px;
}

/* V3-09) Count pill inside search field */
.zsx-search__pill {
	position: absolute;
	right: 0.6rem;
	top: 50%;
	transform: translateY(-50%);
	padding: 0.35rem 0.55rem;
	border-radius: 999px;
	border: 1px solid rgba(37, 99, 235, 0.16);
	background: rgba(37, 99, 235, 0.06);
	color: rgba(15, 23, 42, 0.80);
	font-weight: 800;
	letter-spacing: 0.01em;
	white-space: nowrap;
	max-width: 42%;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* V3-10) Meta line: smaller + calmer */
.zsx-search__meta {
	font-size: 0.95rem;
	color: rgba(15, 23, 42, 0.62);
}

/* V3-11) Tools CTA: ensure equal height with input on desktop */
@media (min-width: 860px) {
	.zsx-tools__cta {
		min-height: 54px;
	}
}

/* V3-12) Tools CTA: more “button-like” */
.zsx-tools__cta {
	border-radius: 18px;
}

/* V3-13) When searching, matching items get subtle accent */
.zsx-is-match {
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.10);
	border-color: rgba(37, 99, 235, 0.26) !important;
}

/* V3-14) Hidden items do not reserve layout space (safety) */
[data-zsx-item][hidden] {
	display: none !important;
}

/* V3-15) Services page: simplify icon visuals (avoid harsh fills) */
.service-card .service-card__icon svg {
	color: rgba(37, 99, 235, 0.95);
}

/* V3-16) Service titles: clamp to 2 lines */
.service-card h3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

/* V3-17) City-link-simple: make it feel more “tile” */
.city-link-simple {
	position: relative;
}

.city-link-simple::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 10px;
	height: 10px;
	border-right: 2px solid rgba(37, 99, 235, 0.55);
	border-bottom: 2px solid rgba(37, 99, 235, 0.55);
	transform: translateY(-50%) rotate(-45deg);
	opacity: 0.9;
}

/* V3-18) City-link (archive tiles) caret */
.city-link {
	position: relative;
}

.city-link::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 10px;
	height: 10px;
	border-right: 2px solid rgba(37, 99, 235, 0.55);
	border-bottom: 2px solid rgba(37, 99, 235, 0.55);
	transform: translateY(-50%) rotate(-45deg);
	opacity: 0.9;
}

/* V3-19) Avoid caret overlapping on tiny screens */
@media (max-width: 360px) {
	.city-link::after,
	.city-link-simple::after {
		display: none;
	}
}

/* V3-20) Improve tap targets on mobile */
@media (max-width: 520px) {
	.zsx-tools__cta {
		width: 100%;
	}
}

/* V3-21) Tools: align better on mobile */
@media (max-width: 860px) {
	.zsx-tools {
		padding: 0.85rem 0.9rem;
	}
}

/* V3-22) Cards: unify transition speed */
.service-card,
.city-link,
.city-link-simple {
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

/* V3-23) Press state for tiles */
.city-link:active,
.city-link-simple:active {
	transform: translateY(-1px);
}

/* V3-24) Make grid density more “premium” on large screens */
@media (min-width: 1200px) {
	.page-template-page-servizi .services-grid {
		gap: 1.15rem;
	}
	.page-template-page-comuni .cities-grid--simple {
		gap: 0.85rem;
	}
}

/* V3-25) Ensure section anchors don't hide under sticky UI */
.all-services-section[data-zsx-filter-scope],
.all-cities-section[data-zsx-filter-scope] {
	scroll-margin-top: calc(var(--zsx-sticky-top, 88px) + 24px);
}

/* V3-26) Floating call button (mobile only) */
.zsx-fab-call {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: 12px;
	z-index: 50;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.95rem 1rem;
	border-radius: 18px;
	text-decoration: none;
	font-weight: 950;
	letter-spacing: 0.02em;
	background: linear-gradient(135deg, #dc2626 0%, #ef4444 55%, #fb7185 100%);
	color: #ffffff;
	box-shadow: 0 22px 60px rgba(2, 6, 23, 0.26);
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.zsx-fab-call__icon {
	width: 42px;
	height: 42px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.18);
	display: grid;
	place-items: center;
}

.zsx-fab-call__text {
	white-space: nowrap;
}

@media (max-width: 860px) {
	.page-template-page-servizi .zsx-fab-call,
	.page-template-page-comuni .zsx-fab-call,
	.page-hero.page-hero--services-archive ~ .zsx-fab-call,
	.page-hero.page-hero--cities-archive ~ .zsx-fab-call {
		display: inline-flex;
	}
}

/* V3-27) Avoid overlap with iOS safe area */
@supports (padding: max(0px)) {
	.zsx-fab-call {
		padding-bottom: max(0.95rem, env(safe-area-inset-bottom));
	}
}

/* V3-28) Give pages bottom padding so FAB doesn't cover content */
@media (max-width: 860px) {
	.page-template-page-servizi .site-main,
	.page-template-page-comuni .site-main {
		padding-bottom: 84px;
	}
}

/* V3-29) FAB hover */
.zsx-fab-call:hover {
	transform: translateY(-2px);
	box-shadow: 0 26px 70px rgba(2, 6, 23, 0.32);
}

/* V3-30) FAB focus */
.zsx-fab-call:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.55);
	outline-offset: 4px;
}

/* V3-31) Reduce motion for FAB */
@media (prefers-reduced-motion: reduce) {
	.zsx-fab-call {
		transition: none !important;
		transform: none !important;
	}
}

/* V3-32) Empty state: make it feel like “helper” not error */
.zsx-empty {
	border-style: solid;
	border-color: rgba(37, 99, 235, 0.18);
}

/* V3-33) Empty state: add subtle icon via pseudo */
.zsx-empty::before {
	content: "🔎";
	margin-right: 0.5rem;
}

/* V3-34) Better contrast for CTA guarantee line */
.cta-section--final .cta-guarantee {
	color: rgba(255, 255, 255, 0.92);
}

/* V3-35) Keep hero CTA numbers legible */
.hero.hero--unified .hero__cta-number {
	text-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* V3-36) Improve section header spacing on page templates */
.page-template-page-servizi .section-header,
.page-template-page-comuni .section-header {
	margin-bottom: 1.35rem;
}

/* V3-37) Grid: reduce visual noise by consistent card border */
.service-card,
.city-link,
.city-link-simple {
	border-color: rgba(15, 23, 42, 0.10);
}

/* V3-38) Better focus ring for cards (keyboard) */
.service-card:focus-within,
.city-link:focus-visible,
.city-link-simple:focus-visible {
	outline: 3px solid rgba(37, 99, 235, 0.30);
	outline-offset: 4px;
}

/* V3-39) Slightly tighter paragraph rhythm in cards */
.service-card p {
	margin-bottom: 0.95rem;
}

/* V3-40) Buttons: ensure icon alignment */
.button svg {
	vertical-align: -0.18em;
}

/* V3-41) Tools: prevent pill wrapping awkwardly */
.zsx-search__pill {
	text-wrap: nowrap;
}

/* V3-42) Tools: keep CTA from shrinking too small */
.zsx-tools__cta {
	min-width: 180px;
}

/* V3-43) On mobile, allow CTA full width */
@media (max-width: 860px) {
	.zsx-tools__cta {
		min-width: 0;
	}
}

/* V3-44) Improve readability of city counts */
.city-link__text small {
	font-weight: 700;
}

/* V3-45) City links: align internal spacing so caret has room */
.city-link,
.city-link-simple {
	padding-right: 2.25rem;
}

/* V3-46) Service cards: ensure icon never touches title */
.service-card .service-card__icon {
	margin-bottom: 0.85rem;
}

/* V3-47) Tools: reduce “jump” when switching empty state */
.zsx-empty {
	contain: layout paint;
}

/* V3-48) Tools: better typography for labels */
.zsx-search__label {
	text-wrap: balance;
}

/* V3-49) Improve overall perceived quality: subtle body background on templates */
.page-template-page-servizi,
.page-template-page-comuni {
	background:
		radial-gradient(1200px 520px at 18% 0%, rgba(37, 99, 235, 0.04), rgba(37, 99, 235, 0) 62%),
		radial-gradient(1200px 640px at 82% 0%, rgba(96, 165, 250, 0.05), rgba(96, 165, 250, 0) 60%);
}

/* V3-50) Reduce extra top padding on first section after hero (templates) */
.page-template-page-servizi .intro-text-section,
.page-template-page-comuni .intro-text-section {
	padding-top: clamp(1.6rem, 3.5vw, 2.25rem);
}
