/**
 * "What to Expect" repair-process section.
 *
 * Horizontal four-step timeline with a connecting line on desktop (>=768px),
 * stacking to a vertical timeline on mobile. Reuses the theme's --mytheme-*
 * design tokens declared in responsive.css so it stays on-brand and dark-mode
 * friendly.
 *
 * @package my-theme
 */

.what-to-expect {
	background: var(--mytheme-bg, #f5f7fa);
	color: var(--mytheme-ink, #16202c);
	padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.what-to-expect__inner {
	width: 100%;
}

/* --- Section heading ------------------------------------------------------ */

.what-to-expect__head {
	max-width: 42rem;
	margin: 0 auto clamp(2rem, 5vw, 3rem);
	text-align: center;
}

.what-to-expect__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mytheme-accent, #c8281e);
}

.what-to-expect__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.15;
	font-weight: 800;
}

.what-to-expect__subtitle {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--mytheme-muted, #5a6675);
}

/* --- Steps: mobile-first vertical timeline -------------------------------- */

.what-to-expect__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.25rem;
	counter-reset: what-to-expect;
}

.what-to-expect__step {
	position: relative;
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	background: var(--mytheme-surface, #ffffff);
	border: 1px solid var(--mytheme-border, #e3e8ef);
	border-radius: var(--mytheme-radius, 12px);
	box-shadow: var(--mytheme-shadow, 0 6px 20px rgba(16, 32, 44, 0.08));
	padding: 1.25rem;
	transition: transform var(--mytheme-duration, 220ms) var(--mytheme-ease, ease),
		box-shadow var(--mytheme-duration, 220ms) var(--mytheme-ease, ease);
}

.what-to-expect__step:hover {
	transform: translateY(-4px);
	box-shadow: var(--mytheme-shadow-lg, 0 16px 40px rgba(16, 32, 44, 0.14));
}

/* Marker: number badge + icon */
.what-to-expect__marker {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.what-to-expect__num {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--mytheme-accent, #c8281e);
	color: #fff;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1;
	box-shadow: 0 0 0 6px rgba(200, 40, 30, 0.12);
}

.what-to-expect__icon {
	display: inline-flex;
	color: var(--mytheme-accent, #c8281e);
}

.what-to-expect__body {
	flex: 1 1 auto;
}

.what-to-expect__step-title {
	margin: 0 0 0.4rem;
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.25;
}

.what-to-expect__desc {
	margin: 0;
	font-size: 0.9875rem;
	line-height: 1.55;
	color: var(--mytheme-muted, #5a6675);
}

/* Vertical connecting line between markers on mobile */
.what-to-expect__step::before {
	content: "";
	position: absolute;
	left: calc(1.25rem + 1.5rem - 1px);
	top: calc(1.25rem + 3rem);
	bottom: -1.25rem;
	width: 2px;
	background: var(--mytheme-border, #e3e8ef);
	z-index: 0;
}

.what-to-expect__step:last-child::before {
	display: none;
}

/* --- Desktop: horizontal timeline (>=768px) ------------------------------- */

@media (min-width: 768px) {
	.what-to-expect__steps {
		grid-template-columns: repeat(4, 1fr);
		gap: 1.5rem;
		position: relative;
	}

	.what-to-expect__step {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 1rem;
		padding: 2rem 1.25rem 1.5rem;
	}

	.what-to-expect__step:hover {
		transform: translateY(-6px);
	}

	.what-to-expect__marker {
		flex-direction: row;
	}

	/* Horizontal connector: a line running out to the next step's marker. */
	.what-to-expect__step::before {
		content: "";
		left: 50%;
		right: auto;
		top: calc(2rem + 1.5rem - 1px);
		bottom: auto;
		width: calc(100% + 1.5rem);
		height: 2px;
		background: var(--mytheme-border, #e3e8ef);
	}

	/* Arrow head at the end of each connector. */
	.what-to-expect__step::after {
		content: "";
		position: absolute;
		z-index: 1;
		top: calc(2rem + 1.5rem);
		right: -0.9rem;
		width: 0;
		height: 0;
		border-top: 5px solid transparent;
		border-bottom: 5px solid transparent;
		border-left: 8px solid var(--mytheme-border, #e3e8ef);
		transform: translateY(-50%);
	}

	.what-to-expect__step:last-child::before,
	.what-to-expect__step:last-child::after {
		display: none;
	}
}

/* --- Accessibility helpers ------------------------------------------------ */

.what-to-expect .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Dark mode ------------------------------------------------------------ */

[data-theme="dark"] .what-to-expect {
	background: var(--mytheme-bg, #0f1620);
	color: var(--mytheme-ink, #eef2f7);
}

@media (prefers-reduced-motion: reduce) {
	.what-to-expect__step {
		transition: none;
	}

	.what-to-expect__step:hover {
		transform: none;
	}
}
