/*
 * SectionKit Process Steps.
 * Mobile-first: the base styles are the vertical (timeline) layout. The horizontal preset
 * only adds overrides from 1025px up, so there is no duplicated vertical CSS.
 * Frame comes from base.css (.sk-section, .sk-container). Elementor control selectors are
 * more specific than these rules, so every default here can be overridden from the editor.
 */

.sk-steps {
	--sk-step-marker: 3rem;
	--sk-steps-gap: 2rem;
}

.sk-steps__inner {
	display: flex;
	flex-direction: column;
	gap: clamp(2rem, 4vw, 3.5rem);
}

.sk-steps__list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Step (vertical): marker on one side, text on the other. */
.sk-step {
	position: relative;
	display: grid;
	grid-template-columns: var(--sk-step-marker) minmax(0, 1fr);
	column-gap: 1.25rem;
	margin: 0;
	padding: 0 0 var(--sk-steps-gap);
}

.sk-step:last-child {
	padding-bottom: 0;
}

/* Marker. */
.sk-step__marker {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--sk-step-marker);
	height: var(--sk-step-marker);
	border: 2px solid var(--sk-color-accent);
	border-radius: 50%;
	font-size: calc(var(--sk-step-marker) * 0.4);
	font-weight: 700;
	line-height: 1;
}

.sk-step__marker svg {
	width: 1em;
	height: 1em;
	fill: currentcolor;
}

.sk-steps--marker-filled .sk-step__marker {
	background-color: var(--sk-color-accent);
	color: var(--sk-color-on-accent, #fff);
}

.sk-steps--marker-outline .sk-step__marker {
	background-color: transparent;
	color: var(--sk-color-accent);
}

.sk-steps--shape-rounded .sk-step__marker {
	border-radius: 0.75rem;
}

.sk-steps--shape-square .sk-step__marker {
	border-radius: 0;
}

/* Text. */
.sk-step__content {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
	padding-top: 0.25rem;
}

.sk-step__title {
	margin: 0;
	color: var(--sk-color-heading);
}

:where(.sk-step__title) {
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
}

.sk-step__description {
	color: var(--sk-color-text);
	line-height: 1.6;
}

:where(.sk-step__description) {
	font-size: 1rem;
}

.sk-step__description p {
	margin: 0;
}

.sk-step__description p + p {
	margin-top: 0.75em;
}

/* Connecting line (vertical): runs from below one marker to the next. */
.sk-steps--connected .sk-step:not(:last-child)::after {
	content: "";
	position: absolute;
	inset-block: calc(var(--sk-step-marker) + 0.5rem) 0.5rem;
	inset-inline-start: calc(var(--sk-step-marker) / 2);
	margin-inline-start: calc(var(--sk-steps-line-width, 2px) / -2);
	border-inline-start: var(--sk-steps-line-width, 2px) var(--sk-steps-line-style, solid) var(--sk-steps-line-color, rgba(127, 127, 127, 0.35));
}

/* Preset: horizontal (one row). Tablet width and below keep the vertical layout above. */
@media (min-width: 1025px) {
	.sk-steps--horizontal .sk-steps__list {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
		column-gap: var(--sk-steps-gap);
	}

	.sk-steps--horizontal .sk-step {
		display: flex;
		flex-direction: column;
		gap: 1rem;
		padding-bottom: 0;
	}

	.sk-steps--horizontal .sk-step__content {
		padding-top: 0;
	}

	.sk-steps--horizontal.sk-steps--align-center .sk-step {
		align-items: center;
		text-align: center;
	}

	/* Connecting line (horizontal): from this marker to the next one. */
	.sk-steps--horizontal.sk-steps--connected .sk-step:not(:last-child)::after {
		inset-block: calc(var(--sk-step-marker) / 2) auto;
		inset-inline-start: calc(var(--sk-step-marker) + 0.75rem);
		width: calc(100% + var(--sk-steps-gap) - var(--sk-step-marker) - 1.5rem);
		height: 0;
		margin-inline-start: 0;
		margin-top: calc(var(--sk-steps-line-width, 2px) / -2);
		border-inline-start: 0;
		border-top: var(--sk-steps-line-width, 2px) var(--sk-steps-line-style, solid) var(--sk-steps-line-color, rgba(127, 127, 127, 0.35));
	}

	.sk-steps--horizontal.sk-steps--align-center.sk-steps--connected .sk-step:not(:last-child)::after {
		inset-inline-start: calc(50% + var(--sk-step-marker) / 2 + 0.75rem);
	}
}
