/* ==========================================================================
   Beyond Talent — additions on top of app.css

   app.css mirrors the original scraped site 1:1 and will eventually be
   replaced wholesale — anything invented that has no equivalent on the live
   site (the 404 template, the default page/post templates) lives here
   instead, so that swap stays a clean file replacement rather than a diff
   against hand-authored rules mixed into the original stylesheet.
   ========================================================================== */

/* ---------- Club & school enquiry modal ---------- */

/*
 * A single site-wide instance (see acf/internal/enquiry-modal.php, included
 * once from footer.php). assets/js/app.js toggles the `hidden` attribute —
 * same open/close pattern as the mobile nav (.mobile-menu-button) below.
 */
.enquiry-modal[hidden] {
	display: none;
}
.enquiry-modal {
	z-index: 100;
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.enquiry-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 5, 23, 0.72);
}
.enquiry-modal-dialog {
	z-index: 1;
	position: relative;
	background: #fff;
	border-radius: 4px;
	width: min(100%, 560px);
	max-height: calc(100svh - 48px);
	overflow-y: auto;
	padding: 44px;
}
.enquiry-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--navy);
	cursor: pointer;
}
.enquiry-modal-close:hover,
.enquiry-modal-close:focus-visible {
	color: var(--teal-deep);
}
.enquiry-modal-close svg {
	width: 22px;
	height: 22px;
}
.enquiry-modal-dialog h2 {
	margin: 0 0 12px;
}
.enquiry-modal-intro {
	color: var(--body-text);
	margin: 0 0 26px;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* Contact Form 7 field styling, scoped to this modal only */
/*
 * :not(.wpcf7-list-item-label) matters here: the radio group uses
 * use_label_element (CF7's own fix for wrapping a group in a <label>, which
 * nests labels and confuses click targets/validation) — that turns each
 * "Club"/"School" option's text into its own <label>, which would otherwise
 * inherit this block/bold field-label styling too.
 */
.enquiry-modal .wpcf7-form label:not(.wpcf7-list-item-label) {
	color: var(--navy);
	margin-bottom: 18px;
	font-size: 0.85rem;
	font-weight: 700;
	display: block;
}
.enquiry-modal .wpcf7-form fieldset {
	border: none;
	margin: 0;
	padding: 0;
}
.enquiry-modal .wpcf7-form legend {
	color: var(--navy);
	margin-bottom: 18px;
	padding: 0;
	font-size: 0.85rem;
	font-weight: 700;
}
.enquiry-modal .wpcf7-form-control {
	color: var(--navy);
	background: var(--off-white);
	border: 1px solid #d2dde3;
	border-radius: 4px;
	margin-top: 6px;
	padding: 12px 14px;
	font-family: var(--font-body);
	font-size: 0.95rem;
	width: 100%;
}
.enquiry-modal textarea.wpcf7-form-control {
	min-height: 110px;
	resize: vertical;
}
.enquiry-modal .wpcf7-form-control:focus-visible {
	outline: 3px solid #11bed37a;
	outline-offset: 2px;
}
/* The radio group also carries .wpcf7-form-control — undo the boxed input
   look above and give it its own plain, branded treatment instead. */
.enquiry-modal .wpcf7-form-control.wpcf7-radio {
	background: none;
	border: none;
	padding: 0;
	width: auto;
}
.enquiry-modal .wpcf7-radio {
	gap: 24px;
	margin-top: 8px;
	display: flex;
}
.enquiry-modal .wpcf7-list-item {
	align-items: center;
	gap: 8px;
	margin: 0;
	display: flex;
}
.enquiry-modal .wpcf7-list-item input[type="radio"] {
	accent-color: var(--teal-deep);
	width: 18px;
	height: 18px;
	margin: 0;
	cursor: pointer;
}
.enquiry-modal .wpcf7-list-item-label {
	margin-left: 0;
	font-weight: 500;
	cursor: pointer;
}
.enquiry-modal input[type="submit"] {
	color: #03131b;
	background: var(--teal);
	border: 1px solid var(--teal);
	border-radius: 4px;
	margin-top: 8px;
	padding: 13px 22px;
	font-family: var(--font-heading);
	letter-spacing: 0.025em;
	text-transform: uppercase;
	font-size: 0.78rem;
	font-weight: 800;
	cursor: pointer;
	transition: transform 0.18s, background 0.18s;
}
.enquiry-modal input[type="submit"]:hover,
.enquiry-modal input[type="submit"]:focus-visible {
	background: #42d3e4;
	transform: translateY(-2px);
}
/* The spinner is a sibling of the submit button, not a child of it — the
   button's own width:100% (from .wpcf7-form-control) pushes it onto its own
   line unless the wrapping <p> gives it something to position against. */
.enquiry-modal .wpcf7-form p:has(.wpcf7-submit) {
	position: relative;
}
.enquiry-modal .wpcf7-spinner {
	position: absolute;
	top: 50%;
	right: 18px;
	margin: 0;
	transform: translateY(-50%);
}
.enquiry-modal .wpcf7-response-output {
	border-radius: 4px;
	margin: 22px 0 0;
	font-size: 0.9rem !important;
}
/* This site's boilerplate style.css sets a huge default (1.5rem) — override
   it here to something that fits the rest of the form. */
.enquiry-modal .wpcf7-not-valid-tip {
	color: #c4342f;
	margin-top: 6px;
	font-size: 0.8rem !important;
	font-weight: 500;
}

@media (max-width: 640px) {
	.enquiry-modal-dialog {
		padding: 32px 24px;
	}
}

/* ---------- Audience image fix ---------- */

/*
 * app.css's .audience-image-wrap img sets aspect-ratio: 4/3 + object-fit:
 * cover but no explicit height. Every module image in this theme carries
 * width/height HTML attributes (for CLS prevention), which browsers map to
 * an implicit UA-level height. With no author height rule to beat that, the
 * browser treats both width (100%, ours) and height (the attribute's native
 * pixel height) as definite — leaving aspect-ratio nothing to resolve, so
 * the box renders at the image's native (portrait-cropped) height instead
 * of 4:3. Explicit height: auto restores aspect-ratio as the sole source of
 * the box's height.
 */
.audience-image-wrap img {
	height: auto;
}

/* ---------- Enrolment direct contact ---------- */

.enrolment-contact {
	border-left: 3px solid var(--teal-deep);
	background: #fff;
	max-width: 700px;
	margin: 20px 0 0;
	padding: 14px 18px;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.enrolment-contact li {
	align-items: center;
	gap: 10px;
	display: flex;
}
.enrolment-contact svg {
	color: var(--teal-deep);
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}
.enrolment-contact a, .enrolment-contact span {
	color: var(--navy);
	font-size: 0.85rem;
}
.enrolment-contact a {
	text-decoration: none;
}
.enrolment-contact a:hover, .enrolment-contact a:focus-visible {
	color: var(--teal-deep);
	text-decoration: underline;
}
.enrolment-enquiry {
	border-left: 3px solid var(--teal-deep);
	background: #fff;
	max-width: 700px;
	margin: 20px 0 0;
	padding: 18px;
}
.enrolment-enquiry h3 {
	color: var(--navy);
	margin: 0 0 6px;
	font-family: var(--font-heading);
	font-size: 1.05rem;
	font-weight: 800;
}
.enrolment-enquiry p {
	color: var(--body-text);
	margin: 0 0 14px;
	font-size: 0.9rem;
	line-height: 1.6;
}

/* ---------- 404 ---------- */

.notfound-section {
	color: #fff;
	background: var(--navy-black);
	align-items: center;
	min-height: min(650px, 100svh - 94px);
	display: flex;
	text-align: center;
}
.notfound-content {
	flex-direction: column;
	align-items: center;
	max-width: 640px;
	margin-inline: auto;
	padding-block: 90px;
	display: flex;
}
.notfound-content .eyebrow {
	order: -1;
	margin-bottom: 4px;
}
.notfound-mark {
	color: var(--teal);
	margin-bottom: 22px;
	font-family: var(--font-heading);
	font-size: clamp(4rem, 10vw, 6.5rem);
	line-height: 1;
}
/* Same size/weight as the site's other h2 section headings (e.g. .section-heading h2 in app.css) */
.notfound-heading {
	font-family: var(--font-heading);
	letter-spacing: -0.045em;
	text-wrap: balance;
	font-weight: 900;
	line-height: 1.04;
	font-size: clamp(2.5rem, 4.4vw, 4.7rem);
}
.notfound-copy {
	color: rgba(255, 255, 255, 0.78);
	margin-top: 14px;
	margin-bottom: 34px;
	font-size: clamp(1rem, 1.5vw, 1.17rem);
	line-height: 1.8;
}
.notfound-actions {
	justify-content: center;
	display: flex;
}
.notfound-links {
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 26px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	margin-top: 46px;
	padding-top: 28px;
	display: flex;
}
.notfound-links a {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.9rem;
	text-decoration: none;
}
.notfound-links a:hover, .notfound-links a:focus-visible {
	color: var(--teal);
}

/* ---------- Content page ---------- */

/*
 * Styles the native WordPress editor output (the default templates used by
 * any page or post without an explicit "Template Name", see page.php and
 * single.php) rather than any fixed piece of content — a client can rewrite
 * the copy in wp-admin at any time and this should keep rendering it on-brand
 * without a code change.
 */

.simple-hero {
	color: #fff;
	background: var(--navy-black);
	padding: 90px 0;
}
.simple-hero-inner {
	display: flex;
	flex-direction: column;
}
/*
 * The eyebrow follows the heading in the markup (a heading should be the
 * first thing a screen reader announces) but is pulled back above it
 * visually to match the rest of the site's hero banners.
 */
.simple-hero-inner .eyebrow {
	order: -1;
}
.simple-hero h1 {
	max-width: 760px;
	margin-bottom: 0;
	font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.content-page-section {
	background: #fff;
	padding: 90px 0;
}
.content-page-container {
	width: min(100% - 40px, 820px);
}

.entry-content {
	color: var(--body-text);
	font-size: 1.05rem;
	line-height: 1.8;
}
.entry-content > *:first-child {
	margin-top: 0;
}
.entry-content > *:last-child {
	margin-bottom: 0;
}
.entry-content p {
	margin: 0 0 24px;
}
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
	color: var(--navy);
	max-width: none;
	text-wrap: balance;
	margin: 52px 0 20px;
}
.entry-content h2 { font-size: clamp(1.8rem, 3vw, 2.35rem); }
.entry-content h3 { font-size: clamp(1.4rem, 2.2vw, 1.7rem); }
.entry-content h4 { font-size: 1.25rem; font-weight: 700; }
.entry-content h5 { font-size: 1.1rem; font-weight: 700; }
.entry-content h6 {
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--teal-deep);
}
.entry-content strong, .entry-content b { color: var(--navy); font-weight: 700; }
.entry-content em, .entry-content i { font-style: italic; }
.entry-content a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover, .entry-content a:focus-visible { color: var(--teal); }

.entry-content ul, .entry-content ol {
	margin: 0 0 24px;
	padding-left: 1.3em;
}
.entry-content li { margin-bottom: 10px; }
.entry-content li > ul, .entry-content li > ol { margin: 10px 0 0; }
.entry-content ul { list-style: disc; }
.entry-content ul ul { list-style: circle; }
.entry-content ul::marker, .entry-content ul ul::marker { color: var(--teal-deep); }

.entry-content blockquote {
	border-left: 3px solid var(--teal);
	background: var(--off-white);
	margin: 0 0 24px;
	padding: 20px 28px;
	color: var(--navy);
	font-family: var(--font-heading);
	font-size: 1.2rem;
	font-style: italic;
	line-height: 1.5;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite {
	color: var(--body-text);
	margin-top: 10px;
	font-family: var(--font-body);
	font-size: 0.82rem;
	font-style: normal;
	display: block;
}

.entry-content hr {
	border: none;
	border-top: 1px solid #dde5eb;
	margin: 44px 0;
}

.entry-content pre {
	background: var(--navy-black);
	color: #e7f6f8;
	border-radius: 6px;
	margin: 0 0 24px;
	padding: 20px 22px;
	font-size: 0.88rem;
	line-height: 1.6;
	overflow-x: auto;
}
.entry-content code {
	background: var(--off-white);
	border-radius: 3px;
	padding: 0.15em 0.4em;
	font-size: 0.9em;
}
.entry-content pre code { background: none; padding: 0; }

.entry-content img { border-radius: 4px; }
.entry-content .aligncenter, .entry-content .alignnone { display: block; margin: 0 auto 24px; }
.entry-content .alignleft, .entry-content .alignright {
	max-width: min(100%, 380px);
	margin-bottom: 12px;
}
.entry-content .alignleft { float: left; margin-right: 28px; }
.entry-content .alignright { float: right; margin-left: 28px; }
.entry-content .wp-caption { max-width: 100%; margin-bottom: 24px; }
.entry-content .wp-caption img { margin-bottom: 0; }
.entry-content .wp-caption-text, .entry-content figcaption {
	color: #7d8ba0;
	margin-top: 10px;
	font-size: 0.82rem;
	line-height: 1.5;
	text-align: center;
}
.entry-content .alignwide, .entry-content .alignfull {
	width: min(100vw - 40px, 1240px);
	max-width: 1240px;
	margin-left: 50%;
	transform: translateX(-50%);
}

.entry-content table {
	border-collapse: collapse;
	width: 100%;
	margin: 0 0 24px;
	font-size: 0.94rem;
}
.entry-content th, .entry-content td {
	border: 1px solid #dde5eb;
	padding: 10px 14px;
	text-align: left;
}
.entry-content th {
	background: var(--off-white);
	color: var(--navy);
	font-family: var(--font-heading);
	font-weight: 700;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
	.simple-hero {
		padding: 60px 0;
	}
	.content-page-section {
		padding: 60px 0;
	}
	.entry-content .alignleft, .entry-content .alignright {
		max-width: 100%;
		float: none;
		margin: 0 0 24px;
	}
	.entry-content .alignwide, .entry-content .alignfull {
		width: 100%;
		margin-left: 0;
		transform: none;
	}
}
