/*
 * Chapter Timeline — structural CSS only.
 * Deliberately contains no color, font-size, font-weight, line-height,
 * border-radius or box-shadow rules — those all come from Elementor's
 * Style tab controls (see widgets/class-chapter-timeline-widget.php).
 * Keeping the two separate means the Style tab always wins.
 */

.cte-timeline {
	box-sizing: border-box;
}

.cte-header {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 56px;
}

.cte-header h2,
.cte-subtitle {
	margin: 0 0 16px;
}

.cte-subtitle {
	margin-bottom: 0;
}

.cte-eyebrow {
	letter-spacing: 0.12em;
	margin-bottom: 14px;
}

.cte-track {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
}

.cte-line {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
}

.cte-row {
	position: relative;
	display: flex;
	align-items: flex-start;
	min-height: 64px;
	margin-bottom: 40px;
}

.cte-row:last-child {
	margin-bottom: 0;
}

.cte-card {
	width: calc(50% - 48px);
	padding: 24px 26px;
	box-sizing: border-box;
}

.cte-row--left .cte-card {
	order: 1;
}

.cte-row--left .cte-spacer {
	order: 3;
	width: calc(50% - 48px);
}

.cte-row--right .cte-card {
	order: 3;
}

.cte-row--right .cte-spacer {
	order: 1;
	width: calc(50% - 48px);
}

.cte-dot {
	order: 2;
	width: 96px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	top: 26px;
}

.cte-dot::before {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	border: 2px solid;
	border-color: inherit;
	border-radius: 50%;
	box-sizing: border-box;
	background: #fff;
}

.cte-dot span {
	position: relative;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	z-index: 1;
}

.cte-date {
	letter-spacing: 0.08em;
	margin-bottom: 10px;
}

.cte-card h3 {
	margin: 0 0 10px;
}

.cte-card p {
	margin: 0;
}

/* Tablet: narrower gap either side of the line, cards stay two-column */
@media (max-width: 1024px) {
	.cte-card {
		width: calc(50% - 32px);
	}

	.cte-row--left .cte-spacer,
	.cte-row--right .cte-spacer {
		width: calc(50% - 32px);
	}

	.cte-dot {
		width: 64px;
	}

	.cte-header {
		margin-bottom: 40px;
	}
}

/* Mobile: single column, dots sit on the line to the left of each card */
@media (max-width: 767px) {
	.cte-line {
		left: 18px;
		transform: none;
	}

	.cte-header {
		max-width: 100%;
		margin-bottom: 32px;
	}

	.cte-row,
	.cte-row--left,
	.cte-row--right {
		flex-direction: column;
		padding-left: 44px;
		margin-bottom: 28px;
	}

	.cte-row--left .cte-card,
	.cte-row--right .cte-card {
		order: 2;
		width: 100%;
	}

	.cte-card {
		padding: 20px 20px;
	}

	.cte-dot {
		order: 1;
		position: absolute;
		left: -44px;
		top: 4px;
		width: 40px;
	}

	.cte-spacer {
		display: none;
	}
}

/* Small phones: tighten padding and text-wrap further */
@media (max-width: 400px) {
	.cte-timeline {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}

	.cte-row,
	.cte-row--left,
	.cte-row--right {
		padding-left: 34px;
	}

	.cte-line {
		left: 14px;
	}

	.cte-dot {
		left: -34px;
		width: 32px;
	}

	.cte-card {
		padding: 16px 16px;
	}
}
