.training_paths {
	padding-top: 48px;
	padding-bottom: 40px;
	background: #ffffff;
}

.training_paths__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 680px;
	margin: 0 auto 40px;
	text-align: center;
}

.training_paths__slider {
	position: relative;
}

/* Cards share their rows (image, title, text, link) through subgrid, so titles and texts line up across cards */
.training_paths__cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 0;
}

.training_paths__card {
	display: grid;
	grid-row: span 4;
	grid-template-rows: subgrid;
	row-gap: 0;
	overflow: hidden;
	border: 1px solid var(--gray-100);
	border-radius: var(--radius-2026);
	background: #ffffff;
	box-shadow: var(--shadow-2026-card);
}

.training_paths__image {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	object-position: 50% 55%;
	background: var(--sky-50);
}

.design_2026 .training_paths__title {
	padding: 24px 24px 0;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: 0;
}

.training_paths__text {
	padding: 12px 24px 0;
	font-size: 17px;
	line-height: 1.6;
}

.design_2026 .training_paths__link {
	justify-self: end;
	align-self: end;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 44px;
	margin: 4px 24px 16px;
	color: var(--sky-400);
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: color 0.15s ease;
}

.design_2026 .training_paths__link:hover {
	color: var(--sky-500);
}

.training_paths__link svg {
	display: block;
	flex: none;
	transition: transform 0.15s ease;
}

.training_paths__link:hover svg {
	transform: translateX(3px);
}

/* The swipe hint and dots are only used by the phone carousel */
.training_paths__swipe,
.training_paths__dots {
	display: none;
}

@media (max-width: 991px) {
	.training_paths__cards {
		grid-template-columns: minmax(0, 1fr);
		max-width: 560px;
		margin: 0 auto;
		row-gap: 20px;
	}

	.training_paths__card {
		grid-row: auto;
		grid-template-rows: auto;
	}
}

/* Phones: a swipeable carousel, the next card peeks in from the right */
@media (max-width: 767px) {
	.training_paths {
		padding-top: 44px;
		padding-bottom: 28px;
	}

	.training_paths__header {
		margin-bottom: 32px;
		padding: 0 8px;
	}

	.training_paths__cards {
		display: flex;
		align-items: stretch;
		gap: 12px;
		max-width: none;
		margin: 0 -12px;
		padding: 4px 12px 16px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 12px;
		scrollbar-width: none;
		/* Without this the cards still make the page wider than the screen, so the page can shift sideways on iPhones */
		contain: paint;
	}

	.training_paths__cards::-webkit-scrollbar {
		display: none;
	}

	.training_paths__card {
		flex: 0 0 86%;
		display: flex;
		flex-direction: column;
		scroll-snap-align: center;
	}

	/* The first and last card snap to the edge, the cards in between to the middle of the screen */
	.training_paths__card:first-child {
		scroll-snap-align: start;
	}

	.training_paths__card:last-child {
		scroll-snap-align: end;
	}

	.training_paths__image {
		flex: none;
		height: 168px;
	}

	.design_2026 .training_paths__title {
		padding: 20px 20px 0;
		font-size: 20px;
	}

	.training_paths__text {
		padding: 12px 20px 0;
		font-size: 16px;
	}

	.design_2026 .training_paths__link {
		align-self: flex-end;
		margin: auto 20px 16px;
		padding-top: 8px;
	}

	/* Same swipe animation as on the classic homepage, hidden a few seconds after it came into view */
	.training_paths__swipe {
		display: block;
		position: absolute;
		top: 40px;
		/* Over the right side of the first card, so it covers less of the photo */
		left: 80%;
		z-index: 1;
		width: 89px !important;
		height: 89px !important;
		border-radius: 50%;
		background-color: #ffffff;
		box-shadow: var(--shadow-2026-card);
		transform: translateX(-50%);
		pointer-events: none;
		transition: opacity 0.3s ease;
	}

	.training_paths__swipe.hidden {
		opacity: 0;
	}

	.training_paths__dots {
		display: flex;
		justify-content: center;
		gap: 6px;
		margin-top: 4px;
	}

	/* 10px dot inside a 24px tap area */
	.training_paths__dot {
		position: relative;
		width: 24px;
		height: 24px;
		padding: 0;
		border: 0;
		background: transparent;
		cursor: pointer;
	}

	.training_paths__dot::before {
		content: '';
		position: absolute;
		top: 7px;
		left: 7px;
		width: 10px;
		height: 10px;
		box-sizing: border-box;
		border: 1.5px solid var(--navy-600);
		border-radius: 999px;
	}

	.training_paths__dot.active::before {
		background: var(--navy-600);
	}
}
