/**
 * CDS College of Engineering — standard engineering college theme.
 * Palette: maroon + slate + teal (distinct from other institutional sites).
 */

:root {
	--cds-brand: #7a0019;
	--cds-brand-dark: #5c0012;
	--cds-brand-light: #9e1b32;
	--cds-slate: #334155;
	--cds-slate-dark: #1e293b;
	--cds-teal: #0d9488;
	--cds-teal-dark: #0f766e;
	--cds-surface: #f1f5f9;
	--cds-page-bg: #e8edf3;
	--cds-border: #cbd5e1;
	--cds-text: #1e293b;
	--cds-muted: #64748b;
	--cds-font-body: "Roboto", system-ui, sans-serif;
	--cds-font-heading: "Roboto Slab", Georgia, serif;
	--cds-max: 960px;
	--cds-header-height: 5rem;
	--cds-gutter: clamp(1.25rem, 5vw, 2rem);
	--cds-section-y: 1.5rem;
	--cds-radius: 6px;
	--cds-shadow-sm: 0 1px 3px rgba(30, 41, 59, 0.07);
	--cds-shadow-md: 0 4px 14px rgba(30, 41, 59, 0.08);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: var(--cds-font-body);
	font-size: 0.9375rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	color: var(--cds-text);
	background: var(--cds-page-bg);
}

h1, h2, h3, h4, h5, h6,
.cds-hero__title {
	font-family: var(--cds-font-heading);
	color: var(--cds-brand);
	font-weight: 700;
	line-height: 1.3;
}

a {
	color: var(--cds-teal);
}

a:hover {
	color: var(--cds-brand);
}

/* ── Unified site width — 960px industry container (header · body · footer) ── */
.cds-site-width,
.cds-header__inner.cds-site-width,
.cds-top-bar__inner.cds-site-width,
.cds-page,
main.cds-page {
	width: 100%;
	max-width: var(--cds-max) !important;
	margin-inline: auto !important;
	box-sizing: border-box;
}

.cds-site-width,
.cds-header__inner.cds-site-width,
.cds-top-bar__inner.cds-site-width {
	padding-inline: var(--cds-gutter);
}

/* Strip WP constrained side-padding on shell wrappers — page content keeps its own inset */
.cds-top-bar.is-layout-constrained,
.cds-header__brand-row.is-layout-constrained,
.cds-footer.is-layout-constrained {
	padding-inline: 0 !important;
}

/* WP post content inside our page shell */
.cds-page .wp-block-post-content.is-layout-constrained {
	max-width: 100% !important;
	padding-inline: 0 !important;
}

/* ── Top utility bar — email only, minimal height ── */
.cds-top-bar {
	font-size: 0.75rem;
	line-height: 1.2;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cds-top-bar__inner {
	padding-block: 0.2rem;
	min-height: 0;
}

.cds-top-bar__inner p {
	margin: 0;
}

.cds-top-bar__content {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.35rem 1rem;
	width: 100%;
}

.cds-top-bar__admission {
	font-size: 0.75rem;
	line-height: 1.3;
	opacity: 0.95;
}

.cds-top-bar__email {
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
	font-size: 0.75rem;
}

.cds-top-bar__email:hover {
	color: #99f6e4;
}

.cds-top-bar a {
	color: #fff;
	text-decoration: none;
}

.cds-top-bar a:hover {
	color: #99f6e4;
}

@media (max-width: 781px) {
	.cds-top-bar {
		display: none !important;
	}
}

/* ── Header (two-row: brand + nav bar) ── */
.cds-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	box-shadow: 0 2px 8px rgba(30, 41, 59, 0.08);
}

@media (max-width: 781px) {
	.cds-header {
		position: relative;
	}
}

.cds-header__brand-row {
	border-bottom: 1px solid var(--cds-border);
}

.cds-header__inner {
	padding-block: 0.65rem;
	min-height: 4.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.cds-header__inner > .wp-block-shortcode {
	margin: 0;
	padding: 0;
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
}

.cds-header__inner > .wp-block-shortcode:last-of-type {
	flex: 0 0 auto;
}

.cds-top-bar__inner > .wp-block-shortcode {
	margin: 0;
	padding: 0;
	width: 100%;
}

.cds-header__menu-row {
	background: var(--cds-slate-dark);
}

.cds-header__nav-width {
	padding-block: 0;
}

.cds-header__menu-row .cds-nav,
.cds-header__menu-row > .cds-nav {
	margin: 0;
	width: 100%;
}

.cds-header__accent {
	height: 3px;
	background: linear-gradient(90deg, var(--cds-brand) 0%, var(--cds-brand-light) 50%, var(--cds-teal) 100%);
}

/* Header brand — single tight flex row (no WP block gap) */
.cds-header-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	min-width: 0;
	flex: 1;
	text-decoration: none;
	color: inherit;
}

.cds-header-brand__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 0;
	margin: 0;
	padding: 0.2rem 0.5rem 0.2rem 0.125rem;
}

.cds-header-brand__img {
	display: block;
	max-height: 48px;
	width: auto;
	max-width: 132px;
	height: auto;
	margin: 0;
}

.cds-header-brand__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	gap: 0.1rem;
	margin: 0;
	padding-left: 0.125rem;
}

.cds-header-brand__name {
	font-family: var(--cds-font-heading);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--cds-brand);
}

.cds-header-brand__tagline {
	font-size: 0.68rem;
	line-height: 1.3;
	color: var(--cds-muted);
	font-weight: 500;
	letter-spacing: 0.01em;
}

.cds-header-cta-link {
	display: inline-block;
	background: var(--cds-brand) !important;
	color: #fff !important;
	padding: 0.5rem 1rem;
	border-radius: var(--cds-radius);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.cds-header-cta-link:hover {
	background: var(--cds-brand-dark) !important;
	color: #fff !important;
}

.cds-header-cta-wrap {
	flex-shrink: 0;
}

.cds-header-cta .wp-block-button__link {
	background: var(--cds-brand) !important;
	color: #fff !important;
	padding: 0.55rem 1.1rem !important;
	font-size: 0.8125rem !important;
	border-radius: var(--cds-radius) !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600 !important;
	white-space: nowrap;
}

.cds-header-cta .wp-block-button__link:hover {
	background: var(--cds-brand-dark) !important;
}

/* Primary navigation bar */
.cds-header__menu-row .cds-nav__list,
.cds-header__menu-row .cds-nav .wp-block-navigation__container {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cds-header__menu-row .cds-nav__list > .menu-item,
.cds-header__menu-row .cds-nav .wp-block-navigation__container > .menu-item {
	margin: 0;
	padding: 0;
}

.cds-header__menu-row .cds-nav__list a,
.cds-header__menu-row .cds-nav a {
	display: flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0 0.9rem;
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.cds-header__menu-row .cds-nav__list a:hover,
.cds-header__menu-row .cds-nav a:hover,
.cds-header__menu-row .cds-nav__list .current-menu-item > a,
.cds-header__menu-row .cds-nav .current-menu-item > a {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.cds-header__menu-row .cds-nav__list > .menu-item > a,
.cds-header__menu-row .cds-nav .wp-block-navigation__container > .menu-item > a {
	border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.cds-header__menu-row .cds-nav__list > .menu-item:first-child > a,
.cds-header__menu-row .cds-nav .wp-block-navigation__container > .menu-item:first-child > a {
	border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.cds-nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: 0;
	padding: 0.5rem;
	cursor: pointer;
	flex-shrink: 0;
}

.cds-nav-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--cds-brand);
}

/* Desktop dropdown */
@media (min-width: 782px) {
	.cds-header__menu-row .cds-nav__list > .menu-item,
	.cds-header__menu-row .cds-nav .wp-block-navigation__container > .menu-item {
		position: relative;
	}

	.cds-header__menu-row .menu-item-has-children > a {
		padding-right: 1.6rem !important;
	}

	.cds-header__menu-row .menu-item-has-children > a::after {
		content: "";
		position: absolute;
		right: 0.55rem;
		top: 50%;
		width: 0.4rem;
		height: 0.4rem;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: translateY(-70%) rotate(45deg);
		opacity: 0.85;
		pointer-events: none;
	}

	.cds-header__menu-row .cds-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 15rem;
		display: flex;
		flex-direction: column;
		padding: 0.35rem 0;
		margin: 0;
		list-style: none;
		background: #fff;
		border: 1px solid var(--cds-border);
		border-top: 3px solid var(--cds-brand);
		border-radius: 0 0 var(--cds-radius) var(--cds-radius);
		box-shadow: 0 12px 28px rgba(30, 41, 59, 0.18);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(4px);
		transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
		z-index: 120;
	}

	.cds-header__menu-row .cds-nav .sub-menu a {
		display: block;
		min-height: 0;
		padding: 0.55rem 1rem;
		color: var(--cds-slate);
		font-size: 0.8125rem;
		text-transform: none;
		letter-spacing: 0;
		white-space: normal;
		border: 0 !important;
	}

	.cds-header__menu-row .cds-nav .sub-menu a:hover {
		background: var(--cds-surface);
		color: var(--cds-brand);
	}

	.cds-header__menu-row .menu-item-has-children:hover > .sub-menu,
	.cds-header__menu-row .menu-item-has-children:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
		transition-delay: 0s;
	}

	.cds-header__menu-row .menu-item-has-children::after {
		content: "";
		position: absolute;
		left: 0;
		top: 100%;
		width: 100%;
		height: 10px;
	}

	.cds-menu-item__row {
		display: contents;
	}

	.cds-submenu-toggle {
		display: none;
	}
}

.cds-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 781px) {
	.cds-site-tagline {
		display: none;
	}

	.cds-nav-toggle {
		display: flex;
		min-width: 44px;
		min-height: 44px;
		align-items: center;
		justify-content: center;
	}

	.cds-header-cta-wrap {
		display: none;
	}

	.cds-header__nav-width {
		max-width: none;
		padding-inline: 0;
	}

	.cds-header__menu-row {
		display: none;
		background: #fff;
		border-top: 3px solid var(--cds-brand);
		box-shadow: 0 12px 32px rgba(30, 41, 59, 0.12);
		max-height: calc(100vh - 5rem);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.cds-header.is-nav-open .cds-header__menu-row {
		display: block;
	}

	.cds-header__menu-row .cds-nav__list,
	.cds-header__menu-row .cds-nav .wp-block-navigation__container {
		flex-direction: column;
		max-width: none;
		padding: 0;
	}

	.cds-header__menu-row .cds-nav__list a,
	.cds-header__menu-row .cds-nav a {
		color: var(--cds-slate);
		min-height: 0;
		padding: 0.85rem var(--cds-gutter);
		border-right: 0 !important;
		border-left: 0 !important;
		border-bottom: 1px solid var(--cds-border);
	}

	.cds-header__menu-row .cds-nav .sub-menu {
		display: none;
		background: var(--cds-surface);
	}

	.cds-header__menu-row .menu-item-has-children.is-submenu-open > .sub-menu {
		display: block;
	}

	.cds-header__menu-row .menu-item-has-children.is-submenu-open > .cds-menu-item__row .cds-submenu-toggle::before {
		transform: rotate(-135deg);
	}

	.cds-menu-item__row {
		display: flex;
		align-items: stretch;
		border-bottom: 1px solid var(--cds-border);
	}

	.cds-menu-item__row > a {
		flex: 1;
		border-bottom: 0 !important;
	}

	.cds-submenu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		flex-shrink: 0;
		background: none;
		border: 0;
		border-left: 1px solid var(--cds-border);
		cursor: pointer;
		color: var(--cds-brand);
	}

	.cds-submenu-toggle::before {
		content: "";
		width: 0.45rem;
		height: 0.45rem;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform 0.15s ease;
	}

	.cds-header__menu-row .cds-nav .sub-menu a {
		padding: 0.65rem var(--cds-gutter) 0.65rem 1.75rem;
		font-size: 0.8125rem;
	}
}

/* ── Hero (split engineering banner) ── */
.cds-hero {
	background: var(--cds-surface);
	border-bottom: 1px solid var(--cds-border);
	padding: 0;
}

.cds-hero__inner {
	max-width: 100%;
	margin: 0;
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	min-height: 0;
}

.cds-hero__content {
	padding: 1.75rem var(--cds-gutter);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.cds-hero__panel {
	position: relative;
	background-color: var(--cds-brand);
	background-image:
		linear-gradient(135deg, rgba(92, 0, 18, 0.92) 0%, rgba(122, 0, 25, 0.88) 100%),
		repeating-linear-gradient(
			0deg,
			transparent,
			transparent 24px,
			rgba(255, 255, 255, 0.04) 24px,
			rgba(255, 255, 255, 0.04) 25px
		),
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 24px,
			rgba(255, 255, 255, 0.04) 24px,
			rgba(255, 255, 255, 0.04) 25px
		);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: 1.75rem var(--cds-gutter);
	color: #fff;
}

.cds-hero__panel-title {
	font-family: var(--cds-font-heading);
	font-size: 1.35rem;
	margin: 0 0 1rem;
	color: #fff;
}

.cds-hero__panel-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cds-hero__panel-list li {
	padding: 0.35rem 0 0.35rem 1.25rem;
	position: relative;
	font-size: 0.9375rem;
	opacity: 0.95;
}

.cds-hero__panel-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.75rem;
	width: 6px;
	height: 6px;
	background: var(--cds-teal);
	border-radius: 1px;
}

.cds-hero__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--cds-teal);
	margin: 0 0 0.75rem;
}

.cds-hero__title {
	font-size: clamp(1.85rem, 4vw, 2.75rem);
	color: var(--cds-brand);
	margin: 0 0 0.5rem;
}

.cds-hero__tagline {
	font-family: var(--cds-font-body);
	font-size: 1rem;
	color: var(--cds-slate);
	margin: 0 0 1rem;
	font-weight: 600;
	font-style: normal;
}

.cds-hero__lead {
	max-width: 36rem;
	font-size: 0.9375rem;
	line-height: 1.6;
	margin: 0 0 1rem;
	color: var(--cds-muted);
}

.cds-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.85rem;
}

.cds-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cds-badge {
	background: #fff;
	border: 1px solid var(--cds-border);
	color: var(--cds-slate);
	padding: 0.35rem 0.75rem;
	border-radius: var(--cds-radius);
	font-size: 0.75rem;
	font-weight: 600;
}

@media (max-width: 900px) {
	.cds-hero__inner {
		grid-template-columns: 1fr;
	}

	.cds-hero__panel {
		order: -1;
		padding: 1.25rem var(--cds-gutter);
	}

	.cds-hero__content {
		padding: 1.25rem var(--cds-gutter) 1rem;
	}
}

/* ── Buttons ── */
.cds-btn-primary,
.cds-btn-primary.wp-element-button {
	display: inline-block;
	background: var(--cds-brand);
	color: #fff !important;
	padding: 0.7rem 1.35rem;
	border-radius: var(--cds-radius);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
	border: 0;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.cds-btn-primary:hover {
	background: var(--cds-brand-dark);
}

.cds-btn-outline {
	display: inline-block;
	border: 2px solid var(--cds-brand);
	color: var(--cds-brand) !important;
	padding: 0.6rem 1.2rem;
	border-radius: var(--cds-radius);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
	background: transparent;
}

.cds-btn-outline:hover {
	background: var(--cds-surface);
}

/* ── Affiliations strip (maroon band) ── */
.cds-affiliations {
	background: var(--cds-brand);
	color: #fff;
	padding: 0.85rem var(--cds-gutter);
}

.cds-affiliations__inner {
	max-width: var(--cds-max);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 0.75rem 1rem;
	text-align: center;
}

.cds-affiliations__item strong {
	display: block;
	font-size: 1.35rem;
	color: #fff;
	font-family: var(--cds-font-heading);
}

.cds-affiliations__item span {
	font-size: 0.75rem;
	opacity: 0.85;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ── Sections ── */
.cds-section {
	padding: var(--cds-section-y) var(--cds-gutter);
}

/* Page shell supplies horizontal inset — inner blocks keep vertical spacing only */
.cds-page .cds-section:not(.has-background),
.cds-page .cds-block:not(.cds-hero):not(.cds-affiliations),
.cds-page .cds-prose,
.cds-page .cds-academics-intro {
	padding-inline: 0;
	margin-inline: 0;
}

.cds-page .cds-section:not(.has-background) {
	padding-block: var(--cds-section-y);
}

/* News marquee — homepage ticker */
.cds-news-marquee {
	background: var(--cds-slate-dark);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cds-news-marquee__bar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.45rem var(--cds-gutter);
	min-height: 2.25rem;
}

.cds-news-marquee__label {
	flex-shrink: 0;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: var(--cds-brand);
	color: #fff;
	padding: 0.2rem 0.55rem;
	border-radius: 3px;
}

.cds-news-marquee__viewport {
	flex: 1;
	overflow: hidden;
	min-width: 0;
	mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.cds-news-marquee__track {
	display: flex;
	align-items: center;
	gap: 2rem;
	margin: 0;
	padding: 0;
	list-style: none;
	width: max-content;
	animation: cds-news-marquee-scroll 40s linear infinite;
}

.cds-news-marquee__item {
	flex-shrink: 0;
}

.cds-news-marquee__item a {
	display: inline-flex;
	align-items: baseline;
	gap: 0.5rem;
	color: #e2e8f0;
	text-decoration: none;
	font-size: 0.8125rem;
	white-space: nowrap;
}

.cds-news-marquee__item a:hover {
	color: #99f6e4;
}

.cds-news-marquee__title {
	font-weight: 500;
}

.cds-news-marquee__date {
	font-size: 0.72rem;
	opacity: 0.75;
}

.cds-news-marquee__more {
	flex-shrink: 0;
	font-size: 0.72rem;
	font-weight: 600;
	color: #99f6e4;
	text-decoration: none;
	white-space: nowrap;
}

.cds-news-marquee__more:hover {
	color: #fff;
}

@keyframes cds-news-marquee-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cds-news-marquee__track {
		animation: none;
		flex-wrap: wrap;
		width: 100%;
	}
}

.cds-page .cds-news-marquee {
	margin-inline: calc(-1 * var(--cds-gutter));
}

.cds-page .cds-news-marquee__bar {
	padding-inline: var(--cds-gutter);
}

/* Coloured bands bleed to the card edge; text stays aligned with page gutter */
.cds-page .cds-affiliations,
.cds-page .cds-section.has-background,
.cds-page .cds-academics-hero,
.cds-page .cds-dept-profile__hero {
	margin-inline: calc(-1 * var(--cds-gutter));
	padding-inline: var(--cds-gutter);
	width: auto;
	max-width: none;
	box-sizing: border-box;
}

/* Hero — full-bleed split banner; columns keep their own inset */
.cds-page .cds-hero {
	margin-inline: calc(-1 * var(--cds-gutter));
	padding-inline: 0;
	width: auto;
	max-width: none;
	box-sizing: border-box;
}

.cds-page .cds-hero__content,
.cds-page .cds-hero__panel {
	padding: 1.75rem var(--cds-gutter);
	margin-inline: 0;
}

.cds-page .cds-affiliations {
	padding-block: 0.85rem;
}

.cds-section__inner {
	max-width: 100%;
	margin: 0 auto;
}

.cds-section__head {
	margin-bottom: 1rem;
	max-width: 40rem;
}

.cds-section__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--cds-teal);
	margin: 0 0 0.5rem;
}

.cds-section__head h2 {
	margin: 0 0 0.35rem;
	font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.cds-section__head h2::after {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: var(--cds-brand);
	margin-top: 0.5rem;
}

.cds-section__cta {
	margin-top: 1rem;
}

.cds-section__cta--row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
}

.has-surface-background-color {
	background: var(--cds-surface) !important;
}

.cds-page--home .cds-section.has-background {
	margin: 0;
}

/* Neutralize WP full-bleed if any alignfull remains */
.alignfull {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Tighter WP block flow on inner pages */
.cds-page > .wp-block-post-content > * + *,
.cds-page > .entry-content > * + * {
	margin-block-start: 0;
}

.cds-prose {
	max-width: 760px;
}

.cds-prose p {
	margin: 0 0 1rem;
	color: var(--cds-text);
}

/* ── Why CDS grid ── */
.cds-why__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0.75rem;
}

.cds-why__card {
	background: #fff;
	border: 1px solid var(--cds-border);
	border-top: 3px solid var(--cds-brand);
	padding: 1rem;
	border-radius: 0 0 var(--cds-radius) var(--cds-radius);
	box-shadow: var(--cds-shadow-sm);
}

.cds-why__card h3 {
	font-size: 1rem;
	margin: 0 0 0.5rem;
	font-family: var(--cds-font-heading);
	font-weight: 700;
	color: var(--cds-brand);
}

.cds-why__card p {
	margin: 0;
	color: var(--cds-muted);
	font-size: 0.9375rem;
}

/* Legacy dept card aliases — programme cards styled in cds-core front.css */

/* ── Facilities ── */
.cds-facilities__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.cds-facilities__list li {
	background: #fff;
	border: 1px solid var(--cds-border);
	padding: 0.6rem 0.75rem;
	border-radius: var(--cds-radius);
	font-weight: 500;
	font-size: 0.875rem;
	box-shadow: var(--cds-shadow-sm);
}

.cds-facilities__list li::before {
	content: "▸ ";
	color: var(--cds-teal);
	font-weight: 700;
}

/* ── Leadership ── */
.cds-leadership__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0.75rem;
}

.cds-leader-card {
	text-align: center;
	background: #fff;
	border: 1px solid var(--cds-border);
	padding: 1rem 0.75rem;
	border-radius: var(--cds-radius);
	box-shadow: var(--cds-shadow-sm);
}

.cds-leader-card__photo {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 0.5rem;
	display: block;
	border: 2px solid var(--cds-border);
}

.cds-leader-card__avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--cds-surface);
	border: 2px solid var(--cds-border);
	margin: 0 auto 0.5rem;
}

.cds-leader-card h3 {
	font-size: 1rem;
	margin: 0 0 0.35rem;
	font-family: var(--cds-font-heading);
}

.cds-leader-card p {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--cds-teal);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* ── Stats ── */
.cds-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.75rem;
	margin: 1.5rem 0;
}

.cds-stat {
	background: #fff;
	border: 1px solid var(--cds-border);
	border-bottom: 3px solid var(--cds-teal);
	padding: 1rem;
	border-radius: var(--cds-radius);
	text-align: center;
}

.cds-stat strong {
	display: block;
	font-size: 1rem;
	color: var(--cds-brand);
	font-family: var(--cds-font-heading);
}

.cds-stat span {
	font-size: 0.8125rem;
	color: var(--cds-muted);
}

/* ── Notices ── */
.cds-notices-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cds-notices-list li,
.cds-notice-item {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--cds-border);
}

.cds-notices-list time,
.cds-notice-item time {
	display: block;
	font-size: 0.8125rem;
	color: var(--cds-muted);
	margin-bottom: 0.25rem;
}

.cds-notice-item__cat {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: var(--cds-surface);
	color: var(--cds-brand);
	padding: 0.15rem 0.5rem;
	border-radius: var(--cds-radius);
	margin-bottom: 0.35rem;
}

.cds-notice-item__title {
	font-size: 1.1rem;
	margin: 0.25rem 0;
	font-family: var(--cds-font-heading);
}

.cds-notices-list a,
.cds-notice-item__title a {
	font-weight: 600;
	color: var(--cds-brand);
	text-decoration: none;
}

.cds-notices-list a:hover,
.cds-notice-item__title a:hover {
	color: var(--cds-teal);
}

/* ── Page shell — white card centred in 960px column ── */
.cds-page {
	padding-block: 1.25rem 2rem;
	padding-inline: var(--cds-gutter) !important;
	margin-block: clamp(0.65rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
	background: #fff;
	border: 1px solid var(--cds-border);
	border-radius: var(--cds-radius);
	box-shadow: var(--cds-shadow-sm);
}

.cds-page .wp-block-post-title,
.cds-page .wp-block-post-content,
.cds-page .entry-content {
	padding-inline: 0;
	max-width: 100%;
}

.cds-page--home {
	padding-block: 0;
	box-shadow: var(--cds-shadow-md);
	overflow: hidden;
}

.cds-page--home .wp-block-post-content {
	max-width: 100%;
	margin: 0;
}

.cds-page--home .wp-block-post-content > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

.cds-page--home .cds-block + .cds-block,
.cds-page--home .cds-hero + .cds-block,
.cds-page--home .cds-section + .cds-block {
	border-top: 1px solid var(--cds-border);
}

.cds-page h1 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 3px solid var(--cds-brand);
}

.cds-page .entry-content > *:first-child,
.cds-page .wp-block-post-content > *:first-child {
	margin-top: 0;
}

.cds-page .entry-content h2,
.cds-page .wp-block-post-content h2 {
	font-size: 1.35rem;
	margin: 1.5rem 0 0.65rem;
}

.cds-page .entry-content h3,
.cds-page .wp-block-post-content h3 {
	font-size: 1.1rem;
	margin: 1.15rem 0 0.5rem;
}

.cds-page .entry-content p,
.cds-page .wp-block-post-content p {
	margin: 0 0 0.75rem;
}

.cds-page .entry-content ul,
.cds-page .entry-content ol,
.cds-page .wp-block-post-content ul,
.cds-page .wp-block-post-content ol {
	margin: 0 0 0.85rem;
	padding-left: 1.25rem;
}

.cds-page .entry-content li,
.cds-page .wp-block-post-content li {
	margin-bottom: 0.25rem;
}

/* ── Footer ── */
.cds-footer {
	padding-block: 1.75rem 1.25rem;
	padding-inline: 0;
	margin-top: 0;
}

.cds-footer__grid {
	margin: 0 0 1.5rem;
}

.cds-footer a {
	color: #e2e8f0;
	text-decoration: none;
}

.cds-footer a:hover {
	color: #99f6e4;
}

.cds-footer .has-accent-color {
	color: var(--cds-teal) !important;
}

.cds-footer__rule {
	margin: 1.5rem 0;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

.cds-footer-nav.wp-block-navigation,
nav.cds-footer-nav {
	justify-content: center;
	width: 100%;
}

.cds-footer-nav .wp-block-navigation__container,
.cds-footer-nav .cds-footer-nav__list,
.cds-footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	justify-content: center;
	list-style: none;
	padding: 0;
	margin: 0;
	width: 100%;
}

.cds-footer__legal {
	margin: 0 0 0.75rem;
}

.cds-footer__legal-summary {
	display: none;
}

.cds-footer__legal-panel {
	margin: 0;
}

.cds-footer__copyright {
	margin: 0.5rem 0 0;
	opacity: 0.85;
}

.cds-footer-contact {
	font-size: 0.875rem;
	line-height: 1.7;
}

.cds-footer__linklist {
	list-style: none;
	padding: 0;
	margin: 0;
	line-height: 1.75;
}

.cds-footer__linklist li {
	margin: 0;
}

.cds-footer__brand .wp-block-heading {
	margin-bottom: 0.5rem;
}

.cds-footer__links .wp-block-heading,
.cds-footer__contact .wp-block-heading {
	margin-bottom: 0.5rem;
}

/* ── Floating WhatsApp ── */
.cds-floating-whatsapp {
	position: fixed;
	bottom: 1.25rem;
	right: 1.25rem;
	z-index: 200;
	background: #25d366;
	color: #fff !important;
	padding: 0.75rem 1rem;
	border-radius: var(--cds-radius);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.875rem;
	box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.cds-floating-whatsapp:hover {
	background: #1fb855;
}

.cds-section .cds-btn-outline {
	border-color: var(--cds-brand);
	color: var(--cds-brand) !important;
}

.cds-section .cds-btn-outline:hover {
	background: var(--cds-surface);
}

/* ── Global responsive foundations ── */
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	overflow-x: clip;
}

body.is-mobile-nav-open {
	overflow: hidden;
}

img,
video,
iframe,
svg {
	max-width: 100%;
	height: auto;
}

.cds-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 300;
	padding: 0.75rem 1rem;
	background: var(--cds-brand);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.cds-skip-link:focus {
	left: 0;
}

/* Scrollable tables on small screens */
.cds-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1rem 0;
	border: 1px solid var(--cds-border);
	border-radius: var(--cds-radius);
}

.cds-table-wrap .cds-table {
	margin: 0;
	min-width: 520px;
}

.cds-table-wrap .cds-table th,
.cds-table-wrap .cds-table td {
	white-space: nowrap;
}

.cds-table-wrap .cds-table td:first-child {
	white-space: normal;
	min-width: 180px;
}

/* Contact page */
.cds-page--contact .cds-contact-page {
	margin-top: 0.25rem;
}

/* Footer — compact mobile layout */
@media (max-width: 781px) {
	.cds-footer {
		padding-block: 0.85rem 0.65rem;
	}

	.cds-footer__grid {
		margin-bottom: 0.65rem;
	}

	.cds-footer__grid.wp-block-columns {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 0.75rem 1rem;
	}

	.cds-footer__grid > .wp-block-column {
		flex-basis: auto !important;
		min-width: 0;
		margin: 0 !important;
	}

	.cds-footer__brand,
	.cds-footer__grid > .wp-block-column:first-child {
		grid-column: 1 / -1;
	}

	.cds-footer__brand .wp-block-heading,
	.cds-footer__grid > .wp-block-column:first-child .wp-block-heading {
		font-size: 0.95rem;
		margin-bottom: 0.2rem;
	}

	.cds-footer__tagline,
	.cds-footer__brand > .wp-block-paragraph:first-of-type,
	.cds-footer__grid > .wp-block-column:first-child > .wp-block-paragraph:first-of-type {
		font-size: 0.72rem !important;
		line-height: 1.35;
		margin-bottom: 0 !important;
	}

	.cds-footer__meta,
	.cds-footer__grid > .wp-block-column:first-child > .wp-block-paragraph + .wp-block-paragraph {
		display: none !important;
	}

	.cds-footer__links .wp-block-heading,
	.cds-footer__contact .wp-block-heading,
	.cds-footer__grid > .wp-block-column:nth-child(2) .wp-block-heading,
	.cds-footer__grid > .wp-block-column:nth-child(3) .wp-block-heading {
		font-size: 0.72rem;
		margin-bottom: 0.3rem;
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}

	.cds-footer__linklist,
	.cds-footer__links .wp-block-list {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0.2rem;
		font-size: 0.78rem;
		line-height: 1.3;
	}

	.cds-footer__grid > .wp-block-column:nth-child(2) .wp-block-paragraph {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0.2rem;
		font-size: 0.78rem;
		line-height: 1.3;
		margin: 0;
	}

	.cds-footer__grid > .wp-block-column:nth-child(2) .wp-block-paragraph br {
		display: none;
	}

	.cds-footer-contact,
	.cds-footer__contact .cds-footer-contact {
		font-size: 0.74rem;
		line-height: 1.35;
		margin: 0;
	}

	.cds-footer-contact .cds-contact-links--compact {
		display: flex;
		flex-direction: column;
		gap: 0.15rem;
	}

	.cds-footer-contact .cds-contact-links--compact br {
		display: none;
	}

	.cds-footer__rule {
		display: none;
	}

	.cds-footer__compliance,
	.cds-footer__compliance-heading {
		display: none !important;
	}

	.cds-footer__legal {
		border: 1px solid rgba(255, 255, 255, 0.18);
		border-radius: var(--cds-radius);
		margin: 0.5rem 0 0.4rem;
		background: rgba(0, 0, 0, 0.15);
	}

	.cds-footer__legal-summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0.5rem 0.65rem;
		font-size: 0.75rem;
		font-weight: 600;
		color: var(--cds-teal);
		cursor: pointer;
		list-style: none;
	}

	.cds-footer__legal-summary::-webkit-details-marker {
		display: none;
	}

	.cds-footer__legal-summary::after {
		content: "+";
		font-size: 1rem;
		line-height: 1;
		opacity: 0.85;
	}

	.cds-footer__legal[open] .cds-footer__legal-summary::after {
		content: "−";
	}

	.cds-footer__legal-panel {
		padding: 0 0.65rem 0.55rem;
	}

	.cds-footer-nav .wp-block-navigation__container,
	.cds-footer-nav .cds-footer-nav__list,
	.cds-footer-nav ul {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.3rem 0.5rem;
		justify-content: stretch;
		justify-items: start;
		font-size: 0.7rem;
		line-height: 1.3;
	}

	.cds-footer .cds-information-disclaimer--compact {
		display: none;
	}

	.cds-footer__copyright,
	.cds-footer .cds-footer__copyright {
		text-align: center !important;
		font-size: 0.68rem !important;
		margin: 0.35rem 0 0 !important;
		opacity: 0.75;
	}
}

@media (min-width: 782px) {
	.cds-footer__legal-summary {
		display: none;
	}

	.cds-footer-nav .wp-block-navigation__container,
	.cds-footer-nav .cds-footer-nav__list,
	.cds-footer-nav ul {
		margin: 0 auto 0.75rem;
	}

	.cds-footer .cds-information-disclaimer--compact {
		text-align: center;
	}
}

/* ── Mobile (≤781px) ── */
@media (max-width: 781px) {
	:root {
		--cds-section-y: 1.15rem;
		--cds-header-height: auto;
	}

	.cds-page,
	.cds-page--home {
		margin-block: 0 1rem;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}

	.cds-page {
		padding-inline: var(--cds-gutter) !important;
	}

	.cds-header__inner {
		flex-wrap: nowrap;
		padding-block: 0.5rem;
		min-height: 3.75rem;
	}

	.cds-header-brand {
		flex: 1;
		min-width: 0;
		gap: 0.5rem;
	}

	.cds-header-brand__logo {
		padding: 0.15rem 0.375rem 0.15rem 0.1rem;
	}

	.cds-header-brand__text {
		margin: 0;
		padding-left: 0;
	}

	.cds-header-brand__img {
		max-height: 40px;
		max-width: 108px;
	}

	.cds-header-brand__name {
		font-size: 0.82rem;
		line-height: 1.15;
	}

	.cds-header-brand__tagline {
		font-size: 0.6rem;
		line-height: 1.25;
	}

	.cds-header-cta-link {
		display: none;
	}

	.cds-nav-toggle {
		min-width: 44px;
		min-height: 44px;
		align-items: center;
		justify-content: center;
	}

	.cds-hero__title {
		font-size: 1.5rem;
	}

	.cds-hero__lead {
		font-size: 0.875rem;
	}

	.cds-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.cds-hero__actions .cds-btn-primary,
	.cds-hero__actions .cds-btn-outline {
		text-align: center;
		min-height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.cds-hero__badges {
		gap: 0.35rem;
	}

	.cds-badge {
		font-size: 0.7rem;
		padding: 0.3rem 0.55rem;
	}

	.cds-affiliations__inner {
		grid-template-columns: repeat(3, 1fr);
		gap: 0.35rem 0.5rem;
	}

	.cds-affiliations__item strong {
		font-size: 1rem;
	}

	.cds-affiliations__item span {
		font-size: 0.65rem;
	}

	.cds-section__head h2 {
		font-size: 1.25rem;
	}

	.cds-programmes__grid,
	.cds-why__grid,
	.cds-leadership__grid {
		grid-template-columns: 1fr;
	}

	.cds-leadership__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Portrait headshots lose faces in small circles — use square crop on mobile */
	.cds-leader-card__photo,
	.cds-leader-card__avatar {
		width: 92px;
		height: 92px;
		border-radius: 8px;
		object-fit: cover;
		object-position: center 22%;
		margin-top: 0.35rem;
	}

	.cds-facilities__list {
		grid-template-columns: 1fr 1fr;
	}

	.cds-stats {
		grid-template-columns: 1fr 1fr;
	}

	.cds-page {
		padding-block: 1rem 1.75rem;
	}

	.cds-page--home {
		padding-block: 0;
		margin-inline: auto;
	}

	.cds-page .cds-hero__content,
	.cds-page .cds-hero__panel {
		padding: 1.25rem var(--cds-gutter);
	}

	.cds-floating-whatsapp {
		bottom: max(0.75rem, env(safe-area-inset-bottom));
		right: max(0.75rem, env(safe-area-inset-right));
		font-size: 0.75rem;
		padding: 0.55rem 0.75rem;
	}

	body {
		padding-bottom: env(safe-area-inset-bottom);
	}
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
	.cds-affiliations__inner {
		grid-template-columns: repeat(2, 1fr);
	}

	.cds-leadership__grid,
	.cds-facilities__list,
	.cds-stats {
		grid-template-columns: 1fr;
	}

	.cds-hero__badges {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.cds-badge {
		text-align: center;
	}
}

/* ── Desktop enhancements (≥782px) ── */
@media (min-width: 782px) {
	.cds-nav__list a,
	.cds-nav a {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	.cds-header-cta .wp-block-button__link {
		min-height: 40px;
		display: inline-flex;
		align-items: center;
	}
}

