/*
 * Shared inner-page sections (About, Team & Career, …):
 * page header banner, rich text and the image/text split card.
 * Tokens, buttons and cards come from home.css.
 */

/* ---------- Rich text ---------- */

.ehs-prose > * + * {
	margin-top: 18px !important;
}

.ehs-prose p {
	margin: 0;
}

.ehs-prose ul,
.ehs-prose ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Hanging indent: wrapped lines line up with the text, not the bullet.
   Pages can change the bullet and indent with --ehs-bullet / --ehs-list-indent. */
.ehs-prose li {
	position: relative;
	padding-left: var(--ehs-list-indent, 1.2em);
}

.ehs-prose ul > li::before {
	content: var(--ehs-bullet, "\25CF");
	position: absolute;
	left: 0;
}

.ehs-prose ol {
	counter-reset: ehs-list;
}

.ehs-prose ol > li::before {
	counter-increment: ehs-list;
	content: counter(ehs-list) ".";
	position: absolute;
	left: 0;
}

.ehs-prose a {
	color: inherit;
	text-decoration: underline;
}

.ehs-prose strong {
	font-weight: 600;
}

/* ---------- Plain text sections (heading + rich text) ---------- */

.ehs-plain__title {
	margin-bottom: 27px !important;
	color: var(--ehs-teal);
	font-family: inherit;
	font-size: clamp(28px, 25.5px + 0.75vw, 35px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: 0;
}

.ehs-plain__text {
	color: var(--ehs-muted);
}

/* ---------- Page header ---------- */

.ehs-page-header {
	display: flex;
	align-items: center;
	/* 60% of the screen like the live site, capped for tall screens (iPad Pro portrait). */
	min-height: clamp(420px, 60vh, 640px);
	padding-block: 36px;
	overflow: hidden;
	isolation: isolate;
	background-color: #0a5a7a;
	color: #fff;
}

.ehs-page-header__img {
	position: absolute;
	inset: 0;
	z-index: -3;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ehs-page-header__inner {
	width: 100%;
}

.ehs-page-header__title {
	color: #fff;
	font-family: inherit;
	font-size: clamp(33.3px, 26.4px + 1.85vw, 50px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: 0;
}

.ehs-page-header__line {
	display: block;
	width: 200px;
	max-width: 100%;
	height: 2px;
	margin: 18px 0;
	background: var(--ehs-orange);
}

.ehs-page-header__subtitle {
	max-width: 70%;
	color: #fff;
	font-size: 20px;
	line-height: 1.2;
}

/* ---------- Image/text split card ---------- */

.ehs-split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	background: #f7f7f7;
}

.ehs-split--teal {
	background: var(--ehs-teal);
}

.ehs-split--no-image {
	grid-template-columns: minmax(0, 1fr);
}

.ehs-split__media {
	position: relative;
	min-height: 320px;
	background: #0a5a7a;
}

.ehs-split__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ehs-split__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 36px;
	padding: 36px;
}

/* With buttons: text at the top, buttons pinned to the bottom. */
.ehs-split__body--actions {
	justify-content: space-between;
}

.ehs-split__title {
	color: var(--ehs-teal);
	font-family: inherit;
	font-size: clamp(28px, 25.5px + 0.75vw, 35px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: 0;
}

.ehs-split__text {
	margin-top: 9px !important;
	color: var(--ehs-muted);
}

.ehs-split--teal .ehs-split__title,
.ehs-split--teal .ehs-split__text {
	color: #fff;
}

.ehs-button--white {
	border-color: #fff;
	background: #fff;
	color: #141618;
}

.ehs-button--white:hover {
	background: transparent;
	color: #fff;
}

/* Title without a subtitle: like the live site, centre it in the space
   below the transparent desktop header rather than in the whole banner. */
@media (min-width: 960px) {
	.ehs-page-header--no-subtitle {
		padding-top: 118px;
	}
}

/* ---------- iPad landscape and small laptops ---------- */

/* Keep two buttons on one row in the narrower half-width panel. */
@media (max-width: 1199px) {
	.ehs-split__buttons .ehs-button {
		padding-inline: 24px;
	}
}

/* ---------- iPad portrait and phones ---------- */

@media (max-width: 959px) {
	/* Compact banner on small screens so the content starts sooner;
	   it still grows to fit a long subtitle. */
	.ehs-page-header {
		min-height: clamp(300px, calc(45vh - 60px), 420px);
	}

	.ehs-page-header__subtitle {
		max-width: none;
	}

	.ehs-split {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Wide, short photos so the stacked cards don't get photo-heavy. */
	.ehs-split__media {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}
}

/* ---------- Phones ---------- */

@media (max-width: 569px) {
	.ehs-page-header {
		min-height: clamp(260px, calc(45vh - 60px), 340px);
	}

	.ehs-page-header__subtitle {
		font-size: 18px;
		line-height: 1.35;
	}

	.ehs-split__media {
		aspect-ratio: 4 / 3;
	}

	.ehs-split__body {
		padding: 30px 24px;
	}

	/* Full-width, easy-to-tap buttons. */
	.ehs-split__buttons {
		flex-direction: column;
	}

	.ehs-split__buttons .ehs-button {
		width: 100%;
	}
}
