/* Guru Stacking Slider — sticky "stacking cards" scroll effect */

.gss-slider {
	--gss-sticky-offset: 90px;
	--gss-cascade-gap: 18px;
	--gss-aspect-ratio: 2.8;
	--gss-enter-zoom: 0.12;
	--gss-exit-zoom: 0.15;
	--gss-hover-zoom-img: 0.06;
	--gss-hover-zoom-btn: 0.05;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.gss-slide {
	position: -webkit-sticky;
	position: sticky;
	top: var(--gss-sticky-offset);
	aspect-ratio: var(--gss-aspect-ratio) / 1;
	min-height: 280px;
	margin-bottom: 40px;
	border-radius: 20px;
	overflow: hidden;
	background-color: #12203a;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
	will-change: transform;
}

.gss-slide:last-child {
	margin-bottom: 0;
}

.gss-slide-inner {
	display: flex;
	align-items: stretch;
	height: 100%;
}

.gss-image-left {
	flex-direction: row-reverse;
}

.gss-content {
	flex: 1 1 50%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(24px, 4vw, 56px) clamp(24px, 5vw, 64px);
	box-sizing: border-box;
	overflow: hidden;
}

.gss-heading {
	margin: 0 0 16px;
	font-size: clamp(20px, 2.6vw, 42px);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #ffffff;
}

.gss-description {
	margin: 0 0 clamp(16px, 2.5vw, 32px);
	font-size: clamp(13px, 1.1vw, 17px);
	line-height: 1.55;
	max-width: 460px;
	color: rgba(255, 255, 255, 0.8);
}

.gss-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	padding: 14px 28px;
	border-radius: 999px;
	background-color: #ffffff;
	color: #12203a;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gss-button:hover,
.gss-button:focus {
	color: #12203a;
	transform: translateX(4px) scale(calc(1 + var(--gss-hover-zoom-btn, 0.05)));
	box-shadow: 0 8px 20px rgba(255, 255, 255, 0.25);
}

.gss-button-arrow {
	flex-shrink: 0;
}

.gss-media {
	flex: 1 1 50%;
	position: relative;
	overflow: hidden;
}

.gss-media-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(var(--gss-scroll-scale, 1));
	transform-origin: center center;
	/* Smooths the per-frame scroll-linked scale updates from JS and doubles
	   as the hover transition — snappy enough to track scrolling, soft
	   enough not to look janky. */
	transition: transform 0.25s ease-out;
	will-change: transform;
}

.gss-media:hover .gss-media-img {
	transform: scale(calc(var(--gss-scroll-scale, 1) + var(--gss-hover-zoom-img, 0.06)));
}

/* Tablet — shorten the aspect ratio a bit so text has room to breathe */
@media (max-width: 1024px) {
	.gss-slide {
		aspect-ratio: min(var(--gss-aspect-ratio), 1.8) / 1;
	}
}

/* Mobile — same sticky stacking + scroll zoom, laid out as image-on-top
   card with centered text below (matches the reference mobile design). */
@media (max-width: 767px) {
	.gss-slide {
		/* Height comes from its children (image ratio + text), not a
		   fixed aspect-ratio, since caption length varies. */
		aspect-ratio: auto;
		margin-bottom: 24px;
	}

	.gss-slide-inner,
	.gss-image-left {
		flex-direction: column;
		min-height: 0;
	}

	/* Image always on top regardless of the desktop image-position
	   setting, and content always below it. */
	.gss-media {
		order: -1;
		flex: none;
		width: 100%;
		aspect-ratio: 3 / 2;
	}

	.gss-content {
		order: 2;
		align-items: center;
		text-align: center;
		padding: 28px 24px 36px;
		flex: none;
	}

	.gss-heading {
		font-size: 26px;
	}

	.gss-description {
		max-width: none;
		font-size: 15px;
	}

	.gss-media-img {
		height: 100%;
	}
}

/* Devices without a real pointer (touch) shouldn't get stuck showing the
   ":hover" zoom after a tap — restrict the extra hover bump to devices
   that can actually hover. Scroll-linked zoom still runs everywhere. */
@media (hover: none) {
	.gss-media:hover .gss-media-img {
		transform: scale(var(--gss-scroll-scale, 1));
	}

	.gss-button:hover {
		transform: none;
		box-shadow: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gss-slide {
		will-change: auto;
	}

	/* JS skips the continuous scroll-linked zoom for reduced-motion users,
	   so --gss-scroll-scale simply never moves off 1 — hover feedback still
	   works, it just won't transition as elaborately. */
	.gss-media-img {
		transition-duration: 0.2s;
	}

	.gss-button:hover,
	.gss-button:focus {
		transform: none;
	}
}
