/* ============================================================
   Four Pillars section ("The four pillars" - Programme page)
   Design ref: analysis/pa/pa-03-y1470.png, pa-04-y1960.png.
   Cream band, centred intro, then an interactive tabs widget:
   LEFT = active pillar (large line-art illustration + serif title
   + centred description). RIGHT = vertical stack of pill tabs
   (small line-art icon + serif title); active tab = caramel left
   bar + lighter background.
   Mobile: display on top, tabs stacked full-width below.
   Tablet: two columns tightened. Desktop: display left, tabs right.
   ============================================================ */

.four-pillars {
	background: var(--color-cream-light);
	padding-block: var(--section-padding);
}

/* ---- Intro ---- */

.four-pillars__intro {
	text-align: center;
	max-width: 44rem;
	margin-inline: auto;
}

.four-pillars__heading {
	margin-bottom: var(--space-md);
}

.four-pillars__text {
	margin-bottom: 0;
}

.four-pillars__text > :last-child {
	margin-bottom: 0;
}

/* ---- Widget layout ---- */

.four-pillars__widget {
	margin-top: var(--space-lg);
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
}

/* ---- Display (active pillar) ---- */

.four-pillars__display {
	text-align: center;
}

.four-pillars__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.four-pillars__panel[hidden] {
	display: none;
}

.four-pillars__panel:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 4px;
}

.four-pillars__illustration {
	width: 100%;
	max-width: 200px;
	margin-bottom: var(--space-md);
}

.four-pillars__illustration img {
	width: 100%;
	height: auto;
}

.four-pillars__panel-title {
	margin-bottom: var(--space-sm);
	font-size: 1.375rem;
	line-height: 1.3;
}

.four-pillars__panel-text {
	max-width: 34rem;
	margin-inline: auto;
	color: var(--color-text);
}

.four-pillars__panel-text > :last-child {
	margin-bottom: 0;
}

/* ---- Tablist (pill tab buttons) ---- */

.four-pillars__tablist {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
}

/* Each tab title is an H3 wrapping its button - reset the heading's own box so
   only the button's styling shows. It stretches to full width (column flex),
   and the button inside is width:100%. */
.four-pillars__tab-heading {
	margin: 0;
	font-size: inherit;
	line-height: inherit;
}

.four-pillars__tab {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	width: 100%;
	padding: var(--space-md) var(--space-md);
	text-align: left;
	background: var(--color-grey);
	border: 0;
	border-left: 4px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background-color var(--transition), border-color var(--transition);
}

.four-pillars__tab:hover {
	background: var(--color-light-grey);
}

.four-pillars__tab:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* Active tab: caramel left bar + a lighter neutral (grey-family) background,
   lifted off the inactive greys by the shadow + bar (per the design). */
.four-pillars__tab[aria-selected="true"] {
	background: var(--color-light-grey);
	border-left-color: var(--color-accent);
	box-shadow: var(--shadow-soft);
}

.four-pillars__tab-icon {
	flex: 0 0 auto;
	display: block;
}

.four-pillars__tab-icon img {
	width: 56px;
	height: auto;
}

.four-pillars__tab-title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1.3;
	color: var(--color-heading);
}

/* ---- Tablet: two columns tightened ---- */

@media (min-width: 768px) {
	.four-pillars__widget {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: start;
		gap: var(--space-lg);
	}

	.four-pillars__illustration {
		max-width: 220px;
	}

	.four-pillars__tab-icon img {
		width: 52px;
	}

	.four-pillars__tab-title {
		font-size: 1.125rem;
	}
}

/* ---- Desktop: display ~5/12 left, tabs right ---- */

@media (min-width: 1024px) {
	.four-pillars__widget {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--space-xl);
		align-items: center;
	}

	.four-pillars__illustration {
		max-width: 250px;
	}

	.four-pillars__tab {
		padding: var(--space-md) var(--space-lg);
	}

	.four-pillars__tab-icon img {
		width: 60px;
	}

	.four-pillars__tab-title {
		font-size: 1.375rem;
	}

	.four-pillars__panel-title {
		font-size: 1.5rem;
	}
}
