/*
BN Team — grid + lightbox styles.

Colors/fonts borrowed from BN's own theme (style.css) rather than invented:
- #004C97 is BN's real brand blue (used elsewhere for e.g. the scroll
  progress bar), not a new value.
- Heading font stack matches the theme's h1-h6 stack.
Breakpoint (960px) matches the theme's own "Min-width: 960px" desktop
breakpoint (see style.css table of contents) rather than a new one, so this
grid switches at the same point everything else on the site does.
*/

.bn-team-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin: 0 0 40px;
	padding: 0;
	list-style: none;
}

@media (min-width: 960px) {
	.bn-team-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 24px;
	}
}

.bn-team-card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #dfe3ee;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(20, 30, 75, .08), 0 6px 16px rgba(20, 30, 75, .08);
	cursor: pointer;
	font: inherit;
	text-align: left;
	transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s cubic-bezier(.2, .7, .2, 1);
}

.bn-team-card:hover,
.bn-team-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 10px 26px rgba(20, 30, 75, .18);
}

.bn-team-card:focus-visible {
	outline: 3px solid #FEDD00;
	outline-offset: 2px;
}

.bn-team-card-media {
	position: absolute;
	inset: 0;
}

.bn-team-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	box-shadow: none; /* override the theme's global `img { box-shadow: ... }` */
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.bn-team-card:hover .bn-team-card-media img,
.bn-team-card:focus-visible .bn-team-card-media img {
	transform: scale(1.05);
}

/* Text-over-photo caption, per the confirmed July 2026 design: a color
   band anchored to the bottom of the photo, not a separate panel below
   it. */
.bn-team-card-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 14px 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	background: linear-gradient(180deg, rgba(0, 76, 151, 0) 0%, rgba(0, 76, 151, .55) 40%, rgba(0, 76, 151, .88) 100%);
	color: #fff;
	text-align: left;
}

.bn-team-card-name {
	font-family: 'Fira Sans Condensed', 'Avenir Next Condensed', 'Arial Narrow', 'Helvetica Neue Condensed', sans-serif;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
}

.bn-team-card-designation {
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.3;
	opacity: .92;
}

/* The details block is only ever read by JS to populate the lightbox —
   never shown in place. */
.bn-team-details {
	display: none;
}

/* ---------- Lightbox ---------- */

.bn-team-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.bn-team-lightbox[hidden] {
	display: none;
}

.bn-team-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 21, 53, .72);
}

.bn-team-lightbox-panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 720px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

@media (min-width: 640px) {
	.bn-team-lightbox-panel {
		flex-direction: row;
	}
}

.bn-team-lightbox-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .9);
	border: 0;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	color: #0C4699;
	cursor: pointer;
}

.bn-team-lightbox-close:hover,
.bn-team-lightbox-close:focus-visible {
	background: #fff;
}

.bn-team-lightbox-media {
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 3 / 4;
}

@media (min-width: 640px) {
	.bn-team-lightbox-media {
		width: 42%;
		aspect-ratio: auto;
		align-self: stretch;
	}
}

.bn-team-lightbox-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	box-shadow: none;
	border-radius: 16px 16px 0 0;
}

@media (min-width: 640px) {
	.bn-team-lightbox-media img {
		border-radius: 16px 0 0 16px;
	}
}

.bn-team-lightbox-body {
	flex: 1 1 auto;
	padding: 28px 28px 32px;
	overflow-y: auto;
}

.bn-team-lightbox-name {
	margin: 0 0 4px;
	font-family: 'Fira Sans Condensed', 'Avenir Next Condensed', 'Arial Narrow', 'Helvetica Neue Condensed', sans-serif;
	font-size: 26px;
	color: #0C4699;
}

.bn-team-lightbox-designation {
	margin: 0 0 16px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
	color: #333;
}

.bn-team-lightbox-bio p {
	margin: 0 0 12px;
	padding: 0;
	font-size: 15px;
	line-height: 1.6;
	color: #333;
}

.bn-team-lightbox-email {
	display: inline-block;
	margin-top: 8px;
	font-size: 14px;
	color: #0C4699;
}
