.gsps {
	--gsps-extra: var(--gsps-s-d, 25%);
	/* Button: semi-transparent steel */
	--gsps-btn-bg: rgba(84, 104, 122, .72);
	--gsps-btn-bg-hover: rgba(84, 104, 122, .92);
	--gsps-btn-border: rgba(255, 255, 255, .35);
	--gsps-btn-color: #fff;
}

.gsps-section {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--gsps-h-d, 65vh);
	padding: 80px 20px;
	box-sizing: border-box;
	overflow: hidden;
	isolation: isolate;
	text-align: center;
	/* Solid base under the image: stacked slides must never show through each other */
	background-color: #f3f1f1;
}

/* Background layer: taller than the section by --gsps-extra, anchored to the bottom.
   JS shifts it down (0 → extra) while the section scrolls through the viewport. */
.gsps-bg {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(100% + var(--gsps-extra));
	z-index: -2;
	pointer-events: none;
	will-change: transform;
}

/* Set by an inline script: hide backgrounds and content until parallax.js has positioned everything */
.gsps--js .gsps-bg,
.gsps--js .gsps-content {
	opacity: 0;
	transition: opacity .5s ease;
}

.gsps--js .gsps-content {
	transition-delay: .15s;
}

.gsps--js.is-ready .gsps-bg,
.gsps--js.is-ready .gsps-content {
	opacity: 1;
}

.gsps-bg picture {
	display: block;
	width: 100%;
	height: 100%;
}

.gsps .gsps-bg .gsps-img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	object-position: var(--gsps-fx, 50%) var(--gsps-fy, 50%);
}

.gsps-section::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: #fff;
	opacity: var(--gsps-overlay, 0);
	pointer-events: none;
}

.gsps-content {
	position: relative;
	width: 100%;
	max-width: 760px;
}

.gsps-title {
	margin: 0;
}

.gsps-sep {
	display: block;
	width: 90px;
	height: 1px;
	margin: 22px auto 0;
	background: currentColor;
	opacity: .3;
}

.gsps-text {
	margin-top: 20px;
}

.gsps-text > :last-child,
.gsps-html > :last-child {
	margin-bottom: 0;
}

.gsps-btn-wrap {
	margin-top: 30px;
}

.gsps-html {
	margin-top: 25px;
}

.gsps-title {
	font-style: italic;
}

/* Buttons (theme .mkdf-btn or the fallback .gsps-btn) */
.gsps .gsps-btn-wrap .mkdf-btn.mkdf-btn-solid,
.gsps .gsps-btn-wrap .gsps-btn {
	background-color: var(--gsps-btn-bg) !important;
	border: 1px solid var(--gsps-btn-border) !important;
	color: var(--gsps-btn-color) !important;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: background-color .25s, border-color .25s;
}

.gsps .gsps-btn-wrap .mkdf-btn.mkdf-btn-solid:hover,
.gsps .gsps-btn-wrap .gsps-btn:hover {
	background-color: var(--gsps-btn-bg-hover) !important;
	border-color: var(--gsps-btn-bg-hover) !important;
	color: var(--gsps-btn-color) !important;
}

/* Fallback button, used only when the Fiorello theme is not active */
.gsps-btn {
	display: inline-block;
	padding: 14px 38px;
	text-decoration: none;
}

/* Instagram link */
.gsps .gsps-instagram {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	color: inherit;
	font-size: 15px;
	letter-spacing: .03em;
	text-decoration: none;
	transition: opacity .2s;
}

.gsps .gsps-instagram:hover {
	opacity: .7;
}

/* Google reviews */
.gsps-reviews {
	margin-top: 26px;
}

.gsps .gsps-reviews-head,
.gsps .gsps-reviews-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	font-size: 14px;
	text-decoration: none;
}

.gsps .gsps-reviews-more {
	margin-top: 16px;
	padding: 7px 14px;
	border-radius: 20px;
	background: rgba(255, 255, 255, .8);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.gsps .gsps-reviews-head:hover,
.gsps .gsps-reviews-more:hover {
	opacity: .7;
}

.gsps-reviews-list {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(220px, 1fr);
	gap: 12px;
	margin: 14px auto 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 4px 4px 12px;
	text-align: left;
}

.gsps-reviews-list::-webkit-scrollbar {
	display: none;
}

.gsps .gsps-review {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px;
	border-radius: 6px;
	background: rgba(255, 255, 255, .78);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: inherit;
	font-size: 13px;
	line-height: 1.5;
	text-decoration: none;
	scroll-snap-align: start;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
	transition: background-color .2s;
}

.gsps a.gsps-review:hover {
	background: rgba(255, 255, 255, .95);
}

.gsps-review-text {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gsps-review-author {
	font-size: 12px;
	opacity: .65;
}

.gsps-stars {
	display: inline-block;
	font-size: 14px;
	line-height: 1;
	letter-spacing: 2px;
}

.gsps-stars::before {
	content: "★★★★★";
	background: linear-gradient(90deg, #f5b301 calc(var(--gsps-rating, 5) / 5 * 100%), #d5d5d5 0);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.gsps-admin-note {
	margin-top: 20px;
	padding: 10px 14px;
	border: 1px dashed #b32d2e;
	color: #b32d2e;
	font-size: 13px;
}

@media (min-width: 768px) {
	.gsps-align-left,
	.gsps-align-right {
		padding-left: 8vw;
		padding-right: 8vw;
	}

	.gsps-align-left {
		justify-content: flex-start;
		text-align: left;
	}

	.gsps-align-right {
		justify-content: flex-end;
		text-align: right;
	}

	.gsps-align-left .gsps-content,
	.gsps-align-right .gsps-content {
		max-width: 520px;
	}

	.gsps-align-left .gsps-sep {
		margin-left: 0;
	}

	.gsps-align-right .gsps-sep {
		margin-right: 0;
	}
}

/* Slides mode: every slide sticks to the bottom of the screen, earlier slides lie on top,
   so scrolling moves the top slide up and uncovers the next one lying still underneath. */
/* `overflow: hidden` on an ancestor breaks `position: sticky`; `clip` crops the same way but keeps sticky working */
body:has(.gsps--slides) .mkdf-wrapper-inner,
.vc_row:has(.gsps--slides) {
	overflow: clip !important;
}

/* The theme sets body { overflow-x: hidden }, which turns body into a (non-scrolling) scroll container */
body:has(.gsps--slides) {
	overflow-x: clip !important;
	overflow-y: visible !important;
}

.gsps--slides .gsps-section {
	position: sticky;
	bottom: 0;
	z-index: var(--gsps-z, 1);
	min-height: var(--gsps-h-d, 65vh);
	box-shadow: 0 14px 36px -18px rgba(0, 0, 0, .14);
}

@media (max-width: 767px) {
	.gsps {
		--gsps-extra: var(--gsps-s-m, 15%);
	}

	.gsps-section {
		min-height: var(--gsps-h-m, 72svh);
		padding: 50px 16px;
	}

	.gsps-reviews-list {
		grid-auto-columns: 82%;
		margin-left: -16px;
		margin-right: -16px;
		padding: 0 16px;
		scroll-padding: 0 16px;
	}

	.gsps--slides .gsps-section {
		min-height: var(--gsps-h-m, 72svh);
	}

	.gsps .gsps-bg .gsps-img {
		object-position: var(--gsps-mfx, 50%) var(--gsps-mfy, 50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gsps {
		--gsps-extra: 0%;
	}
}
