/**
 * Programmes page presentation aligned with the approved homepage and About page.
 */

.ych-page--programmes {
	overflow: hidden;
	background: var(--ych-bg-primary);
	color: var(--ych-text-primary);
	font-family: var(--ych-font-body);
}

.ych-page--programmes *,
.ych-page--programmes *::before,
.ych-page--programmes *::after { box-sizing: border-box; }

.ych-page--programmes h1,
.ych-page--programmes h2,
.ych-page--programmes h3 {
	margin-top: 0;
	color: var(--ych-text-primary);
	font-family: var(--ych-font-heading);
	font-weight: 700;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.ych-page--programmes h1 {
	margin-bottom: var(--ych-space-3);
	font-size: clamp(3.4rem, 7vw, 6rem);
	line-height: 0.94;
}

.ych-page--programmes h2 {
	font-size: clamp(2.5rem, 5vw, 4.5rem);
	line-height: 1;
}

.ych-page--programmes h3 {
	font-size: clamp(1.35rem, 2vw, 1.8rem);
	line-height: 1.15;
}

.ych-page--programmes p {
	color: var(--ych-text-secondary);
	line-height: 1.72;
}

.ych-programmes__eyebrow {
	margin: 0 0 var(--ych-space-2);
	color: var(--ych-accent-blue) !important;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.4 !important;
	text-transform: uppercase;
}

.ych-programmes-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding-block: clamp(4.5rem, 9vw, 8rem);
	background:
		radial-gradient(circle at 82% 22%, rgba(154, 114, 208, 0.2), transparent 25rem),
		linear-gradient(120deg, #07111f, var(--ych-bg-primary) 55%, #101c31);
}

.ych-programmes-hero::before {
	position: absolute;
	z-index: -1;
	inset: auto -8rem -14rem auto;
	width: 34rem;
	height: 34rem;
	border-radius: 50%;
	background: rgba(120, 169, 228, 0.12);
	filter: blur(5rem);
	content: "";
	pointer-events: none;
}

.ych-programmes-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(25rem, 1.1fr);
	gap: clamp(2.5rem, 6vw, 6rem);
	align-items: center;
}

.ych-programmes-breadcrumb {
	margin-bottom: clamp(3rem, 7vw, 6rem);
	font-size: 0.78rem;
}

.ych-programmes-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ych-programmes-breadcrumb li + li::before {
	margin-right: 0.65rem;
	color: var(--ych-text-muted);
	content: "/";
}

.ych-programmes-breadcrumb a {
	color: var(--ych-text-secondary);
	text-decoration: none;
}

.ych-programmes-breadcrumb a:hover { color: var(--ych-accent-blue); }

.ych-programmes-hero__lead {
	max-width: 42rem;
	margin: 0;
	font-size: clamp(1.05rem, 1.7vw, 1.22rem);
}

.ych-programmes-actions,
.ych-programmes-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	align-items: center;
	margin-top: var(--ych-space-4);
}

.ych-programmes__button {
	display: inline-flex;
	min-height: 3.25rem;
	align-items: center;
	justify-content: center;
	padding: 0.8rem 1.35rem;
	border: 0.0625rem solid transparent;
	border-radius: var(--ych-radius-button);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: transform var(--ych-transition), box-shadow var(--ych-transition), border-color var(--ych-transition);
}

.ych-programmes__button--primary {
	background: var(--ych-accent-gradient);
	color: #08111e;
	box-shadow: 0 0.75rem 2rem rgba(120, 82, 168, 0.2);
}

.ych-programmes__button--secondary {
	border-color: var(--ych-border-strong);
	background: rgba(255, 255, 255, 0.04);
	color: var(--ych-text-primary);
}

.ych-programmes__button:hover {
	color: #08111e;
	box-shadow: 0 1rem 2.5rem rgba(120, 82, 168, 0.28);
	transform: translateY(-0.125rem);
}

.ych-programmes__button--secondary:hover {
	border-color: var(--ych-accent-blue);
	background: var(--ych-text-primary);
}

.ych-programmes-hero__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border: 0.0625rem solid var(--ych-border-strong);
	border-radius: var(--ych-radius-panel);
	background: var(--ych-bg-card);
	box-shadow: var(--ych-shadow-large);
}

.ych-programmes-hero__media::after,
.ych-programmes-feature__media::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(7, 17, 31, 0.36));
	content: "";
	pointer-events: none;
}

.ych-programmes-hero__image,
.ych-programmes-feature__image,
.ych-programme-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ych-programmes-feature {
	padding-block: clamp(5rem, 9vw, 8rem);
	background: var(--ych-bg-secondary);
}

.ych-programmes-feature__card {
	display: grid;
	overflow: hidden;
	grid-template-columns: minmax(0, 1.1fr) minmax(24rem, 0.9fr);
	border: 0.0625rem solid var(--ych-border);
	border-radius: var(--ych-radius-panel);
	background: var(--ych-bg-card);
	box-shadow: var(--ych-shadow-large);
}

.ych-programmes-feature__media {
	position: relative;
	min-height: 32rem;
}

.ych-programmes-feature__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(2rem, 5vw, 5rem);
}

.ych-programmes-feature__content h2 {
	margin-bottom: var(--ych-space-3);
	font-size: clamp(2.4rem, 4.5vw, 4rem);
}

.ych-programmes-feature__content > p:not(.ych-programmes__eyebrow) { margin-block: 0 var(--ych-space-2); }

.ych-programmes-feature__meta {
	color: var(--ych-accent-blue) !important;
	font-size: 0.85rem;
	font-weight: 700;
}

.ych-programmes__text-link {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
	gap: 0.5rem;
	color: var(--ych-accent-blue);
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: rgba(120, 169, 228, 0.45);
	text-decoration-thickness: 0.125rem;
	text-underline-offset: 0.3rem;
}

.ych-programmes__text-link:hover {
	color: var(--ych-text-primary);
	text-decoration-color: var(--ych-text-primary);
}

.ych-programmes-directory {
	padding-block: clamp(5rem, 9vw, 8rem);
	background: var(--ych-bg-primary);
}

.ych-programmes-section-header {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(22rem, 1.15fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: end;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ych-programmes-section-header h2,
.ych-programmes-section-header > p { margin-bottom: 0; }

.ych-programmes-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.ych-programmes-filter {
	display: inline-flex;
	min-height: 2.75rem;
	align-items: center;
	padding: 0.55rem 1rem;
	border: 0.0625rem solid var(--ych-border-strong);
	border-radius: 999px;
	background: var(--ych-bg-card);
	color: var(--ych-text-secondary);
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color var(--ych-transition), border-color var(--ych-transition), color var(--ych-transition);
}

.ych-programmes-filter:hover,
.ych-programmes-filter.is-active {
	border-color: var(--ych-accent-blue);
	background: rgba(120, 169, 228, 0.13);
	color: var(--ych-text-primary);
}

.ych-programmes-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1.25rem, 2vw, 1.75rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ych-programmes-grid > li { min-width: 0; }

.ych-programme-card {
	display: flex;
	overflow: hidden;
	height: 100%;
	flex-direction: column;
	border: 0.0625rem solid var(--ych-border);
	border-radius: var(--ych-radius-card);
	background: var(--ych-bg-card);
	box-shadow: var(--ych-shadow-small);
	transition: border-color var(--ych-transition), box-shadow var(--ych-transition), transform var(--ych-transition);
}

.ych-programme-card:hover,
.ych-programme-card:focus-within {
	border-color: var(--ych-border-strong);
	box-shadow: var(--ych-shadow-medium);
	transform: translateY(-0.25rem);
}

.ych-programme-card__media-link { display: block; text-decoration: none; }

.ych-programme-card__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, rgba(120, 169, 228, 0.2), rgba(154, 114, 208, 0.2));
}

.ych-programme-card__image { transition: transform 500ms ease; }

.ych-programme-card:hover .ych-programme-card__image,
.ych-programme-card:focus-within .ych-programme-card__image { transform: scale(1.035); }

.ych-programme-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: clamp(1.4rem, 2.5vw, 2rem);
}

.ych-programme-card__category {
	margin: 0 0 0.85rem;
	color: var(--ych-accent-blue) !important;
	font-size: 0.67rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.4 !important;
	text-transform: uppercase;
}

.ych-programme-card h3 { margin-bottom: 0.8rem; }

.ych-programme-card h3 a { color: var(--ych-text-primary); text-decoration: none; }
.ych-programme-card h3 a:hover { color: var(--ych-accent-blue); }

.ych-programme-card__meta {
	margin: 0 0 0.65rem;
	color: var(--ych-accent-purple) !important;
	font-size: 0.78rem;
	font-weight: 700;
}

.ych-programme-card__copy {
	margin: 0 0 var(--ych-space-3);
	font-size: 0.9rem;
}

.ych-programme-card__body > .ych-programmes__text-link { margin-top: auto; }

.ych-programmes-empty {
	padding: clamp(2rem, 5vw, 4rem);
	border: 0.0625rem solid var(--ych-border);
	border-radius: var(--ych-radius-card);
	background: var(--ych-bg-card);
	text-align: center;
}

.ych-programmes-cta {
	padding-block: 1rem clamp(5rem, 9vw, 8rem);
	background: var(--ych-bg-primary);
}

.ych-programmes-cta__panel {
	display: grid;
	overflow: hidden;
	grid-template-columns: minmax(0, 1.15fr) auto;
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	padding: clamp(2.5rem, 6vw, 5.5rem);
	border: 0.0625rem solid var(--ych-border-strong);
	border-radius: var(--ych-radius-panel);
	background: radial-gradient(circle at 88% 20%, rgba(154, 114, 208, 0.26), transparent 22rem), var(--ych-bg-secondary);
	box-shadow: var(--ych-shadow-large);
}

.ych-programmes-cta__panel h2 { margin-bottom: var(--ych-space-2); }
.ych-programmes-cta__panel p:last-child { max-width: 44rem; margin-bottom: 0; }
.ych-programmes-cta__actions { justify-content: flex-end; margin-top: 0; }

.ych-page--programmes a:focus-visible {
	outline: 0.1875rem solid var(--ych-focus);
	outline-offset: 0.25rem;
}

@media (max-width: 72rem) {
	.ych-programmes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 62rem) {
	.ych-programmes-hero__grid,
	.ych-programmes-feature__card,
	.ych-programmes-section-header,
	.ych-programmes-cta__panel { grid-template-columns: minmax(0, 1fr); }

	.ych-programmes-feature__media { min-height: 26rem; }
	.ych-programmes-cta__actions { justify-content: flex-start; }
	.ych-programmes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
	.ych-programmes-hero { padding-block: 3rem 4.5rem; }
	.ych-programmes-breadcrumb { margin-bottom: 3rem; }
	.ych-programmes-hero__grid { gap: 2.5rem; }

	.ych-programmes-actions,
	.ych-programmes-cta__actions { align-items: stretch; flex-direction: column; }

	.ych-programmes__button { width: 100%; }
	.ych-programmes-feature__media { min-height: 20rem; }
	.ych-programmes-grid { grid-template-columns: minmax(0, 1fr); }
	.ych-programmes-filter { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.ych-programmes__button,
	.ych-programmes-filter,
	.ych-programme-card,
	.ych-programme-card__image { transition: none; }

	.ych-programmes__button:hover,
	.ych-programme-card:hover,
	.ych-programme-card:focus-within,
	.ych-programme-card:hover .ych-programme-card__image,
	.ych-programme-card:focus-within .ych-programme-card__image { transform: none; }
}

@media (forced-colors: active) {
	.ych-programmes__button,
	.ych-programmes-filter,
	.ych-programmes-feature__card,
	.ych-programme-card,
	.ych-programmes-cta__panel { border: 0.125rem solid CanvasText; }
}

/**
 * Native programme detail posts.
 *
 * Kadence supplies the post shell; these route-scoped rules align it with the
 * YouthConnectHub dark editorial system without changing programme content.
 */
body.single-ych_programme {
	background: var(--ych-bg-primary);
	color: var(--ych-text-primary);
}

body.single-ych_programme #primary.content-area {
	padding-block: clamp(4rem, 7vw, 6rem);
	background:
		radial-gradient(circle at 86% 14%, rgba(154, 114, 208, 0.16), transparent 26rem),
		var(--ych-bg-primary);
}

body.single-ych_programme article.entry {
	position: relative;
	overflow: hidden;
	border: 0.0625rem solid var(--ych-border-strong);
	border-radius: var(--ych-radius-panel);
	background:
		radial-gradient(circle at 96% 8%, rgba(120, 169, 228, 0.13), transparent 24rem),
		linear-gradient(145deg, var(--ych-bg-card), var(--ych-bg-secondary));
	box-shadow: var(--ych-shadow-large);
	color: var(--ych-text-primary);
}

body.single-ych_programme article.entry::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 7rem;
	height: 0.25rem;
	border-radius: 0 0 999px;
	background: var(--ych-accent-gradient);
	content: "";
}

body.single-ych_programme .entry-content-wrap {
	padding: clamp(2.5rem, 5vw, 5rem);
	background: transparent;
}

body.single-ych_programme .entry-header {
	margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

body.single-ych_programme .entry-title {
	max-width: 15ch;
	margin: 0;
	color: var(--ych-text-primary);
	font-family: var(--ych-font-heading);
	font-size: clamp(3rem, 5vw, 4.5rem);
	font-weight: 700;
	letter-spacing: -0.045em;
	line-height: 0.98;
	text-wrap: balance;
}

body.single-ych_programme .entry-content {
	max-width: 70rem;
}

body.single-ych_programme .entry-content p {
	margin: 0;
	color: var(--ych-text-secondary);
	font-family: var(--ych-font-body);
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	line-height: 1.75;
	text-wrap: pretty;
}

@media (max-width: 40rem) {
	body.single-ych_programme #primary.content-area {
		padding-block: 3rem;
	}

	body.single-ych_programme .entry-content-wrap {
		padding: 2rem 1.5rem;
	}

	body.single-ych_programme .entry-title {
		font-size: clamp(2.5rem, 12vw, 3.5rem);
	}
}
