/* Purpose: programme_next_step – "Why families begin…" / "The 100 Years Legacy™ Model" (a5c0e48 on 445 / 1337): centred copy
   (81% or 75% wide), then a 780px card: photo over an ink panel with the round arrow badge and a full-width button. */

.programme-next-step {
	padding: var(--space-40) var(--space-16);
}

.programme-next-step__inner {
	display: flex;
	flex-flow: column wrap;
	align-items: center;
	gap: var(--space-32);
	max-width: var(--container-max);
	margin-inline: auto;
}

.programme-next-step__copy {
	display: flex;
	flex-direction: column;
	gap: var(--space-24);
	width: 100%;
}

.programme-next-step__heading {
	align-self: center;
	width: 90%;
	margin: 0;
	color: var(--color-secondary);
	font-family: var(--font-heading);
	font-size: var(--text-24);
	font-weight: var(--weight-bold);
	line-height: 1.2em;
	text-align: center;
}

.programme-next-step--narrow .programme-next-step__heading {
	width: 100%;
}

.programme-next-step__text {
	display: flex;
	flex-direction: column;
	gap: var(--space-12);
}

.programme-next-step__para p {
	margin: 0;
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--text-14);
	font-weight: var(--weight-regular);
	line-height: 22px;
	text-align: center;
	text-wrap: pretty;
}

.programme-next-step__para .programme-next-step__highlight {
	color: var(--color-primary);
	font-weight: var(--weight-semibold);
}

.programme-next-step__card {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.programme-next-step .programme-next-step__image {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
	object-position: center center;
}

.programme-next-step__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: var(--space-32) var(--space-16);
	background-color: var(--color-secondary);
}

.programme-next-step__badge {
	position: absolute;
	top: -27px;
	left: 40%;
	z-index: 1;
	line-height: 0;
	text-align: center;
}

.programme-next-step .programme-next-step__badge-img {
	display: inline-block;
	width: 50px;
	height: 50px;
	object-fit: cover;
	vertical-align: middle;
}

.programme-next-step__action {
	margin-top: var(--space-8);
}

.programme-next-step .programme-btn {
	--btn-size: var(--text-14);
	--btn-weight: var(--weight-bold);
	--btn-pad: 8px 40px;
	display: block;
	width: 100%;
	font-family: var(--font-body);
	line-height: 24px;
	text-transform: uppercase;
}

/* ------------------------------------------------------------ Tablet */
@media (min-width: 768px) {
	.programme-next-step {
		padding: var(--space-60) var(--space-16);
	}

	.programme-next-step__inner {
		flex-wrap: nowrap;
		gap: var(--space-40);
	}

	.programme-next-step__copy {
		gap: var(--space-40);
	}

	.programme-next-step__heading {
		font-size: var(--text-32);
	}

	.programme-next-step--narrow .programme-next-step__heading {
		width: 60%;
	}

	.programme-next-step__text {
		gap: var(--space-32);
	}

	.programme-next-step__para p {
		font-size: var(--text-20);
		line-height: 28px;
	}

	.programme-next-step .programme-next-step__image {
		height: auto;
	}

	.programme-next-step__panel {
		margin-right: 1px;
		padding: var(--space-60) var(--space-40);
	}

	.programme-next-step__badge {
		top: -41px;
		left: 44%;
	}

	.programme-next-step .programme-next-step__badge-img {
		width: 80px;
		height: auto;
	}

	.programme-next-step .programme-btn {
		--btn-size: var(--text-16);
		--btn-pad: 12px 40px;
	}
}

/* ------------------------------------------------------------ Desktop */
@media (min-width: 1025px) {
	.programme-next-step {
		padding: var(--space-100) var(--gutter);
	}

	.programme-next-step__inner {
		gap: var(--space-56); /* was 120px: too much air between the copy and the photo */
	}

	.programme-next-step__copy {
		width: 81%;
	}

	.programme-next-step--narrow .programme-next-step__copy {
		width: 75%;
	}

	.programme-next-step__heading {
		font-size: var(--text-40);
	}

	.programme-next-step__card {
		width: 780px;
		max-width: 100%;
	}
}

/* ------------------------------------------------------------ Pillars (100 Years Legacy™ Model)
   A small temple: gold entablature carrying the label, four classical columns (capital, fluted rounded shaft, base) with
   the number and pillar name on the shaft, gold arrows between them, and a stepped gold platform.
   Phones: 2 × 2 columns. Tablet up: four in a row. */
.legacy-pillars {
	--lp-gold-hi: #E2C38E;
	--lp-gold: var(--color-primary);
	--lp-gold-lo: #8C6A35;
	--lp-shaft: #222C38;

	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	margin-block: var(--space-16);
}

/* Entablature (beam) with the label. */
.legacy-pillars__label {
	position: relative;
	margin: 0;
	padding: 12px var(--space-16);
	background: linear-gradient(180deg, var(--lp-gold-hi) 0%, var(--lp-gold) 45%, var(--lp-gold-lo) 100%);
	box-shadow: 0 4px 8px rgba(29, 37, 47, 0.2);
	color: var(--color-secondary);
	font-family: var(--font-body);
	font-size: var(--text-15);
	font-weight: var(--weight-bold);
	letter-spacing: 0.18em;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
}

/* Thin moulding line under the beam. */
.legacy-pillars__label::after {
	content: "";
	position: absolute;
	right: 2%;
	bottom: -6px;
	left: 2%;
	height: 6px;
	background: linear-gradient(180deg, var(--lp-gold-lo), var(--lp-gold));
}

.legacy-pillars__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-28) var(--space-16);
	margin: 6px 0 0;
	padding: var(--space-16) var(--space-8) 0;
	list-style: none;
}

.legacy-pillars__item {
	--lp-shaft-w: 64%; /* shaft width; the capital and base taper to meet it exactly */

	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
}

/* Capital and base: gold slabs wider than the shaft. */
.legacy-pillars__capital,
.legacy-pillars__base {
	display: block;
	height: 12px;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(255, 255, 255, 0.28) 32%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, 0.38) 100%),
		linear-gradient(180deg, var(--lp-gold-hi), var(--lp-gold) 50%, var(--lp-gold-lo));
	box-shadow: 0 2px 3px rgba(0, 0, 0, 0.22);
}

.legacy-pillars__capital {
	width: 100%;
	border-radius: 2px 2px 0 0;
}

.legacy-pillars__capital::after {
	content: "";
	display: block;
	height: 8px;
	margin-top: 12px;
	clip-path: polygon(5% 0, 95% 0, calc(50% + var(--lp-shaft-w) / 2) 100%, calc(50% - var(--lp-shaft-w) / 2) 100%);
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(255, 255, 255, 0.25) 32%, rgba(0, 0, 0, 0.4) 100%),
		linear-gradient(180deg, var(--lp-gold), var(--lp-gold-lo));
}

.legacy-pillars__base {
	position: relative;
	width: 100%;
	margin-top: 8px;
	border-radius: 0 0 2px 2px;
}

/* Upper step of the base: tapers from the shaft out to the base slab, flush on both edges. */
.legacy-pillars__base::before {
	content: "";
	position: absolute;
	top: -8px;
	right: 0;
	left: 0;
	height: 8px;
	clip-path: polygon(calc(50% - var(--lp-shaft-w) / 2) 0, calc(50% + var(--lp-shaft-w) / 2) 0, 95% 100%, 5% 100%);
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(255, 255, 255, 0.25) 32%, rgba(0, 0, 0, 0.4) 100%),
		linear-gradient(180deg, var(--lp-gold-hi), var(--lp-gold));
}

/* Shaft: rounded shading + vertical fluting so it reads as a column. */
.legacy-pillars__shaft {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start; /* numbers start at the same height on every column; names follow */
	gap: var(--space-12);
	width: var(--lp-shaft-w);
	min-height: 170px;
	margin-top: 8px;
	padding: var(--space-28) 6px var(--space-20);
	position: relative;
	background:
		/* cylinder lighting: dark rims, bright highlight left of centre, soft core shadow right */
		linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 7%, rgba(255, 255, 255, 0.04) 20%, rgba(255, 255, 255, 0.24) 33%, rgba(255, 255, 255, 0.08) 45%, rgba(0, 0, 0, 0.12) 62%, rgba(0, 0, 0, 0.45) 84%, rgba(0, 0, 0, 0.8) 100%),
		/* fluting */
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 7px, rgba(0, 0, 0, 0.32) 7px 9px, rgba(255, 255, 255, 0.03) 9px 10px),
		var(--lp-shaft);
	box-shadow:
		inset 0 10px 8px -6px rgba(0, 0, 0, 0.65), /* shadow cast by the capital */
		inset 0 -6px 6px -4px rgba(0, 0, 0, 0.45),
		0 6px 10px -4px rgba(0, 0, 0, 0.3); /* contact shadow only – no grey haze beside the column */
	text-align: center;
}

.legacy-pillars__num {
	color: var(--lp-gold);
	font-family: var(--font-heading);
	font-size: var(--text-36);
	font-weight: var(--weight-bold);
	line-height: 1;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
	font-variant-numeric: lining-nums;
}

.legacy-pillars__title {
	color: var(--color-white);
	font-family: var(--font-heading);
	font-size: var(--text-18);
	font-weight: var(--weight-semibold);
	line-height: 1.15;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
	text-wrap: balance;
}

/* Gold arrow to the next pillar (tablet up, where they stand in one row). */
.legacy-pillars__item:not(:last-child)::after {
	content: none;
}

/* Stepped platform under the columns. */
.legacy-pillars__plinth {
	position: relative;
	height: 10px;
	margin-top: 4px;
	background: linear-gradient(180deg, var(--lp-gold-hi), var(--lp-gold) 50%, var(--lp-gold-lo));
	box-shadow: 0 6px 12px rgba(29, 37, 47, 0.18);
}

.legacy-pillars__plinth::after {
	content: "";
	position: absolute;
	top: 10px;
	/* Never wider than the 16px page gutter, so it cannot cause sideways scrolling on tablets. */
	right: max(-2%, calc(var(--space-16) * -1));
	left: max(-2%, calc(var(--space-16) * -1));
	height: 10px;
	background: linear-gradient(180deg, var(--lp-gold), var(--lp-gold-lo));
}

.legacy-pillars__caption {
	margin: var(--space-28) 0 0;
	color: var(--color-muted);
	font-family: var(--font-body);
	font-size: var(--text-14);
	text-align: center;
}

/* Paragraph with a gold <span> after the pillars ("…It is the order.") reads as a statement. */
.programme-next-step__para p:has(> span) {
	margin-top: var(--space-20);
	color: var(--color-secondary);
	font-family: var(--font-heading);
	font-size: var(--text-24);
	font-weight: var(--weight-bold);
	line-height: 1.2;
}

.programme-next-step__para p > span {
	color: var(--color-primary);
}

@media (min-width: 768px) {
	.legacy-pillars__label {
		padding: 14px var(--space-24);
		font-size: var(--text-16);
	}

	.legacy-pillars__list {
		grid-template-columns: repeat(4, 1fr);
		gap: var(--space-24);
		padding: var(--space-16) var(--space-12) 0;
	}

	.legacy-pillars__shaft {
		min-height: 190px;
	}

	.legacy-pillars__num {
		font-size: var(--text-40);
	}

	.legacy-pillars__title {
		font-size: var(--text-20);
	}

	.legacy-pillars__item:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 50%;
		right: calc(var(--space-24) / -2 - 7px);
		width: 14px;
		height: 14px;
		background-color: var(--lp-gold);
		clip-path: polygon(0 0, 100% 50%, 0 100%);
		transform: translateY(-50%);
	}

	.programme-next-step__para p:has(> span) {
		font-size: var(--text-32);
	}
}

@media (min-width: 1025px) {
	.legacy-pillars__label {
		font-size: var(--text-17);
	}

	.legacy-pillars__list {
		gap: var(--space-40);
		padding-inline: var(--space-20);
	}

	.legacy-pillars__item:not(:last-child)::after {
		right: calc(var(--space-40) / -2 - 7px);
	}

	.legacy-pillars__item {
		--lp-shaft-w: 60%;
	}

	.legacy-pillars__shaft {
		min-height: 215px;
		padding-block: var(--space-16);
		padding-inline: 8px;
	}

	.legacy-pillars__num {
		font-size: var(--text-48);
	}

	.legacy-pillars__title {
		font-size: var(--text-20);
	}

	/* Mentorship model fits one screen: tighter copy rhythm when the pillars are shown. */
	.programme-next-step__copy:has(.legacy-pillars) {
		gap: var(--space-24);
	}

	.programme-next-step__copy:has(.legacy-pillars) .programme-next-step__text {
		gap: var(--space-16);
	}

	.programme-next-step:has(.legacy-pillars) {
		padding-top: var(--space-60);
	}
}
