/* ==========================================================
   WUA Lecturer profiles. All classes start with "wua-".
   Change the colours here to match your theme exactly.
   ========================================================== */
:root {
	--wua-green: #5fcf6b;        /* bright green (tabs)            */
	--wua-green-dark: #1b5e20;   /* dark green (menu text, links)  */
	--wua-accent: #a8c23a;       /* yellow-green accent            */
	--wua-text: #333333;
	--wua-muted: #6b6b6b;
	--wua-bg: #ffffff;
	--wua-border: #e3e3e3;
	--wua-radius: 12px;
}

/* ---------- Grid ---------- */
.wua-grid {
	display: grid;
	grid-template-columns: repeat(var(--wua-cols, 4), minmax(0, 1fr));
	gap: 28px;
	font-family: inherit; /* keeps Poppins from the theme */
}
@media (max-width: 1024px) {
	.wua-grid { grid-template-columns: repeat(min(var(--wua-cols, 4), 2), minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.wua-grid { grid-template-columns: 1fr; }
}

/* ---------- Card ---------- */
.wua-card {
	background: var(--wua-bg);
	border: 1px solid var(--wua-border);
	border-radius: var(--wua-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease;
}
.wua-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 14px 30px rgba(27, 94, 32, .18);
}
.wua-card__photo {
	display: block;
	aspect-ratio: 1 / 1;       /* square; use 4 / 5 for taller portraits */
	overflow: hidden;
	background: #eef6ee;
}
.wua-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
	transition: transform .4s ease;
}
.wua-card:hover .wua-card__img { transform: scale(1.06); }
.wua-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 64px;
	font-weight: 600;
	color: #fff;
	background: var(--wua-green-dark);
}
.wua-card__body {
	padding: 18px 18px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.wua-card__name { margin: 0 0 4px; font-size: 18px; line-height: 1.3; }
.wua-card__name a { color: var(--wua-green-dark); text-decoration: none; }
.wua-card__position { margin: 0 0 8px; color: var(--wua-muted); font-size: 14px; font-weight: 500; }
.wua-card__excerpt { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--wua-text); }
.wua-card__email { margin: 0 0 12px; font-size: 13px; word-break: break-all; }
.wua-card__email a { color: var(--wua-green-dark); }
.wua-card__button {
	margin-top: auto;
	align-self: flex-start;
	padding: 9px 20px;
	border-radius: 999px;
	background: var(--wua-green);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background .2s ease;
}
.wua-card__button:hover { background: var(--wua-green-dark); color: #fff; }

/* ---------- Style: minimal ---------- */
.wua-grid--minimal .wua-card { border: 0; background: transparent; text-align: center; }
.wua-grid--minimal .wua-card:hover { box-shadow: none; }
.wua-grid--minimal .wua-card__photo { border-radius: 50%; aspect-ratio: 1 / 1; }
.wua-grid--minimal .wua-card__button { align-self: center; }

/* ---------- Style: name over photo ---------- */
.wua-grid--overlay .wua-card { position: relative; }
.wua-grid--overlay .wua-card__photo { aspect-ratio: 4 / 5; }
.wua-grid--overlay .wua-card__body {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	background: linear-gradient(to top, rgba(27, 94, 32, .95), rgba(27, 94, 32, 0));
	padding-top: 60px;
}
.wua-grid--overlay .wua-card__name a,
.wua-grid--overlay .wua-card__position,
.wua-grid--overlay .wua-card__excerpt,
.wua-grid--overlay .wua-card__email a { color: #fff; }
.wua-grid--overlay .wua-card__button { background: var(--wua-accent); color: #1b3a1b; }

.wua-empty { color: var(--wua-muted); font-style: italic; }

/* ---------- Single profile ---------- */
.wua-single__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 50px 20px 70px;
	display: grid;
	grid-template-columns: 340px 1fr;
	gap: 48px;
	font-family: inherit;
}
.wua-single__photo {
	aspect-ratio: 4 / 5;
	border-radius: var(--wua-radius);
	overflow: hidden;
	background: #eef6ee;
}
.wua-single__img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.wua-single__contact { list-style: none; margin: 20px 0 0; padding: 0; font-size: 15px; }
.wua-single__contact li { padding: 8px 0; border-bottom: 1px solid var(--wua-border); word-break: break-word; }
.wua-single__contact a { color: var(--wua-green-dark); }
.wua-single__name { margin: 0 0 6px; color: var(--wua-green-dark); font-size: 34px; line-height: 1.2; }
.wua-single__position { margin: 0 0 6px; font-size: 18px; font-weight: 500; color: var(--wua-muted); }
.wua-single__faculty { margin: 0 0 24px; font-size: 14px; }
.wua-single__faculty a { color: var(--wua-green-dark); text-decoration: none; }
.wua-single__main h2 {
	margin: 28px 0 8px;
	font-size: 20px;
	color: var(--wua-green-dark);
	padding-left: 12px;
	border-left: 4px solid var(--wua-green);
}
.wua-single__bio { line-height: 1.75; }
@media (max-width: 800px) {
	.wua-single__inner { grid-template-columns: 1fr; gap: 28px; }
	.wua-single__photo { max-width: 340px; }
}

/* ==========================================================
   Photos: the image always fills its frame (no empty strip below)
   ========================================================== */
.wua-card__photo,
.wua-featured__photo,
.wua-single__photo,
.wua-modal__photo {
	position: relative;
	display: block;
	overflow: hidden;
	background: #f1f1f1;
}
.wua-card__photo img,
.wua-featured__photo img,
.wua-single__photo img,
.wua-modal__photo img {
	position: absolute;
	top: 0; left: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	object-position: top center;
	display: block;
	margin: 0;
}

/* ==========================================================
   Text sizes (stronger rules so the theme cannot enlarge them)
   ========================================================== */
.wua-wrap .wua-card__name { font-size: 18px !important; line-height: 1.3 !important; margin: 0 0 6px; }
.wua-wrap .wua-card__position { font-size: 14px !important; line-height: 1.45 !important; margin: 0 0 8px; }
.wua-wrap .wua-card__excerpt { font-size: 14px !important; line-height: 1.55 !important; }
.wua-wrap .wua-card__email { font-size: 13px !important; line-height: 1.4 !important; margin: 0 0 14px; }
.wua-wrap .wua-card__button { font-size: 14px !important; line-height: 1.2 !important; display: inline-block; }

/* ==========================================================
   Featured profile (Dean): centred, and exactly the same width
   (so the same photo size) as one lecturer card in the grid below.
   ========================================================== */
.wua-wrap { width: 100%; --wua-eff: var(--wua-cols, 4); }
@media (max-width: 1024px) { .wua-wrap { --wua-eff: min(var(--wua-cols, 4), 2); } }
@media (max-width: 600px)  { .wua-wrap { --wua-eff: 1; } }

.wua-featured {
	display: flex;
	flex-direction: column;
	text-align: center;
	width: calc((100% - (var(--wua-eff) - 1) * 28px) / var(--wua-eff)); /* one grid column */
	margin: 0 auto 48px;
	box-sizing: border-box;
	overflow: hidden;
	background: var(--wua-bg);
	border: 1px solid var(--wua-border);
	border-top: 5px solid var(--wua-green);
	border-radius: var(--wua-radius);
	font-family: inherit;
	transition: transform .25s ease, box-shadow .25s ease;
}
.wua-featured:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(27, 94, 32, .18); }
.wua-featured__photo { width: 100%; aspect-ratio: 1 / 1; border-radius: 0; }
.wua-featured__body { padding: 18px 18px 22px; display: flex; flex-direction: column; align-items: center; flex: 1; }
.wua-wrap .wua-featured__position {
	margin: 0 0 4px;
	font-size: 13px !important;
	line-height: 1.4 !important;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--wua-accent);
}
.wua-wrap .wua-featured__name { margin: 0 0 6px; font-size: 18px !important; line-height: 1.3 !important; }
.wua-featured__name a { color: var(--wua-green-dark); text-decoration: none; }
.wua-wrap .wua-featured__text { margin: 0 0 12px; font-size: 14px !important; line-height: 1.55 !important; color: var(--wua-text); }
.wua-featured .wua-card__button { align-self: center; margin-top: auto; }

.wua-section-title {
	margin: 0 0 22px;
	font-size: 24px;
	color: var(--wua-green-dark);
	padding-left: 12px;
	border-left: 4px solid var(--wua-green);
}

/* ==========================================================
   Single profile page
   ========================================================== */
.wua-single__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 50px 20px 70px;
	display: grid;
	grid-template-columns: 340px 1fr;
	gap: 48px;
	font-family: inherit;
}
.wua-single__photo { aspect-ratio: 4 / 5; border-radius: var(--wua-radius); }
.wua-single__contact { list-style: none; margin: 20px 0 0; padding: 0; }
.wua-single__contact li { padding: 8px 0; border-bottom: 1px solid var(--wua-border); word-break: break-word; font-size: 15px; line-height: 1.5; }
.wua-single__contact a { color: var(--wua-green-dark); }
.wua-single__name { margin: 0 0 6px; color: var(--wua-green-dark); font-size: 34px; line-height: 1.2; }
.wua-single__position { margin: 0 0 6px; font-size: 18px; font-weight: 500; color: var(--wua-muted); }
.wua-single__faculty { margin: 0 0 24px; font-size: 14px; color: var(--wua-text); }
.wua-single__faculty a { color: var(--wua-green-dark); text-decoration: none; }
.wua-single__bio { margin-top: 18px; }
.wua-single__bio,
.wua-single__bio p { font-size: 16px; line-height: 1.75; }
.wua-single__bio p { margin: 0 0 1em; }
@media (max-width: 800px) {
	.wua-single__inner { grid-template-columns: 1fr; gap: 28px; }
	.wua-single__photo { max-width: 340px; }
}

/* ==========================================================
   Popup (View more)
   ========================================================== */
html.wua-modal-open { overflow: hidden; }
.wua-modal {
	border: 0;
	border-radius: var(--wua-radius);
	padding: 0;
	width: min(960px, 94vw);
	max-width: 94vw;
	max-height: 90vh;
	overflow: hidden;            /* the inner box scrolls, so the X stays put */
	background: var(--wua-bg);
	color: var(--wua-text);
	font-family: inherit;
	box-shadow: 0 25px 70px rgba(0, 0, 0, .4);
}
.wua-modal[open] { display: block; animation: wua-pop .22s ease-out; }
.wua-modal::backdrop { background: rgba(10, 30, 12, .65); }
@keyframes wua-pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* Close button: a flex box with an SVG cross = exactly centred */
.wua-modal .wua-modal__close {
	position: absolute;
	top: 14px; right: 14px;
	width: 42px; height: 42px;
	min-width: 0; min-height: 0;
	margin: 0;
	padding: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	border: 0 !important;
	border-radius: 50% !important;
	background: var(--wua-green-dark) !important;
	color: #fff !important;
	box-shadow: none !important;
	line-height: 1;
	cursor: pointer;
	z-index: 5;
	transition: background .2s ease;
}
.wua-modal .wua-modal__close:hover,
.wua-modal .wua-modal__close:focus { background: var(--wua-green) !important; color: #fff !important; outline: none; }
.wua-modal .wua-modal__close svg { width: 18px; height: 18px; display: block; pointer-events: none; }

.wua-modal__inner {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 36px;
	padding: 36px;
	max-height: 90vh;
	overflow-y: auto;
	box-sizing: border-box;
}
.wua-modal__photo { aspect-ratio: 4 / 5; border-radius: var(--wua-radius); }
.wua-modal .wua-single__name { margin-top: 0; padding-right: 50px; font-size: 30px !important; line-height: 1.2 !important; }
.wua-modal .wua-single__position { font-size: 17px !important; line-height: 1.4 !important; }
.wua-modal .wua-single__faculty { font-size: 14px !important; line-height: 1.5 !important; }
.wua-modal .wua-single__bio,
.wua-modal .wua-single__bio p { font-size: 16px !important; line-height: 1.75 !important; }
@media (max-width: 760px) {
	.wua-modal__inner { grid-template-columns: 1fr; padding: 60px 20px 24px; gap: 22px; }
	.wua-modal__photo { max-width: 260px; }
}
