/*
 * Muni University: what the site adds to the clov_uct template (faculty sites,
 * profiles, the Students' Guild, careers, admission lists). Joomla loads this
 * file after the template's own CSS, so edits here survive a rebuild of the SCSS.
 */

/* Keyboard users open the drop-downs too (the template only reacts to hover) */

.sp-megamenu-parent .sp-has-child:focus-within > .sp-dropdown { display: block; }

/* Rich text in the "text and picture" homepage block */

.clov-split__body > p { line-height: 1.6; }

/* Event date, time and place on an event page */

.clov-event-when { display: block; }

/* ---------------------------------------------------------------------------
 * Faculty colours: each faculty has one colour, chosen in Strapi (Faculty →
 * color). lib/colors.ts turns it into --fac, --fac-deep, --fac-ink and
 * --fac-tint on the faculty's pages (Muni red if none is set). Inside a
 * faculty the template's accent, band and link colours follow it, so buttons,
 * sliders and figures match.
 * ------------------------------------------------------------------------- */

.muni-fac-theme {
	--fac: var(--clov-link);
	--fac-deep: var(--clov-link-hover);
	--fac-ink: #fff;
	--fac-tint: #f7e5e7;
	--clov-accent: var(--fac);
	--clov-accent-text: var(--fac-ink);
	--clov-band-bg: var(--fac-deep);
	--clov-link: var(--fac-deep);
}

.muni-fac-kicker {
	margin: 0 0 .5rem;
	font-family: 'Montserrat', sans-serif;
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--fac-deep, var(--clov-band-bg));
}

/* The faculties page */

.muni-faculty-cards {
	display: grid;
	gap: 1.5rem;
	margin: 2rem 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.muni-faculty-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.muni-faculty-card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	background: var(--clov-surface);
	border-bottom: 5px solid var(--fac);
	transition: box-shadow .15s ease;
}

.muni-faculty-card::before { content: none !important; }

.muni-faculty-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .14); }

.muni-faculty-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.muni-faculty-card__body { padding: 1.25rem 1.5rem 1.5rem; }

.muni-faculty-card h3 { margin: 0 0 .5rem; font-size: 1.375rem; }

.muni-faculty-card h3 a { color: var(--clov-text); text-decoration: none; }

.muni-faculty-card h3 a::after { content: ""; position: absolute; inset: 0; }

.muni-faculty-card:hover h3 a { color: var(--fac-deep); text-decoration: underline; }

.muni-faculty-card__meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0 0 .75rem; font-size: .875rem; font-weight: 700; color: var(--fac-deep); }

.muni-faculty-card__dean { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: .9375rem; }

.muni-faculty-card__dean img,
.muni-faculty-card__dean .muni-initials { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.muni-programme-table h3 a { color: inherit; }

/* Initials on Muni red when there is no photo yet */

.muni-initials {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	/* Stays in the darker half of the colour, so white initials read on light colours such as gold */
	background: linear-gradient(135deg, var(--clov-band-bg), color-mix(in srgb, var(--clov-accent) 55%, var(--clov-band-bg)));
	color: #fff;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	letter-spacing: .02em;
	user-select: none;
}

:root .clov-profile__photo .muni-initials { width: 100% !important; height: auto !important; aspect-ratio: 1; font-size: clamp(2.5rem, 6vw, 4.5rem) !important; }

:root .clov-person .muni-initials { width: 96px; height: 96px; }

.muni-people-group { margin: 2.5rem 0; }

.muni-people-group > h2 { margin-bottom: .75rem; }

.muni-people-group > p { margin-bottom: 1.5rem; }

.muni-people-group .clov-profile__name a { color: inherit; text-decoration: none; }

.muni-people-group .clov-profile__name a:hover { color: var(--clov-link); text-decoration: underline; }

.muni-people-table { width: 100%; }

.muni-people-table__name { display: inline-flex; align-items: center; gap: .75rem; font-weight: 500; }

.muni-people-table__name img,
.muni-people-table__name .muni-initials { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.muni-section-text { margin: 2rem 0; }

/* News slider on a page, and the category filter in the newsroom */

.muni-news-slider { margin: 2.5rem 0; }

/* The band is built for the full-width homepage, where its picture overlaps the left margin; here it stays in the column */

.muni-news-slider .clov-band { margin: 0 0 1rem; }

.muni-news-slider .clov-band__slide { min-height: 0; padding: 0; }

.muni-news-slider .clov-band__media { min-height: 320px; margin: 0; }

.muni-news-slider .clov-band__body { padding: 2rem 2.25rem; }

.muni-news-slider .clov-band__controls { margin-bottom: 1rem; }

.muni-news-slider h3 { margin: 0 0 .75rem; color: #fff; font-size: 1.5rem; }

.muni-news-slider__meta { margin: 0 0 .5rem; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--clov-footer-link-hover); }

.muni-category-filter { margin: 0 0 1.5rem; }

.muni-category-filter a[aria-current] { background: var(--clov-accent); color: var(--clov-accent-text); }

.muni-story-categories { margin: .5rem 0 1rem; }

/* Job adverts */

.muni-jobs { margin: 0 0 1.5rem; padding: 0; list-style: none; }

.muni-jobs > li { padding: 1.25rem 0; border-bottom: 1px solid #E2DDD9; }

.muni-jobs > li:first-child { padding-top: .25rem; }

.muni-jobs h3 { margin: 0 0 .25rem; font-size: 1.25rem; }

.muni-jobs p { margin: 0 0 .35rem; }

.muni-jobs__closes { color: var(--clov-link); }

/* Leaders' profiles */
.muni-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.muni-tags li { margin: 0; padding: .3rem .8rem; background: var(--fac-tint, var(--clov-surface)); border: 1px solid color-mix(in srgb, var(--fac, var(--clov-band-bg)) 35%, transparent); font-size: .875rem; }
.muni-tags li::before { content: none !important; }
.muni-tags--large li { padding: .5rem 1rem; font-weight: 500; font-size: .9375rem; }

/* Contact */
.muni-fac-contact { border-top: 1px solid #e3e0de; }

.muni-fac-contact__grid {
	display: grid;
	gap: 2rem 4rem;
	align-items: center;
}

@media (min-width: 992px) { .muni-fac-contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.muni-fac-contact__cta {
	padding: 2rem;
	background: var(--fac-deep);
	color: #fff;
}

.muni-fac-contact__cta h3 { margin: 0 0 .5rem; color: #fff; }
.muni-fac-contact__cta .clov-btn { background: #fff; border-color: #fff; color: var(--fac-deep); }
.muni-fac-contact__cta .clov-btn--outline { background: transparent; color: #fff; }

/* Overview: a card for each page of the faculty site */
.muni-fac-explore {
	display: grid;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) { .muni-fac-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .muni-fac-explore { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.muni-fac-explore li {
	position: relative;
	margin: 0;
	padding: 1.5rem 1.5rem 1.25rem;
	background: #fff;
	border-top: 4px solid var(--fac);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
	transition: box-shadow .15s ease, transform .15s ease;
}

.muni-fac-explore li::before { content: none !important; }
.muni-fac-explore li:hover { box-shadow: 0 10px 22px rgba(0, 0, 0, .12); transform: translateY(-2px); }
.muni-fac-explore h3 { margin: 0 0 .5rem; font-size: 1.25rem; }
.muni-fac-explore h3 a { color: var(--clov-text); text-decoration: none; }
.muni-fac-explore h3 a::after { content: ""; position: absolute; inset: 0; }
.muni-fac-explore h3 a::before { content: "→ "; color: var(--fac-deep); }
.muni-fac-explore li:hover h3 a { color: var(--fac-deep); }
.muni-fac-explore p { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--clov-muted); }

.muni-fac-why__more { color: #fff !important; font-weight: 700; text-decoration: underline; }
.muni-fac-narrow { max-width: 52rem; }

/* Department page: text and the other departments */
.muni-dept { display: grid; gap: 2rem 3rem; }

@media (min-width: 1200px) {
	.muni-dept:has(> .muni-dept__aside) { grid-template-columns: minmax(0, 3fr) minmax(14rem, 1fr); }
}

.muni-dept__aside {
	align-self: start;
	padding: 1.25rem 1.5rem;
	background: var(--fac-tint);
	border-top: 4px solid var(--fac);
}

.muni-dept__aside h2 { margin: 0 0 .75rem; font-size: 1.125rem; }
.muni-dept__aside ul { margin: 0; padding-left: 1.1rem; }

/* Staff */
.muni-staff__intro { max-width: 52rem; margin-bottom: 2rem; }
.muni-staff-group { margin: 0 0 3rem; }

.muni-staff-group > h3 {
	margin: 0 0 1.25rem;
	padding-bottom: .5rem;
	border-bottom: 3px solid var(--fac);
	font-size: 1.375rem;
}

.muni-staff-group > h3 a { color: inherit; text-decoration: none; }
.muni-staff-group > h3 a:hover { color: var(--fac-deep); text-decoration: underline; }
.muni-staff { margin-bottom: 0; }
:root .muni-staff .clov-person { border-left: 4px solid var(--fac); }
:root .muni-staff .clov-person p + p { margin-top: .35rem; }
.muni-staff__detail { font-size: .875rem; color: var(--clov-text); }
.muni-staff__qualification { font-size: .8125rem; color: var(--clov-muted); }
.muni-fac-people { border-top: 1px solid #e3e0de; }
.muni-dept-staff { margin: 2.5rem 0; }

/* The faculties page */
.muni-faculty-cards {
	display: grid;
	gap: 1.5rem;
	margin: 2rem 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) { .muni-faculty-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.muni-faculty-card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	background: var(--clov-surface);
	border-bottom: 5px solid var(--fac);
	transition: box-shadow .15s ease;
}

.muni-faculty-card::before { content: none !important; }
.muni-faculty-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .14); }
.muni-faculty-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.muni-faculty-card__body { padding: 1.25rem 1.5rem 1.5rem; }
.muni-faculty-card h3 { margin: 0 0 .5rem; font-size: 1.375rem; }
.muni-faculty-card h3 a { color: var(--clov-text); text-decoration: none; }
.muni-faculty-card h3 a::after { content: ""; position: absolute; inset: 0; }
.muni-faculty-card:hover h3 a { color: var(--fac-deep); text-decoration: underline; }
.muni-faculty-card__meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin: 0 0 .75rem; font-size: .875rem; font-weight: 700; color: var(--fac-deep); }
.muni-faculty-card__dean { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: .9375rem; }
.muni-faculty-card__dean img, .muni-faculty-card__dean .muni-initials { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

.muni-dept-banner:not(.clov-banner--image) { background: var(--fac-deep); }

.muni-programme-table h3 a { color: inherit; }

/* ---------------------------------------------------------------------------
 * People
 * ------------------------------------------------------------------------- */

/* Initials on Muni red when there is no photo yet */
.muni-initials {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	/* Stays in the darker half of the colour, so white initials read on light colours such as gold */
	background: linear-gradient(135deg, var(--clov-band-bg), color-mix(in srgb, var(--clov-accent) 55%, var(--clov-band-bg)));
	color: #fff;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	letter-spacing: .02em;
	user-select: none;
}

:root .clov-profile__photo .muni-initials { width: 100% !important; height: auto !important; aspect-ratio: 1; font-size: clamp(2.5rem, 6vw, 4.5rem) !important; }
:root .clov-person .muni-initials { width: 96px; height: 96px; }

.muni-people-group { margin: 2.5rem 0; }
.muni-people-group > h2 { margin-bottom: .75rem; }
.muni-people-group > p { margin-bottom: 1.5rem; }
.muni-people-group .clov-profile__name a { color: inherit; text-decoration: none; }
.muni-people-group .clov-profile__name a:hover { color: var(--clov-link); text-decoration: underline; }

.muni-people-table { width: 100%; }
.muni-people-table__name { display: inline-flex; align-items: center; gap: .75rem; font-weight: 500; }
.muni-people-table__name img, .muni-people-table__name .muni-initials { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

.muni-profile .clov-profile__role { font-size: 1.125rem; }

.muni-profile__grid {
	display: grid;
	gap: 2rem 3rem;
	margin: 0 0 2rem;
}

@media (min-width: 1200px) {
	.muni-profile__grid { grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); }
}

.muni-profile__aside > section {
	margin: 0 0 1.25rem;
	padding: 1.25rem 1.5rem;
	background: var(--clov-surface);
	border-top: 4px solid var(--clov-accent);
}

.muni-profile__aside h3 { margin: 0 0 .75rem; font-size: 1.0625rem; }
.muni-profile__aside ul, .muni-profile__aside ol { margin-bottom: 0; }
.muni-profile__aside p { margin: 0 0 .5rem; }
.muni-profile__label { margin: .5rem 0 .25rem !important; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--clov-muted); }
.muni-profile__roles ul { padding-left: 1.1rem; }

/* Publications and projects tabs below the CV */
.muni-tabs { margin: 3rem 0 2rem; }
.muni-tabs__list { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid #E2DDD9; }
.muni-tabs__tab {
	margin-bottom: -2px;
	padding: .75rem 1.25rem;
	border: 0;
	border-bottom: 4px solid transparent;
	background: none;
	color: var(--clov-text);
	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}
.muni-tabs__tab:hover { color: var(--clov-link); }
.muni-tabs__tab[aria-selected="true"] { border-bottom-color: var(--clov-accent); color: var(--clov-link); }
.muni-tabs__tab:focus-visible, .muni-tabs__panel:focus-visible { outline: 2px solid var(--clov-link); outline-offset: 2px; }
.muni-tabs__panel { padding-top: 1.5rem; }
.muni-tabs__panel h3 { margin: 1.5rem 0 .5rem; font-size: 1.0625rem; }
.muni-tabs__panel h3:first-child { margin-top: 0; }
.muni-works { margin: 0; padding: 0; list-style: none; }
.muni-works > li { padding: 1rem 0; border-bottom: 1px solid #E2DDD9; }
.muni-works > li:first-child { padding-top: .25rem; }
.muni-works > li p { margin: 0 0 .25rem; }
.muni-works > li p:empty { display: none; }
.muni-works__title { font-weight: 700; }
@media print {
	.muni-tabs__list { display: none; }
	.muni-tabs__panel[hidden] { display: block; }
}

.muni-directory__list { columns: 2 18rem; column-gap: 2rem; }
.muni-directory__list li { break-inside: avoid; }
