/* Executives page (office 99/2, views/content_manager_board.php). Loaded after office-about.css (head, section
   headings); colours from public.css. */

.about-exec {
	--ex-navy: var(--sci-navy);
	--ex-gold: var(--sci-gold);
	--ex-line: #e3e8ef;
	--ex-muted: #5c6b7a;
	--ex-photo-bg: #f3f5f8;
	--ex-radius: 10px;
	--ex-gap: 16px;
	--ex-avatar: 104px;
	--ex-avatar-lead: 168px;
}

/* Cards: one column on phones (photo beside the text), centred 250-300px columns from 576px */

.ex-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ex-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ex-card {
	display: flex;
	gap: 1rem;
	align-items: center;
	min-width: 0;
	padding: 1rem;
	border: 1px solid var(--ex-line);
	border-radius: var(--ex-radius);
	background: #fff;
}

/* auto-fit counts columns from the max track size, so the 300px cap sits on the card, not the track */
@media (min-width: 576px) {
	.ex-grid {
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}

	.ex-grid .ex-card {
		justify-self: center;
		width: 100%;
		max-width: 300px;
		flex-direction: column;
		padding: 1.5rem 1rem 1.25rem;
		text-align: center;
	}
}

/* Photo with the initials behind it */

.ex-avatar {
	position: relative;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: var(--ex-avatar);
	height: var(--ex-avatar);
	overflow: hidden;
	border-radius: 50%;
	background: var(--ex-navy);
}

.ex-initials {
	color: #fff;
	font-size: calc(var(--ex-avatar) * .3);
	font-weight: 500;
	line-height: 1;
}

.ex-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	background: var(--ex-photo-bg);
}

.ex-photo.is-broken {
	display: none;
}

/* Text */

.ex-info {
	min-width: 0;
}

.ex-info p {
	margin: 0;
}

.ex-name {
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.4;
}

.ex-name a,
.ex-mail a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.ex-position {
	color: var(--ex-muted);
	font-size: .9rem;
	line-height: 1.5;
}

.ex-mail {
	font-size: .875rem;
}

.ex-mail a {
	gap: .4rem;
	overflow-wrap: anywhere;
}

.ex-mail i {
	flex: none;
	color: var(--ex-muted);
}

/* Dean: larger card with a gold bar */

.ex-card-lead {
	--ex-avatar: var(--ex-avatar-lead);
	flex-direction: column;
	max-width: 680px;
	margin: 0 auto;
	padding: 1.75rem 1.25rem;
	border-left: 6px solid var(--ex-gold);
	text-align: center;
}

.ex-card-lead .ex-name {
	font-size: 1.375rem;
}

.ex-card-lead .ex-mail {
	font-size: 1rem;
}

@media (min-width: 768px) {
	.ex-card-lead {
		flex-direction: row;
		gap: 2rem;
		padding: 2rem 2.5rem;
		text-align: left;
	}

	.ex-card-lead .ex-name {
		font-size: 1.625rem;
	}
}
