/*
 * BaltHUB: base, header, footer, breadcrumbs, pagination, single post, search, 404.
 * Tokens measured on the Impreza 8.8.2 front end (docs/theme/02-design-spec.md).
 * Block and pattern styles live in blocks.css (loaded after this file).
 *
 * rem = 16px; at <=660px html is 14px / line-height 1.2 (as on the old site), so rem-based
 * paddings shrink the same way.
 */

:root {
	--bh-text: #000;
	--bh-accent: #7baecc;
	--bh-accent-hover: #c5c5c5; /* fills only; for link text use --bh-accent-text-hover */
	--bh-accent-text: #33708f; /* accent for TEXT, links and focus rings: 5.17-5.45:1 on #fff / #f0fcff / #fff8ef */
	--bh-accent-text-hover: #1f4f69;
	--bh-danger: #db8d91;
	--bh-bg: #f0fcff;
	--bh-bg-cream: #fff8ef;
	--bh-muted: #6e6e6e;
	--bh-white: #fff;
	--bh-radius: 8px;
	--bh-container: 1200px;
	--bh-gutter: 2.5rem;
	--bh-header-h: 90px;
	--bh-ease: cubic-bezier(.78, .13, .15, .86);
	--bh-font: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (max-width: 1024px) { :root { --bh-header-h: 60px; } }
@media (max-width: 660px) { :root { --bh-header-h: 50px; } }

/* == Base =================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
@media (max-width: 660px) { html { font-size: 14px; line-height: 1.2; } }
body {
	margin: 0;
	background: var(--bh-white);
	color: var(--bh-text);
	font: 400 1rem/20px var(--bh-font);
	-webkit-font-smoothing: antialiased;
}
@media (max-width: 660px) { body { line-height: 1.2; } }
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: var(--bh-accent-text); text-decoration: none; transition: color .3s; }
a:hover { color: var(--bh-accent-text-hover); }
:focus-visible { outline: 2px solid var(--bh-accent-text); outline-offset: 2px; }
p { margin: 0 0 1.5rem; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; color: var(--bh-text); font-family: var(--bh-font); }
h1 { margin-bottom: 20px; font-size: 50px; line-height: 1.1; font-weight: 600; }
h2 { margin-bottom: 20px; font-size: 40px; line-height: 1.1; font-weight: 600; }
h3 { font-size: 28px; line-height: 1.8; font-weight: 700; }
/* Old site loaded Rubik 400/600 only, so every "500" rendered as 400: keep that look. */
h4 { font-size: 24px; line-height: 1.2; font-weight: 400; }
h5 { font-size: 20px; line-height: 30px; font-weight: 400; }
h6 { font-size: 36px; line-height: 1.2; font-weight: 700; }
@media (max-width: 660px) {
	h1, h2 { font-size: 32px; }
	h3 { font-size: 24px; }
	h6 { font-size: 30px; }
}

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; margin: 0;
	padding: 12px 20px; clip: auto; clip-path: none; background: var(--bh-white); color: var(--bh-text);
	border-radius: var(--bh-radius); box-shadow: 0 5px 15px rgba(0, 0, 0, .15);
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

.bh-container { width: 100%; max-width: var(--bh-container); margin-inline: auto; }

/* Shared button (404 and templates; block buttons are styled in blocks.css). */
.bh-btn {
	position: relative; display: inline-flex; align-items: center; gap: .5em;
	padding: .8em 1.8em; border: 0; border-radius: var(--bh-radius);
	font: 400 1rem/1.2 var(--bh-font); cursor: pointer;
	transition: background-color .3s, box-shadow .3s, color .3s;
}
.bh-btn--danger { background: var(--bh-danger); color: #fff; }
.bh-btn--danger:hover, .bh-btn--danger:focus-visible { background: #fff; color: var(--bh-danger); box-shadow: inset 0 0 0 2px var(--bh-danger); }

/* == Header ================================================================= */
/* Fixed bar: 90 / 60 / 50px; 70 / 50 / 50px once scrolled (.is-sticky, main.js). */
.bh-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 110;
	background: rgba(255, 255, 255, .9); color: var(--bh-text);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
	transition: background .3s var(--bh-ease), box-shadow .3s var(--bh-ease);
}
.admin-bar .bh-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .bh-header { top: 46px; } }
.bh-header__bar { position: relative; padding-inline: var(--bh-gutter); }
.bh-header__in {
	display: flex; align-items: center; max-width: var(--bh-container); margin-inline: auto;
	height: var(--bh-header-h); transition: height .3s var(--bh-ease);
}
.bh-header.is-sticky .bh-header__in { height: 70px; }
@media (max-width: 1024px) { .bh-header.is-sticky .bh-header__in { height: 50px; } }
.bh-header__cell { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.bh-header__cell--left { justify-content: flex-start; }
.bh-header__cell--center { justify-content: center; }
.bh-header__cell--right { justify-content: flex-end; width: 50px; }

.bh-logo { display: block; flex: none; }
.bh-logo a { display: block; line-height: 0; }
.bh-logo img, .bh-logo .custom-logo { display: block; width: auto; height: 60px; }
@media (max-width: 1024px) { .bh-logo img, .bh-logo .custom-logo { height: 44px; } }

/* Menu */
.bh-nav { display: flex; }
.bh-nav__list { display: flex; margin: 0; padding: 0; list-style: none; }
.bh-nav__list li { position: relative; margin: 0; }
.bh-nav__list > li > a {
	display: block; padding: 0 2rem; color: var(--bh-text);
	font-size: 16px; font-weight: 400; line-height: var(--bh-header-h);
	transition: color .3s, line-height .3s var(--bh-ease);
	white-space: nowrap;
}
.bh-header.is-sticky .bh-nav__list > li > a { line-height: 70px; }
@media (max-width: 1024px) { .bh-header.is-sticky .bh-nav__list > li > a { line-height: 50px; } }
.bh-nav__list > li > a:hover,
.bh-nav__list > li > a:focus-visible,
.bh-nav__list > li:hover > a,
.bh-nav__list > li:focus-within > a,
.bh-nav__list > li.current-menu-item > a,
.bh-nav__list > li.current-menu-ancestor > a,
.bh-nav__list > li.current_page_item > a,
.bh-nav__list > li.opened > a { color: var(--bh-accent-text); }
.bh-nav__list > li.menu-item-has-children > a::after,
.bh-nav__toggle::before {
	display: inline-block; width: 1.3em; height: 1.3em; margin: -.1em 0 0 .4em; vertical-align: middle;
	background: currentColor; content: "";
	-webkit-mask: var(--bh-chevron) center / contain no-repeat; mask: var(--bh-chevron) center / contain no-repeat;
	--bh-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
}
.bh-nav__toggle { display: none; }
/* 900-1279px: side padding shrinks 32 -> 12px, so 5 items (+ Lachin, C11) and longer et/uk/ru labels fit next to logo and switcher. */
@media (max-width: 1279px) { .bh-nav__list > li > a { padding: 0 clamp(.75rem, 5.25vw - 2.2rem, 2rem); } }

/* Menu item with class "bh-nav__item--accent" (Lachin / RefAid TWIIN, C11): outline pill, same look as the second hero button. */
.bh-nav__list > li.bh-nav__item--accent { display: flex; align-items: center; margin-left: .5rem; }
.bh-nav__list > li.bh-nav__item--accent > a,
.bh-header.is-sticky .bh-nav__list > li.bh-nav__item--accent > a {
	padding: 0 1.25rem; border: 2px solid #e8ac37; border-radius: 20px; color: var(--bh-text); font-weight: 500; line-height: 40px;
	transition: background .3s, color .3s;
}
.bh-nav__list > li.bh-nav__item--accent > a:hover,
.bh-nav__list > li.bh-nav__item--accent > a:focus-visible,
.bh-nav__list > li.bh-nav__item--accent:hover > a,
.bh-nav__list > li.bh-nav__item--accent.current-menu-item > a { background: #e8ac37; color: #000; }
@media (max-width: 1024px) {
	.bh-nav__list > li.bh-nav__item--accent > a,
	.bh-header.is-sticky .bh-nav__list > li.bh-nav__item--accent > a { padding: 0 1rem; line-height: 36px; }
}

/* Dropdown "Countries": material scale-in from the top-left corner. */
.bh-nav__list .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 120; min-width: 12rem; margin: 0; padding: 0; list-style: none;
	background: rgba(255, 255, 255, .9); box-shadow: 0 5px 15px rgba(0, 0, 0, .15); text-align: left;
	transform: scale(0); transform-origin: 0 0; opacity: 0;
	transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .15s;
}
.bh-nav__list li:hover > .sub-menu,
.bh-nav__list li:focus-within > .sub-menu,
.bh-nav__list li.opened > .sub-menu { transform: scale(1); opacity: 1; }
.bh-nav__list .sub-menu a {
	display: block; padding: .6em 20px; color: var(--bh-text); font-size: 16px; line-height: 1.5em; white-space: nowrap;
}
.bh-nav__list .sub-menu a:hover,
.bh-nav__list .sub-menu a:focus-visible,
.bh-nav__list .sub-menu .current-menu-item > a { color: var(--bh-accent-text); }

/* Search: icon button; the form slides over the whole bar. */
.bh-search-toggle {
	display: grid; place-items: center; flex: none; width: 44px; height: 44.8px; margin: 0; padding: 0;
	border: 0; background: none; color: var(--bh-text); cursor: pointer; transition: color .3s;
}
.bh-search-toggle:hover { color: var(--bh-accent-text); }
.bh-search {
	position: absolute; top: 0; left: 0; right: 0; height: 100%; margin: 0; padding: 0 var(--bh-gutter);
	background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.bh-search[hidden] { display: none; }
.bh-search input[type="text"] {
	width: 100%; max-width: var(--bh-container); height: 100%; margin: 0 auto; padding: 0 3rem 0 1.5rem;
	display: block; border: 0; border-radius: 0; background: #fff; color: var(--bh-text); font: 400 20px/1 var(--bh-font); outline: 0;
}
.bh-search__close {
	position: absolute; top: 0; right: var(--bh-gutter); width: 3rem; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; opacity: .5;
}
.bh-search__close::before, .bh-search__close::after {
	position: absolute; top: 50%; left: 50%; width: 20px; height: 2px; margin: -1px 0 0 -10px; background: #000; content: "";
}
.bh-search__close::before { transform: rotate(45deg); }
.bh-search__close::after { transform: rotate(-45deg); }

/* Burger */
.bh-burger { display: none; width: 46.4px; height: 50px; margin: 0; padding: 0; border: 0; background: none; color: var(--bh-text); cursor: pointer; }
.bh-burger__icon { position: relative; display: block; width: 36px; height: 3px; margin: 0 auto; }
.bh-burger__icon i { position: absolute; left: 0; width: 100%; height: 3px; background: currentColor; transition: transform .3s, opacity .3s, background .3s; }
.bh-burger__icon i:nth-child(1) { top: -11px; }
.bh-burger__icon i:nth-child(2) { top: 0; }
.bh-burger__icon i:nth-child(3) { top: 11px; }
.bh-burger[aria-expanded="true"] { color: var(--bh-accent-text); }
.bh-burger[aria-expanded="true"] .bh-burger__icon i:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.bh-burger[aria-expanded="true"] .bh-burger__icon i:nth-child(2) { opacity: 0; }
.bh-burger[aria-expanded="true"] .bh-burger__icon i:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }
@media (max-width: 1200px) { .bh-burger__icon { width: 32px; } }
@media (max-width: 1024px) {
	.bh-search-toggle { display: none; }
	.bh-burger__icon { width: 28px; }
	.bh-burger__icon i:nth-child(1) { top: -9px; }
	.bh-burger__icon i:nth-child(3) { top: 9px; }
	.bh-burger[aria-expanded="true"] .bh-burger__icon i:nth-child(1) { transform: translateY(9px) rotate(45deg); }
	.bh-burger[aria-expanded="true"] .bh-burger__icon i:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}
@media (max-width: 660px) {
	.bh-burger__icon { width: 24px; }
	.bh-burger__icon i:nth-child(1) { top: -8px; }
	.bh-burger__icon i:nth-child(3) { top: 8px; }
	.bh-burger[aria-expanded="true"] .bh-burger__icon i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
	.bh-burger[aria-expanded="true"] .bh-burger__icon i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 899px) {
	.bh-header__bar { padding-inline: 1rem; }
	.bh-burger { display: block; }
	.bh-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 110; padding: 0 2rem;
		background: rgba(255, 255, 255, .9); box-shadow: 0 3px 3px rgba(0, 0, 0, .1); text-align: center;
	}
	.bh-nav.is-open { display: block; }
	.bh-nav__list { display: block; }
	.bh-nav__list > li > a { display: inline-block; padding: .7rem; font-size: 1.1rem; line-height: 1.6em; }
	.bh-header.is-sticky .bh-nav__list > li > a { line-height: 1.6em; }
	.bh-nav__list > li.menu-item-has-children > a::after { display: none; }
	.bh-nav__toggle {
		display: inline-block; width: 1.8em; height: 1.6em; margin: 0; padding: 0; border: 0; background: none;
		color: inherit; cursor: pointer; vertical-align: top; font-size: 1.1rem; line-height: 1.6em; transition: color .3s;
	}
	.bh-nav__toggle::before { margin: 0; transition: transform .3s; }
	.bh-nav__list > li.opened > .bh-nav__toggle { color: var(--bh-accent-text); }
	.bh-nav__list > li.opened > .bh-nav__toggle::before { transform: rotate(180deg); }
	.bh-nav__list .sub-menu {
		position: static; display: none; min-width: 0; background: none; box-shadow: none; text-align: center;
		transform: none; opacity: 1; transition: none;
	}
	.bh-nav__list li:hover > .sub-menu,
	.bh-nav__list li:focus-within > .sub-menu { transform: none; }
	.bh-nav__list li.opened > .sub-menu { display: block; }
	.bh-nav__list .sub-menu a { padding: .7rem; font-size: .9rem; }
	.bh-header__cell--left { flex: 0 0 auto; }
	.bh-header__cell--right { flex: 0 0 50px; }
	.bh-header__cell--center { justify-content: flex-end; }
	.bh-burger { margin-right: 26px; }
	.bh-nav__list > li.bh-nav__item--accent { display: block; margin: .3rem 0 .7rem; }
	.bh-nav__list > li.bh-nav__item--accent > a,
	.bh-header.is-sticky .bh-nav__list > li.bh-nav__item--accent > a { display: inline-block; padding: .4rem 1.2rem; line-height: 1.6em; }
}
@media (max-width: 660px) { .bh-burger { margin-right: 20px; } }

/* == Main =================================================================== */
.bh-main { padding-top: var(--bh-header-h); }
.bh-entry__content > :not(.bh-section):not(.alignfull):not(.alignwide):not(.wp-block-group) {
	max-width: var(--bh-container); margin-inline: auto; padding-inline: var(--bh-gutter);
}
.bh-container > .bh-title { margin: 0 0 40px; font-size: 28px; line-height: 50.4px; font-weight: 700; }
@media (max-width: 660px) { .bh-container > .bh-title { font-size: 24px; line-height: 43.2px; } }
.bh-none { margin: 0; color: #666; }

/* == Breadcrumbs (core/breadcrumbs and template-parts/breadcrumbs.php) ======== */
.bh-breadcrumbs { margin: 0; font-size: 16px; line-height: 22.4px; }
.bh-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.bh-breadcrumbs li { display: inline-flex; align-items: center; margin: 0; }
.bh-breadcrumbs li:not(:last-child)::after {
	display: inline-block; width: 1em; height: 1em; margin: 0 9.6px; background: currentColor; color: #000; content: ""; opacity: 1;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E") center / 100% no-repeat;
}
/* The crumbs row is a 32px-padded band (176px with the header); the next band starts 16px lower. */
.bh-section.bh-section--auto:has(> .bh-breadcrumbs) { padding-block: 32px; }
.bh-section.bh-section--auto:has(> .bh-breadcrumbs) + .bh-section--content.bh-section--auto { padding-top: 16px; }
.bh-breadcrumbs a { color: var(--bh-accent-text); }
.bh-breadcrumbs a:hover { color: var(--bh-accent-text-hover); }
.bh-breadcrumbs [aria-current], .bh-breadcrumbs li:last-child > span { color: #000; }
@media (max-width: 660px) { .bh-breadcrumbs { font-size: 14px; line-height: 19.6px; } }

/* == Pagination (the_posts_pagination and core/query-pagination) ============= */
.pagination, .wp-block-query-pagination { margin: 32px 0 0; }
.pagination .nav-links, .wp-block-query-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
.page-numbers, .wp-block-query-pagination-next, .wp-block-query-pagination-previous {
	display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 3.2px;
	border-radius: 10px; background: transparent; color: #000; font-size: 14px; line-height: 1;
	transition: background-color .3s ease, color .3s ease;
}
.wp-block-query-pagination-numbers { display: contents; }
.page-numbers.current, .page-numbers:hover, .wp-block-query-pagination-next:hover, .wp-block-query-pagination-previous:hover { background: var(--bh-accent); color: #fff; }
.page-numbers.dots:hover { background: transparent; color: #000; }
.page-numbers.next, .page-numbers.prev,
.wp-block-query-pagination-next, .wp-block-query-pagination-previous { font-size: 0; }
.page-numbers.next::before, .page-numbers.prev::before,
.wp-block-query-pagination-next::before, .wp-block-query-pagination-previous::before {
	display: block; width: 14px; height: 14px; background: currentColor; content: "";
	-webkit-mask: var(--bh-arrow) center / contain no-repeat; mask: var(--bh-arrow) center / contain no-repeat;
	--bh-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E");
}
.page-numbers.prev::before, .wp-block-query-pagination-previous::before { transform: scaleX(-1); }
.wp-block-query-pagination-next > *, .wp-block-query-pagination-previous > * { display: none; }
.bh-search-results .page-numbers { width: 56px; height: 56px; border-radius: 50%; font-size: 22.4px; }
.bh-search-results .page-numbers.current { background: var(--bh-accent); }
@media (max-width: 660px) {
	.page-numbers { margin: 2.8px; }
	.bh-search-results .page-numbers { width: 49px; height: 49px; font-size: 19.6px; }
}

/* == News grid in templates (search, archive, index) ========================= */
.bh-news--grid .bh-news__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: -14.4px; }
.bh-news--grid .bh-news__item { padding: 14.4px; }
.bh-search-results .bh-news--grid .bh-news__list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -24px; }
.bh-search-results .bh-news--grid .bh-news__item { padding: 24px; }
.bh-news--grid .bh-card__image img { width: 100%; max-width: 350px; }
.bh-news .bh-news__pagination { justify-content: flex-end; gap: 10.2px; padding-right: 37px; }
.bh-news .bh-news__pagination .page-numbers, .bh-news .bh-news__pagination a { margin: 3.2px; }
@media (max-width: 1200px) { .bh-news--grid .bh-card__image img { max-width: 300px; } }
@media (max-width: 1024px) { .bh-news--grid .bh-news__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* News page blocks: the old layout used fixed 660 / 300px columns inside padded sections. */
@media (max-width: 1024px) {
	.bh-main .bh-news--grid .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, 300px); column-gap: 18px; row-gap: 2rem; margin-left: 2.5rem; }
}
@media (max-width: 660px) {
	.bh-main .bh-news--grid .wp-block-post-template.is-layout-grid { grid-template-columns: 300px; margin-left: 1.5rem; }
}
@media (max-width: 660px) {
	.bh-news--grid .bh-news__list, .bh-search-results .bh-news--grid .bh-news__list { grid-template-columns: 100%; margin: 0; }
	.bh-news--grid .bh-news__item, .bh-search-results .bh-news--grid .bh-news__item { padding: 0 0 1.5rem; }
	.bh-news--grid .bh-news__item:last-child { padding-bottom: 0; }
}

/* == Page ==================================================================== */
.bh-entry--page { margin: 0; }

/* == Single post ============================================================= */
.bh-post__col { max-width: 690px; margin-top: 40px; }
@media (max-width: 1024px) { .bh-post__col { max-width: 660px; } .bh-post__image img { max-width: 660px; } }
.bh-post__image { margin: 0 0 24px; }
.bh-post__image img { display: block; width: 100%; max-width: 680px; height: 250px; border-radius: 20px; object-fit: cover; }
.bh-post__title { margin: 0 0 16px; font-size: 40px; line-height: 1.2; font-weight: 700; } /* h1 must outrank the 30px h2 of .bh-prose */
.bh-post__date, .bh-post__tags { display: block; margin: 0; color: var(--bh-muted); font-size: 16px; line-height: 20px; }
.bh-post__date { margin-bottom: 6px; }
.bh-post__tags { margin-bottom: 40px; }
.bh-post__tags a { color: var(--bh-muted); }
@media (max-width: 660px) {
	.bh-post__title { font-size: 32px; line-height: 1.2; margin-bottom: 14px; }
	.bh-post__image img { height: auto; aspect-ratio: 16 / 9; } /* was a fixed 250px: cropped the banner text */
	.bh-post__date, .bh-post__tags { font-size: 14px; line-height: 16.8px; }
	.bh-post__col { max-width: 300px; }

}

/* Running text of posts (inherited from Impreza .w-text). */
.bh-post .bh-prose p, .bh-prose p { margin: 0 0 24px; color: #000; font-size: 1rem; line-height: 20px; }
.bh-post .bh-prose p:last-child { margin-bottom: 0; }
.bh-prose h2 { margin: 0 0 20px; padding-top: 24px; font-size: 30px; line-height: 1.2; }
.bh-prose h3 { margin: 0 0 16px; padding-top: 24px; font-size: 24px; line-height: 1.3; }
.bh-prose h4, .bh-prose h5, .bh-prose h6 { margin-bottom: .6em; padding-top: 24px; } /* reference: every content heading has padding-top */
.bh-prose a { text-decoration: underline; text-underline-offset: .15em; }
.bh-prose a:hover { color: var(--bh-accent-text-hover); }
.bh-prose strong, .bh-prose b { font-weight: 700; }
.bh-prose ul, .bh-prose ol { margin: 0 0 24px 40px; padding: 0; }
.bh-prose ul { list-style: disc outside; }
.bh-prose ol { list-style: decimal outside; }
.bh-prose li { margin: 0 0 8px; padding: 0; }
.bh-prose li p { margin: 0; }
.bh-prose blockquote { margin: 0 0 24px; padding: 0 48px; border: 0; background: none; font-size: 1.3rem; line-height: 1.7; font-style: normal; }
.bh-prose blockquote p { margin: 0; }
.bh-prose img { max-width: 100%; height: auto; }
.bh-prose figure { margin: 0 0 24px; }
.bh-prose figcaption, .bh-prose .wp-caption-text { margin-top: 8px; font-size: 13.6px; line-height: 1.6; text-align: left; }
.bh-prose hr { margin: 0 0 24px; border: 0; border-top: 1px solid rgba(0, 0, 0, .15); }
.bh-prose .alignleft { float: left; margin: 0 24px 24px 0; }
.bh-prose .alignright { float: right; margin: 0 0 24px 24px; }
.bh-prose .aligncenter { display: block; margin-inline: auto; }
@media (max-width: 660px) {
	.bh-post .bh-prose p, .bh-prose p { margin-bottom: 14px; line-height: 1.2; }
	.bh-prose h2 { padding-top: 14px; font-size: 26px; line-height: 1.2; }
	.bh-prose h3 { padding-top: 14px; margin-bottom: 14px; font-size: 21px; line-height: 1.3; }
	.bh-prose h4, .bh-prose h5, .bh-prose h6 { padding-top: 14px; }
	.bh-prose ul, .bh-prose ol { margin: 0 0 21px 35px; }
	.bh-prose li { margin-bottom: 7px; }
	.bh-prose blockquote { margin-bottom: 21px; padding: 0 42px; }
}

/* == 404 ===================================================================== */
.bh-not-found .bh-section__title { margin-bottom: 25px; }
.bh-not-found__action { margin: 0 0 7px; }
.bh-not-found__img { display: block; width: 100%; max-width: 1200px; height: auto; margin: 0; }

/* == Footer ================================================================== */
.bh-footer { background: #fff; color: var(--bh-text); }
.bh-footer__main { position: relative; padding: 2rem var(--bh-gutter); background: url("../img/footer-bg.png") 50% 50% / auto repeat; }
.bh-footer__main::before { position: absolute; inset: 0; border-radius: 20px; background: rgba(255, 255, 255, .66); content: ""; }
.bh-footer__cols {
	position: relative; display: grid; grid-template-columns: 252px 252px 252px 300px; gap: 48px;
	max-width: var(--bh-container); margin-inline: auto;
}
.bh-footer__col { min-width: 0; }
.bh-footer__col--brand a { display: block; line-height: 0; }
.bh-footer__col--brand img { display: block; width: 252px; height: auto; }
.bh-footer__title { margin: 0 0 12px; font-size: 20px; line-height: 30px; font-weight: 400; }
.bh-footer__list { margin: 0; padding: 0; list-style: none; }
.bh-footer__list li { margin: 0 0 1.5rem; }
.bh-footer__list--countries li { margin-bottom: 14px; }
.bh-footer__list li:last-child { margin-bottom: 0; }
.bh-footer__list a { color: var(--bh-text); font-size: 16px; line-height: 22.4px; transition: color .3s; }
.bh-footer__list a:hover, .bh-footer__list .current-menu-item > a { color: var(--bh-accent-text); }
.bh-footer__contacts { width: 200px; max-width: 100%; overflow-wrap: anywhere; }
.bh-footer__contacts p { margin: 0 0 24px; }
.bh-footer__contacts p:last-child { margin-bottom: 0; }
.bh-footer__contacts a { color: var(--bh-accent-text); }
.bh-footer__col--contacts .bh-socials { margin-top: 0; }
.bh-socials { display: flex; margin: 0; padding: 0; list-style: none; }
.bh-socials li { margin: 0; }
.bh-socials a { display: grid; place-items: center; width: 40px; height: 40px; margin-right: 29px; color: var(--bh-text); transition: opacity .3s; }
.bh-socials a:hover { color: var(--bh-text); opacity: .6; }
.bh-footer__bottom { padding: 2rem var(--bh-gutter); }
.bh-footer__bottom-in { display: flex; justify-content: space-between; gap: 48px; max-width: var(--bh-container); margin-inline: auto; }
.bh-footer__copy, .bh-footer__legal a { margin: 0; color: #000; font-size: 14px; line-height: 21px; }
.bh-footer__legal { text-align: right; }
.bh-footer__legal-list { margin: 0; padding: 0; list-style: none; }
.bh-footer__legal a:hover { color: var(--bh-accent-text); }
/* Funding line: last row, thin separator, muted small text aligned with the bottom row's container. */
.bh-footer__support { padding: 0 var(--bh-gutter) 1.25rem; }
.bh-footer__support::before { content: ""; display: block; max-width: var(--bh-container); height: 1px; margin: 0 auto 1rem; background: rgba(0, 0, 0, .12); }
.bh-footer__support-text { max-width: var(--bh-container); margin: 0 auto; color: var(--bh-muted); font-size: 13px; line-height: 19px; text-align: center; text-wrap: balance; }

@media (max-width: 1200px) {
	.bh-footer__cols { grid-template-columns: 150px 150px 150px 270px; gap: 48px; justify-content: space-between; }
	.bh-footer__col--brand img { width: 150px; }
}
@media (max-width: 1024px) {
	/* Fluid columns (were fixed 198+169+169+200 px, which overflowed the page at 661-775 px). */
	.bh-footer__cols { grid-template-columns: minmax(0, 198fr) minmax(0, 169fr) minmax(0, 169fr) minmax(0, 200fr); gap: 0 16px; justify-content: stretch; }
	.bh-footer__col--brand img { max-width: 100%; }
}
@media (max-width: 760px) {
	.bh-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
	.bh-footer__col { margin-bottom: 1.5rem; }
}
@media (max-width: 660px) {
	.bh-footer__cols { grid-template-columns: 1fr; gap: 0; }
	.bh-footer__col { margin-bottom: 1.5rem; }
	.bh-footer__col--brand img { width: auto; height: 70px; }
	.bh-footer__list a { font-size: 14px; line-height: 19.6px; }
	.bh-footer__contacts { width: 150px; }
	.bh-footer__contacts p { margin-bottom: 14px; font-size: 14px; line-height: 16.8px; }
}
@media (max-width: 600px) { .bh-footer__main, .bh-footer__bottom { padding: 1.5rem; } .bh-footer__support { padding: 0 1.5rem 1.25rem; } }

/* == Back-to-top ============================================================= */
.bh-toplink {
	position: fixed; right: 0; bottom: 0; z-index: 100; width: 50px; height: 50px; padding: 0; border: 0;
	border-radius: 4.8px; background: rgba(0, 0, 0, .3); cursor: pointer;
	transition: opacity .3s;
}
.bh-toplink[hidden] { display: none; }
.bh-toplink::before {
	display: block; width: 16px; height: 16px; margin: auto; background: #fff; content: "";
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z'/%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 448 512'%3E%3Cpath d='M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bh-toplink { display: grid; place-items: center; }
@media (max-width: 600px) { .bh-toplink { right: 10px; bottom: 10px; } }

/* == Section rhythm in rem, as on the old site (blocks.css has px; rem shrinks to 14px at <=660px) ===== */
/* Service points (.bh-section--points) take their double-row padding from blocks.css, section 7. */
.bh-main .bh-section:not(.bh-section--auto):not(.bh-hero):not(.bh-section--partner):not(.bh-support):not(.bh-section--subhero):not(.bh-section--mission):not(.bh-section--points) { padding: 2rem 2.5rem; }
.bh-main .bh-section--md:not(.bh-section--auto) { padding-block: 4rem; }
.bh-main .bh-hero { padding: 2rem 0; }
@media (max-width: 1024px) { .bh-main .bh-section--md:not(.bh-section--auto) { padding-block: 2.5rem; } }
@media (max-width: 600px) {
	.bh-main .bh-section:not(.bh-section--auto):not(.bh-hero):not(.bh-section--partner):not(.bh-support):not(.bh-section--subhero):not(.bh-section--mission):not(.bh-section--points),
	.bh-main .bh-section--md:not(.bh-section--auto):not(.bh-section--partner) { padding: 1.5rem; }
	.bh-main .bh-hero { padding: 1.5rem 0; }
	.bh-section.bh-section--auto:has(> .bh-breadcrumbs) { padding: 1.5rem; }
}

/* == Post card details shared by grid, search and carousel (overrides blocks.css where it differs from the old site) == */
.bh-main .bh-card__meta { display: block; }
.bh-main .bh-card__tag { display: block; }
.bh-main .bh-card__more::after {
	display: inline-block; width: 1.05em; height: .8em; margin-left: 8px; vertical-align: -.05em; background: currentColor; content: "";
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12h19M15 5l7 7-7 7'/%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='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12h19M15 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Card image: fixed 188px band (350px wide, 300px at <=1200), cropped like the old us_350_273_crop thumbnails. */
.bh-main .bh-card__image img { width: 100%; max-width: 350px; height: 188px !important; aspect-ratio: auto !important; object-fit: cover; }
@media (max-width: 1200px) {
	.bh-main .bh-card__image img { max-width: 300px; }
	.bh-news--grid .bh-card { max-width: 300px; }
}
@media (max-width: 660px) {
	.bh-news--grid .bh-news__list { max-width: 300px; }
}

/* Reset against stylesheets that restyle bare li / a (the TWIIN landing page loads a Tailwind build). */
.bh-header li, .bh-footer li, .bh-breadcrumbs li, .bh-news li { margin-inline-start: 0; list-style: none; }
.bh-header a, .bh-footer a, .bh-breadcrumbs a, .bh-card a, .bh-pagination a, .page-numbers { text-decoration: none; }

/* Scrollers (news carousel): visually hidden text inside cards must stay inside the scroll area. */
.bh-main .wp-block-post-template, .bh-main .bh-card { position: relative; }

/* Підзаголовок-рамка (us_page_block 173): рядок 1200x440 з rev_slider-фоном у оригіналі */
.bh-main .bh-section--subhero {
	box-sizing: border-box; width: auto; max-width: 1200px; min-height: 440px;
	margin: 2rem auto; padding: 86px 0 0 155px;
}
.bh-main .bh-section--subhero > * { max-width: 510px; margin-inline: 0; }
.bh-main .bh-section--subhero .bh-section__title { margin: 0 0 20px; font-size: 50px; line-height: 60px; text-align: left; }
.bh-main .bh-section--subhero p { color: #000; font-size: 20px; line-height: 25px; }
@media (max-width: 1200px) { .bh-main .bh-section--subhero { max-width: 1000px; padding-left: 120px; } }
@media (max-width: 1024px) {
	.bh-main .bh-section--subhero { max-width: 660px; min-height: 380px; padding: 52px 0 0 46px; }
	.bh-main .bh-section--subhero > * { max-width: 375px; }
	.bh-main .bh-section--subhero .bh-section__title { font-size: 40px; line-height: 44px; }
}
@media (max-width: 660px) {
	.bh-main .bh-section--subhero { max-width: 300px; min-height: 516px; padding: 20px 0 0 20px; }
	.bh-main .bh-section--subhero > * { max-width: 260px; }
	.bh-main .bh-section--subhero .bh-section__title { font-size: 32px; line-height: 35px; }
	.bh-main .bh-section--subhero p { font-size: 16px; line-height: 20px; }
}

/* hide_on_states з Impreza: default >1380, laptops 1025-1380, tablets 601-1024, mobiles <=600 */
@media (min-width: 1381px) { .bh-main .bh-hide-default { display: none !important; } }
@media (min-width: 1025px) and (max-width: 1380px) { .bh-main .bh-hide-laptops { display: none !important; } }
@media (min-width: 601px) and (max-width: 1024px) { .bh-main .bh-hide-tablets { display: none !important; } }
@media (max-width: 600px) { .bh-main .bh-hide-mobiles { display: none !important; } }

/* Our mission / Our goal (us_page_block 183): вкладена секція 1200, контент 1120, колонки 408 + 48 + 664 */
.bh-main .bh-section--mission { padding: 4rem 2.5rem; }
.bh-main .bh-section--mission > .wp-block-columns { max-width: 1120px; margin: 0 auto 60px; gap: 48px; flex-wrap: nowrap; }
.bh-main .bh-section--mission > .wp-block-columns:last-child { margin-bottom: 0; }
.bh-main .bh-section--mission .wp-block-column[style*="33.33%"] { flex: 0 0 408px !important; }
.bh-main .bh-section--mission .wp-block-column[style*="66.66%"] { flex: 1 1 0 !important; min-width: 0; }
.bh-main .bh-section--mission .wp-block-image { margin: 0; }
.bh-main .bh-section--mission .wp-block-image img { display: block; width: 100%; height: 228px; object-fit: cover; border-radius: 20px; }
.bh-main .bh-section--mission h3 { margin: 0 0 16.8px; color: #000; font-size: 28px; line-height: 50.4px; font-weight: 700; text-align: left; }
.bh-main .bh-section--mission .wp-block-columns:first-child .wp-block-column:last-child h3 { margin-top: 20px; }
.bh-main .bh-section--mission p { margin: 0; color: #000; font-size: 16px; line-height: 20px; }
@media (max-width: 1024px) {
	.bh-main .bh-section--mission > .wp-block-columns { flex-direction: column; gap: 0; max-width: 608px; margin-left: 40px; }
	.bh-main .bh-section--mission .wp-block-column[style*="33.33%"],
	.bh-main .bh-section--mission .wp-block-column[style*="66.66%"] { flex: none !important; width: 100%; }
	.bh-main .bh-section--mission .wp-block-image img { width: 660px; max-width: none; height: 260px; }
	.bh-main .bh-section--mission > .wp-block-columns:first-child .wp-block-column:last-child { margin-top: 48px; }
}
@media (max-width: 660px) {
	.bh-main .bh-section--mission { padding: 3rem 1.5rem; }
	.bh-main .bh-section--mission > .wp-block-columns { margin-left: 0; max-width: none; }
	.bh-main .bh-section--mission .wp-block-image img { width: 300px; }
	.bh-main .bh-section--mission h3 { font-size: 24px; line-height: 43.2px; margin-bottom: 14.4px; }
	.bh-main .bh-section--mission p { font-size: 14px; line-height: 16.8px; }
}

/* We help and support you with (#help) на планшеті: заголовок mb 40, картки 490 по центру, іконка 24 */
.bh-main .bh-section--help .bh-card .bh-card__text { color: #000; }
@media (min-width: 661px) and (max-width: 1024px) {
	.bh-main .bh-section--help .bh-section__title { margin-bottom: 40px; }
	.bh-main .bh-section--help > .bh-cards { max-width: 490px; margin-inline: auto; }
	.bh-main .bh-section--help .bh-card__head .bh-icon img { width: 24px !important; height: 24px !important; }
}
/* Our mission на планшеті: текст 660 завширшки, як в оригіналі (колонка 608, вміст виступає) */
@media (min-width: 661px) and (max-width: 1024px) {
	.bh-main .bh-section--mission .wp-block-column[style*="66.66%"] { width: 660px; }
}

/* Партнерські логотипи (#partners): див. кінець blocks.css (розкладка з вимірів еталона на 1440/768/390). */
