/* ── Scroll Slideshow ─────────────────────────────────────────────────────── */

/* Strip any Elementor widget/section spacing so there's no gap above or below */
.elementor-widget-cf-slideshow {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.cf-slideshow {
	position: relative;
	height: calc(var(--cf-ss-count, 1) * 60vh);
}

.cf-ss__sticky {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 30px;
	overflow: hidden;
}

/* ── Section title ────────────────────────────────────────────────────────── */

.cf-ss__title {
	margin: 0;
	padding: 0 4rem;
}

/* ── Track & slides ───────────────────────────────────────────────────────── */

.cf-ss__track {
	/* display: grid stacks all slides in the same cell so the track is only
	   as tall as the tallest slide — no forced viewport fill */
	display: grid;
	overflow: hidden;
}

.cf-ss__slide {
	grid-row: 1;
	grid-column: 1; /* all slides occupy the same cell */
	display: flex;
	align-items: center;
	gap: 2.5rem;
	padding: 2rem 4rem;
	transition: transform 0.85s cubic-bezier(0.65, 0, 0.35, 1);
	will-change: transform;
	transform: translateX(100%);
}

.cf-ss__slide[data-index="0"] {
	transform: translateX(0);
}

.cf-ss__media {
	flex: 0 0 45%;
	max-width: 45%;
	aspect-ratio: 4 / 3; /* constrains image height to a predictable size */
	overflow: hidden;
	border-radius: 8px;
}

.cf-ss__img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.cf-ss__content {
	flex: 1;
	min-width: 0;
}

.cf-ss__step {
	margin: 0 0 0.4rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #d516b1; /* var(--wp--preset--color--magenta) */
}

.cf-ss__step p,
.cf-ss__step h1, .cf-ss__step h2, .cf-ss__step h3,
.cf-ss__step h4, .cf-ss__step h5, .cf-ss__step h6 {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

.cf-ss__heading {
	margin-top: 0;
	margin-bottom: 0.75rem;
	color: #181075; /* var(--wp--preset--color--navy) */
}

.cf-ss__heading p,
.cf-ss__heading h1, .cf-ss__heading h2, .cf-ss__heading h3,
.cf-ss__heading h4, .cf-ss__heading h5, .cf-ss__heading h6 {
	margin-top: 0;
	margin-bottom: 0;
	color: inherit;
}

.cf-ss__body {
	margin: 0;
	line-height: 1.7;
}

.cf-ss__body > p:first-child { margin-top: 0; }
.cf-ss__body > p:last-child  { margin-bottom: 0; }

.cf-ss__body ul,
.cf-ss__body ol {
	margin: 0.5rem 0 0;
	padding-left: 1.4em;
}

.cf-ss__body li {
	margin-bottom: 0.3rem;
}

/* ── Timeline ─────────────────────────────────────────────────────────────── */

.cf-ss__timeline {
	position: relative;
	flex-shrink: 0;
	height: 40px;
	overflow: hidden;
}

.cf-ss__timeline-track {
	position: absolute;
	top: 50%;
	height: 30px;
	will-change: transform;
	transition: transform 0.85s cubic-bezier(0.65, 0, 0.35, 1);
}

.cf-ss__line-wrap {
	position: absolute;
	top: 50%;
	left: 0;
	height: 6px;
	transform: translateY(-50%);
}

.cf-ss__line {
	width: 100%;
	height: 100%;
	background-color: #40ffd3;
}

.cf-ss__dot {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid #40ffd3;
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.cf-ss__dot.is-active {
	background-color: #40ffd3;
	transform: translate(-50%, -50%) scale(1.5);
}

/* ── Elementor editor — show all slides flat for editing ──────────────────── */

.elementor-editor-active .cf-slideshow {
	height: auto !important;
}

.elementor-editor-active .cf-ss__sticky {
	position: relative !important;
	height: auto !important;
	justify-content: flex-start !important;
	overflow: visible !important;
	gap: 0 !important;
}

.elementor-editor-active .cf-ss__track {
	display: block !important;
	overflow: visible !important;
}

.elementor-editor-active .cf-ss__slide {
	grid-row: auto !important;
	grid-column: auto !important;
	transform: none !important;
	transition: none !important;
	margin-bottom: 2rem;
}

.elementor-editor-active .cf-ss__timeline {
	margin-top: 1rem;
	overflow: visible;
	height: auto;
	padding: 0.75rem 4rem;
}

.elementor-editor-active .cf-ss__timeline-track {
	position: relative !important;
	top: auto !important;
	height: auto !important;
	transform: none !important;
	width: 100% !important;
	display: flex !important;
	justify-content: space-between;
	align-items: center;
}

.elementor-editor-active .cf-ss__line-wrap {
	display: none !important;
}

.elementor-editor-active .cf-ss__dot {
	position: static !important;
	transform: none !important;
}

.elementor-editor-active .cf-ss__dot.is-active {
	transform: scale(1.5) !important;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.cf-ss__slide {
		flex-direction: column;
		padding: 1.25rem 1.5rem;
		gap: 1.25rem;
		align-items: flex-start;
	}

	.cf-ss__media {
		flex: none;
		max-width: 100%;
		width: 100%;
		aspect-ratio: 16 / 9;
	}
}
