/**
 * IEMA Team Members block styles.
 *
 * Responsive grid of member cards (photo, name, role, "See full bio").
 * Matches the Figma design: 4-col desktop grid (card 308x, photo 300px
 * tall, 16px radius + navy border), collapsing to 2 columns on tablet and
 * a single, paginated column on mobile. Fully scoped to
 * `.iema-team-members`, so inert on pages without the block.
 */

.iema-team-members {
	width: 100%;
	box-sizing: border-box;
	background-color: #ffffff;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
}

.iema-team-members__inner {
	max-width: 1440px;
	margin: 0 auto;
	padding: 64px 80px;
	box-sizing: border-box;
}

.iema-team-members__heading {
	margin: 0 0 40px;
	color: #002147;
	font-weight: 700;
	font-size: 40px;
	line-height: 1.15;
}

/* Grid --------------------------------------------------------------- */
.iema-team-members__grid {
	display: grid;
	grid-template-columns: repeat(var(--tm-cols, 4), minmax(0, 1fr));
	column-gap: 16px;
	row-gap: 40px;
	align-items: start;
}

/* Card --------------------------------------------------------------- */
.iema-tm-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
}

.iema-tm-card.enable-hover__switch .iema-tm-card__img:nth-child(n+2) {
	opacity: 0;
}

.iema-tm-card.enable-hover__switch:hover .iema-tm-card__img:first-child {
	opacity: 0;
}

.iema-tm-card.enable-hover__switch:hover .iema-tm-card__img:nth-child(2) {
	opacity: 1;
}

.iema-tm-card__photo {
	display: block;
	height: 300px;
	margin-bottom: 16px;
	overflow: hidden;
	border-radius: 16px;
	border: 1px solid rgba(0, 33, 71, 0.15);
	aspect-ratio: 308/300;
	box-shadow: none;
	transition: border-color 0.50s ease, box-shadow 0.50s ease;
	position: relative;
}

.iema-tm-card:hover .iema-tm-card__photo {
	border-color: #002147;
	box-shadow: 0 5px 25px 0 rgba(0, 0, 0, 0.15);
}

.iema-tm-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 1;
	transition: opacity 0.50s ease;
	position: absolute;
	inset: 0;
}

.iema-tm-card__img--placeholder {
	background: #eef1f4;
}

.iema-tm-card__body {
	margin-bottom: 16px;
}

.iema-tm-card__name {
	margin: 0 0 8px;
	color: #002147;
	font-weight: 700;
	font-size: 20px;
	line-height: 22px;
}

.iema-tm-card__role {
	margin: 0;
	color: #677700;
	font-weight: 400;
	font-size: 14px;
	line-height: 19.6px;
}

/* "See full bio" link ----------------------------------------------- */
.iema-tm-card__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	margin-top: auto;
	color: #00142c;
	font-size: 14px;
	line-height: normal;
	text-decoration: none;
	padding: 0 0 4px;
	border-bottom: 1px solid #00152D;
}

.iema-tm-card__link.disabled {
	opacity: 0.3;
}

.iema-tm-card__arrow {
	flex: none;
	transition: transform 0.2s ease;
	width: 20px;
	height: 20px;
}

.iema-tm-card__link:hover .iema-tm-card__arrow,
.iema-tm-card__link:focus-visible .iema-tm-card__arrow {
	transform: translateX(4px);
}

/* Pagination (mobile; built + toggled by view.js) ------------------- */
.iema-team-members__pagination[hidden] {
	display: none;
}

.iema-team-members__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 32px;
}

.iema-tm-pg__numbers {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.iema-tm-pg__num {
	min-width: 32px;
	height: 32px;
	padding: 0 6px;
	border: 0;
	background: none;
	color: #002147;
	font-family: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	border-bottom: 2px solid transparent;
}

.iema-tm-pg__num.is-active {
	color: #00142c;
	border-bottom-color: #00142c;
}

.iema-tm-pg__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: #002147;
	cursor: pointer;
}

.iema-tm-pg__arrow[disabled] {
	opacity: 0.35;
	cursor: default;
}

/* Tablet ------------------------------------------------------------- */
@media (max-width: 1024px) {
	.iema-team-members__inner {
		padding: 48px 24px;
	}

	.iema-team-members__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.iema-team-members__heading {
		font-size: 32px;
		margin-bottom: 32px;
	}
}

/* Mobile ------------------------------------------------------------- */
@media (max-width: 640px) {
	.iema-team-members__inner {
		padding: 40px 24px;
	}

	.iema-team-members__grid {
		grid-template-columns: 1fr;
		row-gap: 24px;
	}
}

/* LinkedIn link in the team member bio modal. */
.iema-modal--team-member__linkedin {
	display: inline-flex;
	align-items: center;
	margin-top: 12px;
	margin-bottom: 20px;
	line-height: 0;
	transition: opacity 0.2s ease;
}

.iema-modal--team-member__linkedin:hover,
.iema-modal--team-member__linkedin:focus-visible {
	opacity: 0.7;
}

.iema-modal--team-member__linkedin-icon {
	display: block;
	width: 24px;
	height: 24px;
}
