/*
 * EHS home page sections — matches ehsghealth.com.
 * Desktop from 960px; iPad portrait and phones at 959px and below.
 */

.ehs-section {
	--ehs-container: 1224px;
	--ehs-gutter: 36px;
	--ehs-teal: #007792;
	--ehs-teal-dark: #005a5b;
	--ehs-teal-light: #99cccc;
	--ehs-orange: #ff9c23;
	--ehs-muted: #618f96;
	position: relative;
	color: var(--ehs-muted);
	font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 18px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

.ehs-section,
.ehs-section *,
.ehs-section *::before,
.ehs-section *::after {
	box-sizing: border-box;
}

.ehs-section :where(h1, h2, h3, p, blockquote, figure, dl, dd, ul) {
	margin: 0;
}

.ehs-section :focus-visible {
	outline: 2px solid var(--ehs-orange);
	outline-offset: 3px;
}

.wp-site-blocks > .ehs-home {
	margin-block-start: 0;
}

.ehs-home > .ehs-section {
	margin-block: 0;
}

/* Anchor targets clear the sticky header. */
.ehs-section[id] {
	scroll-margin-top: 70px;
}

.ehs-section > .ehs-container {
	position: relative;
	z-index: 1;
}

.ehs-section__bg {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	pointer-events: none;
}

/* ---------- Shared: section heading, buttons, cards, grids ---------- */

.ehs-sec-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px 36px;
	margin-bottom: 45px;
}

.ehs-sec-head__text {
	flex: 0 1 50%;
	padding-left: 30px;
	border-left: 2px solid var(--ehs-orange);
}

.ehs-sec-title {
	color: var(--ehs-teal-dark);
	font-family: inherit;
	font-size: clamp(30px, 23.8px + 1.66vw, 45px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
}

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

.ehs-sec-link {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 9px;
	/* 44px touch target without changing the layout. */
	margin-block: -11px;
	padding-block: 11px;
	color: var(--ehs-teal);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

.ehs-sec-link .ehs-svg {
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.ehs-sec-link:hover {
	color: var(--ehs-teal-dark);
}

.ehs-sec-link:hover .ehs-svg {
	transform: translateX(4px);
}

.ehs-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 11px 18px;
}

.ehs-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 42px;
	padding: 13px 31px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ehs-button .ehs-svg {
	width: 14px;
	height: 14px;
}

.ehs-button--primary {
	border-color: var(--ehs-orange);
	background: var(--ehs-orange);
	color: #fff;
}

.ehs-button--primary:hover {
	background: transparent;
	color: var(--ehs-orange);
}

.ehs-button--light {
	border-color: var(--ehs-teal-light);
	background: var(--ehs-teal-light);
	color: #fff;
}

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

.ehs-button--outline {
	border-color: var(--ehs-teal-light);
	background: transparent;
	color: #fff;
}

.ehs-button--outline:hover {
	background: var(--ehs-teal-light);
	color: #fff;
}

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

.ehs-button--outline-white:hover {
	background: #fff;
	color: var(--ehs-teal);
}

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

.ehs-card {
	position: relative;
	overflow: hidden;
	border-bottom: 4px solid var(--ehs-orange);
	border-radius: 8px;
	background-color: var(--ehs-teal);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
	color: #fff;
}

.ehs-card__title {
	color: #fff;
	font-family: inherit;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
}

.ehs-card__text {
	margin-top: 18px !important;
	color: #fff;
}

.ehs-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 36px;
}

/* ---------- Carousel ---------- */

.ehs-carousel {
	--per-view: 1;
	--gap: 36px;
	position: relative;
}

.ehs-carousel__viewport {
	overflow: hidden;
}

/* Items stretch to the tallest one, so sliding never changes the page height. */
.ehs-carousel__track {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform 0.6s ease;
	touch-action: pan-y;
}

.ehs-carousel__item {
	flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
	min-width: 0;
	margin: 0;
}

.ehs-carousel__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
	color: var(--ehs-teal);
	font-size: 20px;
	cursor: pointer;
	opacity: 0;
	transform: translateY(-50%);
	transition: opacity 0.2s ease, color 0.2s ease;
}

.ehs-carousel__nav--prev {
	left: -24px;
}

.ehs-carousel__nav--next {
	right: -24px;
}

.ehs-carousel:hover .ehs-carousel__nav,
.ehs-carousel__nav:focus-visible {
	opacity: 1;
}

.ehs-carousel__nav:hover {
	color: var(--ehs-orange);
}

.ehs-carousel__dots {
	display: flex;
	gap: 4px;
	margin: 24px 0 0 -7px;
}

.ehs-carousel__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.ehs-carousel__dot::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	transition: background-color 0.2s ease;
}

.ehs-carousel__dot[aria-current="true"]::before,
.ehs-carousel__dot:hover::before {
	background: var(--ehs-orange);
}

/* ---------- Hero ---------- */

.ehs-hero {
	display: flex;
	align-items: center;
	min-height: max(600px, 90vh);
	padding-block: 108px;
	overflow: hidden;
	isolation: isolate;
	border-bottom-right-radius: 96px;
	background-color: #0a5a7a;
	color: #fff;
}

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

.ehs-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--ehs-teal);
	opacity: var(--ehs-overlay, 0.5);
}

.ehs-hero__fade {
	position: absolute;
	left: 0;
	right: 0;
	z-index: -1;
	pointer-events: none;
}

.ehs-hero__fade--top {
	top: 0;
	height: 150px;
	background: linear-gradient(to bottom, var(--ehs-teal), transparent);
	opacity: 0.8;
}

.ehs-hero__fade--bottom {
	bottom: 0;
	height: 75%;
	background: linear-gradient(to bottom, transparent, #000);
	opacity: 0.3;
}

.ehs-hero__content {
	max-width: 50%;
}

.ehs-hero__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-hero__text {
	margin-top: 9px !important;
	color: #fff;
}

.ehs-hero__buttons {
	margin-top: 18px;
}

/* ---------- What we do (solutions) ---------- */

.ehs-solutions {
	padding-block: 108px;
	background: #fff;
}

.ehs-solutions__bg {
	background-position: left top;
	background-size: 70% auto;
	opacity: 0.5;
}

/* Solution cards: "Cards per slide" on desktop, 2 on tablets, 1 on phones. */
.ehs-carousel--cards {
	--per-view: var(--cols, 3);
}

/* Room for the card shadows inside the carousel's clipped viewport. */
.ehs-carousel--cards .ehs-carousel__viewport {
	margin: -10px -10px -24px;
	padding: 10px 10px 24px;
}

.ehs-carousel--cards .ehs-carousel__dots {
	justify-content: center;
	margin: 18px 0 0;
}

.ehs-carousel--cards .ehs-carousel__dot::before {
	background: rgba(0, 119, 146, 0.25);
}

.ehs-carousel--cards .ehs-carousel__dot[aria-current="true"]::before,
.ehs-carousel--cards .ehs-carousel__dot:hover::before {
	background: var(--ehs-orange);
}

.ehs-sol-card {
	display: flex;
	flex-direction: column;
}

.ehs-sol-card__media {
	height: 204px;
	background: #0a5a7a;
}

.ehs-sol-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ehs-sol-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 36px;
}

.ehs-sol-card__body > :nth-last-child(2) {
	margin-bottom: 36px !important;
}

.ehs-sol-card__body > .ehs-button {
	margin-top: auto;
}

/* ---------- Why EHS ---------- */

.ehs-why {
	padding-block: 72px;
	background: #fff;
}

.ehs-why__bg,
.ehs-testimonials__bg {
	background-position: center;
	background-size: cover;
	opacity: 0.04;
}

.ehs-feature {
	padding: 36px;
}

.ehs-feature__icon {
	width: 72px;
	height: 72px;
	margin-bottom: 36px;
	color: var(--ehs-orange);
}

.ehs-feature-icon,
.ehs-feature__img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: contain;
}

.ehs-stats {
	margin-top: 72px !important;
}

.ehs-stat {
	display: flex;
	flex-direction: column-reverse;
	justify-content: flex-end;
	padding-left: 30px;
	border-left: 2px solid var(--ehs-orange);
}

.ehs-stat__value {
	color: var(--ehs-teal-dark);
	font-size: clamp(33.3px, 26.4px + 1.85vw, 50px);
	font-weight: 700;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

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

/* ---------- Testimonials ---------- */

.ehs-testimonials {
	padding-block: 72px;
	background: #fff;
}

.ehs-quote-card {
	padding: 54px 36px;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.ehs-quote__photo {
	display: block;
	width: 72px;
	height: 72px;
	margin-bottom: 18px;
	border-radius: 50%;
	object-fit: cover;
}

.ehs-quote__text p {
	color: #fff;
	font-size: clamp(17px, 15.5px + 0.45vw, 20px);
	line-height: 1.5;
}

.ehs-quote__text p::before {
	content: "\201C\00a0";
	font-weight: 700;
}

.ehs-quote__author {
	display: flex;
	flex-direction: column;
	margin-top: 18px;
	font-size: 15px;
	line-height: 1.5;
}

.ehs-quote__name {
	color: #fff;
	font-weight: 600;
}

.ehs-quote__role {
	color: var(--ehs-teal-light);
}

/* ---------- Client logos ---------- */

.ehs-logos {
	padding-block: 72px 108px;
	background: #fff;
}

.ehs-logos__title {
	margin-bottom: 36px !important;
	color: var(--ehs-teal-dark);
	font-family: inherit;
	font-size: clamp(30px, 23.8px + 1.66vw, 45px);
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
}

.ehs-carousel--logos {
	--per-view: 6;
}

.ehs-carousel--logos .ehs-carousel__track {
	align-items: center;
}

.ehs-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 120px;
}

.ehs-logo__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 120px;
	object-fit: contain;
}

/* ---------- Call to action ---------- */

.ehs-cta {
	padding-block: 36px 108px;
	background: #fff;
}

.ehs-cta__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 36px;
	min-height: 374px;
	padding: 36px;
	isolation: isolate;
}

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

.ehs-cta__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--ehs-teal);
	opacity: var(--ehs-overlay, 0.5);
}

.ehs-cta__content {
	max-width: 564px;
}

.ehs-cta__title {
	color: #fff;
	font-family: inherit;
	font-size: clamp(26.7px, 21.2px + 1.47vw, 40px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
}

.ehs-cta__text {
	margin-top: 9px !important;
	color: #fff;
}

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

@media (max-width: 959px) {
	.ehs-sec-head {
		flex-direction: column;
		align-items: stretch;
	}

	.ehs-sec-head__text {
		flex-basis: auto;
	}

	.ehs-sec-link {
		align-self: flex-end;
	}

	.ehs-hero {
		min-height: max(480px, calc(90vh - 104px));
		padding-block: 72px;
	}

	.ehs-hero__content {
		max-width: none;
	}

	.ehs-solutions {
		padding-block: 72px;
	}

	.ehs-grid-3 {
		grid-template-columns: 1fr;
	}

	.ehs-carousel__nav {
		display: none;
	}

	.ehs-carousel--cards {
		--per-view: 2;
	}

	.ehs-carousel--logos {
		--per-view: 3;
	}

	.ehs-logos {
		padding-block: 72px;
	}

	.ehs-cta {
		padding-block: 36px 72px;
	}
}

/* iPad portrait: counters stay in one row. */
@media (min-width: 570px) and (max-width: 959px) {
	.ehs-stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
	}

	.ehs-stat {
		padding-left: 18px;
	}

	/* Feature boxes become compact rows: icon on the left, text on the right. */
	.ehs-feature {
		display: grid;
		grid-template-columns: 72px minmax(0, 1fr);
		column-gap: 30px;
		align-items: start;
	}

	.ehs-feature__icon {
		grid-column: 1;
		grid-row: 1 / span 2;
		margin-bottom: 0;
	}

	.ehs-feature > :not(.ehs-feature__icon) {
		grid-column: 2;
	}
}

/* Small phones: a little more room for the text. */
@media (max-width: 359px) {
	.ehs-section {
		--ehs-gutter: 24px;
	}
}

/* Phones */
@media (max-width: 569px) {
	.ehs-carousel--cards,
	.ehs-carousel--logos {
		--per-view: 1;
	}

	.ehs-carousel--cards {
		--gap: 18px;
	}

	.ehs-quote-card {
		padding: 36px 24px;
	}

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

/* Touch screens swipe instead of using the arrows. */
@media (hover: none) {
	.ehs-carousel__nav {
		display: none;
	}
}

/* Desktop with a mouse uses arrows for the cards; everyone else gets dots. */
@media (min-width: 960px) and (hover: hover) {
	.ehs-carousel--cards .ehs-carousel__dots {
		display: none;
	}
}

.ehs-carousel__nav[hidden],
.ehs-carousel__dots[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.ehs-carousel__track,
	.ehs-section * {
		transition: none !important;
	}
}

/* Block editor previews: keep the hero a sensible height. */
.editor-styles-wrapper .ehs-hero {
	min-height: 600px;
}
