/**
 * Bloom parent theme styles.
 *
 * Structure and behaviour only. Values come from:
 *  - theme.json settings.custom.bloom, printed by core as --wp--custom--bloom--* and aliased below as --bloom-*;
 *  - the legacy-compatible --global-* variables printed by inc/compat-vars.php from the theme.json presets.
 * A child theme sets values in its theme.json (or overrides a --bloom-* alias) and keeps only its own rules.
 * Breakpoints follow the previous theme: 1024px (header/tablet), 767px (mobile) and 719px (its small-phone step for boxed entries). CSS-MIGRATION.md maps the old Protea rules.
 */

/* ------------------------------------------------------------------
 * Tokens
 * ---------------------------------------------------------------- */
:root {
	--bloom-header-height: var(--wp--custom--bloom--header--height, 80px);
	--bloom-header-bg: var(--wp--custom--bloom--header--background, var(--global-palette9, #fff));
	--bloom-header-text: var(--wp--custom--bloom--header--text, var(--global-palette4, #2d3748));
	--bloom-nav-color: var(--wp--custom--bloom--header--nav-color, var(--global-palette5, #4a5568));
	--bloom-nav-hover: var(--wp--custom--bloom--header--nav-hover, var(--global-palette1, #2b6cb0));
	--bloom-nav-active: var(--wp--custom--bloom--header--nav-active, var(--global-palette3, #1a202c));
	--bloom-nav-item-padding: var(--wp--custom--bloom--header--nav-item-padding, 0.6em 1.25em);
	--bloom-dropdown-bg: var(--wp--custom--bloom--header--dropdown-background, var(--global-palette9, #fff));
	--bloom-dropdown-text: var(--wp--custom--bloom--header--dropdown-text, var(--global-palette4, #2d3748));
	--bloom-dropdown-hover-text: var(--wp--custom--bloom--header--dropdown-hover-text, var(--global-palette1, #2b6cb0));
	--bloom-dropdown-hover-bg: var(--wp--custom--bloom--header--dropdown-hover-background, var(--global-palette8, #f7fafc));
	--bloom-dropdown-active: var(--wp--custom--bloom--header--dropdown-active, var(--global-palette1, #2b6cb0));
	--bloom-dropdown-font-size: var(--wp--custom--bloom--header--dropdown-font-size, 14px);
	--bloom-dropdown-link-padding: var(--wp--custom--bloom--header--dropdown-link-padding, 1em);
	--bloom-dropdown-divider: var(--wp--custom--bloom--header--dropdown-divider, rgba(255, 255, 255, 0.1));
	--bloom-dropdown-offset: var(--wp--custom--bloom--header--dropdown-offset, 10px);
	--bloom-header-button-bg: var(--wp--custom--bloom--header--button-background, var(--global-palette1, #2b6cb0));
	--bloom-header-button-text: var(--wp--custom--bloom--header--button-text, var(--global-palette9, #fff));
	--bloom-header-button-border: var(--wp--custom--bloom--header--button-border, var(--global-palette1, #2b6cb0));
	--bloom-header-button-hover-bg: var(--wp--custom--bloom--header--button-hover-background, var(--global-palette2, #215387));
	--bloom-header-button-hover-text: var(--wp--custom--bloom--header--button-hover-text, var(--global-palette9, #fff));
	--bloom-header-button-hover-border: var(--wp--custom--bloom--header--button-hover-border, var(--global-palette2, #215387));
	--bloom-header-button-radius: var(--wp--custom--bloom--header--button-radius, 3px);
	--bloom-header-button-font-size: var(--wp--custom--bloom--header--button-font-size, 1rem);
	--bloom-header-button-font-weight: var(--wp--custom--bloom--header--button-font-weight, 400);
	--bloom-header-button-padding: var(--wp--custom--bloom--header--button-padding, 0.5em 1.2em);
	--bloom-header-button-border-width: var(--wp--custom--bloom--header--button-border-width, 1px);
	--bloom-toggle-color: var(--wp--custom--bloom--header--toggle-color, var(--bloom-header-text));
	--bloom-toggle-hover: var(--wp--custom--bloom--header--toggle-hover, var(--bloom-nav-hover));
	--bloom-drawer-bg: var(--wp--custom--bloom--header--drawer-background, rgba(0, 0, 0, 0.72));
	--bloom-drawer-panel-bg: var(--wp--custom--bloom--header--drawer-panel-background, var(--global-palette3, #1a202c));
	--bloom-drawer-text: var(--wp--custom--bloom--header--drawer-text, var(--global-palette8, #f7fafc));
	--bloom-drawer-close: var(--wp--custom--bloom--header--drawer-close, var(--global-palette9, #fff));
	--bloom-drawer-active: var(--wp--custom--bloom--header--drawer-active, var(--global-palette9, #fff));
	--bloom-drawer-divider: var(--wp--custom--bloom--header--drawer-divider, rgba(255, 255, 255, 0.1));
	--bloom-drawer-max-width: var(--wp--custom--bloom--header--drawer-max-width, 480px);
	--bloom-drawer-blur: var(--wp--custom--bloom--header--drawer-blur, 10px);
	--bloom-drawer-inner-padding: var(--wp--custom--bloom--header--drawer-inner-padding, 1rem var(--global-content-edge-padding) 3rem);
	--bloom-drawer-font-size: var(--wp--custom--bloom--header--drawer-font-size, 16px);
	--bloom-drawer-link-padding: var(--wp--custom--bloom--header--drawer-link-padding, 1em 0);
	--bloom-drawer-close-size: var(--wp--custom--bloom--header--drawer-close-size, 32px);
	--bloom-cover-light-text: var(--wp--custom--bloom--cover--light--text, var(--global-palette4, #2d3748));
	--bloom-cover-light-heading: var(--wp--custom--bloom--cover--light--heading, var(--global-palette3, #1a202c));
	--bloom-cover-light-heading-small: var(--wp--custom--bloom--cover--light--heading-small, var(--bloom-cover-light-heading));
	--bloom-cover-light-heading-smallest: var(--wp--custom--bloom--cover--light--heading-smallest, var(--bloom-cover-light-heading));
	--bloom-cover-light-link: var(--wp--custom--bloom--cover--light--link, var(--global-palette3, #1a202c));
	--bloom-accent-hover: var(--wp--custom--bloom--accent-hover, var(--global-palette2, #215387));
	/* Stacking order and motion, by name, so a child theme slots its own overlays and timings in between. */
	--bloom-z-dropdown: 10;
	--bloom-z-header: 100;
	--bloom-z-drawer: 1000;
	--bloom-z-drawer-toggle: 1001;
	--bloom-z-skip-link: 2000;
	--bloom-duration-fast: 0.2s;
	--bloom-duration: 0.25s;
	--bloom-duration-slow: 0.3s;
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Scroll-in animations start blocks shifted sideways (e.g. fade-left); clip them so phones never scroll horizontally.
   clip (not hidden) keeps the page itself the scroll container, so the sticky header still works. */
.wp-site-blocks { overflow-x: clip; }
/* Footer at the bottom of the viewport on short pages (404, empty search): body class from bloom_sticky_footer. */
.has-sticky-footer .wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.admin-bar.has-sticky-footer .wp-site-blocks { min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px)); }
.has-sticky-footer .wp-site-blocks > main { flex: 1 0 auto; }
.has-sticky-footer .wp-site-blocks > footer { margin-top: auto; }
/* the previous theme's boxed-content padding shrinks on phones (the variable itself comes from inc/compat-vars.php). */
@media (max-width: 767px) { :root, body { --global-content-boxed-padding: 1.5rem; } }
/* Full-width entries: a text row (columns holding headings or paragraphs) directly in a full-width flow group keeps to
   the content width; photo rows stay full width. */
.content-width-fullwidth .entry-content > .alignfull.is-layout-flow > .wp-block-columns:has(> .wp-block-column > :is(h1, h2, h3, h4, p)) {
	box-sizing: border-box; max-width: var(--bloom-content-width-fallback, 1242px); margin-left: auto; margin-right: auto;
}
/* Search results: space between the search form and the first result. */
body.search main .archive-hero + .bloom-loop { margin-top: 2.5rem; }
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	margin: 0;
}
input, select, optgroup, textarea, button { font-family: inherit; }
img { max-width: 100%; height: auto; }

/* ------------------------------------------------------------------
 * Content area (mirrors the the previous theme page settings kept in post meta)
 * ---------------------------------------------------------------- */
.content-area { margin: 0; }
.wp-site-blocks > .site-footer { margin-block-start: 0; } /* footer (and its hooked before-footer section) sits flush under the content, like the previous theme */
.single-post .entry-content { margin-top: var(--global-lg-spacing); }
.single-post .content-area { margin-bottom: var(--global-xxl-spacing); }
.single-post .content-area:has(.entry-related) { margin-bottom: 0; } /* a related-posts band carries its own padding */
.content-vertical-padding-hide .content-area { margin-top: 0; margin-bottom: 0; }
.content-title-style-hide .page-hero,
.page-hero:empty { display: none; }
.page-hero { padding: 2rem 0 0; }
.entry-content > .alignfull { margin-left: 0; margin-right: 0; }

/* Parent templates: main.bloom-main holds the title hero (.bloom-title-above) and .bloom-content (the content area,
   holding article.bloom-entry). Width, box, title placement and spacing follow the display settings, sized like the
   the previous theme theme (content area 5rem / 3rem / 2rem, boxed entry 2rem / 1.5rem, 200px title hero). */
.bloom-main > *,
.bloom-content > *,
.bloom-entry > * { margin-block-start: 0; }
.bloom-content { padding-top: var(--global-xxl-spacing); padding-bottom: var(--global-xxl-spacing); }
@media (max-width: 1024px) { .bloom-content { padding-top: 3rem; padding-bottom: 3rem; } }
@media (max-width: 767px) { .bloom-content { padding-top: 2rem; padding-bottom: 2rem; } }
.content-width-fullwidth .bloom-content,
.content-vertical-padding-hide .bloom-content { padding-top: 0; padding-bottom: 0; }
.content-vertical-padding-top .bloom-content { padding-bottom: 0; }
.content-vertical-padding-bottom .bloom-content { padding-top: 0; }
.content-width-narrow .bloom-content,
.content-width-narrow .bloom-title-above {
	--wp--style--global--content-size: calc(var(--global-content-narrow-width) - 2 * var(--global-content-edge-padding));
	--wp--style--global--wide-size: var(--wp--style--global--content-size);
}
.content-width-fullwidth .bloom-content {
	--wp--style--global--content-size: 100%;
	--wp--style--global--wide-size: 100%;
}
.content-width-fullwidth .bloom-content .entry-content.has-global-padding { padding-left: 0; padding-right: 0; }
.content-width-fullwidth .bloom-content .entry-content.has-global-padding > .alignfull { margin-left: 0; margin-right: 0; }
.content-style-boxed .bloom-entry {
	background: var(--global-palette9);
	border-radius: 0.25rem;
	box-shadow: 0 15px 15px -10px rgba(0, 0, 0, 0.05);
}
.content-style-boxed:not(.content-width-fullwidth) .bloom-entry {
	box-sizing: border-box;
	width: calc(100% - 2 * var(--global-content-edge-padding));
	max-width: var(--global-calc-content-width);
	margin-left: auto;
	margin-right: auto;
	padding: var(--global-md-spacing);
}
.content-width-narrow.content-style-boxed .bloom-entry { max-width: calc(var(--global-content-narrow-width) - 2 * var(--global-content-edge-padding)); }
@media (max-width: 767px) { .content-style-boxed:not(.content-width-fullwidth) .bloom-entry { padding: 1.5rem; } }
/* 719px is the previous theme's own small-phone step (26 rules in its CSS); kept so boxed entries match it. */
@media (max-width: 719px) { .content-style-boxed:not(.content-width-fullwidth) .bloom-entry { width: calc(100% - 2 * var(--global-content-edge-padding) + 2rem); } }
.content-style-boxed:not(.content-width-fullwidth) .bloom-entry .entry-content.has-global-padding { padding-left: 0; padding-right: 0; }
.content-style-boxed:not(.content-width-fullwidth) .bloom-entry .entry-content.has-global-padding > .alignfull { margin-left: 0; margin-right: 0; }
.bloom-title-above { background: var(--global-palette7); }
.bloom-title-above .entry-header { display: flex; flex-direction: column; min-height: 200px; gap: 0; justify-content: center; align-items: center; text-align: center; }
.bloom-title-above .entry-header > div { width: 100%; }
.bloom-title-above .entry-title,
.bloom-title-inline .entry-title { margin: 0; }
.bloom-title-inline { margin-bottom: 1em; }
.bloom-404 { padding: 4rem 0 2rem; text-align: center; }
.bloom-404 h1 { font-size: 5rem; line-height: 1; margin: 0 0 0.3em; }
/* [bloom_breadcrumbs] (inc/breadcrumbs.php) */
.bloom-breadcrumbs,
.bloom-title-above .entry-header > .bloom-breadcrumbs { margin: 1em 0; font-size: 85%; color: var(--global-palette5); }
.bloom-breadcrumbs a { color: inherit; }

/* Entry hero (single and page titles) */
.entry-hero { text-align: center; padding: 2rem var(--global-content-edge-padding) 0; }
.entry-hero .entry-title { margin: 0.4em 0 0.5em; }
.entry-hero .entry-taxonomies { font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; }
.entry-hero .entry-taxonomies a { color: var(--global-palette1); text-decoration: none; }
.entry-hero .entry-meta { font-size: 0.85rem; color: var(--global-palette5); }
.entry-hero .entry-meta.is-layout-flex { justify-content: center; }
.entry-hero .entry-meta a { color: inherit; text-decoration: none; }
.single .post-thumbnail { margin: 2rem auto; }
.single .post-thumbnail img { border-radius: 0; }

/* Archive loop */
.bloom-loop .loop-entry { margin-bottom: 3rem; }
.bloom-loop .loop-entry .wp-block-post-featured-image { margin-bottom: 1.5rem; }
.bloom-loop .loop-entry .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.bloom-loop .entry-taxonomies { font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; }
.bloom-loop .entry-taxonomies a { color: var(--global-palette1); text-decoration: none; }
.bloom-loop .wp-block-post-title { margin: 0.3em 0; }
.bloom-loop .wp-block-post-title a { text-decoration: none; }
.bloom-loop .wp-block-read-more { font-family: var(--global-heading-font-family); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--global-palette1); }
.bloom-loop .wp-block-read-more::after { content: " \2192"; }
.archive-hero { text-align: center; padding: 2rem 0 0; }
.archive-hero h1 { margin: 0 0 1rem; }

/* ------------------------------------------------------------------
 * Header
 * ---------------------------------------------------------------- */
.site-header {
	position: relative;
	z-index: var(--bloom-z-header);
	margin-top: 0; /* content placed before the header part (e.g. a progress bar) would otherwise give it a block-gap margin */
	background: var(--bloom-header-bg);
	color: var(--bloom-header-text);
	transition: background var(--bloom-duration-slow) ease, transform var(--bloom-duration-slow) ease, box-shadow var(--bloom-duration-slow) ease;
}
.site-header__inner {
	min-height: var(--bloom-header-height);
	max-width: var(--global-content-width);
	margin: 0 auto;
	padding: 0 var(--global-content-edge-padding);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.site-header__right { display: flex; align-items: center; gap: 1rem; }
.site-header .wp-block-buttons { margin: 0; }

/* Logo (bloom/logo: main image for the solid header, optional alt image for the transparent state) */
.bloom-logo { display: inline-flex; align-items: center; line-height: 0; }
.bloom-logo img { width: var(--bloom-logo-width, 150px); max-width: 100%; height: auto; }
.bloom-logo__alt { display: none; }

/* Header button (the previous theme "header button") */
.site-header .header-button .wp-block-button__link {
	font-family: var(--global-heading-font-family);
	font-size: var(--bloom-header-button-font-size);
	font-weight: var(--bloom-header-button-font-weight);
	padding: var(--bloom-header-button-padding);
	border-radius: var(--bloom-header-button-radius);
	border: var(--bloom-header-button-border-width) solid var(--bloom-header-button-border);
	background: var(--bloom-header-button-bg);
	color: var(--bloom-header-button-text);
	transition: all var(--bloom-duration-fast) ease;
}
.site-header .header-button .wp-block-button__link:hover {
	color: var(--bloom-header-button-hover-text);
	background: var(--bloom-header-button-hover-bg);
	border-color: var(--bloom-header-button-hover-border);
	box-shadow: 0 15px 25px -7px rgba(0, 0, 0, 0.1);
}

/* Primary navigation (bloom/nav) */
.bloom-nav { font-family: var(--global-primary-nav-font-family); }
.bloom-nav ul { list-style: none; margin: 0; padding: 0; }
.bloom-nav.is-horizontal > ul { display: flex; align-items: center; }
.bloom-nav.is-horizontal > ul > li { position: relative; }
.bloom-nav.is-horizontal > ul > li > a {
	display: inline-flex; align-items: center; gap: 0.35em;
	padding: var(--bloom-nav-item-padding);
	color: var(--bloom-nav-color);
	text-decoration: none;
	transition: color var(--bloom-duration-fast) ease;
}
.bloom-nav.is-horizontal > ul > li > a:hover { color: var(--bloom-nav-hover); }
.bloom-nav.is-horizontal > ul > li.current-menu-item > a,
.bloom-nav.is-horizontal > ul > li.current-menu-ancestor > a { color: var(--bloom-nav-active); }
.bloom-nav li.menu-item-has-children > a::after {
	content: ""; width: 0.45em; height: 0.45em; margin-top: -0.2em;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}
.bloom-nav.is-horizontal ul.sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 200px;
	background: var(--bloom-dropdown-bg);
	box-shadow: 0 2px 13px 0 rgba(0, 0, 0, 0.1);
	opacity: 0; visibility: hidden; transform: translateY(var(--bloom-dropdown-offset));
	transition: opacity var(--bloom-duration-fast) ease, transform var(--bloom-duration-fast) ease, visibility var(--bloom-duration-fast);
	z-index: var(--bloom-z-dropdown);
}
.bloom-nav.is-horizontal li:hover > ul.sub-menu,
.bloom-nav.is-horizontal li:focus-within > ul.sub-menu,
.bloom-nav.is-horizontal li.is-dropdown-open > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.bloom-nav.is-horizontal ul.sub-menu li { border-bottom: 1px solid var(--bloom-dropdown-divider); }
.bloom-nav.is-horizontal ul.sub-menu a {
	display: block; width: 200px; padding: var(--bloom-dropdown-link-padding); box-sizing: border-box;
	font-size: var(--bloom-dropdown-font-size); color: var(--bloom-dropdown-text); text-decoration: none;
}
.bloom-nav.is-horizontal ul.sub-menu a:hover { color: var(--bloom-dropdown-hover-text); background: var(--bloom-dropdown-hover-bg); }
.bloom-nav.is-horizontal ul.sub-menu li.current-menu-item > a { color: var(--bloom-dropdown-active); }
/* WPML language items */
.bloom-nav .wpml-ls-item img { vertical-align: middle; margin-right: 0.3em; }

/* Vertical (footer) navigation */
.bloom-nav.is-vertical li { margin: 0 0 0.6em; }

/* Mobile toggle + drawer. Base = full-screen fade; body.has-drawer-slide (site default) turns it into a side panel.
   A menu block can set its own style per width (data-style / data-style-mobile on the drawer): header.js copies the one
   for the current width to data-active, which then wins over the body class. */
.bloom-menu-toggle {
	display: none; align-items: center; gap: 0.4em;
	background: none; border: 0; color: var(--bloom-toggle-color);
	font: inherit; font-size: 14px; padding: 0.4em 0.6em; cursor: pointer;
}
.bloom-menu-toggle svg { width: 20px; height: 20px; }
.bloom-menu-toggle:hover { color: var(--bloom-toggle-hover); }
/* toggleAt: always — the toggle replaces the horizontal menu at every width */
.bloom-menu-toggle--always { display: inline-flex; }
.bloom-nav.has-toggle-always { display: none; }
/* toggleIcon: plus — "+" that turns into "×" (the close button shows the same plus rotated) */
.bloom-menu-toggle--plus svg,
.bloom-drawer.has-plus-close .bloom-drawer__close svg { transition: transform var(--bloom-duration-fast) ease-in-out; }
.bloom-menu-toggle--plus[aria-expanded="true"] svg,
.bloom-drawer.has-plus-close .bloom-drawer__close svg { transform: rotate(45deg); }
.bloom-drawer.has-plus-close .bloom-drawer__close svg { width: 1em; height: 1em; }
.bloom-drawer.has-plus-close .bloom-drawer__close:active svg { transform: rotate(0deg); }
/* toggleCloses — the toggle stays above the open drawer and closes it (header.js adds body.drawer-toggle-closes); the drawer
   has no close button. Only the toggle shows over the drawer, and clicks beside it still reach the drawer's backdrop. */
.drawer-open.drawer-toggle-closes .site-header { z-index: var(--bloom-z-drawer-toggle); background: transparent; box-shadow: none; pointer-events: none; }
.drawer-open.drawer-toggle-closes .site-header * { visibility: hidden; }
.drawer-open.drawer-toggle-closes .site-header .bloom-menu-toggle,
.drawer-open.drawer-toggle-closes .site-header .bloom-menu-toggle * { visibility: visible; pointer-events: auto; color: var(--bloom-drawer-close); }
.bloom-drawer {
	position: fixed; inset: 0; z-index: var(--bloom-z-drawer);
	background: var(--bloom-drawer-bg);
	backdrop-filter: blur(var(--bloom-drawer-blur)); -webkit-backdrop-filter: blur(var(--bloom-drawer-blur));
	opacity: 0; visibility: hidden; transition: opacity var(--bloom-duration) ease, visibility var(--bloom-duration);
	overflow-y: auto;
}
.bloom-drawer.is-open { opacity: 1; visibility: visible; }
.bloom-drawer__inner { max-width: var(--bloom-drawer-max-width); margin: 0 auto; padding: var(--bloom-drawer-inner-padding); transform: scale(0.96); transition: transform var(--bloom-duration) ease; }
.bloom-drawer.is-open .bloom-drawer__inner { transform: scale(1); }
.bloom-drawer__close {
	display: block; margin-left: auto; background: none; border: 0;
	color: var(--bloom-drawer-close); font-size: var(--bloom-drawer-close-size); line-height: 1; padding: 0.6em 0.15em; cursor: pointer;
}
.bloom-drawer .bloom-mobile-menu { font-family: var(--global-heading-font-family); font-size: var(--bloom-drawer-font-size); }
.bloom-drawer .bloom-mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.bloom-drawer .bloom-mobile-menu li { border-bottom: 1px solid var(--bloom-drawer-divider); }
.bloom-drawer .bloom-mobile-menu a { display: block; padding: var(--bloom-drawer-link-padding); color: var(--bloom-drawer-text); text-decoration: none; }
.bloom-drawer .bloom-mobile-menu li.current-menu-item > a { color: var(--bloom-drawer-active); }
.bloom-drawer .bloom-mobile-menu .sub-menu { display: none; padding-left: 1em; }
.bloom-drawer .bloom-mobile-menu li.is-open > .sub-menu { display: block; }
.bloom-drawer .bloom-mobile-menu li.menu-item-has-children { position: relative; }
.bloom-drawer .bloom-mobile-menu .submenu-toggle {
	position: absolute; right: 0; top: 0; height: 3.4em; width: 3em;
	background: none; border: 0; border-left: 1px solid var(--bloom-drawer-divider); color: var(--bloom-drawer-text); cursor: pointer;
}
.bloom-drawer .bloom-mobile-menu .submenu-toggle::after {
	content: ""; display: inline-block; width: 0.5em; height: 0.5em;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.bloom-drawer .bloom-mobile-menu li.is-open > .submenu-toggle::after { transform: rotate(-135deg); }
.bloom-drawer .bloom-mobile-menu li.menu-item-has-children > a { padding-right: 3.5em; }
.bloom-drawer .header-button { margin-top: 1.5rem; }
.drawer-open { overflow: hidden; }

.has-drawer-slide .bloom-drawer:not([data-active]),
.bloom-drawer[data-active="slide"] { backdrop-filter: none; -webkit-backdrop-filter: none; }
.has-drawer-slide .bloom-drawer:not([data-active]) .bloom-drawer__inner,
.bloom-drawer[data-active="slide"] .bloom-drawer__inner {
	box-sizing: border-box; width: var(--wp--custom--bloom--header--drawer-panel-width, min(400px, 85vw)); max-width: none; min-height: 100%;
	margin: 0 0 0 auto; background: var(--bloom-drawer-panel-bg);
	transform: translateX(100%);
}
.has-drawer-slide .bloom-drawer.is-open:not([data-active]) .bloom-drawer__inner,
.bloom-drawer.is-open[data-active="slide"] .bloom-drawer__inner { transform: none; }

/* Staggered entrance of the drawer's top-level menu items (data-stagger); header.js numbers them with --bloom-i. */
.bloom-drawer[data-stagger] .bloom-mobile-menu > ul > li {
	opacity: 0; transform: translateY(0.75rem);
	transition: opacity var(--bloom-duration-slow) ease, transform var(--bloom-duration-slow) ease;
}
.bloom-drawer.is-open[data-stagger] .bloom-mobile-menu > ul > li {
	opacity: 1; transform: none;
	transition-delay: calc(var(--wp--custom--bloom--header--drawer-stagger-delay, 0.3s) + var(--bloom-i, 0) * var(--wp--custom--bloom--header--drawer-stagger-step, 0.08s));
}
@media (prefers-reduced-motion: reduce) {
	.bloom-drawer[data-stagger] .bloom-mobile-menu > ul > li { opacity: 1; transform: none; transition: none; }
}

/* The width where the horizontal menu gives way to the toggle is generated from bloom_header_options['breakpoint']
   (inc/assets.php), so a child theme sets it once instead of re-writing this media query. */

/* Transparent header (at the top of the page) */
.has-transparent-header .site-header { position: absolute; left: 0; right: 0; top: 0; }
.admin-bar.has-transparent-header .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.has-transparent-header .site-header { top: 46px; } }
.has-transparent-header .site-header:not(.is-stuck) { background: transparent; }
.has-transparent-header .site-header:not(.is-stuck) .bloom-logo:has(.bloom-logo__alt) .bloom-logo__main { display: none; }
.has-transparent-header .site-header:not(.is-stuck) .bloom-logo__alt { display: inline; }

/* Sticky header (header.js adds .is-fixed once scrolled past the header, .is-stuck when not at the top,
   .is-hidden while scrolling down when "reveal on scroll up" is on) */
.site-header.is-fixed { position: fixed; left: 0; right: 0; top: 0; }
.admin-bar .site-header.is-fixed { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header.is-fixed { top: 46px; } }
.site-header.is-fixed.is-hidden { transform: translateY(-110%); }
body.has-fixed-header:not(.has-transparent-header) { padding-top: var(--bloom-header-height); }

/* ------------------------------------------------------------------
 * Footer rows
 * ---------------------------------------------------------------- */
.site-footer__row { padding-left: var(--global-content-edge-padding); padding-right: var(--global-content-edge-padding); }
.site-footer__row > * { max-width: var(--global-content-width); margin-left: auto; margin-right: auto; }
.site-footer__bottom p { margin: 0; padding: 1em 0; font-size: 14px; }

/* Icons (bloom-core inline SVG) */
.bloom-icon { display: inline-flex; vertical-align: middle; line-height: 0; }
.bloom-icon svg { width: 1em; height: 1em; }
/* Section covers migrated from the previous theme rows: no core 430px default min-height, no core 1em padding (rows set their own). */
.wp-block-cover.bloom-section { min-height: 0; padding: 0; }
.wp-block-cover.bloom-section.has-custom-content-position .wp-block-cover__inner-container { width: 100%; }
/* Equal columns even when one column carries padding (the previous theme behaviour). */
.wp-block-column { box-sizing: border-box; }
/* Full-width sections on pages stack edge to edge like the previous theme rows (no block-gap strip between them). */
.page .entry-content .alignfull { margin-block-start: 0; }
.breadcrumbs, .rank-math-breadcrumb { font-size: 12px; }
.rank-math-breadcrumb .separator { margin: 0 0.4em; }

/* Inline icons in migrated headings/buttons */
.has-icon-left-fe_arrowRight .bloom-icon, .has-icon-right-fe_arrowRight .bloom-icon { margin: 0 0.3em; }
.wp-block-button .bloom-icon { margin: 0 0.4em 0 0; }
.wp-block-button .bloom-icon.is-right { margin: 0 0 0 0.4em; }
.wp-block-button .bloom-icon svg { width: 1.1em; height: 1.1em; }
.wp-block-button.is-icon-only .wp-block-button__link { padding: 0.5em; line-height: 0; font-size: 0; }
.wp-block-button.is-icon-only .bloom-icon { margin: 0; }
.wp-block-button.is-icon-only .bloom-icon svg { width: 18px; height: 18px; }

/* legacy-style mobile scaling of the large spacing presets */
@media (max-width: 1024px) {
	body { --wp--preset--spacing--kb-xxxxxl: 6rem; --wp--preset--spacing--kb-xxxxl: 5rem; --wp--preset--spacing--kb-xxxl: 4rem; --wp--preset--spacing--kb-xxl: 3.5rem; --wp--preset--spacing--kb-xl: 3rem; }
}
@media (max-width: 767px) {
	body { --wp--preset--spacing--kb-xxxxxl: 4rem; --wp--preset--spacing--kb-xxxxl: 3.5rem; --wp--preset--spacing--kb-xxxl: 3rem; --wp--preset--spacing--kb-xxl: 2.5rem; --wp--preset--spacing--kb-xl: 2rem; --wp--preset--spacing--kb-lg: 1.5rem; }
}

/* Light covers keep the theme text colours (the previous theme rows did not recolour their content) */
.wp-block-cover.is-light { color: var(--bloom-cover-light-text); }
.wp-block-cover.is-light :where(h1, h2, h3, h4, h5, h6):not(.has-text-color) { color: var(--bloom-cover-light-heading); }
.wp-block-cover.is-light :where(h5):not(.has-text-color) { color: var(--bloom-cover-light-heading-small); }
.wp-block-cover.is-light :where(h6):not(.has-text-color) { color: var(--bloom-cover-light-heading-smallest); }
.wp-block-cover.is-light :where(a):not(.wp-block-button__link):not(.has-text-color) { color: var(--bloom-cover-light-link); }

/* Single post: navigation, related posts, meta */
.post-navigation { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,0.08); gap: 2rem; font-family: var(--global-heading-font-family); }
.post-navigation .wp-block-post-navigation-link { max-width: 48%; }
.post-navigation .post-navigation-link__label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--global-palette5); }
.post-navigation a { color: var(--global-palette3); text-decoration: none; }
.post-navigation a:hover { color: var(--global-palette1); }
.entry-related { margin-top: 4rem; padding: 3rem var(--global-content-edge-padding); background: var(--global-palette7); }
.entry-related-title { text-align: center; margin: 0 0 2rem; }
.entry-meta { gap: 0.4em; }
.entry-meta p, .entry-meta .wp-block-post-author-name, .entry-meta .wp-block-post-date { margin: 0; font-size: 0.85rem; color: var(--global-palette5); }
.entry-meta .meta-label { color: var(--global-palette6); }

/* ------------------------------------------------------------------
 * Accessibility and small utilities
 * ---------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--global-palette1); outline-offset: 2px; }
.skip-link { position: fixed; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: var(--bloom-z-skip-link); background: var(--global-palette9, #fff); color: var(--global-palette1); padding: .5em 1em; border-radius: 4px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
/* Shimmer placeholder while a lazy-loaded image is still fetching (class added by header.js / infinite-scroll.js). */
.bloom-img-loading { background-image: linear-gradient(90deg, #eef1f2 25%, #f8fafb 37%, #eef1f2 63%); background-size: 400% 100%; animation: bloom-shimmer 1.4s ease infinite; }
@keyframes bloom-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.archive-hero .wp-block-search { max-width: 480px; margin: 1rem auto 0; }

/* Query pagination */
.wp-block-query-pagination { margin-top: 2rem; font-family: var(--global-heading-font-family); }
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers { color: var(--global-palette1); text-decoration: none; padding: .3em .6em; }
.wp-block-query-pagination .page-numbers.current { background: var(--global-palette1); color: var(--global-palette9, #fff); border-radius: 6px; }

/* Infinite scroll (bloom_infinite_scroll): once JS enhances the loop, the prev/numbers/next links are replaced by
   auto-loading plus a status indicator; they stay in the DOM (undisplayed) as the scroll sentinel and no-JS fallback. */
.bloom-loop.js-infinite .wp-block-query-pagination-previous,
.bloom-loop.js-infinite .wp-block-query-pagination-numbers,
.bloom-loop.js-infinite .wp-block-query-pagination-next { display: none; }
.bloom-loop__loading { display: none; align-items: center; justify-content: center; gap: 0.6em; margin-top: 2rem; padding: 1em 0; color: var(--global-palette5); font-family: var(--global-heading-font-family); font-size: 0.9rem; }
.bloom-loop__loading.is-visible { display: flex; }
.bloom-loop__spinner { width: 16px; height: 16px; border: 2px solid var(--global-palette7); border-top-color: var(--global-palette1); border-radius: 50%; animation: bloom-spin 0.7s linear infinite; }
@keyframes bloom-spin { to { transform: rotate(360deg); } }

.bloom-nav.is-horizontal > ul > li > a:focus-visible { outline-offset: -2px; }
/* Escape closes an open dropdown (header.js adds the class; focusing the parent link alone keeps :focus-within open).
   Placed after the hover/focus rules so it wins on equal specificity. */
.bloom-nav.is-horizontal li.menu-item-has-children.is-dropdown-closed > ul.sub-menu { opacity: 0; visibility: hidden; }

/* Reduced motion: the chrome stays still (the drawer stagger and smooth scrolling are handled where they are defined). */
@media (prefers-reduced-motion: reduce) {
	.site-header { transition: none; }
	.site-header.is-fixed.is-hidden { transform: none; }
	.bloom-nav.is-horizontal ul.sub-menu { transition: none; }
	.bloom-drawer,
	.bloom-drawer .bloom-drawer__inner { transition: none; }
	.bloom-img-loading { animation: none; background-image: none; }
	.bloom-loop__spinner { animation: none; }
}

/* Transparent header on single posts: keep the hero clear of the header */
.has-transparent-header.single-post .entry-hero { padding-top: calc(var(--bloom-header-height) + 1.5rem); }
@media (max-width: 782px) { .has-transparent-header.single-post .entry-hero { padding-top: calc(var(--bloom-header-height) + 1rem); } }
