/*
 * Two-tier WBS header, 3 September 2026.
 * Uses only WBS tokens. October update: transparent over the existing hero;
 * opened mobile navigation and search retain solid backgrounds for readability.
 */
.wbs-site-header,
.home .wbs-site-header,
.home:has(.wbs-mockup-home) .wbs-site-header {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
}

/* Overlay the existing photographic hero; never leave pale links over a plain page. */
body:has(.wbs-mockup-hero) .wbs-site-header {
	position: absolute;
	width: 100%;
	left: 0;
}
body:not(:has(.wbs-mockup-hero)) .wbs-site-header {
	position: relative;
	top: 0;
}
body:not(:has(.wbs-mockup-hero)) .wbs-site-header :is(.wbs-primary-menu a, .wbs-search-toggle, .wbs-menu-toggle) {
	color: var(--wbs-color-text);
}
@media (max-width: 68rem) {
	body:not(:has(.wbs-mockup-hero)) .wbs-site-header .wbs-primary-menu a { color: var(--wbs-color-white); }
}

.wbs-site-header__inner,
.home .wbs-site-header__inner,
.home:has(.wbs-mockup-home) .wbs-site-header__inner {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	display: block;
	min-height: 0;
	padding: 0 var(--wbs-gutter);
	position: relative;
	width: min(100%, var(--wbs-content-width));
}

.wbs-site-header__top {
	align-items: center;
	display: flex;
	gap: var(--wbs-space-8);
	justify-content: space-between;
	min-height: 6rem;
	padding-block: var(--wbs-space-2);
}

.wbs-site-branding {
	flex: 0 1 12rem;
}

.wbs-site-branding .custom-logo,
.home .wbs-site-branding .custom-logo,
.home:has(.wbs-mockup-home) .wbs-site-branding .custom-logo {
    display: block;
    filter: none;
    height: auto;
    max-height: 4.75rem;
    width: auto;
}

.wbs-site-name {
	color: var(--wbs-on-dark);
}

.wbs-site-search {
	flex: 0 1 20rem;
}

.wbs-search-form {
	align-items: end;
	display: grid;
	gap: var(--wbs-space-2);
	grid-template-columns: minmax(7rem, 1fr) auto;
	margin: 0;
}

.wbs-search-form__label {
	color: var(--wbs-on-dark-secondary);
	font-family: var(--wbs-font-label);
	font-size: var(--wbs-font-size-label);
	font-weight: var(--wbs-font-weight-heading);
	grid-column: 1 / -1;
	letter-spacing: var(--wbs-letter-spacing-label);
	line-height: 1.2;
	text-transform: uppercase;
}

body .wbs-site-header .wbs-search-form input.wbs-search-form__field[type="search"] {
	background: transparent;
	border: 0;
	border-bottom: var(--wbs-border-width) solid rgba(255, 255, 255, 0.4);
	border-radius: 0;
	color: var(--wbs-on-dark);
	font: 400 var(--wbs-font-size-small)/1.4 var(--wbs-font-body);
	min-height: var(--wbs-touch-target);
	padding: var(--wbs-space-2) 0;
	width: 100%;
}

body .wbs-site-header .wbs-search-form input.wbs-search-form__field[type="search"]::placeholder {
	color: var(--wbs-on-dark-secondary);
	opacity: 1;
}

body .wbs-site-header .wbs-search-form input.wbs-search-form__field[type="search"]:focus {
	border-bottom-color: var(--wbs-color-teal-primary);
	box-shadow: none;
	outline: 0;
}

body button.wbs-search-form__submit[type="submit"] {
	background: transparent;
	border: 0;
	color: var(--wbs-on-dark);
	font-size: var(--wbs-font-size-small);
	min-height: var(--wbs-touch-target);
	padding: var(--wbs-space-2);
}

body button.wbs-search-form__submit[type="submit"]:hover {
	background: transparent;
	color: var(--wbs-color-teal-primary);
}

.wbs-site-header__menu-row {
	align-items: center;
	border-top: var(--wbs-border-width) solid rgba(255, 255, 255, 0.4);
	display: flex;
	justify-content: center;
	min-height: 3.25rem;
	position: relative;
}

.wbs-primary-menu {
	justify-content: center;
}

.wbs-primary-menu a,
.home .wbs-primary-menu > li:not(:last-child) > a,
.home:has(.wbs-mockup-home) .wbs-primary-menu a,
.wbs-primary-menu > li:last-child > a,
.home .wbs-primary-menu > li:last-child > a {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--wbs-on-dark);
	font-size: var(--wbs-font-size-small);
	margin: 0;
	padding: var(--wbs-space-2) var(--wbs-space-4);
}

.wbs-primary-menu a:hover,
.wbs-primary-menu a:focus-visible,
.wbs-primary-menu .current-menu-item > a,
.home .wbs-primary-menu > li:not(:last-child) > a:hover,
.home .wbs-primary-menu > li:last-child > a:hover {
	background: transparent;
	color: var(--wbs-color-teal-primary);
}

.wbs-site-header :is(a, button, input):focus-visible,
.home .wbs-site-header :is(a, button, input):focus-visible {
	box-shadow: none;
	outline-color: var(--wbs-color-teal-primary);
}

/* Contact is a transparent outlined link, independent of its menu position. */
.wbs-site-header #wbs-primary-menu a[href$="/contact-us/"] {
	align-items: center;
	background: transparent;
	border: var(--wbs-border-width) solid var(--wbs-action-primary);
	border-radius: var(--wbs-radius-small);
	display: inline-flex;
	justify-content: center;
	min-height: var(--wbs-touch-target);
	padding: var(--wbs-space-2) var(--wbs-space-4);
}

/* The hero's primary teal becomes the consistent interactive accent without
 * changing the approved palette or non-interactive award styling. */
body :is(.wbs-button, .wp-block-button__link, button:not(.wbs-menu-toggle):not([aria-label^="Previous"]):not([aria-label^="Next"]), input[type="submit"], input[type="button"]):not(:disabled):hover {
	background: var(--wbs-color-teal-primary) !important;
	border-color: var(--wbs-color-teal-primary) !important;
	color: var(--wbs-color-text) !important;
}

body button:is([aria-label^="Previous"], [aria-label^="Next"]):hover,
body button:is([aria-label^="Previous"], [aria-label^="Next"]):focus-visible {
	background: transparent !important;
	border-color: transparent !important;
	color: var(--wbs-color-teal-primary) !important;
}

.wbs-page-main a:not(.wp-block-button__link):not(.wbs-button):hover,
.wbs-page-main a:not(.wp-block-button__link):not(.wbs-button):focus-visible {
	color: var(--wbs-color-text);
	text-decoration-color: var(--wbs-color-teal-primary);
	text-decoration-line: underline;
	text-decoration-thickness: 0.16em;
	text-underline-offset: 0.2em;
}

.wbs-site-footer a:hover,
.wbs-site-footer a:focus-visible {
	color: var(--wbs-color-teal-primary);
}

.wbs-site-footer a,
.wbs-site-footer a:hover,
.wbs-site-footer a:focus,
.wbs-site-footer a:focus-visible,
.wbs-site-footer a:visited {
	text-decoration: none;
}

/* Four-column footer uses the same solid charcoal and interaction treatment as the header. */
.wbs-site-footer,
.home .wbs-site-footer,
.home:has(.wbs-mockup-home) .wbs-site-footer {
	background: var(--wbs-color-text);
	color: var(--wbs-on-dark-secondary);
}

.wbs-site-footer .wbs-site-footer__grid,
.home:has(.wbs-mockup-home) .wbs-site-footer .wbs-site-footer__grid {
	column-gap: 2.5rem;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding-block: 2.5rem;
	row-gap: 2rem;
}

.wbs-site-footer :is(p, a, address) {
	font-size: .875rem;
}

.wbs-site-footer__brand {
	grid-column: auto;
}

.wbs-site-footer .custom-logo {
	display: block;
	margin-block-end: var(--wbs-space-5);
	max-width: 11rem;
}

.wbs-site-footer__grid h3 {
	color: var(--wbs-on-dark);
	font-size: var(--wbs-font-size-small);
	letter-spacing: var(--wbs-letter-spacing-label);
	margin-block-end: var(--wbs-space-6);
	text-transform: uppercase !important;
}

.wbs-site-footer__grid :is(ul, p) {
	margin: 0;
}

.wbs-site-footer__contact ul,
.wbs-site-footer__social-links {
	list-style: none;
	padding: 0;
}

.wbs-site-footer__contact ul {
	display: grid;
	gap: var(--wbs-space-5);
}

.wbs-site-footer .wbs-footer-navigation li + li {
	margin-block-start: var(--wbs-space-4);
}

.wbs-site-footer__contact li {
	align-items: start;
	display: grid;
	gap: var(--wbs-space-3);
	grid-template-columns: 1.5rem minmax(0, 1fr);
}

.wbs-site-footer__contact-icon {
	color: var(--wbs-on-dark);
	display: inline-flex;
	padding-block-start: .1rem;
}

.wbs-site-footer__contact-icon svg {
	fill: none;
	height: 1.25rem;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.75;
	width: 1.25rem;
}

.wbs-site-footer__contact address {
	color: var(--wbs-on-dark-secondary);
	line-height: 1.7;
}

.wbs-site-footer__social-links {
	align-items: center !important;
	display: flex !important;
	flex-flow: row nowrap !important;
	gap: var(--wbs-space-2);
}

.wbs-site-footer .wbs-site-footer__social-links li,
.wbs-site-footer .wbs-site-footer__social-links li + li {
	align-items: center;
	display: flex;
	height: var(--wbs-touch-target);
	justify-content: center;
	margin: 0 !important;
	padding: 0;
	width: var(--wbs-touch-target);
}

.wbs-site-footer__social-links a {
	align-items: center !important;
	display: flex !important;
	height: var(--wbs-touch-target);
	justify-content: center !important;
	line-height: 1;
	margin: 0;
	padding: 0;
	width: var(--wbs-touch-target);
}

.wbs-site-footer__social-links svg {
	display: block;
	flex: 0 0 1.5rem;
	fill: currentColor;
	height: 1.5rem;
	width: 1.5rem;
}

.wbs-site-footer__social-links rect,
.wbs-site-footer__social-links circle:not(.wbs-social-icon-dot) {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
}

.wbs-site-footer__legal {
	border-block-start-color: rgb(255 255 255 / 40%);
}

.wbs-site-footer__legal p {
	align-items: center;
	display: flex;
	gap: var(--wbs-space-4) var(--wbs-space-8);
	justify-content: space-between;
	max-width: none;
	width: 100%;
}

.wbs-site-footer__legal a,
.wbs-site-footer__legal a:hover,
.wbs-site-footer__legal a:focus-visible {
	margin-inline-start: auto;
	text-align: right;
	text-decoration: none;
}

@media (min-width: 68.0625rem) {
	.wbs-site-footer__social {
		margin-block-start: 3.0703125rem;
	}

	.wbs-site-footer__legal p {
		column-gap: 2.5rem;
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.wbs-site-footer__legal p > span {
		grid-column: 1 / span 2;
	}

	.wbs-site-footer__legal a,
	.wbs-site-footer__legal a:hover,
	.wbs-site-footer__legal a:focus-visible {
		grid-column: 4;
		justify-self: start;
		margin-inline-start: 0;
		text-align: left;
	}
}

@media (max-width: 68rem) {
	/* Extra separation between stacked course and policy links. */
	.wbs-site-footer__grid > .wbs-footer-navigation + .wbs-footer-navigation {
		margin-block-start: 1.5rem;
	}

	.wbs-site-footer .wbs-site-footer__grid,
	.home:has(.wbs-mockup-home) .wbs-site-footer .wbs-site-footer__grid {
		grid-template-columns: 1fr;
	}

	.wbs-site-footer__cta-inner {
		align-items: flex-start;
		flex-direction: column;
		text-align: left;
	}

	.wbs-site-footer__grid,
	.wbs-site-footer__grid > *,
	.wbs-site-footer__legal,
	.wbs-site-footer__legal p {
		text-align: left;
	}

	.wbs-site-footer__social-links {
		align-items: center !important;
		display: inline-flex !important;
		flex-flow: row nowrap !important;
		justify-content: flex-start !important;
		width: max-content;
	}

	.wbs-site-footer__social {
		display: flex;
		justify-content: flex-start;
		width: 100%;
	}

	.wbs-site-footer__legal p {
		align-items: flex-start;
		flex-direction: column;
	}

	.wbs-site-footer__legal a,
	.wbs-site-footer__legal a:hover,
	.wbs-site-footer__legal a:focus-visible {
		align-self: flex-start;
		margin-inline-start: 0;
		text-align: left;
	}
}

@media (max-width: 48rem) {
	.wbs-site-footer .wbs-site-footer__grid,
	.home:has(.wbs-mockup-home) .wbs-site-footer .wbs-site-footer__grid {
		grid-template-columns: 1fr;
	}

	.wbs-site-footer__legal p {
		align-items: flex-start;
		flex-direction: column;
	}
}

body .wbs-site-header button.wbs-menu-toggle {
	background: transparent !important;
	border: 0 !important;
	color: var(--wbs-on-dark);
	min-height: var(--wbs-touch-target);
	padding: var(--wbs-space-2) 0;
}

body .wbs-site-header button.wbs-menu-toggle:hover,
body .wbs-site-header button.wbs-menu-toggle:focus-visible {
	background: transparent !important;
	color: var(--wbs-color-teal-primary);
}

@media (max-width: 68rem) {
	.wbs-site-header__top {
		min-height: 5.25rem;
	}

	.wbs-site-header__menu-row {
		justify-content: flex-end;
		min-height: 3rem;
	}

	.wbs-primary-navigation,
	.home .wbs-primary-navigation {
		background: var(--wbs-color-text);
		border: 0;
		border-radius: 0;
		padding: var(--wbs-space-4) var(--wbs-gutter) var(--wbs-space-6);
	}

	.wbs-primary-menu a,
	.home .wbs-primary-menu > li:not(:last-child) > a,
	.home .wbs-primary-menu > li:last-child > a {
		color: var(--wbs-on-dark);
	}

	.wbs-primary-menu a:hover,
	.wbs-primary-menu a:focus-visible,
	.home .wbs-primary-menu > li:not(:last-child) > a:hover,
	.home .wbs-primary-menu > li:last-child > a:hover {
		color: var(--wbs-color-teal-primary);
	}
}

@media (max-width: 48rem) {
	.wbs-site-header__inner,
	.home .wbs-site-header__inner,
	.home:has(.wbs-mockup-home) .wbs-site-header__inner {
		padding-inline: var(--wbs-space-4);
		width: 100%;
	}

	.wbs-site-header__top {
		gap: var(--wbs-space-4);
		min-height: 4.75rem;
	}

	.wbs-site-branding {
		flex-basis: 5rem;
	}

	.wbs-site-branding .custom-logo,
	.home .wbs-site-branding .custom-logo,
	.home:has(.wbs-mockup-home) .wbs-site-branding .custom-logo {
		max-height: 3.75rem;
	}

	.wbs-site-search {
		flex-basis: 13rem;
		min-width: 0;
	}

	.wbs-search-form__label {
		display: none;
	}

	.wbs-search-form {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	body button.wbs-search-form__submit[type="submit"] {
		font-size: var(--wbs-font-size-label);
		padding-inline: var(--wbs-space-1);
	}
}

/* Capitalise navigation and button presentation without rewriting content. */
body .wbs-primary-menu a,
body :is(.wbs-button, .wp-block-button__link, button, input[type="submit"], input[type="button"], input[type="reset"]) {
	text-transform: uppercase;
}

/* Shared heading casing; hero typography and uppercase controls stay intact.
 * Capitalize preserves existing qualification acronyms (VTCT, NVQ, IPL). */
body :is(h1, h2, h3, h4, h5, h6):not(:where([class*="hero"], [class*="hero"] *)) {
	text-transform: capitalize !important;
}

/* Native disclosure keeps site search usable without JavaScript. */
.wbs-site-header details.wbs-site-search {
	flex: 0 0 var(--wbs-touch-target);
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}
.wbs-site-header .wbs-search-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wbs-touch-target);
	min-height: var(--wbs-touch-target);
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wbs-on-dark);
	cursor: pointer;
	list-style: none;
}
.wbs-search-toggle::-webkit-details-marker { display: none; }
.wbs-search-toggle::marker { content: ''; }
.wbs-search-toggle::after { content: none; }
.wbs-site-header .wbs-search-toggle:hover { color: var(--wbs-color-teal-primary); }
.wbs-site-header .wbs-search-toggle:focus-visible {
	outline: 2px solid var(--wbs-color-teal-primary);
	outline-offset: 4px;
}
.wbs-site-search:not([open]) > .wbs-search-form { display: none; }
.wbs-site-search[open] > .wbs-search-form {
	position: absolute;
	top: calc(100% + var(--wbs-space-2));
	right: 0;
	z-index: 10;
	width: min(21rem, calc(100vw - 2rem));
	padding: var(--wbs-space-4);
	border: var(--wbs-border-width) solid var(--wbs-color-teal-primary);
	border-radius: var(--wbs-radius-small);
	background: var(--wbs-color-text);
	grid-template-columns: minmax(0, 1fr) auto;
}
body .wbs-site-header .wbs-site-search .wbs-search-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wbs-touch-target);
	padding: 0;
}
body .wbs-site-header .wbs-site-search .wbs-search-form__submit:hover {
	background: transparent !important;
	color: var(--wbs-color-teal-primary) !important;
}
