/*
 * Page sections: the "Department style" page template.
 *
 * Matches the course department pages (Elementor template 12537, e.g.
 * /departments/animal-care-land-based-studies/). Loaded only on pages using
 * template-department-style.php. Hand-written, no build step; kept apart from
 * the Prepros-compiled css/style.css.
 */

.cc-sections-page {
	/*
	 * The "Coral" and "Purple" colour choices both render the brand's dark
	 * grey (Chris, 4 Nov 2026): the light coral #fa7268 and purple #a45a95
	 * failed contrast on white and grey. On navy they show white instead.
	 */
	--cc-coral: #262f34;
	--cc-purple: #262f34;
	--cc-teal: #3bbfad;
	--cc-navy: #222633;
	--cc-grey: #f1f0f0;
	--cc-card-grey: #f0f0f0;
	--cc-ink: #000;
	--cc-serif: "DM Serif Display", Georgia, serif;
	/*
	 * The theme's DIN, loaded on every page from fonts.net. (The department
	 * pages' Elementor widgets ask for "DIN Next", which isn't loaded, so
	 * their copy falls back to Helvetica/Arial.)
	 */
	--cc-sans: "DIN Next W01", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	/* Elementor's boxed container on the department pages: 1300px, 10px padding. */
	--cc-width: 1280px;
	--cc-gutter: 10px;
	--cc-space: 50px;
}

/* ---------- Base ---------- */

.cc-sections {
	font-family: var(--cc-sans);
	color: var(--cc-ink);
}

.cc-section {
	padding: var(--cc-space) 0;
}

.cc-section__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(var(--cc-width) + 2 * var(--cc-gutter));
	margin: 0 auto;
	padding: 0 var(--cc-gutter);
}

.cc-section-anchor {
	display: block;
	position: relative;
	top: -120px;
	height: 0;
	visibility: hidden;
}

.cc-sections .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* Backgrounds */
.cc-bg--white { background: #fff; }
.cc-bg--grey { background: var(--cc-grey); }
.cc-bg--navy { background: var(--cc-navy); color: #fff; }

/*
 * Adjacent sections on the same light background read as one band, as the
 * department pages' stacked cards do. (An anchor marker may sit between them.)
 */
.cc-bg--grey + .cc-bg--grey,
.cc-bg--white + .cc-bg--white,
.cc-bg--grey + .cc-section-anchor + .cc-bg--grey,
.cc-bg--white + .cc-section-anchor + .cc-bg--white {
	padding-top: 0;
}

/* Colours */
.cc-text--coral { color: var(--cc-coral); }
.cc-text--purple { color: var(--cc-purple); }
/*
 * On navy, Coral is the real brand coral (5.5:1, passes for large headings;
 * Georgia asked for it, 6 Nov 2026). Purple and Navy show white there.
 */
.cc-bg--navy .cc-text--coral { color: #fa7268; }
.cc-bg--navy .cc-text--purple,
.cc-bg--navy .cc-text--navy { color: #fff; }
.cc-bg--navy.cc-accent--coral,
.cc-bg--navy.cc-accent--purple,
.cc-bg--navy .cc-accent--coral,
.cc-bg--navy .cc-accent--purple { --cc-accent: #fff; }
.cc-text--teal { color: var(--cc-teal); }
.cc-text--navy { color: var(--cc-navy); }
.cc-fill--coral { background: var(--cc-coral); }
.cc-fill--purple { background: var(--cc-purple); }
.cc-fill--teal { background: var(--cc-teal); }
.cc-fill--navy { background: var(--cc-navy); }
.cc-accent--coral { --cc-accent: var(--cc-coral); }
.cc-accent--purple { --cc-accent: var(--cc-purple); }
.cc-accent--teal { --cc-accent: var(--cc-teal); }
.cc-accent--navy { --cc-accent: var(--cc-navy); }

/* Headings: the size comes from the class, never the tag. */
.cc-sections .cc-heading {
	margin: 0 0 24px;
	font-family: var(--cc-serif);
	font-size: 50px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
}

/* Text */
.cc-prose {
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;
}
.cc-prose > :first-child { margin-top: 0; }
.cc-prose > :last-child { margin-bottom: 0; }
.cc-prose p,
.cc-prose ul,
.cc-prose ol {
	margin: 0 0 16px;
	font-size: inherit;
	line-height: inherit;
}
.cc-prose ul,
.cc-prose ol {
	padding-left: 22px;
}
.cc-prose li {
	margin-bottom: 4px;
}
.cc-prose a {
	color: var(--cc-accent, var(--cc-coral));
	text-decoration: underline;
}
.cc-prose strong,
.cc-prose b {
	font-weight: 700;
	color: var(--cc-accent, inherit);
}
.cc-bg--navy .cc-prose,
.cc-bg--navy .cc-prose a {
	color: #fff;
}
.cc-bg--navy .cc-prose { font-weight: 300; }

/* Buttons */
.cc-sections .cc-button {
	display: inline-block;
	font-family: var(--cc-sans);
	font-weight: 500;
	text-decoration: underline;
	line-height: 1;
	border: 0;
	transition: filter 0.2s ease;
}
.cc-sections .cc-button:hover,
.cc-sections .cc-button:focus-visible {
	filter: brightness(0.92);
}
.cc-sections .cc-button:focus-visible {
	outline: 3px solid var(--cc-navy);
	outline-offset: 3px;
}
.cc-button--pill {
	padding: 12px 50px;
	border-radius: 25px;
	font-size: 20px;
}
.cc-button--square {
	padding: 12px 24px;
	border-radius: 0;
	font-size: 15px;
}
.cc-sections .cc-button--teal { background: var(--cc-teal); color: #000; }
.cc-sections .cc-button--coral { background: var(--cc-coral); color: #fff; }
.cc-sections .cc-button--purple { background: var(--cc-purple); color: #fff; }
.cc-sections .cc-button--navy { background: var(--cc-navy); color: #fff; }

.cc-section__actions {
	margin-top: 40px;
	text-align: center;
}

/* ---------- Hero ---------- */

.cc-hero {
	display: flex;
	align-items: center;
	min-height: 450px;
	padding: 0;
	background-color: var(--cc-navy);
	background-position: center;
	background-size: cover;
}
.cc-hero--plain {
	min-height: 300px;
}
.cc-hero__box {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 10px 12px;
	background: #fff;
}
.cc-hero__box--logo {
	padding: 20px 24px;
}
.cc-hero__box picture {
	display: block;
}
.cc-hero__box img {
	display: block;
	width: auto;
	max-width: 280px;
	height: auto;
	max-height: 110px;
}
.cc-sections .cc-hero__title {
	margin: 0;
	font-size: 65px;
}

/* ---------- Intro band ---------- */

.cc-intro {
	padding: 30px 0;
}
.cc-breadcrumbs {
	margin-bottom: 20px;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.5;
}
.cc-breadcrumbs p { margin: 0; }
.cc-breadcrumbs a {
	color: inherit;
	text-decoration: underline;
}
.cc-breadcrumbs a:hover { text-decoration: none; }
.cc-intro__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
}
.cc-sections .cc-intro__heading {
	margin-bottom: 30px;
	font-size: 42px;
	font-weight: 600;
}
.cc-intro__text {
	font-weight: 300;
}
.cc-bg--navy .cc-intro__text strong {
	color: var(--cc-teal);
}

/* ---------- Course list ---------- */

.cc-sections .cc-courses__heading {
	margin-bottom: 40px;
}

/* Cards come from lib/department-courses.php, which carries its own styles. */
.cc-bg--grey .course-wrapper { background: #fff; }

/*
 * Apply Now in coral with dark grey text (5:1) instead of white on teal
 * (2.3:1). Georgia asked for it, 6 Nov 2026. Department pages keep teal.
 */
.cc-sections .course-actions .apply-now,
.cc-sections .courses-wrapper .dropdown,
.cc-sections .courses-wrapper .dropdown-content {
	background-color: #fa7268;
}
.cc-sections .course-actions .apply-now,
.cc-sections .courses-wrapper .dropdown span,
.cc-sections .courses-wrapper .dropdown-content a {
	color: #262f34;
}
.cc-courses__empty {
	font-size: 18px;
}

/* ---------- Image and text card ---------- */

/* Cards run the full 1300px container, as on the department pages. */
.cc-image-text {
	padding-right: var(--cc-gutter);
	padding-left: var(--cc-gutter);
}
.cc-image-text .cc-section__inner {
	max-width: calc(var(--cc-width) + 2 * var(--cc-gutter));
	padding: 0;
}
.cc-card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 520px;
	background: #fff;
}
.cc-card--text-only { min-height: 0; }
.cc-bg--white .cc-card { background: var(--cc-grey); }
.cc-card--text-only { grid-template-columns: 1fr; }
.cc-card--image-right .cc-card__media { order: 2; }
.cc-card__media {
	position: relative;
	min-height: 320px;
}
/*
 * Imagify wraps images in <picture> on live and moves the class onto the
 * wrapper, so style the elements themselves, not the class.
 */
.cc-card__media picture,
.cc-card__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cc-card__body {
	padding: 50px;
	align-self: center;
}
.cc-sections .cc-card__heading {
	margin-bottom: 20px;
}
.cc-card__body .cc-button { margin-top: 24px; }

/* ---------- Text columns ---------- */

.cc-columns__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
.cc-columns__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cc-columns__item {
	padding: 32px 28px;
	background: #fff;
}
.cc-bg--white .cc-columns__item { background: var(--cc-grey); }
.cc-sections .cc-columns__item-heading {
	margin: 0 0 14px;
	font-family: var(--cc-serif);
	font-size: 30px;
	font-weight: 400;
	line-height: 1.1;
}

/* ---------- Highlights band ---------- */

.cc-highlights {
	padding: 30px 0;
}
.cc-highlights__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
}
.cc-sections .cc-highlights__heading {
	margin: 0;
	max-width: 400px;
	font-family: var(--cc-serif);
	font-size: 40px;
	font-weight: 400;
	line-height: 1.1;
}
.cc-highlights__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.cc-highlights__item + .cc-highlights__item { margin-top: 8px; }
.cc-highlights__title {
	display: block;
	font-family: var(--cc-serif);
	font-size: 26px;
	line-height: 1.3;
}
.cc-highlights__text {
	display: block;
	font-size: 13px;
	font-weight: 500;
}

/* ---------- Video ---------- */

.cc-video__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	max-width: 900px;
	margin: 0 auto;
	background: #000;
}
.cc-video__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Call back form ---------- */

.cc-callback {
	padding: 40px 0 60px;
}
.cc-callback__panel {
	position: relative;
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 45px;
	margin-left: 110px;
	padding: 34px 34px 46px 0;
	background: #fff;
}
.cc-bg--white .cc-callback__panel { background: var(--cc-grey); }
.cc-callback__box {
	position: relative;
	align-self: start;
	box-sizing: border-box;
	margin-left: -104px;
	padding: 28px 28px 70px;
	min-height: 244px;
	color: #fff;
}
.cc-callback__box-text {
	margin: 0;
	font-family: var(--cc-serif);
	font-size: 26px;
	line-height: 1.2;
}
.cc-callback__mark {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 37px;
	height: 37px;
	background:
		linear-gradient(135deg, transparent 50%, #fff 50%) 0 0 / 50% 50% no-repeat,
		linear-gradient(135deg, #fff 50%, transparent 50%) 100% 0 / 50% 50% no-repeat,
		linear-gradient(135deg, transparent 50%, #fff 50%) 0 100% / 50% 50% no-repeat,
		linear-gradient(135deg, #fff 50%, transparent 50%) 100% 100% / 50% 50% no-repeat;
}
.cc-sections .cc-callback__heading {
	margin-bottom: 16px;
	font-size: 34px;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
	.cc-sections-page {
		--cc-space: 48px;
	}
	.cc-sections .cc-heading { font-size: 42px; }
	.cc-sections .cc-hero__title { font-size: 52px; }
	.cc-columns__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cc-callback__panel {
		grid-template-columns: 1fr;
		gap: 24px;
		margin-left: 0;
		padding: 0 28px 40px;
	}
	.cc-callback__box {
		margin: 0 -28px;
		min-height: 0;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	.cc-sections-page {
		--cc-space: 40px;
		--cc-gutter: 20px;
	}
	.cc-sections .cc-heading { font-size: 30px; }
	.cc-sections .cc-intro__heading { margin-bottom: 20px; font-size: 26px; }
	.cc-sections .cc-hero__title { font-size: 36px; }
	.cc-hero { min-height: 220px; }
	.cc-hero--plain { min-height: 160px; }
	.cc-hero__box--logo { padding: 14px 16px; }
	.cc-hero__box img { max-width: 200px; max-height: 70px; }
	.cc-intro__grid,
	.cc-highlights__grid,
	.cc-columns__grid,
	.cc-columns__grid--3,
	.cc-card {
		grid-template-columns: 1fr;
	}
	.cc-intro__grid { gap: 24px; }
	.cc-card--image-right .cc-card__media { order: 0; }
	.cc-card__media { min-height: 240px; }
	.cc-card__body { padding: 28px 20px; }
	.cc-columns__item { padding: 24px 20px; }
	.cc-sections .cc-columns__item-heading { font-size: 26px; }
	.cc-sections .cc-highlights__heading { font-size: 32px; }
	.cc-button--pill { padding: 12px 36px; font-size: 18px; }
	.cc-sections .cc-callback__heading { font-size: 30px; }
}
