/* BCHD UI - design system layer on top of the BlockMag theme and the Global Styles custom CSS. */

/* ------------------------------------------------------------------ tokens */
:root {
	--bchd-navy: #164260;
	--bchd-navy-900: #0b3558;
	--bchd-blue: #2877a3;
	--bchd-blue-500: #287fad;
	--bchd-gold: #f5c400;
	--bchd-bg: #f4f8fc;
	--bchd-tint: #e8f0f7;
	--bchd-surface: #ffffff;
	--bchd-line: #d5dce1;
	--bchd-line-strong: #9eb6c7;
	--bchd-text: #263944;
	--bchd-muted: #5b6b77;
	--bchd-danger: #b42318;
	--bchd-success: #1f7a4d;

	--bchd-font: var(--wp--preset--font-family--montserrat, "Montserrat"), Arial, sans-serif;

	--bchd-space-1: 4px;
	--bchd-space-2: 8px;
	--bchd-space-3: 12px;
	--bchd-space-4: 16px;
	--bchd-space-5: 24px;
	--bchd-space-6: 32px;
	--bchd-space-7: 48px;
	--bchd-space-8: 64px;
	--bchd-gutter: clamp(16px, 4vw, 32px);
	--bchd-section: clamp(40px, 6vw, 72px);
	--bchd-grid-gap: clamp(16px, 2.2vw, 28px);

	--bchd-wide: 1240px;
	--bchd-text-width: 760px;

	--bchd-radius: 10px;
	--bchd-radius-sm: 6px;
	--bchd-shadow-sm: 0 1px 2px rgba(11, 53, 88, .06), 0 2px 8px rgba(11, 53, 88, .05);
	--bchd-shadow-md: 0 4px 10px rgba(11, 53, 88, .08), 0 12px 28px rgba(11, 53, 88, .10);
	--bchd-ease: cubic-bezier(.2, .7, .2, 1);
	--bchd-focus: 0 0 0 3px rgba(245, 196, 0, .9);
}

/* ------------------------------------------------------------- base type */
body.bchd-ui {
	background-color: var(--bchd-bg);
	color: var(--bchd-text);
	font-family: var(--bchd-font);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Libre Baskerville has no Cyrillic glyphs, so headings fell back to Times. */
body.bchd-ui :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title, .post-navigation-link__title) {
	font-family: var(--bchd-font);
	color: var(--bchd-navy);
	letter-spacing: -.005em;
	text-wrap: balance;
}
body.bchd-ui :is(h1, h2, h3) { font-weight: 700; }
body.bchd-ui :is(h4, h5, h6) { font-weight: 600; }

body.bchd-ui:not(.home) .entry-content {
	color: var(--bchd-text);
	font-size: clamp(16.5px, 1.15vw, 18px);
	line-height: 1.75;
}
body.bchd-ui:not(.home) .entry-content > * + * { margin-block-start: 1.1em; }
body.bchd-ui:not(.home) .entry-content :is(h2, h3, h4) { line-height: 1.3; margin-block: 1.8em .6em; }
body.bchd-ui:not(.home) .entry-content h2 { font-size: clamp(22px, 2vw, 28px); }
body.bchd-ui:not(.home) .entry-content h3 { font-size: clamp(19px, 1.6vw, 22px); }
body.bchd-ui:not(.home) .entry-content :is(ul, ol) { padding-inline-start: 1.3em; }
body.bchd-ui:not(.home) .entry-content li + li { margin-top: .35em; }
body.bchd-ui:not(.home) .entry-content blockquote {
	margin-inline: 0;
	padding: var(--bchd-space-4) var(--bchd-space-5);
	border-left: 4px solid var(--bchd-gold);
	background: var(--bchd-tint);
	border-radius: 0 var(--bchd-radius-sm) var(--bchd-radius-sm) 0;
	color: var(--bchd-navy);
}

body.bchd-ui:not(.home) :is(.entry-content, .bchd-ui-prose) a:not(.wp-block-button__link):not(.wp-element-button):not(.bchd-ui-btn):not(.bchd-ui-chip):not([class*="bchd-post-nav"]) {
	color: var(--bchd-blue);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	transition: color .15s ease;
}
body.bchd-ui:not(.home) :is(.entry-content, .bchd-ui-prose) a:not(.wp-block-button__link):not(.wp-element-button):not(.bchd-ui-btn):not(.bchd-ui-chip):hover { color: var(--bchd-navy); }

body.bchd-ui :focus-visible { outline: 2px solid var(--bchd-gold); outline-offset: 2px; }
body.bchd-ui ::selection { background: rgba(245, 196, 0, .35); color: var(--bchd-navy-900); }

html { scroll-padding-top: calc(var(--bchd-ui-compact-h, 96px) + var(--bchd-ui-admin, 0px) + 16px); }

/* --------------------------------------------------------------- buttons */
body.bchd-ui .wp-block-button__link,
body.bchd-ui .wp-element-button,
body.bchd-ui .bchd-ui-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--bchd-space-2);
	box-sizing: border-box;
	min-height: 44px;
	border-radius: var(--bchd-radius-sm);
	font-family: var(--bchd-font);
	font-weight: 600;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.bchd-ui .wp-block-button__link:focus-visible,
body.bchd-ui .wp-element-button:focus-visible,
body.bchd-ui .bchd-ui-btn:focus-visible {
	outline: none;
	box-shadow: var(--bchd-focus);
}

.bchd-ui-btn {
	padding: 10px 20px;
	border: 1px solid var(--bchd-navy);
	background: var(--bchd-navy);
	color: #fff !important;
	font-size: 15px;
	line-height: 1.3;
	cursor: pointer;
}
.bchd-ui-btn:hover { background: var(--bchd-navy-900); border-color: var(--bchd-navy-900); }
.bchd-ui-btn--ghost { background: transparent; color: var(--bchd-navy) !important; }
.bchd-ui-btn--ghost:hover { background: var(--bchd-tint); color: var(--bchd-navy) !important; }
.bchd-ui-btn[disabled] { opacity: .65; cursor: progress; }

/* --------------------------------------------------------- sticky header */
html.bchd-ui-js header.wp-block-template-part:has(> .bchd-site-header) {
	min-height: var(--bchd-ui-header-h, 0px);
	position: relative;
	z-index: 1000;
	margin: 0 !important;
}
html.bchd-ui-ready .bchd-site-header {
	position: fixed !important;
	top: var(--bchd-ui-admin, 0px);
	left: 0;
	right: 0;
	z-index: 1000;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	height: auto !important;
	background: #fff;
	transition: box-shadow .25s ease;
}
html.bchd-ui-ready .bchd-site-header.bchd-ui-compact { box-shadow: 0 6px 22px rgba(11, 53, 88, .14); }
.bchd-site-header.bchd-ui-measuring,
.bchd-site-header.bchd-ui-measuring * { transition: none !important; }

.bchd-site-header .bchd-top-stripe {
	display: flex;
	align-items: center;
	justify-content: center;
	height: auto !important;
	min-height: 40px;
	padding: 6px var(--bchd-gutter);
	background: var(--bchd-navy-900) !important;
}
.bchd-site-header .bchd-top-notice {
	margin: 0 !important;
	color: #fff;
	font: 600 12.5px/1.35 var(--bchd-font);
	letter-spacing: .04em;
	text-align: center;
}

.bchd-site-header .bchd-masthead {
	overflow: hidden;
	max-height: var(--bchd-ui-masthead-h, 260px);
	transition: max-height .3s var(--bchd-ease), padding .3s var(--bchd-ease), opacity .2s ease;
}
.bchd-site-header.bchd-ui-compact .bchd-masthead {
	max-height: 0;
	padding-block: 0 !important;
	opacity: 0;
	visibility: hidden;
}

/* Primary menu: the link fills the whole cell, so hover/focus/active light up the full item. */
.bchd-site-header .bchd-menu-row { display: flex; align-items: stretch; border: 0 !important; }
.bchd-site-header .bchd-menu-row > .bchd-menu-language { flex: 1 1 auto; min-width: 0; }
.bchd-site-header .bchd-primary-nav { min-height: 56px !important; }
.bchd-site-header .bchd-primary-nav .wp-block-navigation__container { align-items: stretch !important; height: 100%; }
.bchd-site-header .bchd-primary-nav .wp-block-navigation-item { display: flex !important; align-items: stretch; }
.bchd-site-header .bchd-primary-nav .wp-block-navigation-item__content {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 56px;
	padding: 0 clamp(8px, 1vw, 14px) !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: inset 0 -3px 0 transparent;
	font-weight: 500 !important;
	letter-spacing: .03em;
	transition: background-color .18s ease, box-shadow .18s ease;
}
.bchd-site-header .bchd-primary-nav .wp-block-navigation-item__content[href]:hover {
	background: rgba(255, 255, 255, .13) !important;
	box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .55);
}
.bchd-site-header .bchd-primary-nav .current-menu-item > .wp-block-navigation-item__content,
body.single:not(:has(.bchd-media-entry)) .bchd-site-header .bchd-nav-news > .wp-block-navigation-item__content,
body.single:has(.bchd-media-entry) .bchd-site-header .bchd-nav-media > .wp-block-navigation-item__content,
body.bchd-is-news .bchd-site-header .bchd-nav-news > .wp-block-navigation-item__content {
	background: rgba(11, 53, 88, .32) !important;
	box-shadow: inset 0 -3px 0 var(--bchd-gold);
}
.bchd-site-header .bchd-primary-nav .wp-block-navigation-item__content:focus-visible {
	outline: 2px solid #fff !important;
	outline-offset: -5px !important;
}
.bchd-site-header .bchd-primary-nav .wp-block-navigation-item + .wp-block-navigation-item::before { z-index: 1; pointer-events: none; opacity: .45; }

.bchd-ui-minilogo {
	display: none;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 0 14px;
	background: #fff;
	border: 0;
	line-height: 0;
}
.bchd-ui-minilogo img { width: 64px; height: auto; display: block; }
@media (min-width: 981px) {
	.bchd-site-header.bchd-ui-compact .bchd-ui-minilogo { display: inline-flex; animation: bchd-ui-fade .25s ease both; }
}
@keyframes bchd-ui-fade { from { opacity: 0; } to { opacity: 1; } }

.bchd-site-header .bchd-header-search { border-radius: var(--bchd-radius-sm); overflow: hidden; }

@media (max-width: 980px) {
	.bchd-site-header .bchd-top-stripe { min-height: 32px; padding-block: 6px; }
	.bchd-site-header .bchd-top-notice { font-size: 11px; letter-spacing: .02em; }

	.bchd-site-header .bchd-header-inner {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		column-gap: var(--bchd-space-3);
		padding: 0 var(--bchd-gutter) !important;
	}
	.bchd-site-header .bchd-masthead {
		flex-wrap: nowrap !important;
		gap: var(--bchd-space-3) !important;
		padding: 10px 0 !important;
		min-width: 0;
	}
	.bchd-site-header .bchd-brand { flex: 0 1 auto !important; width: auto !important; min-width: 0 !important; }
	.bchd-site-header .bchd-header-tools {
		flex: 0 0 auto !important;
		width: auto !important;
		margin-left: auto !important;
		justify-content: flex-end !important;
		gap: var(--bchd-space-3) !important;
	}
	.bchd-site-header .bchd-header-tools > .bchd-header-search { display: none !important; }
	.bchd-site-header .bchd-logo-link { flex: 0 0 auto !important; }
	.bchd-site-header .bchd-logo-link img { width: 104px !important; }
	.bchd-site-header .bchd-brand { gap: var(--bchd-space-3) !important; }
	.bchd-site-header .bchd-brand-title { padding-left: var(--bchd-space-3) !important; }
	.bchd-site-header .bchd-brand-title p { font-size: 13px !important; line-height: 1.45 !important; }

	html body .bchd-site-header .bchd-menu-row,
	html body .bchd-site-header .bchd-primary-nav { background: transparent !important; min-height: 0 !important; }
	.bchd-site-header .bchd-primary-nav .wp-block-navigation__responsive-container-open {
		min-height: 44px;
		padding: 0 14px !important;
		border-radius: var(--bchd-radius-sm);
		background: var(--bchd-navy) !important;
		color: #fff !important;
	}
	.bchd-site-header .bchd-primary-nav .wp-block-navigation__responsive-container-open:hover { background: var(--bchd-navy-900) !important; }

	.bchd-site-header .is-menu-open .wp-block-navigation__responsive-container-content { gap: var(--bchd-space-4); }
	.bchd-site-header .is-menu-open .bchd-header-search {
		display: flex !important;
		flex: 0 0 auto !important;
		height: 48px !important;
		border-color: #fff !important;
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
	}
	.bchd-site-header .is-menu-open .wp-block-navigation-item__content {
		justify-content: flex-start !important;
		min-height: 48px;
		padding: 0 4px !important;
		font-size: 15px !important;
	}
}
@media (max-width: 720px) {
	.bchd-site-header .bchd-brand-title { display: none !important; }
}
@media (max-width: 400px) {
	.bchd-site-header .bchd-header-tools .wp-block-polylang-language-switcher a:after { display: none; }
	.bchd-site-header .bchd-logo-link img { width: 92px !important; }
}

/* ---------------------------------------------------------------- footer */
body.bchd-ui .footer-dark { padding: var(--bchd-section) var(--bchd-gutter) var(--bchd-space-5) !important; }
body.bchd-ui .footer-dark > .wp-block-columns {
	max-width: var(--bchd-wide) !important;
	margin-inline: auto !important;
	gap: clamp(24px, 4vw, 64px) !important;
	align-items: flex-start !important;
}
body.bchd-ui .footer-dark > .wp-block-columns > .wp-block-column > .wp-block-heading {
	margin: 0 0 var(--bchd-space-4) !important;
	color: #fff !important;
	font: 700 14px/1.3 var(--bchd-font) !important;
	letter-spacing: .1em;
	text-transform: uppercase;
}
body.bchd-ui .footer-dark > .wp-block-columns > .wp-block-column > .wp-block-heading::after {
	content: "";
	display: block;
	width: 32px;
	height: 3px;
	margin-top: 10px;
	background: var(--bchd-gold);
	border-radius: 2px;
}
body.bchd-ui .footer-dark p { margin: 0 0 var(--bchd-space-3); font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .86) !important; }
body.bchd-ui .footer-dark .wp-block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
body.bchd-ui .footer-dark .wp-block-list li { margin: 0; font-size: 15px; line-height: 1.5; }
body.bchd-ui .footer-dark a { color: #fff !important; text-decoration: none; transition: color .15s ease; }
body.bchd-ui .footer-dark a:hover { color: var(--bchd-gold) !important; text-decoration: underline; text-underline-offset: .2em; }
body.bchd-ui .footer-dark a[style*="f5c400"] { color: var(--bchd-gold) !important; font-weight: 600; }
body.bchd-ui .footer-dark > .wp-block-separator {
	max-width: var(--bchd-wide) !important;
	width: 100% !important;
	margin: var(--bchd-space-6) auto var(--bchd-space-4) !important;
	border: 0 !important;
	height: 1px !important;
	background: rgba(255, 255, 255, .18) !important;
}
body.bchd-ui .footer-dark > p.has-text-align-wide {
	max-width: var(--bchd-wide) !important;
	margin: 0 auto !important;
	font-size: 13px;
	color: rgba(255, 255, 255, .7) !important;
}
@media (max-width: 781px) {
	body.bchd-ui .footer-dark > .wp-block-columns { gap: var(--bchd-space-6) !important; }
}

/* ------------------------------------------------------------ page hero */
body.bchd-ui .header-media-inner-post.without-bg,
body.bchd-ui .bchd-ui-hero {
	margin: 0 calc(-1 * var(--wp--custom--spacing--outer, 5vw)) !important;
	max-width: none !important;
	padding: clamp(28px, 5vw, 56px) var(--bchd-gutter) clamp(24px, 4vw, 40px) !important;
	background: linear-gradient(180deg, var(--bchd-tint) 0%, var(--bchd-bg) 100%);
	border-bottom: 1px solid rgba(22, 66, 96, .06);
}
body.bchd-ui .header-media-inner-post .alignfull,
body.bchd-ui .header-media-inner-post .alignwide {
	margin-inline: 0 !important;
	max-width: none !important;
	width: auto !important;
	padding-inline: 0 !important;
}
body.bchd-ui .header-media-inner-post .wp-block-post-title,
body.bchd-ui.page:not(.home) main > .wp-block-group > .wp-block-post-title,
body.bchd-ui .bchd-ui-hero :is(h1, .wp-block-post-title) {
	margin: 0 auto !important;
	max-width: 960px;
	color: var(--bchd-navy) !important;
	font-size: clamp(28px, 3.6vw, 44px) !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-align: center;
}
body.bchd-ui .header-media-inner-post .wp-block-post-title::after,
body.bchd-ui.page:not(.home) main > .wp-block-group > .wp-block-post-title::after,
body.bchd-ui .bchd-ui-hero :is(h1, .wp-block-post-title)::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: 18px auto 0;
	background: var(--bchd-gold);
	border-radius: 2px;
}
body.bchd-ui.page:not(.home) main { padding-bottom: var(--bchd-section); }
body.bchd-ui.page:not(.home) main > .wp-block-group:has(> .wp-block-post-title) {
	padding: clamp(28px, 5vw, 56px) var(--bchd-gutter) clamp(24px, 4vw, 40px);
	background: linear-gradient(180deg, var(--bchd-tint) 0%, var(--bchd-bg) 100%);
	margin: 0 calc(-1 * var(--wp--custom--spacing--outer, 5vw)) var(--bchd-section) !important;
	max-width: none !important;
}
body.bchd-ui.page:not(.home) main:has(> .wp-block-group > .wp-block-post-title),
body.bchd-ui :is(.bchd-ui-single, .bchd-ui-archive, .bchd-ui-search, .bchd-ui-notfound) { padding-top: 0 !important; }
body.bchd-ui.page:not(.home) .entry-content { padding-inline: var(--bchd-gutter); }
body.bchd-ui .header-media-inner-post + main { padding-top: var(--bchd-section); }

/* ------------------------------------------- content pages without white slabs */
body.bchd-ui.single .wp-block-post-content,
body.bchd-ui.page-id-37 .wp-block-post-content,
body.bchd-ui.page-id-9 .entry-content > .bchd-programme,
body.bchd-ui.page-id-164 .entry-content > .bchd-statute,
body.bchd-ui .bchd-about-article.has-background {
	background: transparent !important;
}
body.bchd-ui .bchd-about-article.has-background {
	padding-inline: 0 !important;
	padding-block: 0 !important;
}
body.bchd-ui .bchd-about-article > *,
body.bchd-ui.page:not(.home) .entry-content > :not(.alignwide):not(.alignfull):not(.bchd-programme):not(.bchd-statute):not(.bchd-leaders-catalog):not(.bchd-books-catalog):not(.bchd-media-archive):not(.bchd-video-catalog):not(.bchd-ui-contact):not(.bchd-news-archive):not(.bchd-leaders-intro) {
	max-width: var(--bchd-text-width);
}

/* ------------------------------------------------ shared card treatment */
body.bchd-ui :where(
	.bchd-leaders-grid > .wp-block-post,
	.bchd-external-book-grid > .wp-block-post,
	.bchd-books-catalog .wp-block-post-template > .wp-block-post,
	.bchd-media-card,
	.bchd-video-entry,
	.bchd-media-events > .bchd-media-panel,
	.bchd-leaders-intro,
	.bchd-ui-card,
	.bchd-ui-panel
) {
	border: 1px solid var(--bchd-line) !important;
	border-radius: var(--bchd-radius) !important;
	background: var(--bchd-surface) !important;
	box-shadow: var(--bchd-shadow-sm);
	overflow: hidden;
	transition: box-shadow .25s var(--bchd-ease), transform .25s var(--bchd-ease), border-color .25s ease;
}
body.bchd-ui :where(
	.bchd-leaders-grid > .wp-block-post,
	.bchd-external-book-grid > .wp-block-post,
	.bchd-books-catalog .wp-block-post-template > .wp-block-post,
	.bchd-media-card,
	.bchd-ui-card
):hover {
	border-color: var(--bchd-line-strong) !important;
	box-shadow: var(--bchd-shadow-md);
	transform: translateY(-2px);
}
body.bchd-ui :is(.bchd-leaders-grid, .bchd-external-book-grid) { gap: var(--bchd-grid-gap) !important; }
body.bchd-ui .bchd-leaders-grid > li > .wp-block-post-featured-image { margin: 0 !important; }
body.bchd-ui .bchd-leaders-grid > li > .wp-block-post-title { margin: 0 !important; padding: 16px 16px 18px !important; font-size: clamp(18px, 1.6vw, 22px) !important; line-height: 1.3 !important; }
body.bchd-ui :is(.bchd-leaders-catalog, .bchd-books-catalog, .bchd-external-books, .bchd-media-archive, .bchd-video-catalog) ul.wp-block-post-template { padding: 0 !important; margin-inline: 0 !important; }
body.bchd-ui :is(.bchd-leaders-catalog, .bchd-books-catalog, .bchd-external-books, .bchd-media-archive, .bchd-video-catalog) ul.wp-block-post-template > li { margin: 0 !important; }
body.bchd-ui :is(.bchd-leaders-catalog, .bchd-books-catalog, .bchd-external-books, .bchd-media-archive, .bchd-video-catalog) {
	max-width: var(--bchd-wide) !important;
	margin-inline: auto !important;
}
body.bchd-ui .bchd-leaders-intro { padding: var(--bchd-space-4) var(--bchd-space-5) !important; margin-bottom: var(--bchd-grid-gap) !important; }

@media (prefers-reduced-motion: reduce) {
	body.bchd-ui *, body.bchd-ui *::before, body.bchd-ui *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------- news archive */
.bchd-news-archive {
	max-width: var(--bchd-wide) !important;
	margin: 0 auto !important;
	padding-inline: var(--bchd-gutter);
	box-sizing: border-box;
}
body.bchd-ui.page:not(.home) .entry-content > .bchd-news-archive { padding-inline: 0; }
body.bchd-ui.page:not(.home) .entry-content:has(> .bchd-news-archive) { max-width: var(--bchd-wide); margin-inline: auto; }
body.bchd-ui.page:not(.home) .entry-content:has(> .bchd-news-archive) > :is(h2, p) { max-width: var(--bchd-wide); margin-inline: auto; }
body.bchd-ui.page:not(.home) .entry-content:has(> .bchd-news-archive) > p { color: var(--bchd-muted); }

.bchd-ui-filters { margin: 0 0 var(--bchd-space-6); display: grid; gap: var(--bchd-space-3); }
.bchd-ui-filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bchd-space-2); }
.bchd-ui-filters__label {
	margin-right: var(--bchd-space-2);
	color: var(--bchd-muted);
	font: 600 12px/1 var(--bchd-font);
	letter-spacing: .08em;
	text-transform: uppercase;
}
.bchd-ui-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	padding: 0 14px;
	border: 1px solid var(--bchd-line);
	border-radius: 999px;
	background: #fff;
	color: var(--bchd-navy) !important;
	font: 600 13.5px/1 var(--bchd-font);
	text-decoration: none !important;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.bchd-ui-chip:hover { border-color: var(--bchd-blue); background: var(--bchd-tint); }
.bchd-ui-chip:focus-visible { outline: none; box-shadow: var(--bchd-focus); }
.bchd-ui-chip[aria-current="page"] { background: var(--bchd-navy); border-color: var(--bchd-navy); color: #fff !important; }
.bchd-ui-chip__count { color: inherit; opacity: .6; font-weight: 500; font-size: 12px; }
.bchd-ui-chip--tag { min-height: 32px; padding: 0 12px; font-size: 12.5px; font-weight: 500; }
.bchd-ui-chip--tag::before { content: "#"; opacity: .55; }
@media (max-width: 640px) {
	.bchd-ui-filters__row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--bchd-gutter)); padding-inline: var(--bchd-gutter); scroll-snap-type: x proximity; }
	.bchd-ui-filters__row::-webkit-scrollbar { display: none; }
	.bchd-ui-chip { scroll-snap-align: start; }
}

.bchd-news-archive .wp-block-query { transition: opacity .2s ease; }
.bchd-news-archive.is-loading .wp-block-query { opacity: .45; pointer-events: none; }

body.bchd-ui .bchd-ui-cards {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--bchd-grid-gap) !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}
@media (max-width: 1023px) { body.bchd-ui .bchd-ui-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { body.bchd-ui .bchd-ui-cards { grid-template-columns: minmax(0, 1fr); } }
body.bchd-ui .bchd-ui-cards > li { margin: 0 !important; padding: 0 !important; width: auto !important; min-width: 0; background: transparent !important; border: 0 !important; display: flex; }

.bchd-ui-card { position: relative; display: flex; flex-direction: column; width: 100%; margin: 0 !important; padding: 0 !important; }
.bchd-ui-card .bchd-ui-card-media,
.bchd-ui-card .bchd-ui-card-media.wp-block-post-featured-image { margin: 0 !important; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bchd-tint); }
.bchd-ui-card .bchd-ui-card-media img { width: 100%; height: 100% !important; object-fit: cover; display: block; transition: transform .45s var(--bchd-ease); }
.bchd-ui-card:hover .bchd-ui-card-media img { transform: scale(1.04); }
.bchd-ui-card-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--bchd-navy) 0%, var(--bchd-blue) 100%);
}
.bchd-ui-card-placeholder img { width: 42% !important; height: auto !important; object-fit: contain !important; padding: 10px 14px; background: #fff; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.bchd-ui-card-body { display: flex; flex-direction: column; gap: var(--bchd-space-3); flex: 1; padding: var(--bchd-space-5) !important; margin: 0 !important; }
.bchd-ui-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 !important; color: var(--bchd-muted); font: 500 12.5px/1.3 var(--bchd-font); }
.bchd-ui-card-meta .wp-block-post-date { margin: 0; color: inherit; font: inherit; }
.bchd-ui-card-meta .wp-block-post-date time { display: inline-flex; align-items: center; gap: 6px; }
.bchd-ui-card-meta .wp-block-post-date time::before {
	content: "";
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.bchd-ui-card-cat { margin: 0 !important; font: inherit; }
.bchd-ui-card-cat a {
	position: relative;
	z-index: 2;
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	background: var(--bchd-tint);
	color: var(--bchd-blue) !important;
	font-weight: 600;
	font-size: 11.5px;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none !important;
}
.bchd-ui-card-cat a:hover { background: var(--bchd-navy); color: #fff !important; }
.bchd-ui-card-cat .wp-block-post-terms__separator { display: none; }
.bchd-ui-card .bchd-ui-card-title { margin: 0 !important; font-size: clamp(17px, 1.35vw, 19px) !important; line-height: 1.35 !important; font-weight: 700; }
.bchd-ui-card .bchd-ui-card-title a { color: var(--bchd-navy) !important; text-decoration: none !important; }
.bchd-ui-card .bchd-ui-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bchd-ui-card:hover .bchd-ui-card-title a { color: var(--bchd-blue) !important; }
.bchd-ui-card:has(.bchd-ui-card-title a:focus-visible) { box-shadow: var(--bchd-focus), var(--bchd-shadow-md) !important; }
.bchd-ui-card .bchd-ui-card-title a:focus-visible { outline: none; }
.bchd-ui-card .bchd-ui-card-excerpt { margin: 0 !important; color: var(--bchd-muted); font-size: 15px; line-height: 1.6; }
.bchd-ui-card .bchd-ui-card-excerpt p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bchd-ui-card .wp-block-post-excerpt__more-text { display: none; }
.bchd-ui-card-more {
	margin-top: auto !important;
	padding-top: var(--bchd-space-2);
	color: var(--bchd-blue);
	font: 600 14px/1.3 var(--bchd-font);
}
.bchd-ui-card-more::after { content: " →"; transition: margin .2s ease; }
.bchd-ui-card:hover .bchd-ui-card-more::after { margin-left: 4px; }

body.bchd-ui.page:not(.home) main.wp-block-group { padding-top: var(--bchd-space-6) !important; }
body.bchd-ui.page:not(.home) main.wp-block-group:has(> .entry-content > .bchd-ui-intro:first-child) { padding-top: var(--bchd-space-5) !important; }
body.bchd-ui.page:not(.home) main.wp-block-group > .entry-content { margin-top: 0 !important; }
body.bchd-ui.page:not(.home) main.wp-block-group > .entry-content > :first-child,
body.bchd-ui.page:not(.home) main.wp-block-group > .entry-content > :first-child > :first-child { margin-top: 0 !important; }
body.bchd-ui .entry-content > .bchd-ui-intro:first-child { margin-bottom: var(--bchd-space-6) !important; }

/* pagination */
body.bchd-ui .wp-block-query-pagination {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center !important;
	align-items: center;
	gap: var(--bchd-space-2) !important;
	margin: var(--bchd-space-7) 0 0 !important;
}
body.bchd-ui .wp-block-query-pagination-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bchd-space-2); margin: 0 !important; }
body.bchd-ui .wp-block-query-pagination :is(.page-numbers, .wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 44px;
	height: 44px;
	margin: 0 !important;
	padding: 0 6px !important;
	border: 1px solid var(--bchd-line) !important;
	border-radius: var(--bchd-radius-sm) !important;
	background: #fff !important;
	color: var(--bchd-navy) !important;
	font: 600 14px/1 var(--bchd-font) !important;
	text-decoration: none !important;
	box-sizing: border-box;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
body.bchd-ui .wp-block-query-pagination a:is(.page-numbers, .wp-block-query-pagination-previous, .wp-block-query-pagination-next):hover { border-color: var(--bchd-blue) !important; background: var(--bchd-tint) !important; }
body.bchd-ui .wp-block-query-pagination .page-numbers.current { background: var(--bchd-navy) !important; border-color: var(--bchd-navy) !important; color: #fff !important; }
body.bchd-ui .wp-block-query-pagination .page-numbers.dots { border-color: transparent !important; background: transparent !important; }
body.bchd-ui .wp-block-query-pagination a:focus-visible { outline: none; box-shadow: var(--bchd-focus); }
body.bchd-ui .wp-block-query-pagination .page-numbers { width: 44px !important; }
body.bchd-ui .wp-block-query-pagination .page-numbers.dots { width: 28px !important; min-width: 28px; }
body.bchd-ui .wp-block-query-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) { width: 44px; padding: 0 !important; font-size: 0 !important; }
body.bchd-ui .wp-block-query-pagination-previous { margin-right: var(--bchd-space-2) !important; }
body.bchd-ui .wp-block-query-pagination-next { margin-left: var(--bchd-space-2) !important; }
body.bchd-ui .wp-block-query-pagination-previous-arrow,
body.bchd-ui .wp-block-query-pagination-next-arrow { margin: 0 !important; font: 600 18px/1 var(--bchd-font); }
body.bchd-ui .wp-block-query-pagination .is-disabled { color: var(--bchd-muted) !important; background: transparent !important; opacity: .45; cursor: default; }

.bchd-ui-empty {
	padding: var(--bchd-space-7) var(--bchd-space-5);
	border: 1px dashed var(--bchd-line-strong);
	border-radius: var(--bchd-radius);
	background: #fff;
	text-align: center;
	color: var(--bchd-muted);
}
.bchd-ui-empty strong { display: block; margin-bottom: var(--bchd-space-2); color: var(--bchd-navy); font-size: 18px; }

/* archive hero */
.bchd-ui-hero { text-align: center; }
.bchd-ui-hero .bchd-ui-eyebrow {
	display: inline-block;
	margin: 0 0 var(--bchd-space-3) !important;
	color: var(--bchd-blue);
	font: 700 12px/1.2 var(--bchd-font);
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
}
.bchd-ui-hero .bchd-ui-lead { max-width: 680px; margin: var(--bchd-space-4) auto 0 !important; color: var(--bchd-muted); font-size: 16.5px; line-height: 1.65; }
.bchd-ui-main { padding: var(--bchd-section) 0; }

/* ------------------------------------------------------------ single post */
body.bchd-ui .bchd-ui-single .bchd-ui-hero { padding-bottom: clamp(20px, 3vw, 32px) !important; }
.bchd-ui-meta { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; margin: 0 0 var(--bchd-space-4) !important; color: var(--bchd-muted); font: 500 14px/1.3 var(--bchd-font); }
.bchd-ui-meta .wp-block-post-date { margin: 0; color: inherit; font: inherit; }
.bchd-ui-meta .wp-block-post-terms { margin: 0; font: inherit; }
.bchd-ui-meta .wp-block-post-terms a {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--bchd-line);
	color: var(--bchd-blue) !important;
	font: 600 12px/1.2 var(--bchd-font);
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none !important;
}
body.bchd-ui .bchd-ui-meta .wp-block-post-terms a { border: 1px solid var(--bchd-line-strong) !important; border-radius: 999px !important; background: #fff !important; padding: 5px 12px !important; text-transform: uppercase !important; }
body.bchd-ui .bchd-ui-meta .wp-block-post-terms a:hover { border-color: var(--bchd-blue) !important; background: var(--bchd-tint) !important; }
.bchd-ui-meta .wp-block-post-terms__separator { display: inline-block; width: 6px; font-size: 0; }

.bchd-ui-article { max-width: calc(var(--bchd-text-width) + 2 * var(--bchd-gutter)); margin: 0 auto !important; padding: var(--bchd-space-6) var(--bchd-gutter) var(--bchd-section) !important; box-sizing: border-box; }
.bchd-ui-article > * { max-width: none !important; }
.bchd-ui-article .bchd-ui-cover { margin: 0 0 var(--bchd-space-6) !important; border-radius: var(--bchd-radius); overflow: hidden; box-shadow: var(--bchd-shadow-sm); }
.bchd-ui-article .bchd-ui-cover img { width: 100%; height: auto; display: block; }
.bchd-ui-article .wp-block-post-content { padding: 0 !important; }
.bchd-ui-article .wp-block-post-content > * { max-width: none !important; margin-inline: 0 !important; }
.bchd-ui-article .wp-block-post-content > p:first-child { font-size: 1.1em; color: var(--bchd-navy); font-weight: 500; }
.bchd-ui-article .wp-block-post-content img { border-radius: var(--bchd-radius-sm); }

.bchd-ui-tags a, .bchd-ui-meta .wp-block-post-terms a, .bchd-ui-card-cat a { text-transform: none; }
.bchd-ui-meta .wp-block-post-terms a, .bchd-ui-card-cat a { text-transform: uppercase; }
.bchd-ui-tags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: var(--bchd-space-6) 0 0 !important; padding-top: var(--bchd-space-5); border-top: 1px solid var(--bchd-line); font: 600 14px/1.4 var(--bchd-font); }
body.bchd-ui :is(.bchd-ui-tags, .bchd-media-outlet) a { display: inline; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; min-height: 0 !important; }
:is(.bchd-ui-tags, .bchd-media-outlet) a { color: var(--bchd-blue) !important; text-decoration: none !important; text-transform: none !important; letter-spacing: 0; transition: color .2s ease; }
:is(.bchd-ui-tags, .bchd-media-outlet) a::before { content: "#"; }
:is(.bchd-ui-tags, .bchd-media-outlet) a:hover { color: var(--bchd-navy) !important; text-decoration: underline !important; text-underline-offset: 3px; }
:is(.bchd-ui-tags, .bchd-media-outlet) .wp-block-post-terms__separator { display: none; }

/* media cards (СМІ пра нас) */
body.bchd-ui :is(.bchd-media-grid, .bchd-video-grid, .bchd-home-video-list) > li { border: 0 !important; background: transparent !important; }
body.bchd-ui :is(.bchd-video-grid, .bchd-home-video-list) > li > .entry-content { padding: 0 !important; margin: 0 !important; height: 100%; }
body.bchd-ui .bchd-video-grid > li > .entry-content > .bchd-video-entry { height: 100%; }

/* home video panel: the panel is the card, the entry inside stays flat */
body.bchd-ui .bchd-video-panel .bchd-video-entry { border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible; }
body.bchd-ui .bchd-video-panel .bchd-video-player { border-radius: var(--bchd-radius) !important; overflow: hidden; }
body.bchd-ui .bchd-video-panel .bchd-video-title { margin: var(--bchd-space-4) 0 var(--bchd-space-2) !important; }
body.bchd-ui .bchd-video-panel .bchd-video-watch { margin: 0 !important; }
body.bchd-ui .bchd-video-panel .bchd-all-videos { margin: var(--bchd-space-5) 0 0 !important; padding-top: var(--bchd-space-4); border-top: 1px solid var(--bchd-line); }
body.bchd-ui :is(.bchd-video-watch, .bchd-all-videos) a { font-weight: 600; text-decoration: none !important; }
body.bchd-ui :is(.bchd-video-watch, .bchd-all-videos) a:hover { text-decoration: underline !important; text-underline-offset: 3px; }
body.bchd-ui .bchd-media-card { display: flex; flex-direction: column; height: 100%; }
body.bchd-ui .bchd-media-outlet { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 18px 18px 0 !important; font: 600 13px/1.4 var(--bchd-font) !important; }
body.bchd-ui .bchd-media-date { margin: 4px 18px 0 !important; }
body.bchd-ui.home main.main-front-page { padding-top: clamp(var(--bchd-space-6), 4vw, var(--bchd-space-7)) !important; padding-bottom: clamp(var(--bchd-space-7), 6vw, var(--bchd-space-8)) !important; }
body.bchd-ui.home .bchd-media-outlet { display: none !important; }
body.bchd-ui.home .bchd-media-date { margin-top: 18px !important; }
body.bchd-ui .bchd-media-title { margin: 10px 18px 0 !important; line-height: 1.3 !important; }
body.bchd-ui .bchd-media-title a { color: var(--bchd-navy) !important; text-decoration: none !important; }
body.bchd-ui .bchd-media-title a:hover { color: var(--bchd-blue) !important; }
body.bchd-ui .bchd-media-excerpt { display: flex; flex-direction: column; flex: 1 1 auto; padding: 10px 18px 18px !important; }
body.bchd-ui .bchd-media-excerpt .wp-block-post-excerpt__excerpt { margin: 0 !important; }
body.bchd-ui .bchd-media-excerpt .wp-block-post-excerpt__more-text { margin: auto 0 0 !important; padding: 14px 0 0 !important; }
body.bchd-ui .bchd-media-excerpt .wp-block-post-excerpt__more-link { margin: 0 !important; font-weight: 600; text-decoration: none !important; }
body.bchd-ui .bchd-media-excerpt .wp-block-post-excerpt__more-link:hover { text-decoration: underline !important; text-underline-offset: 3px; }

.bchd-ui-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bchd-space-2); margin: var(--bchd-space-5) 0 0; color: var(--bchd-muted); font: 600 12px/1 var(--bchd-font); letter-spacing: .08em; text-transform: uppercase; }
.bchd-ui-share a, .bchd-ui-share button {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 12px;
	border: 1px solid var(--bchd-line); border-radius: 999px; background: #fff; color: var(--bchd-navy) !important;
	font: 600 13px/1 var(--bchd-font); letter-spacing: 0; text-transform: none; text-decoration: none !important; cursor: pointer;
}
.bchd-ui-share a:hover, .bchd-ui-share button:hover { border-color: var(--bchd-blue); background: var(--bchd-tint); }
.bchd-ui-share__label { margin-right: 4px; }
.bchd-ui-share .bchd-ui-share__btn { --brand: var(--bchd-navy); width: 42px; height: 42px; min-width: 0; min-height: 0; padding: 0; color: var(--bchd-navy) !important; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.bchd-ui-share .bchd-ui-share__btn svg { width: 19px; height: 19px; display: block; }
.bchd-ui-share .bchd-ui-share__btn.is-facebook { --brand: #1877f2; }
.bchd-ui-share .bchd-ui-share__btn.is-x { --brand: #000; }
.bchd-ui-share .bchd-ui-share__btn.is-telegram { --brand: #229ed9; }
.bchd-ui-share .bchd-ui-share__btn.is-whatsapp { --brand: #25d366; }
.bchd-ui-share .bchd-ui-share__btn.is-link { --brand: var(--bchd-blue); }
.bchd-ui-share .bchd-ui-share__btn:hover { background: var(--brand); border-color: var(--brand); color: #fff !important; transform: translateY(-2px); }
.bchd-ui-share .bchd-ui-share__btn:focus-visible { outline: none; box-shadow: var(--bchd-focus); }
@media (max-width: 600px) {
	.bchd-ui-share { flex-wrap: nowrap; gap: 8px; }
	.bchd-ui-share .bchd-ui-share__btn { flex: 0 0 auto; width: 40px; height: 40px; }
	.bchd-ui-share__label { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; margin-right: 2px; }
}

/* prev / next */
.bchd-ui-postnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bchd-space-4); margin: var(--bchd-space-7) 0 0; }
.bchd-ui-postnav > * { margin: 0 !important; }
.bchd-ui-postnav:has(> .bchd-post-nav:only-child) { grid-template-columns: minmax(0, 1fr); }
.bchd-ui-postnav > .bchd-post-nav--next:only-child { grid-column: 1 / -1; }
.bchd-post-nav { position: relative; min-width: 0; height: 100%; border: 1px solid var(--bchd-line); border-radius: var(--bchd-radius); background: #fff; box-shadow: var(--bchd-shadow-sm); overflow: hidden; transition: box-shadow .25s var(--bchd-ease), transform .25s var(--bchd-ease), border-color .25s ease; }
.bchd-post-nav:hover { border-color: var(--bchd-line-strong); box-shadow: var(--bchd-shadow-md); transform: translateY(-2px); }
.bchd-post-nav__link { display: grid; grid-template-columns: 120px minmax(0, 1fr); height: 100%; min-height: 112px; color: inherit; text-decoration: none !important; }
.bchd-post-nav--next .bchd-post-nav__link { grid-template-columns: minmax(0, 1fr) 120px; }
.bchd-post-nav--next .bchd-post-nav__media { order: 2; }
.bchd-post-nav--next .bchd-post-nav__body { text-align: right; align-items: flex-end; }
.bchd-post-nav__media { position: relative; overflow: hidden; background: var(--bchd-tint); }
.bchd-post-nav__img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; transition: transform .45s var(--bchd-ease); }
.bchd-post-nav:hover .bchd-post-nav__img { transform: scale(1.05); }
.bchd-post-nav__img--placeholder { background: linear-gradient(135deg, var(--bchd-navy), var(--bchd-blue)); }
.bchd-post-nav__body { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; padding: var(--bchd-space-4) var(--bchd-space-5); }
.bchd-post-nav__label { display: inline-flex !important; align-items: center; gap: 12px; margin: 0 !important; color: var(--bchd-blue); font: 700 12px/1 var(--bchd-font); letter-spacing: .1em; text-transform: uppercase; }
.bchd-post-nav__arrow {
	display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
	background: var(--bchd-navy); color: #fff; font-size: 14px; line-height: 1; letter-spacing: 0;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.bchd-post-nav:hover .bchd-post-nav__arrow { background: var(--bchd-gold); color: var(--bchd-navy-900); }
.bchd-post-nav--previous:hover .bchd-post-nav__arrow { transform: translateX(-3px); }
.bchd-post-nav--next:hover .bchd-post-nav__arrow { transform: translateX(3px); }
.bchd-post-nav__title {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
	margin: 0 !important; color: var(--bchd-navy); font: 600 clamp(15px, 1.2vw, 17px)/1.4 var(--bchd-font);
}
.bchd-post-nav__link:focus-visible { outline: none; box-shadow: inset var(--bchd-focus); border-radius: var(--bchd-radius); }
@media (max-width: 700px) {
	.bchd-ui-postnav { grid-template-columns: minmax(0, 1fr); gap: var(--bchd-space-3); margin-top: var(--bchd-space-6); }
	.bchd-post-nav { height: 84px; }
	.bchd-post-nav__link, .bchd-post-nav--next .bchd-post-nav__link { grid-template-columns: 84px minmax(0, 1fr); height: 84px; min-height: 0; }
	.bchd-post-nav--next .bchd-post-nav__media { order: 0; }
	.bchd-post-nav--next .bchd-post-nav__body { text-align: left; align-items: flex-start; }
	.bchd-post-nav--next .bchd-post-nav__label { flex-direction: row-reverse; }
	.bchd-post-nav__body { gap: 6px; padding: 10px 14px; }
	.bchd-post-nav__label { gap: 8px; font-size: 11px; }
	.bchd-post-nav__arrow { flex-basis: 22px; width: 22px; height: 22px; font-size: 12px; }
	.bchd-post-nav__title { -webkit-line-clamp: 2; line-clamp: 2; font-size: 14px; line-height: 1.35; }
}

/* ------------------------------------------------------------- contact */
.bchd-ui-contact {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: var(--bchd-grid-gap);
	max-width: 1080px !important;
	margin: 0 auto !important;
	align-items: start;
}
@media (max-width: 860px) { .bchd-ui-contact { grid-template-columns: minmax(0, 1fr); } }
.bchd-ui-panel { padding: clamp(20px, 3vw, 32px) !important; }
body.bchd-ui .bchd-ui-panel.bchd-ui-contact__info { background: linear-gradient(160deg, var(--bchd-navy) 0%, var(--bchd-navy-900) 100%) !important; border-color: var(--bchd-navy) !important; color: #fff; }
.bchd-ui-contact__info :is(h2, h3) { color: #fff !important; margin: 0 0 var(--bchd-space-3) !important; font-size: 22px !important; }
.bchd-ui-contact__info p { color: rgba(255, 255, 255, .85); font-size: 15.5px; line-height: 1.65; margin: 0 0 var(--bchd-space-5); }
.bchd-ui-contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--bchd-space-4); }
.bchd-ui-contact__list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--bchd-space-3); align-items: center; margin: 0 !important; }
.bchd-ui-contact__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--bchd-gold); }
.bchd-ui-contact__icon svg { width: 20px; height: 20px; }
.bchd-ui-contact__list small { display: block; color: rgba(255, 255, 255, .65); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.bchd-ui-contact__list a { color: #fff !important; font-weight: 600; text-decoration: none !important; overflow-wrap: anywhere; }
.bchd-ui-contact__list a:hover { color: var(--bchd-gold) !important; }
.bchd-ui-contact__join { margin-top: var(--bchd-space-6); padding-top: var(--bchd-space-5); border-top: 1px solid rgba(255, 255, 255, .18); }
.bchd-ui-contact__join .bchd-ui-btn { background: var(--bchd-gold); border-color: var(--bchd-gold); color: var(--bchd-navy-900) !important; }
.bchd-ui-contact__join .bchd-ui-btn:hover { background: #ffd633; border-color: #ffd633; }

.bchd-ui-form { display: grid; gap: var(--bchd-space-4); }
.bchd-ui-form h2 { margin: 0 !important; font-size: 22px !important; }
.bchd-ui-form__intro { margin: -6px 0 var(--bchd-space-2) !important; color: var(--bchd-muted); font-size: 15px; }
.bchd-ui-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bchd-space-4); }
@media (max-width: 560px) { .bchd-ui-form__row { grid-template-columns: minmax(0, 1fr); } }
.bchd-ui-field { display: grid; gap: 6px; margin: 0; }
.bchd-ui-field label { color: var(--bchd-navy); font: 600 14px/1.3 var(--bchd-font); }
:is(.bchd-ui-field, .bchd-ui-check) label .req { color: var(--bchd-danger); font-weight: 700; margin-left: 2px; }
.bchd-ui-check label .req { font-size: 13px; margin-left: 0; }
.bchd-ui-field label .opt { color: var(--bchd-muted); font-weight: 500; font-size: 12.5px; margin-left: 4px; }
.bchd-ui-field :is(input, select, textarea) {
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--bchd-line-strong);
	border-radius: var(--bchd-radius-sm);
	background: #fff;
	color: var(--bchd-text);
	font: 400 16px/1.4 var(--bchd-font);
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.bchd-ui-field select {
	padding-right: 40px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23164260' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center/18px no-repeat;
}
.bchd-ui-field textarea { min-height: 160px; resize: vertical; }
.bchd-ui-field :is(input, select, textarea):hover { border-color: var(--bchd-blue); }
.bchd-ui-field :is(input, select, textarea):focus { outline: none; border-color: var(--bchd-blue); box-shadow: 0 0 0 3px rgba(40, 119, 163, .2); }
.bchd-ui-field.has-error :is(input, select, textarea) { border-color: var(--bchd-danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.bchd-ui-field__error { min-height: 0; margin: 0; color: var(--bchd-danger); font-size: 13px; line-height: 1.35; }
.bchd-ui-field__error:empty { display: none; }
.bchd-ui-check { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--bchd-text); font-size: 14px; line-height: 1.5; }
.bchd-ui-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--bchd-navy); }
.bchd-ui-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.bchd-ui-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--bchd-space-4); }
.bchd-ui-form__actions .bchd-ui-btn { min-width: 180px; min-height: 50px; font-size: 16px; }
.bchd-ui-form__note { margin: 0; color: var(--bchd-muted); font-size: 13px; }
.bchd-ui-spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: bchd-ui-spin .7s linear infinite; display: none; }
.bchd-ui-form.is-sending .bchd-ui-spinner { display: inline-block; }
@keyframes bchd-ui-spin { to { transform: rotate(360deg); } }

.bchd-ui-notice { display: flex; gap: var(--bchd-space-3); align-items: flex-start; padding: var(--bchd-space-4); border-radius: var(--bchd-radius-sm); font-size: 15px; line-height: 1.5; }
.bchd-ui-notice[hidden] { display: none; }
.bchd-ui-notice--success { background: #e7f5ee; border: 1px solid #9fd6b9; color: #14532d; }
.bchd-ui-notice--error { background: #fdecea; border: 1px solid #f5b5ae; color: #7a1d14; }

.bchd-ui-toast {
	position: fixed;
	left: 50%;
	bottom: max(20px, env(safe-area-inset-bottom));
	z-index: 2000;
	max-width: min(92vw, 460px);
	padding: 14px 18px;
	border-radius: var(--bchd-radius);
	border-left: 5px solid var(--bchd-success);
	background: #fff;
	color: var(--bchd-navy-900);
	box-shadow: 0 10px 30px rgba(11, 53, 88, .28), 0 0 0 1px rgba(11, 53, 88, .08);
	font: 500 15px/1.45 var(--bchd-font);
	transform: translate(-50%, 140%);
	opacity: 0;
	transition: transform .35s var(--bchd-ease), opacity .35s ease;
}
.bchd-ui-toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.bchd-ui-toast--error { border-left-color: var(--bchd-danger); }

/* ------------------------------------------------------- search and 404 */
.bchd-ui-searchform { display: flex; max-width: 640px; margin: var(--bchd-space-5) auto 0; border: 1px solid var(--bchd-line-strong); border-radius: var(--bchd-radius); background: #fff; overflow: hidden; box-shadow: var(--bchd-shadow-sm); }
.bchd-ui-searchform:focus-within { border-color: var(--bchd-blue); box-shadow: 0 0 0 3px rgba(40, 119, 163, .2); }
.bchd-ui-searchform input[type="search"] { flex: 1; min-width: 0; min-height: 54px; padding: 0 18px; border: 0 !important; background: transparent; color: var(--bchd-text); font: 400 16px/1.3 var(--bchd-font); outline: none; box-shadow: none !important; }
.bchd-ui-searchform button { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; border: 0; background: var(--bchd-navy); color: #fff; font: 600 15px/1 var(--bchd-font); cursor: pointer; transition: background-color .15s ease; }
.bchd-ui-searchform button:hover { background: var(--bchd-navy-900); }
.bchd-ui-searchform button:focus-visible { outline: none; box-shadow: inset var(--bchd-focus); }
.bchd-ui-searchform button svg { width: 18px; height: 18px; }
@media (max-width: 480px) { .bchd-ui-searchform button span { display: none; } .bchd-ui-searchform button { padding: 0 16px; } }
.bchd-ui-search-count { margin: var(--bchd-space-3) 0 0 !important; color: var(--bchd-muted); font-size: 14px; }

.bchd-ui-404 { max-width: 720px; margin: 0 auto; padding: clamp(48px, 9vw, 110px) var(--bchd-gutter); text-align: center; }
.bchd-ui-404 .bchd-ui-404__code {
	margin: 0 !important;
	font: 800 clamp(88px, 16vw, 168px)/1 var(--bchd-font);
	letter-spacing: -.04em;
	background: linear-gradient(135deg, var(--bchd-navy) 10%, var(--bchd-blue) 90%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.bchd-ui-404 h1 { margin: var(--bchd-space-3) 0 var(--bchd-space-3) !important; font-size: clamp(24px, 3vw, 34px) !important; }
.bchd-ui-404 p { margin: 0 auto; max-width: 520px; color: var(--bchd-muted); font-size: 16.5px; line-height: 1.65; }
.bchd-ui-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--bchd-space-3); margin-top: var(--bchd-space-6); }
.bchd-ui-404__links { margin-top: var(--bchd-space-6) !important; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--bchd-space-2); }

/* ------------------------------------------------------------- YouTube */
.bchd-ui-yt { position: relative; aspect-ratio: 16 / 9; width: 100%; margin: var(--bchd-space-5) 0; border-radius: var(--bchd-radius); overflow: hidden; background: #0b1620; box-shadow: var(--bchd-shadow-sm); }
.bchd-ui-yt iframe, .bchd-ui-yt__btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bchd-ui-yt__btn { display: block; padding: 0; background: #0b1620 center/cover no-repeat; cursor: pointer; }
.bchd-ui-yt__btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.45)); transition: background .2s ease; }
.bchd-ui-yt__btn:hover::before { background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.3)); }
.bchd-ui-yt__play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); border-radius: 14px; background: rgba(204, 0, 0, .92); transition: transform .2s ease, background-color .2s ease; }
.bchd-ui-yt__play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.bchd-ui-yt__btn:hover .bchd-ui-yt__play { transform: translate(-50%, -50%) scale(1.08); background: #f00; }
.bchd-ui-yt__btn:focus-visible { outline: none; box-shadow: inset var(--bchd-focus); }
body.bchd-ui .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
body.bchd-ui .wp-block-embed.is-type-video .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
body.bchd-ui .wp-block-embed.is-type-video .wp-block-embed__wrapper::before { display: none; }

/* --------------------------------------------- statute / programme docs */
body.bchd-ui :is(.bchd-statute, .bchd-programme) { padding-inline: 0 !important; }
body.bchd-ui :is(.bchd-statute-toc, .bchd-programme-toc) {
	border: 1px solid var(--bchd-line) !important;
	border-radius: var(--bchd-radius) !important;
	background: #fff !important;
	box-shadow: var(--bchd-shadow-sm);
}
body.bchd-ui .bchd-statute .bchd-statute-points li a { border-radius: var(--bchd-radius-sm); }

/* ------------------------------------------------ phones: use the full width */
@media (max-width: 600px) {
	body.bchd-ui {
		--wp--custom--spacing--outer: 16px;
		--wp--style--root--padding-left: 16px;
		--wp--style--root--padding-right: 16px;
	}
	body.bchd-ui .wp-site-blocks { padding-left: 16px !important; padding-right: 16px !important; }
	body.bchd-ui.page:not(.home) .entry-content,
	body.bchd-ui .bchd-ui-article { padding-inline: 0 !important; }
	body.bchd-ui.page:not(.home) .entry-content { margin-inline: 0 !important; }
	body.bchd-ui .bchd-ui-article .wp-block-post-content > :is(.alignwide, .alignfull) { margin-inline: 0 !important; }
}
