/**
 * Google Reviews carousel (#recensioni)
 * Overrides Rich Showcase for Google Reviews (.wp-gr) into a 4-up carousel.
 * Bleeds from the content left edge to the browser's right edge.
 */

/* Let the track escape Elementor's boxed container. */
#recensioni,
#recensioni > .e-con-inner,
#recensioni .elementor-widget-shortcode,
#recensioni .elementor-widget-container,
#recensioni .elementor-shortcode {
	overflow: visible !important;
}

#recensioni .wp-gr.falle-grw-ready {
	--falle-grw-gap: 1.25rem;
	--falle-grw-visible: 4;
	--falle-grw-bleed-width: 100%;
	--falle-grw-accent: #c20000;
	--falle-grw-text: #1a1a1a;
	--falle-grw-muted: #6b7280;
	position: relative;
	width: var(--falle-grw-bleed-width) !important;
	max-width: none !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

#recensioni .wp-gr.falle-grw-ready .grw-row,
#recensioni .wp-gr.falle-grw-ready .grw-content,
#recensioni .wp-gr.falle-grw-ready .grw-content-inner {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	overflow: visible !important;
}

#recensioni .falle-grw-carousel {
	position: relative;
	width: 100%;
}

#recensioni .falle-grw-carousel__viewport {
	overflow: hidden;
	width: 100%;
}

#recensioni .wp-gr.falle-grw-ready .grw-reviews.falle-grw-carousel__track {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	gap: var(--falle-grw-gap) !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0.25rem 0 0.5rem !important;
	transform: translate3d(0, 0, 0);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

#recensioni .wp-gr.falle-grw-ready .grw-review.rpi-slide {
	position: relative !important;
	flex: 0 0
		calc(
			(100% - (var(--falle-grw-gap) * (var(--falle-grw-visible) - 1))) /
				var(--falle-grw-visible)
		) !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	float: none !important;
	display: flex !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

/* DOM divider injected by JS (plugin resets borders / ::after gets clipped). */
#recensioni .falle-grw-divider {
	position: absolute !important;
	top: 0.35rem !important;
	bottom: 0.35rem !important;
	right: 0 !important;
	width: 1px !important;
	min-width: 1px !important;
	max-width: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: #707070 !important;
	background-color: #707070 !important;
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: none !important;
	z-index: 5 !important;
}

#recensioni .wp-gr.falle-grw-ready .grw-review-inner.grw-backgnd {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	gap: 0.75rem !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 14.5rem !important;
	padding: 0.25rem 1.1rem 0.25rem 0 !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	background: transparent !important;
	background-color: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

#recensioni .wp-gr.falle-grw-ready .grw-review-inner > .rpi-flx.rpi-row12-center {
	width: 100% !important;
	gap: 0.75rem !important;
	align-items: center !important;
}

/* Keep only: name, stars, review text */
#recensioni .wp-gr.falle-grw-ready .grw-img-wrap,
#recensioni .wp-gr.falle-grw-ready .wp-google-time,
#recensioni .wp-gr.falle-grw-ready .grw-review-inner > svg {
	display: none !important;
}

#recensioni .wp-gr.falle-grw-ready a.wp-google-name {
	color: var(--falle-grw-accent) !important;
	font-weight: 600 !important;
	font-size: 0.95rem !important;
	line-height: 1.3 !important;
	text-decoration: none !important;
}

#recensioni .wp-gr.falle-grw-ready a.wp-google-name:hover {
	text-decoration: underline !important;
}

#recensioni .wp-gr.falle-grw-ready .wp-google-time {
	color: var(--falle-grw-muted) !important;
	font-size: 0.8rem !important;
	margin-top: 0.15rem !important;
}

#recensioni .wp-gr.falle-grw-ready .rpi-stars {
	--star-color: var(--falle-grw-accent);
	margin: 0.15rem 0 !important;
}

#recensioni .wp-gr.falle-grw-ready .wp-google-feedback {
	flex: 1 1 auto !important;
	width: 100% !important;
	max-height: none !important;
	overflow: visible !important;
	color: var(--falle-grw-text) !important;
	font-size: 0.92rem !important;
	line-height: 1.45 !important;
}

#recensioni .wp-gr.falle-grw-ready .wp-google-text {
	color: inherit !important;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5;
	overflow: hidden;
}

#recensioni .wp-gr.falle-grw-ready .grw-review-inner > svg {
	margin-top: auto !important;
	align-self: flex-end !important;
	opacity: 0.9;
}

/* Nav stays within the original content column, not the bleed. */
#recensioni .falle-grw-carousel__nav {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	gap: 0.75rem;
	width: min(100%, var(--falle-grw-nav-width, 100%));
	margin-top: 1.25rem;
}

#recensioni .falle-grw-carousel__btn,
#recensioni button.falle-grw-carousel__btn {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 1.75rem !important;
	height: 1.75rem !important;
	min-width: 1.75rem !important;
	min-height: 1.75rem !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #707070 !important;
	background-color: #707070 !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #fff !important;
	fill: #fff !important;
	cursor: pointer !important;
	transition:
		background 0.2s ease,
		opacity 0.2s ease,
		transform 0.2s ease;
}

#recensioni .falle-grw-carousel__btn:hover:not(:disabled),
#recensioni button.falle-grw-carousel__btn:hover:not(:disabled) {
	background: #5a5a5a !important;
	background-color: #5a5a5a !important;
	color: #fff !important;
	transform: translateY(-1px);
}

#recensioni .falle-grw-carousel__btn:focus-visible,
#recensioni button.falle-grw-carousel__btn:focus-visible {
	outline: 2px solid #707070 !important;
	outline-offset: 3px !important;
}

#recensioni .falle-grw-carousel__btn:disabled,
#recensioni button.falle-grw-carousel__btn:disabled {
	opacity: 0.35 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

#recensioni .falle-grw-carousel__btn svg,
#recensioni button.falle-grw-carousel__btn svg {
	width: 0.9rem !important;
	height: 0.9rem !important;
	display: block !important;
	stroke: #fff !important;
	color: #fff !important;
}

#recensioni .falle-grw-carousel__btn svg path,
#recensioni button.falle-grw-carousel__btn svg path {
	stroke: #fff !important;
}

#recensioni .falle-grw-carousel__dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-width: 4.5rem;
}

#recensioni .falle-grw-carousel__dot,
#recensioni button.falle-grw-carousel__dot {
	appearance: none !important;
	-webkit-appearance: none !important;
	width: 0.55rem !important;
	height: 0.55rem !important;
	min-width: 0.55rem !important;
	min-height: 0.55rem !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #c4c4c4 !important;
	background-color: #c4c4c4 !important;
	background-image: none !important;
	box-shadow: none !important;
	cursor: pointer !important;
	transition:
		background 0.2s ease,
		transform 0.2s ease;
}

#recensioni .falle-grw-carousel__dot:hover:not(:disabled),
#recensioni button.falle-grw-carousel__dot:hover:not(:disabled) {
	background: #9a9a9a !important;
	background-color: #9a9a9a !important;
	transform: scale(1.15);
}

#recensioni .falle-grw-carousel__dot.is-active,
#recensioni button.falle-grw-carousel__dot.is-active {
	background: #c20000 !important;
	background-color: #c20000 !important;
	transform: scale(1.2);
	cursor: default !important;
}

/* Tablet / mobile: 2 visible reviews, centered nav that breaks a divider line. */
@media (max-width: 1024px) {
	#recensioni .wp-gr.falle-grw-ready {
		--falle-grw-visible: 2;
		--falle-grw-gap: 0.85rem;
	}

	#recensioni .falle-grw-carousel {
		box-sizing: border-box;
		padding-right: 15px;
		padding-left: 15px;
	}

	#recensioni .falle-grw-carousel__nav {
		justify-content: center;
		width: 100%;
		gap: 1.1rem;
		margin-top: 1.5rem;
	}

	#recensioni .falle-grw-carousel__nav::before,
	#recensioni .falle-grw-carousel__nav::after {
		content: "";
		flex: 1 1 auto;
		height: 1px;
		background: #707070;
		min-width: 0.75rem;
	}

	#recensioni .falle-grw-carousel__dots {
		min-width: 0;
		gap: 0.55rem;
	}

	#recensioni .falle-grw-carousel__dot,
	#recensioni button.falle-grw-carousel__dot {
		background: #707070 !important;
		background-color: #707070 !important;
	}

	#recensioni .falle-grw-carousel__dot.is-active,
	#recensioni button.falle-grw-carousel__dot.is-active {
		background: #c20000 !important;
		background-color: #c20000 !important;
	}

	#recensioni .wp-gr.falle-grw-ready .grw-review-inner.grw-backgnd {
		min-height: 13rem !important;
		padding: 0.25rem 0.85rem 0.25rem 0 !important;
	}

	#recensioni .wp-gr.falle-grw-ready a.wp-google-name {
		font-size: 0.85rem !important;
	}

	#recensioni .wp-gr.falle-grw-ready .wp-google-feedback {
		font-size: 0.8rem !important;
	}

	#recensioni .wp-gr.falle-grw-ready .wp-google-text {
		-webkit-line-clamp: 4;
	}
}

@media (max-width: 767px) {
	#recensioni .wp-gr.falle-grw-ready .grw-review-inner.grw-backgnd {
		padding: 0.25rem 0.65rem 0.25rem 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	#recensioni .wp-gr.falle-grw-ready .grw-reviews.falle-grw-carousel__track,
	#recensioni .falle-grw-carousel__btn {
		transition: none !important;
	}
}
