@import url("../../public/css/amm-body-text.css");

.wp-block-amm-industry-expert,
.amm-industry-expert {
	--amm-industry-expert-bg: var(--amm-palette-background, #f7f9fc);
	--amm-industry-expert-subtitle: var(--amm-palette-primary-1, #005762);
	--amm-industry-expert-name: var(--amm-palette-text-primary, #1e1e1e);
	--amm-industry-expert-role: #a3a3a3;
	--amm-industry-expert-description: var(--amm-palette-text-secondary, #404040);
	--amm-industry-expert-inline-padding: 1rem;
	--amm-industry-expert-img-oy: 50%;
	--amm-industry-expert-media-pct: 50;
	box-sizing: border-box;
}

.amm-industry-expert {
	width: 100%;
}

.amm-industry-expert__inner {
	display: grid;
	grid-template-columns:
		minmax(0, calc(var(--amm-industry-expert-media-pct, 50) * 1%))
		minmax(0, calc((100 - var(--amm-industry-expert-media-pct, 50)) * 1%));
	grid-template-rows: minmax(0, 1fr);
	align-items: stretch;
	width: 100%;
	background: var(--amm-industry-expert-bg);
	border-radius: 12px;
	overflow: hidden;
}

.amm-industry-expert.is-width-contained {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-left: auto;
	margin-right: auto;
	--amm-industry-expert-inline-padding: clamp(20px, 5vw, 100px);
	padding-left: var(--amm-industry-expert-inline-padding);
	padding-right: var(--amm-industry-expert-inline-padding);
}

.amm-industry-expert.is-width-banner {
	width: calc(100vw - (100vw - 100%));
	max-width: calc(100vw - (100vw - 100%));
	margin-left: calc(50% - 50vw + (100vw - 100%) / 2);
	margin-right: calc(50% - 50vw + (100vw - 100%) / 2);
	--amm-industry-expert-inline-padding: 0px;
	padding-left: var(--amm-industry-expert-inline-padding);
	padding-right: var(--amm-industry-expert-inline-padding);
}

.amm-industry-expert--reverse .amm-industry-expert__media {
	order: 2;
}

.amm-industry-expert--reverse .amm-industry-expert__content {
	order: 1;
}

.amm-industry-expert__media {
	position: relative;
	min-width: 0;
	min-height: 0;
	height: 100%;
	background: var(--amm-palette-background-secondary, #d9dde2);
	overflow: hidden;
}

.amm-industry-expert__media--image::after,
.amm-industry-expert__media--video::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.1);
	pointer-events: none;
}

.amm-industry-expert__media img,
.amm-industry-expert__media .amm-video-modal__thumb,
.amm-industry-expert__media video,
.amm-industry-expert__media iframe {
	display: block;
	border: 0;
	object-fit: cover;
	object-position: center var(--amm-industry-expert-img-oy, 50%);
}

.amm-industry-expert__media--image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.amm-industry-expert__media video,
.amm-industry-expert__media iframe {
	width: 100%;
	height: 100%;
}

.amm-industry-expert__media-player {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.amm-industry-expert__media-player iframe {
	position: absolute;
	inset: 0;
}

.amm-industry-expert__media--video-modal .amm-video-modal__embed-template {
	display: none;
}

.amm-industry-expert__media--inline .amm-industry-expert__media-player {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	overflow: hidden;
}

.amm-industry-expert__media--inline .amm-industry-expert__media-embed,
.amm-industry-expert__media--inline .amm-industry-expert__video-file {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.amm-industry-expert__media--inline .amm-industry-expert__video-file {
	object-fit: contain;
}

.amm-industry-expert__media--inline .amm-industry-expert__media-embed > * {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	padding: 0 !important;
	margin: 0;
}

.amm-industry-expert__media--inline .amm-industry-expert__media-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.amm-industry-expert__media-poster {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	cursor: pointer;
	background: transparent;
	z-index: 2;
}

.amm-industry-expert__media-play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	border-radius: 999px;
	background: #fff;
	color: var(--amm-palette-primary-1, #005762);
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.amm-industry-expert__media-play .material-icons {
	font-size: 32px;
	line-height: 1;
}

.amm-industry-expert__media--empty {
	display: grid;
	place-items: center;
	color: #757575;
	font-size: 14px;
}

.amm-industry-expert__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 59px 62px;
	background: var(--amm-industry-expert-bg);
}

.amm-industry-expert__subtitle {
	margin: 0 0 28px;
	color: var(--amm-industry-expert-subtitle);
	font-size: 18px;
	line-height: 1.4;
	font-weight: 500;
	font-family: var(--amm-body-font, var(--amm-font-sans));
}

.amm-industry-expert__name {
	margin: 0;
	color: var(--amm-industry-expert-name);
	font-size: 48px;
	line-height: 1.4;
	font-weight: 500;
	font-family: var(--amm-heading-font, var(--amm-font-sans));
}

.amm-industry-expert__role {
	margin: 0 0 36px;
	color: var(--amm-industry-expert-role);
	font-size: 28px;
	line-height: 1.25;
	font-weight: 400;
	font-family: var(--amm-body-font, var(--amm-font-sans));
}

.amm-industry-expert__description {
	margin: 0;
}

.amm-industry-expert .ammweb-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	width: auto;
	margin-top: 48px;
}

.amm-industry-expert .ammweb-hero__cta-item {
	display: inline-flex;
	margin: 0;
}

.amm-industry-expert .ammweb-hero__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 12px 24px;
	border: 1px solid var(--hero-button-border-color, var(--hero-button-bg, #005762));
	border-radius: var(--amm-radius-button, 4px);
	background-color: var(--hero-button-bg, #005762);
	box-shadow: var(--hero-button-shadow, none);
	color: var(--hero-button-color, #ffffff);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.4;
	font-weight: 500;
	font-family: var(--amm-body-font, var(--amm-font-sans));
	cursor: pointer;
	appearance: none;
	transition: background-color 200ms ease, color 200ms ease, opacity 200ms ease, box-shadow 200ms ease;
}

.amm-industry-expert .ammweb-hero__button span {
	padding-left: 12px;
}

.amm-industry-expert .ammweb-hero__button:hover,
.amm-industry-expert .ammweb-hero__button:focus-visible {
	background-color: var(--hero-button-hover-bg, #005762);
	color: var(--hero-button-hover-color, #ffffff);
	opacity: var(--hero-button-hover-opacity, 1);
	text-decoration: none;
}

.amm-industry-expert__placeholder {
	display: grid;
	place-items: center;
	min-height: 320px;
	padding: 32px;
	color: #757575;
	font-size: 14px;
	text-align: center;
	background: var(--amm-industry-expert-bg);
}

@media (min-width: 768px) {
	.amm-industry-expert__inner {
		min-height: 300px;
	}

	.amm-industry-expert__content {
		padding: clamp(32px, 4.5vw, 59px) clamp(28px, 4vw, 62px);
	}

	.amm-industry-expert__name {
		font-size: clamp(32px, 3.8vw, 48px);
	}

	.amm-industry-expert__role {
		margin-bottom: clamp(24px, 3vw, 36px);
		font-size: clamp(20px, 2.4vw, 28px);
	}

	.amm-industry-expert__subtitle {
		margin-bottom: clamp(16px, 2.5vw, 28px);
		font-size: clamp(16px, 1.6vw, 18px);
	}

	.amm-industry-expert .ammweb-hero__cta {
		margin-top: clamp(24px, 3.5vw, 48px);
	}
}

@media (max-width: 767px) {
	.amm-industry-expert.is-width-contained {
		padding-left: 16px;
		padding-right: 16px;
	}

	.amm-industry-expert__inner {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		aspect-ratio: auto;
		min-height: 0;
	}

	.amm-industry-expert--reverse .amm-industry-expert__media {
		order: -1;
	}

	.amm-industry-expert__media {
		width: 100%;
		height: clamp(400px, 75vw, 560px);
		min-height: 0;
		aspect-ratio: auto;
	}

	.amm-industry-expert__content {
		padding: 28px 24px 32px;
	}

	.amm-industry-expert__subtitle,
	.amm-industry-expert__description {
		font-size: 16px;
	}

	.amm-industry-expert__name {
		font-size: 32px;
	}

	.amm-industry-expert__role {
		margin-bottom: 28px;
		font-size: 22px;
	}

	.amm-industry-expert .ammweb-hero__cta {
		margin-top: 32px;
		gap: 12px;
	}

	.amm-industry-expert__media-play {
		width: 64px;
		height: 64px;
	}

	.amm-industry-expert__media-play .material-icons {
		font-size: 28px;
	}
}

/* -------------------------------------------------------------------------
 * Team member variant: compact profile card (portrait left, text right) that
 * sits inside a column, plus the "Read Bio" pop-up. Colours still come from the
 * block's colour settings via the --amm-industry-expert-* custom properties.
 * ---------------------------------------------------------------------- */

.amm-industry-expert--team-member {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
}

.amm-industry-expert--bio-card .amm-industry-expert__bio-trigger {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.amm-industry-expert--bio-card .amm-industry-expert__bio-trigger,
.amm-industry-expert--bio-card .amm-industry-expert__bio-trigger * {
	cursor: pointer;
}

.amm-industry-expert--bio-card .ammweb-hero__cta,
.amm-industry-expert--bio-card .ammweb-hero__cta * {
	cursor: auto;
}

.amm-industry-expert--bio-card .ammweb-hero__cta .ammweb-hero__button {
	cursor: pointer;
}

.amm-industry-expert--bio-card .amm-industry-expert__bio-trigger:focus-visible {
	outline: 2px solid var(--amm-industry-expert-subtitle);
	outline-offset: 4px;
}

.amm-industry-expert--bio-card .amm-industry-expert__bio-trigger:hover .amm-industry-expert__bio-link .material-icons,
.amm-industry-expert--bio-card .amm-industry-expert__bio-trigger:focus-visible .amm-industry-expert__bio-link .material-icons {
	transform: translateX(4px);
}

.amm-industry-expert--team-member .amm-industry-expert__inner {
	grid-template-columns: minmax(110px, 178px) minmax(0, 1fr);
	grid-template-rows: auto;
	gap: 24px;
	align-items: start;
	min-height: 0;
	border-radius: 0;
	overflow: visible;
}

.amm-industry-expert--team-member .amm-industry-expert__media {
	height: auto;
	min-height: 0;
	background: transparent;
	overflow: visible;
}

.amm-industry-expert--team-member .amm-industry-expert__media--image::after {
	content: none;
}

.amm-industry-expert--team-member .amm-industry-expert__media--image img {
	position: static;
	width: 100%;
	height: auto;
	aspect-ratio: 517 / 574;
}

.amm-industry-expert--team-member .amm-industry-expert__media--empty {
	aspect-ratio: 517 / 574;
	background: var(--amm-palette-background-secondary, #d9dde2);
}

.amm-industry-expert--team-member .amm-industry-expert__content {
	gap: 12px;
	justify-content: flex-start;
	padding: 0;
	background: transparent;
}

.amm-industry-expert--team-member .amm-industry-expert__subtitle {
	margin: 0;
	font-size: 15px;
}

.amm-industry-expert--team-member .amm-industry-expert__name {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

.amm-industry-expert--team-member .amm-industry-expert__role {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

/* Short excerpt on the card; the full text lives in the pop-up. */
.amm-industry-expert--team-member .amm-industry-expert__description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	font-size: 18px;
	line-height: 1.4;
}

.amm-industry-expert--team-member .amm-industry-expert__description p {
	margin: 0;
}

.amm-industry-expert__bio-link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: var(--amm-btn-gap, 12px);
	margin-top: 4px;
	color: var(--amm-industry-expert-subtitle);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	font-family: var(--amm-body-font, var(--amm-font-sans));
	text-decoration: none;
}

.amm-industry-expert__bio-link .material-icons {
	font-size: 18px;
	line-height: 1;
	transition: transform 0.2s ease;
}

/* Same as the other text CTAs (e.g. blog-card): no underline, the chevron nudges right. */
.amm-industry-expert__bio-link:hover,
.amm-industry-expert__bio-link:focus,
.amm-industry-expert__bio-link:visited {
	color: var(--amm-industry-expert-subtitle);
	text-decoration: none;
}

.amm-industry-expert__bio-link:hover .material-icons,
.amm-industry-expert__bio-link:focus-visible .material-icons {
	transform: translateX(4px);
}

.amm-industry-expert--team-member .ammweb-hero__cta {
	margin-top: 8px;
}

@media (max-width: 781px) {
	/* Stacked columns: the card's own bottom margin already spaces it from the next column's
	   first card, so drop the columns gap that would otherwise add to it. */
	.wp-block-columns:not(.is-not-stacked-on-mobile):has(> .wp-block-column > .amm-industry-expert--team-member:last-child) {
		row-gap: 0;
	}

	.amm-industry-expert--team-member .amm-industry-expert__inner {
		grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
		gap: 16px;
	}

	.amm-industry-expert--team-member .amm-industry-expert__name {
		font-size: 22px;
	}

	.amm-industry-expert--team-member .amm-industry-expert__role {
		font-size: 14px;
	}

	.amm-industry-expert--team-member .amm-industry-expert__description {
		font-size: 16px;
	}
}

/* Read Bio pop-up: centred card matching the header search modal (dim backdrop, 8px radius,
   round close icon top-right). The card itself never scrolls; its inner area does. */
/* Lock page scroll. view.js sets --amm-industry-expert-scrollbar to the removed scrollbar's width so
   the page keeps its width (no sideways jump) while the backdrop still covers the whole viewport. */
html.amm-industry-expert-bio-open {
	overflow: hidden;
	padding-right: var(--amm-industry-expert-scrollbar, 0px);
}

.amm-industry-expert__bio {
	box-sizing: border-box;
	width: calc(100% - 2 * var(--amm-site-padding-x, 24px));
	max-width: 880px;
	max-height: calc(100dvh - 2 * clamp(16px, 8vh, 120px));
	margin: clamp(16px, 8vh, 120px) auto auto;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--amm-palette-primary-3, #ffffff);
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
	color: var(--amm-text-primary-color, #1e1e1e);
	overflow: hidden;
}

/* The card itself can take focus (deep link on load); the close button keeps its own focus ring. */
.amm-industry-expert__bio:focus,
.amm-industry-expert__bio:focus-visible {
	outline: none;
}

.amm-industry-expert__bio[open] {
	display: flex;
	flex-direction: column;
	animation: amm-industry-expert-bio-in 0.2s ease-out;
}

.amm-industry-expert__bio::backdrop {
	background: rgba(0, 0, 0, 0.55);
}

@keyframes amm-industry-expert-bio-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.amm-industry-expert__bio[open] {
		animation: none;
	}
}

.amm-industry-expert__bio-inner {
	display: grid;
	grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	min-height: 0;
	padding: 32px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.amm-industry-expert__bio-img {
	position: sticky;
	top: 0;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 517 / 574;
	object-fit: cover;
}

.amm-industry-expert__bio-name {
	margin: 0 0 8px;
	padding-right: 40px;
	color: var(--amm-industry-expert-name);
	font-size: clamp(22px, 2.4vw, 28px);
	font-weight: 700;
	line-height: 1.25;
	font-family: var(--amm-heading-font, var(--amm-font-sans));
}

.amm-industry-expert__bio-year {
	font-weight: 400;
	white-space: nowrap;
}

.amm-industry-expert__bio-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	color: var(--amm-industry-expert-role);
	font-size: 15px;
	line-height: 1.4;
}

.amm-industry-expert__bio-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}

.amm-industry-expert__bio-content {
	color: var(--amm-industry-expert-description);
	font-size: 16px;
	line-height: 1.6;
}

.amm-industry-expert__bio-content > * {
	margin: 0 0 14px;
}

.amm-industry-expert__bio-content > :last-child {
	margin-bottom: 0;
}

.amm-industry-expert__bio-content ul,
.amm-industry-expert__bio-content ol {
	padding-left: 1.25em;
}

.amm-industry-expert__bio-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--amm-palette-primary-3, #ffffff);
	color: var(--amm-text-secondary-color, #757575);
	cursor: pointer;
}

.amm-industry-expert__bio-close:hover,
.amm-industry-expert__bio-close:focus-visible {
	color: var(--amm-palette-primary-1, #005762);
}

.amm-industry-expert__bio-close .material-icons {
	font-size: 20px;
}

@media (max-width: 781px) {
	.amm-industry-expert__bio {
		width: calc(100% - 32px);
		max-height: calc(100dvh - 32px);
		margin-top: 16px;
	}

	.amm-industry-expert__bio-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		padding: 24px 20px;
	}

	.amm-industry-expert__bio-img {
		position: static;
		max-width: 140px;
	}
}
