/**
 * People: the cards that introduce them and the dialog that reads their story.
 *
 * Markup: inc/nvn-people.php. Used by the instructors, founders and academic
 * committee templates, and enqueued only for those - see nvn_child_scripts().
 *
 * This lived in a `<style>` block printed beside the first card. On the
 * committee page that put it inside the carousel container, where slick took
 * it for a slide and the whole stylesheet was laid out on the page as text.
 */

/* ---- Filter: one segmented control, not two rival buttons ---- */
.nvn-iseg-wrap { display: flex; justify-content: center; }

.nvn-iseg {
	display: inline-flex;
	gap: 4px;
	margin: 0;
	padding: 5px;
	border: 0;
	border-radius: 999px;
	background: #e9f4fb;
	list-style: none;
}

.nvn-iseg .nav-link {
	border: 0;
	border-radius: 999px;
	padding: 9px 32px;
	background: transparent;
	color: var(--primary-color, #0071A9);
	font-weight: 600;
	transition: background-color .18s ease, color .18s ease;
}

.nvn-iseg .nav-link:hover { color: var(--secondary-color, #2EAE49); }

.nvn-iseg .nav-link.active {
	background: var(--primary-color, #0071A9);
	color: #fff;
	box-shadow: 0 6px 14px -8px rgba(3, 54, 82, .6);
}

/* ---- Cards ---- */
.nvn-icard { height: 100%; }

.nvn-icard__btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	width: 100%;
	height: 100%;
	padding: 26px 18px 20px;
	border: 1px solid #e3eef6;
	border-radius: 16px;
	background: #fff;
	text-align: center;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nvn-icard__btn:hover,
.nvn-icard__btn:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(0, 113, 169, .35);
	box-shadow: 0 18px 34px -18px rgba(3, 54, 82, .4);
}

.nvn-icard__btn:focus-visible {
	outline: 2px solid var(--secondary-color, #2EAE49);
	outline-offset: 2px;
}

/*
 * 128px, not the 270px the grid used to run at. At that size the
 * portrait was the whole card and the name an afterthought beneath
 * it - and the mix of photographs, logos and initials the site
 * actually holds was magnified rather than settled.
 */
.nvn-icard__avatar {
	display: block;
	width: 128px;
	height: 128px;
	margin-bottom: 16px;
	border-radius: 50%;
	overflow: hidden;
	background: #f2f8fc;
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0, 113, 169, .18);
}

/* `!important` to out-rank `.instructor-wrapper .tutor-avatar-xl`. */
.nvn-icard__avatar img,
.nvn-icard__avatar .tutor-avatar {
	width: 100% !important;
	height: 100% !important;
	display: block;
	object-fit: cover;
	border: 0 !important;
	border-radius: 50% !important;
}

.nvn-icard__name {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--primary-color, #0071A9);
}

/* Clamped so a long post cannot make one card taller than the row. */
.nvn-icard__role {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b8ba1;
}

.nvn-icard__cue {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--secondary-color, #2EAE49);
	opacity: .85;
}

.nvn-icard__btn:hover .nvn-icard__cue { opacity: 1; }

[dir="rtl"] .nvn-icard__cue svg { transform: scaleX(-1); }

@media (max-width: 575.98px) {
	.nvn-icard__btn { padding: 20px 12px 16px; }
	.nvn-icard__avatar { width: 96px; height: 96px; margin-bottom: 12px; }
	.nvn-icard__name { font-size: 15px; }
	.nvn-icard__role { font-size: 13px; }
	.nvn-iseg .nav-link { padding: 9px 22px; }
}

/* ---- Founders: an editorial spread, one band each ---- */
.nvn-founder {
	display: grid;
	/*
	 * A fixed portrait column. Given a fraction of the row instead,
	 * the two portraits grew to some 620px wide on a laptop - a
	 * head the size of the reader's own.
	 */
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 52px;
	align-items: center;
	padding: 12px 0;
}

.nvn-founder + .nvn-founder { margin-top: 64px; }

.nvn-founder--flip { grid-template-columns: minmax(0, 1fr) 320px; }
.nvn-founder--flip .nvn-founder__portrait { order: 2; }

.nvn-founder__portrait {
	position: relative;
	min-height: 0;
	aspect-ratio: 4 / 5;
}

/*
 * An arch, after the mihrab. The institute's colours frame the
 * founder the way the old design meant to with its hard offset
 * shadows - but as a panel set behind the portrait rather than a
 * 30px shove that left the two of them refusing to line up.
 */
.nvn-founder__portrait img {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	border-radius: 190px 190px 20px 20px;
}

/* Logical insets, so the panel peeks to the same side of the
   portrait in Arabic as it does in English. */
.nvn-founder__panel {
	position: absolute;
	z-index: 0;
	inset-block: 26px -22px;
	inset-inline: 26px -22px;
	border-radius: 190px 190px 20px 20px;
}

.nvn-founder--flip .nvn-founder__panel { inset-inline: -22px 26px; }

.nvn-founder--blue .nvn-founder__panel { background: rgba(0, 113, 169, .14); }
.nvn-founder--green .nvn-founder__panel { background: rgba(46, 174, 73, .16); }

.nvn-founder__eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--secondary-color, #2EAE49);
}

.nvn-founder__name {
	margin: 0;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--primary-color, #0071A9);
}

.nvn-founder__rule {
	display: block;
	width: 58px;
	height: 3px;
	margin: 18px 0 20px;
	border-radius: 3px;
	background: var(--secondary-color, #2EAE49);
}

.nvn-founder__lead {
	margin: 0;
	max-width: 62ch;
	color: #46637a;
	font-size: 17px;
	line-height: 1.85;
}

.nvn-founder__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}

/* ---- Buttons and social links, shared with the dialog footer ---- */
.nvn-pbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding-inline: 24px;
	border: 0;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .16s ease, color .16s ease;
}

.nvn-pbtn--primary { background: var(--primary-color, #0071A9); color: #fff; }
.nvn-pbtn--primary:hover,
.nvn-pbtn--primary:focus-visible { background: #005e8d; color: #fff; }

.nvn-pbtn--ghost {
	background: transparent;
	color: var(--primary-color, #0071A9);
	box-shadow: inset 0 0 0 1.5px rgba(0, 113, 169, .35);
}

.nvn-pbtn--ghost:hover,
.nvn-pbtn--ghost:focus-visible { background: var(--primary-color, #0071A9); color: #fff; }

.nvn-pbtn:focus-visible,
.nvn-psocial a:focus-visible {
	outline: 2px solid var(--secondary-color, #2EAE49);
	outline-offset: 2px;
}

.nvn-psocial {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nvn-psocial a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #eef6fb;
	color: var(--primary-color, #0071A9);
	text-decoration: none;
	transition: background-color .16s ease, color .16s ease;
}

.nvn-psocial a:hover { background: var(--primary-color, #0071A9); color: #fff; }

@media (max-width: 991.98px) {
	.nvn-founder,
	.nvn-founder--flip {
		grid-template-columns: minmax(0, 1fr);
		gap: 30px;
		justify-items: center;
		text-align: center;
	}

	.nvn-founder--flip .nvn-founder__portrait { order: 0; }

	.nvn-founder__portrait { width: 260px; }
	.nvn-founder__panel,
	.nvn-founder--flip .nvn-founder__panel {
		inset-block: 20px -16px;
		inset-inline: 20px -16px;
	}
	.nvn-founder__rule { margin-inline: auto; }
	.nvn-founder__lead { max-width: 60ch; }
	.nvn-founder__actions { justify-content: center; }
	.nvn-founder + .nvn-founder { margin-top: 52px; }
	.nvn-founder__name { font-size: 27px; }
}

@media (max-width: 575.98px) {
	.nvn-founder__portrait { width: 210px; }
	.nvn-founder__name { font-size: 23px; }
	.nvn-founder__lead { font-size: 16px; }
}

/* ---- Committee cards: image banner, then the person ---- */
.nvn-ccard { height: 100%; }

.nvn-ccard__btn {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 1px solid #e3eef6;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	text-align: start;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nvn-ccard__btn--static { cursor: default; }

.nvn-ccard__btn:not(.nvn-ccard__btn--static):hover,
.nvn-ccard__btn:focus-visible {
	transform: translateY(-4px);
	border-color: rgba(0, 113, 169, .35);
	box-shadow: 0 18px 34px -18px rgba(3, 54, 82, .4);
}

.nvn-ccard__btn:focus-visible {
	outline: 2px solid var(--secondary-color, #2EAE49);
	outline-offset: 2px;
}

/*
 * `min-height: 0` is what makes the frame authoritative.
 *
 * A flex item's automatic minimum size is its content, and a square source
 * image is taller at a given width than a 4:3 box - so one member's portrait
 * ignored the frame and stood 302px against everyone else's 227. The landscape
 * images happened to be shorter than the frame, which is why only one card
 * ever looked wrong.
 */
.nvn-ccard__media {
	display: block;
	flex: 0 0 auto;
	min-height: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #eef6fb;
}

.nvn-ccard__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}

.nvn-ccard__btn:not(.nvn-ccard__btn--static):hover .nvn-ccard__media img {
	transform: scale(1.04);
}

.nvn-ccard__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 16px 18px 18px;
}

.nvn-ccard__name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--primary-color, #0071A9);
}

/* Clamped: the designations run long and would set the row height. */
.nvn-ccard__role {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 5px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #6b8ba1;
}

.nvn-ccard__cue {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--secondary-color, #2EAE49);
}

[dir="rtl"] .nvn-ccard__cue svg { transform: scaleX(-1); }

@media (max-width: 575.98px) {
	.nvn-ccard__body { padding: 13px 14px 15px; }
	.nvn-ccard__name { font-size: 14.5px; }
	.nvn-ccard__role { font-size: 12.5px; }
}

/* ---- Committee carousel ---- */
.nvn-cslider { position: relative; }

/*
 * Equal heights, which is the whole point of a row of people.
 * style.css centres every `.slick-track` on the site, so each slide
 * sat at its own content height and the portraits stepped up and
 * down the row. Stretching them is scoped to this slider so no
 * other carousel is disturbed.
 */
#academic-committee .slick-track {
	display: flex !important;
	align-items: stretch !important;
}

#academic-committee .slick-slide {
	height: auto;
}

#academic-committee .slick-slide > div {
	height: 100%;
	padding-inline: 10px;
}

.nvn-cslide { height: 100%; }

#academic-committee .slick-list { padding-block: 6px; }

/* Arrows sit outside the track where there is room, and over it
   where there is not. The old markup named #ac-prev / #ac-next as
   its arrows but never rendered them, so it had none. */
.nvn-cnav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #e3eef6;
	border-radius: 50%;
	background: #fff;
	color: var(--primary-color, #0071A9);
	box-shadow: 0 10px 24px -12px rgba(3, 54, 82, .45);
	transform: translateY(-50%);
	cursor: pointer;
	transition: background-color .16s ease, color .16s ease;
}

.nvn-cnav:hover,
.nvn-cnav:focus-visible {
	background: var(--primary-color, #0071A9);
	color: #fff;
}

.nvn-cnav:focus-visible {
	outline: 2px solid var(--secondary-color, #2EAE49);
	outline-offset: 2px;
}

.nvn-cnav--prev { inset-inline-start: -22px; }
.nvn-cnav--next { inset-inline-end: -22px; }

[dir="rtl"] .nvn-cnav svg { transform: scaleX(-1); }

.nvn-cnav.slick-disabled { opacity: .35; pointer-events: none; }

#academic-committee .slick-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

#academic-committee .slick-dots li { width: auto; height: auto; margin: 0; }

#academic-committee .slick-dots li button {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #c3dced;
	text-indent: -9999px;
	overflow: hidden;
	transition: width .2s ease, background-color .2s ease;
}

#academic-committee .slick-dots li button::before { display: none; }

#academic-committee .slick-dots li.slick-active button {
	width: 22px;
	border-radius: 4px;
	background: var(--primary-color, #0071A9);
}

@media (max-width: 1199.98px) {
	.nvn-cnav--prev { inset-inline-start: -6px; }
	.nvn-cnav--next { inset-inline-end: -6px; }
}

/* ---- Section heading ---- */
.nvn-people__heading {
	margin: 0 0 28px;
	font-size: 28px;
	font-weight: 700;
	color: var(--primary-color, #0071A9);
}

.nvn-people__heading::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: 12px;
	border-radius: 3px;
	background: var(--secondary-color, #2EAE49);
}

/* ---- Directors: portrait beside the write-up ---- */
.nvn-dlist {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.nvn-drow {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.nvn-drow--flip { grid-template-columns: minmax(0, 1fr) 280px; }
.nvn-drow--flip .nvn-drow__media { order: 2; }

.nvn-drow__media {
	min-height: 0;
	aspect-ratio: 4 / 5;
	border-radius: 18px;
	overflow: hidden;
	background: #eef6fb;
}

.nvn-drow__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.nvn-drow__body {
	padding: 26px 28px;
	border: 1px solid #e3eef6;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 16px 34px -26px rgba(3, 54, 82, .4);
}

.nvn-drow__name {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 700;
	color: var(--primary-color, #0071A9);
}

.nvn-drow__text {
	color: #33475b;
	line-height: 1.8;
}

.nvn-drow__text > *:first-child { margin-top: 0; }
.nvn-drow__text > *:last-child { margin-bottom: 0; }

/* One column below a tablet, portrait first either way. */
@media (max-width: 767.98px) {
	.nvn-drow,
	.nvn-drow--flip {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.nvn-drow--flip .nvn-drow__media { order: 0; }

	.nvn-drow__media {
		max-width: 240px;
		aspect-ratio: 1 / 1;
		border-radius: 50%;
	}

	.nvn-drow__body { padding: 20px; }
	.nvn-people__heading { font-size: 23px; }
}

/* ---- Dialog ---- */
/* Sized to its content. The dialog was `modal-xl`, which gave a name
   and a paragraph the better part of a 1200px canvas to sit in. */
.nvn-imodal .modal-dialog { max-width: 620px; }

.nvn-imodal__card {
	border: 0;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 30px 70px -30px rgba(3, 54, 82, .45);
}

/* Identity band: who this is, before anything they wrote. */
.nvn-imodal__head {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 26px 28px;
	background: linear-gradient(135deg, #eff8fd, #dceffa);
	border-bottom: 1px solid rgba(0, 113, 169, .12);
}

.nvn-imodal__avatar {
	flex: 0 0 auto;
	width: 92px;
	height: 92px;
	margin: 0;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	border: 3px solid #fff;
	box-shadow: 0 8px 20px -10px rgba(3, 54, 82, .55);
}

/* `!important` to out-rank `.instructor-wrapper .tutor-avatar-xl`,
   which sizes the card portraits this dialog sits among. */
.nvn-imodal__avatar img,
.nvn-imodal__avatar .tutor-avatar {
	width: 100% !important;
	height: 100% !important;
	display: block;
	object-fit: cover;
	border: 0 !important;
	border-radius: 50% !important;
}

.nvn-imodal__ident { min-width: 0; }

.nvn-imodal__name {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--primary-color, #0071A9);
}

.nvn-imodal__role {
	margin: 6px 0 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--secondary-color, #2EAE49);
}

.nvn-imodal__close {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .8);
	color: var(--primary-color, #0071A9);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .16s ease, color .16s ease;
}

.nvn-imodal__close:hover,
.nvn-imodal__close:focus-visible {
	background: #fff;
	color: var(--secondary-color, #2EAE49);
}

.nvn-imodal__body { padding: 24px 28px 28px; }

.nvn-imodal__label {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6b8ba1;
}

.nvn-imodal__bio {
	color: #33475b;
	font-size: 16px;
	line-height: 1.75;
}

.nvn-imodal__bio > *:first-child { margin-top: 0; }
.nvn-imodal__bio > *:last-child { margin-bottom: 0; }

.nvn-imodal__foot {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
	padding: 18px 28px;
	border-top: 1px solid #eef3f7;
	background: #fbfdfe;
}

.nvn-imodal__empty {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: #6b8ba1;
}

/* On a phone the portrait leads and the name sits under it. */
@media (max-width: 575.98px) {
	.nvn-imodal__head {
		flex-direction: column;
		gap: 14px;
		padding: 34px 20px 22px;
		text-align: center;
	}

	.nvn-imodal__avatar { width: 84px; height: 84px; }
	.nvn-imodal__name { font-size: 19px; }
	.nvn-imodal__body { padding: 20px; }
}
		
