/* =============================================================
   Scroll Accordion
   scroll-accordion.css
   Enqueued by scroll_accordion.php when the layout is present.

   No pinning. The section sits in normal page flow.
   Steps auto-advance on a timer (scroll-accordion.js) and can
   be clicked. The right panel cross-fades between images.

   Grid: uses the site's standard 24-column content-wrapper grid.
   Left column  → grid-column: 1 / span 11
   Right column → grid-column: 13 / span 12
   ============================================================= */

/* ── Grid placement (768px+) ─────────────────────────────── */
@media only screen and (min-width: 768px) {
	.scroll-accordion-left {
		grid-column: 1 / span 11;
		align-self: center;
	}

	.scroll-accordion-right {
		grid-column: 13 / span 12;
		align-self: center;
	}
}

/* ── Left column: step list ────────────────────────────────── */

/* Continuous timeline border on the left of the whole column */
.scroll-accordion-left {
	display: flex;
	flex-direction: column;
	position: relative;
	border-left: 2px solid #dcd6c7;
}

.scroll-step {
	display: flex;
	flex-direction: column;
	padding: 1rem 0 1rem 1.25rem;
	position: relative;
	cursor: pointer;
	transition: opacity 0.3s ease;
}

/* Badge and title sit side-by-side, vertically centred to each other */
.step-header {
	display: flex;
	align-items: center;
	gap: 1rem;
}

/* Active step: overlay the timeline border with green */
.scroll-step.is-active::before {
	content: '';
	position: absolute;
	left: -2px;
	top: 0;
	bottom: 0;
	width: 2px;
	background-color: #1f4e3f;
}

/* Number badge */
.step-badge {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid #6f6857;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.scroll-step.is-active .step-badge {
	background-color: #1f4e3f;
	border-color: #1f4e3f;
}

.step-number {
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
	color: #6f6857;
	transition: color 0.3s ease;
}

.scroll-step.is-active .step-number {
	color: #fff;
}

.scroll-step .step-title {
	color: #514d42;
	margin: 0;
	/* zero inherited h3 margins so flex centering works correctly */
	transition: color 0.3s ease;
}

.scroll-step.is-active .step-title {
	color: #181712;
}

.step-description {
	/* indent to align with title text (badge 2rem + gap 1rem) */
	padding-left: calc(2rem + 1rem);
	color: #514d42;
	margin: 0;
	padding-top: 10px;
}

/* Inactive steps: title only, no description */
.scroll-step:not(.is-active) .step-description {
	display: none;
}

/* ── Right column: stacked panels ──────────────────────────── */
.scroll-accordion-right {
	display: flex;
	align-items: center;
	justify-content: center;
}

.scroll-panels {
	position: relative;
	width: 100%;
	min-height: 260px;
}

@media only screen and (min-width: 768px) {
	.scroll-panels {
		min-height: 350px;
	}
}

.scroll-panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    border: 1px solid #dcd6c7;
    border-radius: 12px;
    overflow: hidden;
}

.scroll-panel.is-active {
	opacity: 1;
	pointer-events: auto;
}

.scroll-panel img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.scroll-panel-embed {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.scroll-panel-embed iframe {
	display: block;
	max-width: 100%;
	width: 100%;
	height: auto;
	aspect-ratio: 610 / 350;
	border: 0;
}

/* ── Mobile: inline panel under active step; desktop: right column stack ── */
@media only screen and (max-width: 767px) {
	.scroll-accordion-right {
		display: none;
	}

	.scroll-step-panel {
		display: none;
		/*padding-left: calc(2rem + 1rem);*/
		margin-top: 1rem;
	}

	.scroll-step.is-active .scroll-step-panel {
		display: block;
	}

	.scroll-step-panel.scroll-panel {
		position: relative;
		inset: auto;
		opacity: 1;
		pointer-events: auto;
	}

	.scroll-step-panel img {
		width: 100%;
		height: auto;
		object-fit: contain;
	}

	.scroll-step-panel .scroll-panel-embed iframe {
		width: 100%;
		height: auto;
		aspect-ratio: 610 / 350;
	}
}

@media only screen and (min-width: 768px) {
	.scroll-step-panel {
		display: none !important;
	}
}

/* ── Reduced motion: disable transitions ────────────────────── */
@media (prefers-reduced-motion: reduce) {

	.scroll-panel,
	.scroll-step,
	.step-badge {
		transition: none;
	}
}