/*
 * Hero. Figma: 01 Header + Hero (node 60:4), desktop frame 1512.
 * Layout is flow-based: the cards overlap the image by --sm-hero-overlap (57px in Figma).
 */
.sm-hero {
	--sm-hero-overlap: 0px;
	position: relative;
	z-index: 2; /* card shadows fall over the next section */
	box-sizing: border-box;
	color: var(--wp--preset--color--neutral-white);
}

.sm-hero *,
.sm-hero *::before,
.sm-hero *::after {
	box-sizing: border-box;
}

.sm-hero--has-cards {
	--sm-hero-overlap: 57px;
}

/* Image area: 720px tall on desktop, content centred above the card overlap */
.sm-hero__stage {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 720px;
	padding-top: var(--wp--preset--spacing--64);
	padding-bottom: calc(var(--wp--preset--spacing--64) + var(--sm-hero-overlap));
	background-color: var(--wp--preset--color--brand-navy-dark);
}

.sm-hero__media {
	position: absolute;
	inset: 0;
	margin: 0;
	overflow: hidden;
}

.sm-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 10%; /* heads stay in frame on wide screens */
}

.sm-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 92%, transparent) 0%,
		color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 75%, transparent) 45%,
		color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 5%, transparent) 80%
	);
}

/* Content column, aligned to the 1320 grid */
.sm-hero__inner {
	position: relative;
	width: 100%;
	max-width: calc(1320px + 2 * var(--sm-page-padding));
	margin-inline: auto;
	padding-inline: var(--sm-page-padding);
}

.sm-hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--24);
}

.sm-hero__content > * {
	margin: 0;
}

.sm-hero .sm-eyebrow {
	color: var(--wp--preset--color--neutral-white);
}

.sm-hero__title {
	max-width: 760px;
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: var(--wp--preset--font-size--h-1);
	font-weight: 700;
	line-height: 1.143;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--neutral-white);
}

.sm-hero__subtitle {
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: var(--wp--preset--font-size--h-4);
	font-weight: 600;
	line-height: 26px;
	color: var(--wp--preset--color--neutral-white);
}

.sm-hero__text {
	max-width: 560px;
	font-size: var(--wp--preset--font-size--body-l);
	line-height: 1.667;
	opacity: 0.85;
}

/* Specialty pages: wider description (648px in Figma) */
.sm-hero--wide-text .sm-hero__text {
	max-width: 648px;
}

/* Buttons and links: natural width, wrapping if needed */
.sm-hero__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--16);
}

.sm-hero__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--wp--preset--spacing--16) var(--wp--preset--spacing--24);
}

.sm-hero__trust {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--8) var(--wp--preset--spacing--24);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sm-hero__trust li {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--8);
	font-weight: 500;
	line-height: 26px;
	opacity: 0.9;
}

.sm-hero__trust img {
	flex: none;
	width: 20px;
	height: 20px;
}

/* Shortcut cards (optional) */
.sm-hero__cards {
	position: relative;
	margin-top: calc(-1 * var(--sm-hero-overlap));
}

.sm-hero__cards-inner {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--24);
	width: 100%;
	max-width: calc(1320px + 2 * var(--sm-page-padding));
	margin-inline: auto;
	padding-inline: var(--sm-page-padding);
}

.sm-card {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 28px var(--wp--preset--spacing--32);
	background-color: var(--wp--preset--color--neutral-white);
	border-radius: var(--wp--preset--border-radius--md);
	box-shadow: 0 16px 40px 0 color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 14%, transparent);
	color: var(--wp--preset--color--brand-navy);
	text-decoration: none;
}

.sm-card:hover {
	text-decoration: none;
}

.sm-card__badge {
	display: grid;
	place-items: center;
	flex: none;
	width: 56px;
	height: 56px;
	background-color: var(--wp--preset--color--brand-red);
	border-radius: var(--wp--preset--border-radius--md);
}

.sm-card__badge img {
	width: 32px;
	height: 32px;
}

.sm-card__text {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: var(--wp--preset--spacing--4);
	min-width: 0;
}

.sm-card__eyebrow {
	font-size: var(--wp--preset--font-size--small);
	line-height: 22px;
	color: var(--wp--preset--color--neutral-muted);
}

.sm-card__title {
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: var(--wp--preset--font-size--h-3);
	font-weight: 700;
	line-height: 1.333;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--brand-navy);
}

.sm-card__arrow {
	display: grid;
	place-items: center;
	flex: none;
	width: 48px;
	height: 48px;
	background-color: var(--wp--preset--color--neutral-pale);
	border-radius: var(--wp--preset--border-radius--pill);
}

.sm-card__arrow img {
	width: 20px;
	height: 20px;
}

/* Tablet */
@media (max-width: 1024px) {
	.sm-hero__stage {
		min-height: 600px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.sm-hero--has-cards {
		--sm-hero-overlap: 32px;
	}

	.sm-hero__stage {
		min-height: 0;
		padding-top: var(--wp--preset--spacing--64);
	}

	.sm-hero__overlay {
		background: color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 80%, transparent);
	}

	.sm-hero__ctas {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.sm-hero__links {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-items: center;
		width: 100%;
	}

	.sm-hero__links .sm-link {
		font-size: 0.8125rem; /* 13px */
	}

	.sm-hero__trust {
		width: 100%;
		justify-content: center;
	}

	.sm-hero__cards-inner {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--16);
	}
}

/* Breadcrumb (specialty pages): top of the image, on the 1320 grid, 40px from the top like the page hero */
.sm-hero--has-crumbs .sm-hero__stage {
	padding-top: 104px;
}

.sm-hero__crumbs {
	position: absolute;
	top: 40px;
	left: 0;
	right: 0;
	z-index: 1;
	width: 100%;
	max-width: calc(1320px + 2 * var(--sm-page-padding));
	margin-inline: auto;
	padding-inline: var(--sm-page-padding);
}

.sm-hero__crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
	line-height: 22px;
	color: var(--wp--preset--color--neutral-white);
}

.sm-hero__crumbs li {
	margin: 0;
	padding: 0;
}

.sm-hero__crumbs a,
.sm-hero__sep {
	color: color-mix(in srgb, var(--wp--preset--color--neutral-white) 72%, transparent);
	text-decoration: none;
}

.sm-hero__crumbs a:hover {
	color: var(--wp--preset--color--neutral-white);
	text-decoration: underline;
}

@media (max-width: 767px) {
	.sm-hero__crumbs {
		top: 24px;
	}

	.sm-hero--has-crumbs .sm-hero__stage {
		padding-top: 72px;
	}
}

/*
 * Doctors variant (specialty pages, client feedback 23 Oct 2026): pale blue background and the doctors' photos
 * with their names instead of a stock photo. Text column on the left, doctor cards on the right.
 */
.sm-hero--doctors {
	color: var(--wp--preset--color--brand-navy);
}

.sm-hero--doctors .sm-hero__stage {
	min-height: 0;
	padding-bottom: var(--wp--preset--spacing--64);
	background-color: var(--wp--preset--color--neutral-pale);
}

.sm-hero--doctors .sm-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--wp--preset--spacing--48) 64px;
}

.sm-hero--doctors .sm-eyebrow {
	color: var(--wp--preset--color--brand-red);
}

.sm-hero--doctors .sm-hero__title,
.sm-hero--doctors .sm-hero__subtitle {
	color: var(--wp--preset--color--brand-navy);
}

.sm-hero--doctors .sm-hero__text {
	max-width: 600px;
	opacity: 1;
	color: var(--wp--preset--color--neutral-muted);
}

/* Investigations: one per line, larger, before the buttons */
.sm-hero--doctors .sm-hero__trust {
	order: 4;
	flex-direction: column;
	gap: 12px;
}

.sm-hero--doctors .sm-hero__ctas {
	order: 5;
}

.sm-hero--doctors .sm-hero__links {
	order: 6;
}

.sm-hero--doctors .sm-hero__trust li {
	align-items: flex-start;
	gap: 12px;
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: var(--wp--preset--font-size--h-4);
	font-weight: 600;
	line-height: 26px;
	opacity: 1;
	color: var(--wp--preset--color--brand-navy);
}

.sm-hero--doctors .sm-hero__trust img {
	width: 20px;
	height: 20px;
	margin-top: 3px;
}

.sm-hero--doctors .sm-hero__crumbs ol {
	color: var(--wp--preset--color--brand-navy);
}

.sm-hero--doctors .sm-hero__crumbs a,
.sm-hero--doctors .sm-hero__sep {
	color: var(--wp--preset--color--neutral-muted);
}

.sm-hero--doctors .sm-hero__crumbs a:hover {
	color: var(--wp--preset--color--brand-navy);
}

/* Doctor cards */
.sm-hero__doctors {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 264px;
	gap: 20px;
}

.sm-hero--doctors-3 .sm-hero__doctors {
	grid-auto-columns: 228px;
}

.sm-hero__doctors .sm-team-card {
	box-shadow: 0 16px 40px 0 color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 10%, transparent);
}

.sm-hero__doctors .sm-team-card__info {
	padding: 20px;
}

/* The page is already that specialty: the card eyebrow would repeat it */
.sm-hero__doctors .sm-team-card__info .sm-eyebrow {
	display: none;
}

.sm-hero__doctors .sm-team-card__name {
	font-size: 1.375rem; /* 22px */
	font-weight: 700;
	line-height: 1.3;
}

.sm-hero--doctors-3 .sm-hero__doctors .sm-team-card__name {
	font-size: 1.25rem;
}

/* Arrow icons of the text links: navy instead of white on the pale background */
.sm-hero--doctors .sm-hero__links .sm-link img {
	display: none;
}

.sm-hero--doctors .sm-hero__links .sm-link::after {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: url("/wp-content/plugins/salv-med-blocks/assets/icons/arrow-up-right-white.svg") center / contain no-repeat;
	mask: url("/wp-content/plugins/salv-med-blocks/assets/icons/arrow-up-right-white.svg") center / contain no-repeat;
}

/* Three doctors between 1181 and 1380px: narrower cards, so the text column keeps its width */
@media (max-width: 1380px) {
	.sm-hero--doctors .sm-hero__inner {
		gap: var(--wp--preset--spacing--32) 48px;
	}

	.sm-hero--doctors-3 .sm-hero__doctors {
		grid-auto-columns: 196px;
		gap: 16px;
	}

	.sm-hero--doctors-3 .sm-hero__doctors .sm-team-card__info {
		padding: 16px;
	}

	.sm-hero--doctors-3 .sm-hero__doctors .sm-team-card__name {
		font-size: 1.1875rem;
	}
}

@media (max-width: 1180px) {
	.sm-hero--doctors .sm-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--32);
	}

	/* Compact cards: photo on the left, name on the right */
	.sm-hero__doctors,
	.sm-hero--doctors-3 .sm-hero__doctors {
		grid-auto-flow: row;
		grid-auto-columns: auto;
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
		gap: 12px;
	}

	.sm-hero__doctors .sm-team-card {
		flex-direction: row;
		align-items: stretch;
	}

	.sm-hero__doctors .sm-team-card__photo {
		flex: none;
		width: 104px;
		min-height: 120px;
		aspect-ratio: auto;
	}

	.sm-hero__doctors .sm-team-card__info {
		justify-content: center;
		gap: 4px;
		padding: 12px 16px;
	}

	.sm-hero__doctors .sm-team-card__name,
	.sm-hero--doctors-3 .sm-hero__doctors .sm-team-card__name {
		font-size: 1.125rem;
		line-height: 1.35;
	}

	.sm-hero__doctors .sm-team-card__cta {
		margin-top: 0;
		padding-top: 4px;
	}
}

@media (max-width: 767px) {
	.sm-hero--doctors .sm-hero__stage {
		padding-bottom: var(--wp--preset--spacing--48);
	}

	.sm-hero--doctors .sm-hero__trust li {
		font-size: 1.0625rem;
	}

	.sm-hero--doctors .sm-hero__links {
		display: flex;
		justify-content: flex-start;
	}

	.sm-hero__doctors,
	.sm-hero--doctors-3 .sm-hero__doctors {
		grid-template-columns: minmax(0, 1fr);
	}

	.sm-hero__doctors .sm-team-card__photo {
		width: 96px;
		min-height: 112px;
	}
}

/* Home hero photo (reception, bright white wall in the right half, 26 Oct 2026): on tablets the text runs across most of the width, so the overlay stays darker on the right too */
@media (min-width: 768px) and (max-width: 1024px) {
	.sm-hero:not(.sm-hero--doctors) .sm-hero__overlay {
		background: linear-gradient(
			to right,
			color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 92%, transparent) 0%,
			color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 84%, transparent) 55%,
			color-mix(in srgb, var(--wp--preset--color--brand-navy-dark) 55%, transparent) 100%
		);
	}
}

@media (max-width: 767px) {
	.sm-hero__img {
		object-position: 72% 10%;
	}
}
