/**
 * Roadmap Pattern - Timeline with steps
 * Visual style matching SAT Curriculum (diamonds, horizontal lines)
 *
 * @package NexioEducation
 */

.roadmap {
	padding: 120px 0 240px 0;
	max-width: 1440px;
	margin: 0 auto;
	background: #fffefa;
}

.roadmap-title {
	color: #064d8e;
	font-size: 48px;
	font-family: 'Manrope', sans-serif;
	font-weight: 800;
	line-height: 58px;
	margin: 0 0 140px;
	padding: 0 142px;
}

.roadmap-timeline {
	position: relative;
}

/* Timeline vertical line */
.roadmap-timeline::before {
	content: '';
	position: absolute;
	left: 94px;
	top: 28px;
	bottom: -135px;
	width: 1px;
	background: #064d8e;
}

.roadmap-phase {
	margin-bottom: 0px;
	position: relative;
}

.roadmap-phase:last-child {
	margin-bottom: 0;
	margin-top: 87px;
}

.roadmap-phase.is-collapsed {
	margin-bottom: 48px;
}

.roadmap-phase.is-collapsed:last-child {
	margin-bottom: 0;
}

.roadmap-phase:nth-child(2).is-collapsed + .roadmap-phase:last-child {
	margin-top: 0;
}

.roadmap-phase:last-child .roadmap-steps {
	padding-top: 86px;
}

/* Phase title */
.roadmap-phase-title {
	color: #064d8e;
	font-size: 48px;
	font-family: 'Apris Trial', serif;
	font-weight: 400;
	line-height: 58px;
	margin: 0 0 16px;
	padding-left: 119px;
	position: relative;
}

/* Diamond for phase title */
.roadmap-phase-title::before {
	content: '';
	position: absolute;
	left: 84px;
	top: 18px;
	width: 18px;
	height: 18px;
	border: 1px solid #064d8e;
	background: #fffefa;
	transform: rotate(45deg);
}

/* SVG horizontal line with diamond endpoints */
.roadmap-phase-line {
	padding-left: 119px;
	padding-right: 115px;
	margin-top: 8px;
}

.roadmap-phase-line svg {
	display: block;
	width: 100%;
	height: 6px;
}

/* Phase header with toggle button (11th/12th Grade) */
.roadmap-phase-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-right: 116px;
}

.roadmap-phase-header .roadmap-phase-title {
	margin-bottom: 0;
}

.roadmap-phase-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-right: 8px;
}

.roadmap-phase-toggle svg {
	display: block;
	transition: transform 0.4s ease;
}

.roadmap-phase.is-collapsed .roadmap-phase-toggle svg {
	transform: rotate(180deg);
}

/* Collapsible body wrapper (created by JS) */
.roadmap-phase-body {
	display: grid;
	grid-template-rows: 1fr;
	transition: grid-template-rows 0.4s ease;
}

.roadmap-phase.is-collapsed .roadmap-phase-body {
	grid-template-rows: 0fr;
}

.roadmap-phase-body-inner {
	overflow: hidden;
}

.roadmap-steps {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding-left: 119px;
	padding-top: 88px;
	position: relative;
	max-width: 1036px;
}

.roadmap-step {
	position: relative;
	padding-left: 0;
	padding-bottom: 42px;
	display: flex;
	flex-direction: column-reverse;
}

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

.roadmap-step:has(.roadmap-step-label):last-child {
	padding-bottom: 31px;
}

/* Small diamond for each step */
.roadmap-step::before {
	content: '';
	position: absolute;
	left: -30px;
	top: 8px;
	width: 10px;
	height: 10px;
	border: 1px solid #064d8e;
	background: #064d8e;
	transform: rotate(45deg);
}

.roadmap-step-number {
	color: #064d8e;
	font-size: 14px;
	font-family: 'Manrope', sans-serif;
	font-weight: 400;
	line-height: 18px;
	margin: 0;
}

.roadmap-step-name {
	color: #064d8e;
	font-size: 24px;
	font-family: 'Manrope', sans-serif;
	font-weight: 600;
	line-height: 28px;
	margin: 0;
}

/* Phase 1 two-column layout (steps with label + content) */
.roadmap-step:has(.roadmap-step-label) {
	flex-direction: row;
	align-items: flex-start;
	padding-bottom: 96px;
}

.roadmap-step-label {
	width: 282px;
	flex-shrink: 0;
	position: relative;
}

.roadmap-step-content {
	flex: 1;
	padding-left: 0px;
	max-width: 448px;
	margin-left: auto;
}

.roadmap-step-heading {
	font-family: 'Apris Trial', serif;
	font-size: 24px;
	font-weight: 400;
	font-style: normal;
	line-height: 28px;
	color: #064d8e;
	margin: 0 0 8px;
}

.roadmap-step-text {
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	color: rgba(6, 77, 142, 0.7);
	margin: 0;
}

/* Responsive - Tablet */
@media (max-width: 1200px) {
	.roadmap {
		padding: 100px 0 300px 0;
	}

	.roadmap-title {
		padding: 0 80px;
	}

	.roadmap-timeline {
		padding: 0 80px;
	}

	.roadmap-timeline::before {
		left: 152px;
	}

	.roadmap-phase-header {
		padding-right: 10px;
	}

	.roadmap-phase-title {
		padding-left: 99px;
		font-size: 40px;
		line-height: 48px;
	}

	.roadmap-phase-title::before {
		left: 64px;
		top: 14px;
		width: 14px;
		height: 14px;
	}

	.roadmap-phase-line {
		padding-left: 99px;
		padding-right: 10px;
	}

	.roadmap-steps {
		padding-left: 99px;
	}

	.roadmap-step::before {
		left: -32px;
		width: 8px;
		height: 8px;
	}
}

@media (max-width: 900px) {
	.roadmap {
		padding: 80px 0 80px 0;
	}

	.roadmap-title {
		font-size: 40px;
		line-height: 48px;
		margin-bottom: 60px;
		padding: 0 40px;
	}

	.roadmap-timeline {
		padding: 0 40px;
	}

	.roadmap-timeline::before {
		left: 61px;
	}

	.roadmap-phase {
		margin-bottom: 60px;
	}

	.roadmap-phase.is-collapsed {
		margin-bottom: 32px;
	}

	.roadmap-phase.is-collapsed:last-child {
		margin-bottom: 0;
	}

	.roadmap-phase-header {
		padding-right: 0;
	}

	.roadmap-phase-line {
		padding-left: 40px;
		padding-right: 0;
	}

	.roadmap-phase-title {
		font-size: 36px;
		line-height: 44px;
		padding-left: 40px;
		padding-bottom: 16px;
	}

	.roadmap-phase-title::before {
		left: 14px;
		top: 14px;
		width: 14px;
		height: 14px;
	}

	.roadmap-steps {
		padding-left: 40px;
		padding-top: 24px;
		gap: 0;
	}

	.roadmap-step {
		padding-bottom: 40px;
		padding-left: 32px;
	}

	.roadmap-step::before {
		left: -24px;
		top: 4px;
		width: 10px;
		height: 10px;
	}

	.roadmap-step:has(.roadmap-step-label) {
		flex-direction: column;
	}

	.roadmap-step-label {
		width: 100%;
	}

	.roadmap-step-content {
		padding-left: 0;
		margin-top: 12px;
	}
}

@media (max-width: 768px) {
	.roadmap {
		padding: 60px 0 60px 0;
	}

	.roadmap-title {
		font-size: 32px;
		line-height: 40px;
		margin-bottom: 40px;
		padding: 0 24px;
	}

	.roadmap-timeline {
		padding: 0 24px;
	}

	.roadmap-timeline::before {
		left: 45px;
	}

	.roadmap-phase {
		margin-bottom: 48px;
	}

	.roadmap-phase-title {
		font-size: 28px;
		line-height: 36px;
	}

	.roadmap-steps {
		gap: 0;
		padding-top: 20px;
	}

	.roadmap-step {
		padding-bottom: 32px;
		padding-left: 28px;
	}

	.roadmap-step::before {
		left: -23px;
		width: 8px;
		height: 8px;
		top: 6px;
	}

	.roadmap-step-name {
		font-size: 20px;
		line-height: 26px;
	}

	.roadmap-step-number {
		font-size: 12px;
		line-height: 16px;
	}
}
