/*
Theme Name: Blue Silver Advisory
Template: twentytwentyfive
Description: Professional child theme for Blue Silver Advisory — Real Estate Research & Advisory
Version: 34.1
Text Domain: bluesilver-advisory
*/

/* =============================================
   GLOBAL RESETS & BASE
   ============================================= */

/* Zero root padding vars on body — body-level custom properties win over :root
   for all descendants, so alignfull negative margins become 0 regardless of
   what WordPress's global-styles block sets on :root. With 0 negative margins
   the BFC from overflow-x:hidden on body cannot clip any breakout elements. */
html {
	overflow-x: clip;
	/* What shows when the page bounces past its top or bottom edge: the
	   header's navy above, the footer's black below (the body keeps its own
	   background behind the content) */
	background: linear-gradient(to bottom, #03122B 0 50%, #000000 50% 100%) fixed;
}

:root {
	--bsa-fs-xl: 32px;  /* section H2 headings */
	--bsa-fs-lg: 20px;  /* H3 / sub-headings */
	--bsa-fs-md: 18px;  /* body paragraphs */
	--bsa-fs-sm: 16px;  /* labels / eyebrows / small text */
	--bsa-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--bsa-motion-fast: 180ms;
	--bsa-motion-slow: 820ms;
	/* One corner for every box, button, menu item and field on the site and
	   the portal; full-width bands stay square, circles stay round */
	--bsa-radius: 10px;
	--bsa-page-top: 6.25rem;  /* 100px gap between the header and the first content on the inner pages */
}

/* =============================================
   TYPE SCALE — one set of text sizes for every page except the Home hero,
   per device (laptops & desktops / tablets under 1024px / phones under 600px).
   The page stylesheets, the editor's font size presets (theme.json: Small,
   Body, Sub-heading, Heading, Title, Display) and the editor preview all use
   these, so a size picked in the editor is right on every device.
   ============================================= */
:root {
	--bsa-type-display: 54px;  /* large statistic figures */
	--bsa-type-title: 42px;    /* page titles (H1) */
	--bsa-type-heading: 32px;  /* section headings (H2), statistic figures */
	--bsa-type-sub: 22px;      /* sub-headings (H3), card and panel headings */
	--bsa-type-body: 18px;     /* paragraphs, lists, form fields */
	--bsa-type-small: 15px;    /* notes, labels, card text */
	--bsa-type-eyebrow: 15px;  /* small capitals above headings */
}

@media (max-width: 1023.98px) {
	:root {
		--bsa-type-display: 44px;
		--bsa-type-title: 36px;
		--bsa-type-heading: 28px;
		--bsa-type-sub: 20px;
		--bsa-type-body: 17px;
		--bsa-type-small: 14px;
		--bsa-type-eyebrow: 14px;
	}
}

@media (max-width: 599.98px) {
	:root {
		--bsa-type-display: 36px;
		--bsa-type-title: 28px;
		--bsa-type-heading: 24px;
		--bsa-type-sub: 18px;
		--bsa-type-body: 16px;
		--bsa-type-small: 14px;
		--bsa-type-eyebrow: 13px;
	}
}

/* Text with no size of its own follows the scale (lowest priority, so page
   styles and sizes picked in the editor still win) */
:where(.wp-block-post-content, .editor-styles-wrapper) :where(h1) { font-size: var(--bsa-type-title); }
:where(.wp-block-post-content, .editor-styles-wrapper) :where(h2) { font-size: var(--bsa-type-heading); }
:where(.wp-block-post-content, .editor-styles-wrapper) :where(h3) { font-size: var(--bsa-type-sub); }
:where(.wp-block-post-content, .editor-styles-wrapper) :where(p, li) { font-size: var(--bsa-type-body); }

/* A named size picked in the editor wins over the page stylesheets' own
   sizes (everywhere but the Home hero, which keeps its design) */
html:root body .wp-site-blocks .wp-block-post-content .has-small-font-size:not(.bsa-hero *)     { font-size: var(--bsa-type-small) !important; }
html:root body .wp-site-blocks .wp-block-post-content .has-medium-font-size:not(.bsa-hero *)    { font-size: var(--bsa-type-body) !important; }
html:root body .wp-site-blocks .wp-block-post-content .has-large-font-size:not(.bsa-hero *)     { font-size: var(--bsa-type-sub) !important; }
html:root body .wp-site-blocks .wp-block-post-content .has-x-large-font-size:not(.bsa-hero *)   { font-size: var(--bsa-type-heading) !important; }
html:root body .wp-site-blocks .wp-block-post-content .has-xx-large-font-size:not(.bsa-hero *)  { font-size: var(--bsa-type-title) !important; }
html:root body .wp-site-blocks .wp-block-post-content .has-xxx-large-font-size:not(.bsa-hero *) { font-size: var(--bsa-type-display) !important; }

/* Boxes built in the block editor, which have no corner rule of their own */
.bsa-why-ad .wp-block-column.has-background,
.bsa-liveability-stat,
.bsa-stat-card,
.bsa-philosophy-inner,
.bsa-value-card,
.bsa-bc-card,
.bsa-tc,
.bsa-cr-note {
	border-radius: var(--bsa-radius, 10px) !important;
}

.bsa-why-ad .wp-block-column.has-background,
.bsa-liveability-stat {
	overflow: hidden;
}

/* =============================================
   SITE LOGO — whatever logo is set in Site Identity is shown --bsa-logo-h
   tall. header.js measures the empty transparent margin around the logo in
   its file and adds .bsa-logo-trim with the measurements, so only the logo
   itself is shown (an uploaded logo often has wide empty margins).
   ============================================= */
:is(.bsa-header, .bsa-footer) img.custom-logo {
	display: block;
	width: auto !important;
	height: var(--bsa-logo-h, 56px) !important;
	max-width: none !important;
}

.bsa-logo-trim {
	display: block;
	overflow: hidden;
	height: var(--bsa-logo-h, 56px);
	width: calc(var(--bsa-logo-h, 56px) * var(--logo-ar));
}

:is(.bsa-header, .bsa-footer, .bsa-p4-brand, #bsa-splash) .bsa-logo-trim > img {
	display: block;
	width: auto !important;
	height: calc(var(--bsa-logo-h, 56px) * var(--logo-sh)) !important;
	max-width: none !important;
	margin: calc(var(--bsa-logo-h, 56px) * var(--logo-oy) * -1) 0 0 calc(var(--bsa-logo-h, 56px) * var(--logo-ox) * -1) !important;
	object-fit: fill !important;
}

/* Header: 52px tall plus 9px above and below (70px), so the header stays 102px */
.bsa-header { --bsa-logo-h: 52px; }
.bsa-header .wp-block-site-logo { margin-block: 9px !important; }
/* Footer: the full logo (icon, name and ADVISORY), so it is shown larger than
   the header's name-only logo for the small lettering to read */
.bsa-footer { --bsa-logo-h: 88px; }
@media (max-width: 1023.98px) {
	.bsa-footer { --bsa-logo-h: 68px; }
}

/* Smaller laptops (1024–1439px, hamburger menu): the logo and the menu button
   line up with the page content, as they do on wider screens */
@media (min-width: 1024px) and (max-width: 1439.98px) {
	.bsa-header .bsa-header-row {
		max-width: none !important;
		padding-left: calc(20px + clamp(1.5rem, 4vw, 3rem)) !important;
		padding-right: calc(20px + clamp(1.5rem, 4vw, 3rem)) !important;
	}
}

/* Phones and small tablets: a smaller logo (and so a slimmer header) */
@media (max-width: 767.98px) {
	.bsa-header { --bsa-logo-h: 44px; }
	.bsa-header .wp-block-site-logo { margin-block: 3px !important; }
}

/* Focus outlines only for keyboard use: the parent theme outlines anything
   clicked or tapped (a thick white border on the navy header) */
.wp-site-blocks *:focus:not(:focus-visible) {
	outline: none !important;
}

.bsa-header a,
.bsa-header button {
	-webkit-tap-highlight-color: transparent;
}

body {
	font-family: 'PT Serif', Georgia, 'Times New Roman', serif;
	color: #1A2E44;
	background-color: #FFFFFF;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
	overflow-y: visible;
	--wp--style--root--padding-left: 0px;
	--wp--style--root--padding-right: 0px;
}

a {
	color: #2C5F8A;
	text-decoration: none;
}

a:hover {
	color: #0F1F38;
}

/* Bold from the editor is PT Serif's real bold. Body text set lighter than
   regular (300) would otherwise only step up to 400, which looks plain. */
strong,
b {
	font-weight: 700;
}

/* =============================================
   TYPOGRAPHY — PT SERIF (site-wide)
   ============================================= */

h1, h2, h3, h4, h5, h6,
.wp-block-heading {
	font-family: 'PT Serif', Georgia, 'Times New Roman', serif;
}

/* Form elements and interactive elements don't inherit font-family from body
   by default in most browsers — force PT Serif across everything. */
button, input, select, textarea,
.wp-block-navigation,
.wp-block-navigation a,
.wp-block-navigation-item__content {
	font-family: 'PT Serif', Georgia, 'Times New Roman', serif;
}

/* =============================================
   HEADER
   ============================================= */

.bsa-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

/* Fade shadow below sticky header — darkens content scrolling under the nav */
.bsa-header::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -56px;
	height: 56px;
	background: linear-gradient(to bottom, rgba(15,31,56,0.32) 0%, transparent 100%);
	pointer-events: none;
	z-index: -1;
}

/* Header inner row: logo ← space → nav+userbar */
/*
 * WP adds is-layout-flow to every wp:group during rendering. The is-layout-flow
 * CSS sets margin-block-start:40px on all non-first children. This disrupts our
 * custom flex layouts in the header and footer — zero it on every flex group child.
 */
.bsa-header-row > *,
.bsa-header-right > *,
.bsa-footer-top > *,
.bsa-footer-nav-cols > *,
.bsa-footer-col > *,
.bsa-footer-brand-col > *,
.bsa-footer-bottom > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/* WP .is-layout-constrained injects margin-left/right:auto !important (specificity 0,2,0)
   on all children. We need (0,3,0) to override it. */
.bsa-header .bsa-header-row.wp-block-group > * {
	margin-left: 0 !important;
	margin-right: 0 !important;
	margin-inline-start: 0 !important;
	margin-inline-end: 0 !important;
	max-width: none !important;
}

.bsa-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: var(--wp--preset--spacing--20, 0.75rem);
	padding-bottom: var(--wp--preset--spacing--20, 0.75rem);
}

.bsa-header-row > p {
	margin: 0;
}

/* Right cluster: nav + user bar */
.bsa-header-right {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20, 0.75rem);
}

/* Inline user greeting + logout inside header */
.bsa-header-user {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-left: 1.25rem;
	border-left: 1px solid rgba(255,255,255,0.15);
	white-space: nowrap;
}

.bsa-header-user__name {
	font-size: 18px;
	color: rgba(255,255,255,0.65);
	font-family: 'PT Serif', Georgia, serif;
	letter-spacing: 0.01em;
}

.bsa-header-user__logout {
	font-size: 18px;
	color: rgba(255,255,255,0.55);
	font-family: 'PT Serif', Georgia, serif;
	text-decoration: none;
	border: 1px solid rgba(255,255,255,0.2);
	padding: 0.2rem 0.7rem;
	border-radius: var(--bsa-radius, 10px);
	transition: color 0.15s, border-color 0.15s;
}

.bsa-header-user__logout:hover {
	color: #FFFFFF;
	border-color: rgba(255,255,255,0.5);
}

/* Portal link — primary action for logged-in clients */
.bsa-header-user__portal {
	font-size: 18px;
	color: #FFFFFF;
	font-family: 'PT Serif', Georgia, serif;
	text-decoration: none;
	background: rgba(44, 95, 138, 0.7);
	border: 1px solid rgba(255,255,255,0.3);
	padding: 0.2rem 0.75rem;
	border-radius: var(--bsa-radius, 10px);
	transition: background 0.15s, border-color 0.15s;
}

.bsa-header-user__portal:hover {
	background: #2C5F8A;
	border-color: rgba(255,255,255,0.6);
}

/* Hide Sign Up / Client Login buttons when a client is logged in */
.bsa-header-user ~ .wp-block-buttons {
	display: none;
}
.logged-in .bsa-header .wp-block-buttons {
	display: none;
}

@media (max-width: 1439px) {
	.bsa-header-user {
		display: none;
	}
}

@media (max-width: 680px) {
	.bsa-header-user__name {
		display: none;
	}
}

.bsa-header .wp-block-site-title a {
	color: #FFFFFF !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 1.15rem;
	letter-spacing: 0.03em;
}

/* Navigation links in header — no font-size here so editor typography control
   on the nav block (which sets an inline style on <nav>) cascades down to links */
.bsa-header .wp-block-navigation {
	font-size: 0.875rem;
}
.bsa-header .wp-block-navigation a {
	color: rgba(255,255,255,0.85) !important;
	font-weight: 400;
	letter-spacing: 0.02em;
	transition: color 0.2s ease;
}

.bsa-header .wp-block-navigation a:hover {
	color: #FFFFFF !important;
}

/* Nav button defaults — colours come from Customizer via CSS variables */
:root {
	--bsa-signup-bg: #2C5F8A;
	--bsa-login-bg:  #1A3A5C;
}
.bsa-header .wp-block-navigation-item.bsa-nav-signup,
.bsa-header .wp-block-navigation-item.bsa-nav-login {
	border-radius: var(--bsa-radius, 10px);
	overflow: hidden;
}
.bsa-header .wp-block-navigation-item.bsa-nav-signup {
	background-color: var(--bsa-signup-bg);
}
.bsa-header .wp-block-navigation-item.bsa-nav-login {
	background-color: var(--bsa-login-bg);
}
.bsa-header .wp-block-navigation .bsa-nav-signup > a,
.bsa-header .wp-block-navigation .bsa-nav-login > a,
.bsa-header .wp-block-navigation-item.bsa-nav-signup > a,
.bsa-header .wp-block-navigation-item.bsa-nav-login > a {
	color: #FFFFFF !important;
	padding: 0.45rem 1.1rem !important;
	font-weight: 500;
	transition: opacity 0.2s ease;
}
.bsa-header .wp-block-navigation-item.bsa-nav-signup:hover,
.bsa-header .wp-block-navigation-item.bsa-nav-login:hover {
	opacity: 0.85;
}

/* Dropdown submenu — appearance */
.bsa-header .wp-block-navigation__submenu-container {
	background-color: #FFFFFF !important;
	border-top: 2px solid #2C5F8A;
	box-shadow: 0 24px 56px rgba(15,31,56,0.16), 0 4px 16px rgba(15,31,56,0.08);
	min-width: 240px;
	border-radius: 0 0 var(--bsa-radius, 10px) var(--bsa-radius, 10px);
	overflow: hidden;
}

.bsa-header .wp-block-navigation__submenu-container a {
	color: #1A2E44 !important;
	font-size: 0.80rem !important;
	padding: 0.75rem 1.4rem !important;
	border-left: 2px solid transparent;
	display: block;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.bsa-header .wp-block-navigation__submenu-container a:hover {
	background-color: #F4F5F7;
	color: #2C5F8A !important;
	border-left-color: #2C5F8A;
}

/* Smooth slide-in animation — desktop only */
@media (min-width: 1440px) {
	.bsa-header .wp-block-navigation__submenu-container {
		display: block !important;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateY(-8px);
		transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.bsa-header .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container,
	.bsa-header .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
	}

	/* Chevron rotates when dropdown is open */
	.bsa-header .wp-block-navigation-item__submenu-icon svg {
		transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.bsa-header .wp-block-navigation-item.has-child:hover .wp-block-navigation-item__submenu-icon svg,
	.bsa-header .wp-block-navigation-item.has-child:focus-within .wp-block-navigation-item__submenu-icon svg {
		transform: rotate(180deg);
	}
}

/* Dropdown chevron: same colour as the menu link (it otherwise inherits the
   dark navy text colour and disappears against the navy header). */
.bsa-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-icon {
	color: rgba(255, 255, 255, 0.85);
	transition: color 0.15s;
}

.bsa-header .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation__submenu-icon,
.bsa-header .wp-block-navigation__container > .wp-block-navigation-item:focus-within > .wp-block-navigation__submenu-icon,
.bsa-header .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-current > .wp-block-navigation__submenu-icon {
	color: #FFFFFF;
}

/* Mobile nav overlay — full-viewport fixed layer */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: #0F1F38 !important;
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	height: 100vh !important;
	z-index: 99999 !important;
	overflow-y: auto !important;
	display: flex !important;
	flex-direction: column !important;
}

/* Overlay content wrapper — left-align everything, fill height */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start !important;
	padding: 2rem 1.75rem !important;
	box-sizing: border-box !important;
	width: 100% !important;
	flex: 1 !important;
	display: flex !important;
	flex-direction: column !important;
}

/* Nav item list — left-aligned, full width */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	width: 100% !important;
	padding: 0 !important;
	gap: 0 !important;
}

/* Top-level nav items — divider rows, no box around items */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	width: 100% !important;
	border: none !important;
	border-bottom: 1px solid rgba(255,255,255,0.07) !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Top-level link text */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > a {
	padding: 0.9rem 0 !important;
	font-size: 1rem !important;
	font-weight: 500 !important;
	letter-spacing: 0.02em !important;
	color: rgba(255,255,255,0.9) !important;
	border: none !important;
	background: none !important;
	display: block !important;
	width: 100% !important;
}

/* Sub-menu container — inline, not floating, left-aligned */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	background-color: transparent !important;
	box-shadow: none !important;
	border: none !important;
	border-radius: 0 !important;
	position: static !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
	padding: 0 0 0.5rem 1rem !important;
	min-width: 0 !important;
	width: 100% !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
}

/* Sub-menu items */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	width: 100% !important;
	text-align: left !important;
	border: none !important;
	background: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Sub-menu links */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a {
	color: rgba(255,255,255,0.55) !important;
	font-size: 0.875rem !important;
	padding: 0.45rem 0 !important;
	border: none !important;
	background: none !important;
	display: block !important;
	text-align: left !important;
	width: 100% !important;
}

/* ---- Mobile-only nav items (hidden on desktop) ---- */

/* Go to Portal — individual client */
.bsa-header .wp-block-navigation-item.bsa-nav-portal {
	display: none !important;
}
.bsa-role-individual .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bsa-nav-portal-ind {
	display: flex !important;
}
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bsa-nav-portal > a {
	color: #FFFFFF !important;
	font-weight: 600 !important;
}

/* Log Out */
.bsa-header .wp-block-navigation-item.bsa-nav-logout {
	display: none !important;
}
.logged-in .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bsa-nav-logout {
	display: flex !important;
}
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bsa-nav-logout > a {
	color: rgba(255,160,160,0.9) !important;
}

/* ---- Login/Signup NAV items: hidden on desktop (button blocks handle desktop),
        shown in mobile overlay only when NOT logged in ---- */
.bsa-header .wp-block-navigation-item.bsa-nav-login,
.bsa-header .wp-block-navigation-item.bsa-nav-signup {
	display: none !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bsa-nav-login {
	display: flex !important;
}

/* Hide login/signup nav items in mobile overlay when already logged in */
.logged-in .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bsa-nav-login,
.logged-in .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.bsa-nav-signup {
	display: none !important;
}

/* ---- Hamburger overlay: logo at top ---- */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content::before {
	content: '';
	display: block;
	/* The site logo, trimmed like the header's (vars from header.js, "SITE LOGO") */
	width: calc(52px * var(--logo-ar, 3));
	height: 52px;
	background-image: var(--logo-url, none);
	background-repeat: no-repeat;
	background-size: auto calc(52px * var(--logo-sh, 1));
	background-position: calc(52px * var(--logo-ox, 0) * -1) calc(52px * var(--logo-oy, 0) * -1);
	margin-bottom: 1.75rem;
	flex-shrink: 0;
}

/* ---- Hamburger overlay: Client Log-In as silver button ---- */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-login {
	margin-top: 1.25rem !important;
	border-bottom: none !important;
	padding-bottom: 0.5rem !important;
}
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-login > a {
	background: #A8C4DE !important;
	color: #0F1F38 !important;
	border-radius: var(--bsa-radius, 10px) !important;
	padding: 0.75rem 1.25rem !important;
	font-weight: 600 !important;
	font-size: 0.95rem !important;
	text-align: center !important;
	display: flex !important;
	justify-content: center !important;
	width: 100% !important;
	box-sizing: border-box !important;
	transition: background 0.18s ease, color 0.18s ease !important;
	letter-spacing: 0.02em !important;
	border: none !important;
}
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-login > a:hover {
	background: #FFFFFF !important;
	color: #0F1F38 !important;
}

/* ---- Mobile + tablet header: logo pinned left, hamburger right ---- */
@media (max-width: 1439px) {
	.bsa-header-row {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 0 !important;
		/* prevent hamburger from touching viewport edge */
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}
	/* The nav block uses is-content-justification-center which centers the hamburger
	   button within the nav's own flex layout. Override to push it to the far right. */
	.bsa-header .wp-block-navigation {
		justify-content: flex-end !important;
	}
	/* Hide bsa-header-right (buttons + user-bar) on mobile —
	   hamburger in the nav group is all that's needed */
	.bsa-header .bsa-header-right {
		display: none !important;
	}
	/* Force WordPress nav block into hamburger mode on tablet */
	.bsa-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}
	.bsa-header .wp-block-navigation__responsive-container-open {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		color: #FFFFFF !important;
		background: transparent !important;
		border: none !important;
		border-width: 0 !important;
		outline: none !important;
		box-shadow: none !important;
		-webkit-appearance: none !important;
		appearance: none !important;
		padding: 0.4rem !important;
		margin: 0 !important;
		cursor: pointer !important;
		border-radius: 0 !important;
	}
	.bsa-header .wp-block-navigation__responsive-container-open:focus-visible {
		outline: 2px solid rgba(255,255,255,0.5) !important;
		outline-offset: 2px !important;
	}
	/* SVG icon lines — force white on dark header */
	.bsa-header .wp-block-navigation__responsive-container-open svg,
	.bsa-header .wp-block-navigation__responsive-container-open svg line,
	.bsa-header .wp-block-navigation__responsive-container-open svg path,
	.bsa-header .wp-block-navigation__responsive-container-open svg rect {
		stroke: #FFFFFF !important;
		color: #FFFFFF !important;
	}
	/* Hide Sign Up / Client Login button blocks — they live in the hamburger nav */
	.bsa-header-right .wp-block-buttons {
		display: none !important;
	}
}

/* =============================================
   GLOBAL LAYOUT — HEADER FLUSH + SECTION WIDTHS
   ============================================= */

/* Zero FSE row-gap AND the margin-block-start WP puts on every child.
   min-height + flex pushes footer to bottom on short pages (no white gap). */
.wp-site-blocks {
	row-gap: 0 !important;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* WP generates: :where(.wp-site-blocks) > * { margin-block-start: 40px }
   That 40px appears as white bars between header / main / footer.
   Our selector beats :where() (zero specificity) so !important is a belt-and-braces. */
.wp-site-blocks > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/*
 * The main.wp-block-group wrapper in page.html has layout:constrained which
 * gives it root padding-block from theme.json (creates white gap before footer).
 * The post-content also inherits block-gap that appears between sections.
 * Kill all of it here.
 */
main.wp-block-group {
	padding-block: 0 !important;
	margin-block: 0 !important;
}

.wp-block-post-content {
	padding-block: 0 !important;
	margin-block: 0 !important;
}

/* WP generates: :root :where(.is-layout-constrained) > * { margin-block-start: 40px }
   This puts 40px between every section inside the page post-content.
   Target both the post-content children and the main wrapper children. */
.wp-block-post-content > * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/*
 * Constrain alignwide inner groups to 1280px with horizontal gutters.
 * wp:group {"align":"full"} has no layout type, so Twenty-Five never
 * applies its constrained-layout max-width to children. We do it manually.
 */
.bsa-section > .wp-block-group.alignwide,
.bsa-section > .wp-block-columns.alignwide,
.bsa-page-hero > .wp-block-group.alignwide,
.bsa-header > .wp-block-group.alignwide,
.bsa-footer > .wp-block-group.alignwide {
	max-width: 1280px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(1rem, 3vw, 2rem);
	padding-right: clamp(1rem, 3vw, 2rem);
	box-sizing: border-box;
}

/* =============================================
   HOME PAGE SECTIONS
   ============================================= */

/* Generic section wrapper — replaces wp:group wrappers */
.bsa-section {
	padding-top: clamp(56px, 8vw, 96px);
	padding-bottom: clamp(56px, 8vw, 96px);
}

.bsa-section--light { background-color: #F4F5F7; }

/* Dashboard pages get light grey background */
.bsa-page-dashboard-ind main {
	background-color: #F4F5F7;
}

/* Consultation page — kill the gap below the full-width block */
body.bsa-page-consultation main.wp-block-group {
	padding-block-end: 0 !important;
	margin-block-end: 0 !important;
}

body.bsa-page-client-login main.wp-block-group {
	padding-block-end: 0 !important;
	margin-block-end: 0 !important;
}

/* Utility pages (Book a Consultation, Client Login): the content band grows to
   fill the screen, so the footer sits at the bottom on tall screens, and the page
   scrolls normally whenever the content needs more room. */
body.bsa-page-consultation .wp-site-blocks,
body.bsa-page-client-login .wp-site-blocks {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

body.bsa-page-consultation .wp-site-blocks > main,
body.bsa-page-client-login .wp-site-blocks > main {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

body.bsa-page-consultation main > .wp-block-post-content,
body.bsa-page-client-login main > .wp-block-post-content {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
}

body.bsa-page-consultation .wp-site-blocks > footer,
body.bsa-page-client-login .wp-site-blocks > footer {
	flex: 0 0 auto;
}

body.bsa-page-consultation .wp-block-post-content {
	padding-block-end: 0 !important;
	margin-block-end: 0 !important;
}

/* UAE Dirham sign — bold D with two horizontal bars, inherits currentColor */
.bsa-dh {
	display: inline-block;
	position: relative;
	font-weight: 700;
	font-style: normal;
	letter-spacing: 0;
	line-height: 1;
}
.bsa-dh::before,
.bsa-dh::after {
	content: '';
	position: absolute;
	left: -1px;
	right: 2px;
	height: 1.5px;
	background: currentColor;
	border-radius: 1px;
}
.bsa-dh::before { top: 30%; }
.bsa-dh::after  { top: 56%; }

@media (max-width: 600px) {

	/* Stack columns on mobile with spacing */
	.wp-block-columns {
		gap: 1rem;
	}

	.bsa-inner-card,
	.bsa-notice-card {
		margin-bottom: 0;
	}
}

/* Inner page hero — solid navy */
.bsa-page-hero {
	background-color: #0F1F38;
}

/* =============================================
   INNER PAGES
   ============================================= */

.bsa-page-hero {
	padding: var(--bsa-page-top) clamp(1.5rem, 5vw, 4rem) 4rem;
}

/* alignwide inside hero uses the global constraint above — no extra rule needed */

/* Inner content cards — used on service and company pages */
.bsa-inner-card {
	background: #FFFFFF;
	border: 1px solid #E8ECEF;
	border-radius: var(--bsa-radius, 10px);
	padding: 2rem;
}

.bsa-inner-card h3.wp-block-heading {
	font-size: var(--bsa-type-sub);
	font-weight: 600;
	color: #0F1F38;
	margin-bottom: 0.75rem;
}

.bsa-inner-card p {
	font-size: var(--bsa-type-small);
	color: #6B7C8D;
	line-height: 1.65;
}

.bsa-inner-card--blue  { border-top: 3px solid #2C5F8A; }
.bsa-inner-card--sky   { border-top: 3px solid #A8C4DE; }
.bsa-inner-card--steel { border-top: 3px solid #6B7C8D; }

/* Compact section — reduced top/bottom padding */
.bsa-section--compact {
	padding-top: clamp(2.5rem, 4vw, 3.5rem) !important;
	padding-bottom: clamp(2.5rem, 4vw, 3.5rem) !important;
}

.bsa-section--compact h2.wp-block-heading {
	margin-bottom: 1.75rem !important;
}

/* Notice card — used on careers page */
.bsa-notice-card {
	background: #F4F5F7;
	border-left: 3px solid #2C5F8A;
	border-radius: var(--bsa-radius, 10px);
	padding: 2rem;
}

.bsa-notice-card h3.wp-block-heading {
	font-size: var(--bsa-type-sub);
	font-weight: 600;
	color: #0F1F38;
	margin-bottom: 0.75rem;
}

.bsa-notice-card p {
	font-size: var(--bsa-type-small);
	color: #6B7C8D;
	line-height: 1.65;
}

/* Responsive column adjustment for inner page 2-col grids */
@media (max-width: 680px) {
	.bsa-inner-card,
	.bsa-notice-card {
		margin-bottom: 1rem;
	}
}

/* =============================================
   FOOTER
   ============================================= */

/* Fade gradient above footer — section content bleeds into dark footer */
.bsa-footer {
	color: rgba(255,255,255,0.7);
	padding-top: 1.5rem;
	padding-bottom: var(--wp--preset--spacing--40, 2.25rem);
	position: relative;
	z-index: 2;
}

.bsa-footer::before {
	content: '';
	position: absolute;
	top: -18px;
	left: 0;
	right: 0;
	height: 18px;
	background: linear-gradient(to bottom, transparent 0%, rgba(15,31,56,0.22) 100%);
	pointer-events: none;
}

/* Footer top row: brand left, nav columns right */
.bsa-footer-top {
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: clamp(2rem, 6vw, 4rem);
}

/* Brand column */
.bsa-footer-brand-col {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1 1 auto;
	min-width: 0;
}

.bsa-footer-brand-col > p {
	margin: 0;
}

/* Nav columns wrapper — nowrap keeps all three on one row */
.bsa-footer-nav-cols {
	display: flex;
	flex-wrap: nowrap;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: flex-start;
	flex: 0 0 auto;
}

.bsa-footer > p {
	width: 100%;
	max-width: 1280px;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

/* Individual footer column */
.bsa-footer-col {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.bsa-footer-col > p {
	margin: 0;
}

/* Nav links inside footer columns — left-align and kill any flex centering */
.bsa-footer-col .wp-block-navigation {
	align-self: flex-start;
}

.bsa-footer-col .wp-block-navigation.is-layout-flex {
	align-items: flex-start;
	flex-direction: column;
	flex-wrap: nowrap;
}

/* Footer bottom copyright row */
.bsa-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
}

.bsa-footer-bottom > p {
	margin: 0;
}

/* Broad margin reset for all paragraphs inside footer */
.bsa-footer p {
	margin-block: 0;
}

.bsa-footer p,
.bsa-footer .wp-block-navigation-item__content,
.bsa-footer .wp-block-navigation-item a,
.bsa-footer a {
	color: inherit;
}

.bsa-footer a {
	transition: color 0.2s;
}

.bsa-footer a:hover {
}

.bsa-footer h4{
	font-weight: 600;
	letter-spacing: 0.03em;
}

.bsa-footer-divider {
	border-color: rgba(255,255,255,0.1) !important;
	margin-top: var(--wp--preset--spacing--50, 3rem) !important;
	margin-bottom: var(--wp--preset--spacing--30, 1.5rem) !important;
}

/* Keep the footer readable inside the Site Editor canvas. */
.editor-styles-wrapper .bsa-footer {
	background-color: #03122B !important;
	color: #FFFFFF !important;
	min-height: 260px;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	opacity: 1 !important;
	filter: none !important;
}

.editor-styles-wrapper .wp-block-template-part:has(.bsa-footer),
.editor-styles-wrapper .wp-block-template-part.is-selected:has(.bsa-footer) {
	background-color: #03122B !important;
	opacity: 1 !important;
	filter: none !important;
}

.editor-styles-wrapper .bsa-footer a,
.editor-styles-wrapper .bsa-footer .wp-block-navigation-item__content,
.editor-styles-wrapper .bsa-footer h2,
.editor-styles-wrapper .bsa-footer p {
	color: #FFFFFF !important;
	opacity: 1;
}

.editor-styles-wrapper .bsa-footer .bsa-footer-top {
	padding-top: 1.5rem !important;
	padding-bottom: 1.5rem !important;
}

/* Footer — mobile centre alignment */
@media (max-width: 768px) {
	.bsa-footer-top {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: center;
		text-align: center;
	}
	.bsa-footer-brand-col {
		align-items: center;
	}
	.bsa-footer-brand-col > p,
	.bsa-footer-brand-col .wp-block-image {
		text-align: center;
	}
	.bsa-footer-nav-cols {
		justify-content: center;
		flex-wrap: wrap;
		gap: 2rem;
	}
	.bsa-footer-col {
		align-items: center;
		text-align: center;
	}
	.bsa-footer-col .wp-block-navigation {
		align-self: center;
	}
	.bsa-footer-col .wp-block-navigation.is-layout-flex {
		align-items: center;
	}
	.bsa-footer-bottom {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}

/* =============================================
   WHATSAPP FLOATING BUTTON
   ============================================= */

.bsa-whatsapp-btn {
	position: fixed;
	bottom: 28px;
	right: 28px;
	z-index: 9999;
	width: 56px;
	height: 56px;
	background-color: #25D366;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(37,211,102,0.4);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	text-decoration: none !important;
}

.bsa-whatsapp-btn:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}

.bsa-whatsapp-btn svg {
	width: 30px;
	height: 30px;
	fill: #FFFFFF;
}

/* =============================================
   BUTTONS & INTERACTIVE ELEMENT HOVER STATES
   ============================================= */

/* Base button — transition on all state changes */
.wp-block-button__link {
	border-radius: var(--bsa-radius, 10px) !important;
	font-weight: 500;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
	            box-shadow 0.2s ease, transform 0.15s ease !important;
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(15,31,56,0.18);
}

.wp-block-button__link:active {
	transform: translateY(0);
	box-shadow: none;
}

/* Primary button (solid navy/blue) */
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background-color: #2C5F8A;
	color: #FFFFFF;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background-color: #235078;
}

/* Outline button */
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: #FFFFFF !important;
	color: #FFFFFF !important;
	background-color: rgba(255,255,255,0.06) !important;
}

/* Body content links */
.entry-content a,
.wp-block-post-content a:not(.wp-block-button__link):not(.bsa-whatsapp-btn) {
	transition: color 0.15s ease;
}

/* Inner page content cards — lift on hover */
.bsa-inner-card {
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
	cursor: default;
}

.bsa-inner-card.is-clickable,
a .bsa-inner-card {
	cursor: pointer;
}

/* Navigation — reinforce hover transition */
.bsa-header .wp-block-navigation a {
	transition: color 0.2s ease !important;
}

/* Notice card and info box links */
.bsa-notice-card a{
	color: #2C5F8A;
	transition: color 0.15s ease;
}

.bsa-notice-card a:hover{
	color: #0F1F38;
}

/* =============================================
   LOGIN FORM (wp_login_form inside portal cards)
   ============================================= */

#loginform{
	margin-top: 1.25rem;
}

#loginform p {
	margin-bottom: 1rem;
}

#loginform label {
	display: block;
	font-size: var(--bsa-type-small);
	font-weight: 600;
	color: #0F1F38;
	margin-bottom: 0.35rem;
	letter-spacing: 0.02em;
}

#loginform input[type="text"],
#loginform input[type="password"] {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border: 1px solid #D1D9E0;
	border-radius: var(--bsa-radius, 10px);
	font-size: var(--bsa-type-body);
	font-family: 'PT Serif', Georgia, serif;
	color: #1A2E44;
	background: #FFFFFF;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus {
	outline: none;
	border-color: #2C5F8A;
	box-shadow: 0 0 0 2px rgba(44, 95, 138, 0.12);
}

#loginform .forgetmenot {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--bsa-type-small);
	color: #6B7C8D;
}

#loginform input[type="checkbox"] {
	width: 14px;
	height: 14px;
	accent-color: #2C5F8A;
}

#loginform .login-remember {
	margin-bottom: 1.25rem;
}

#loginform input[type="submit"],
#loginform .button-primary {
	width: 100%;
	padding: 0.7rem 1.5rem;
	background-color: #2C5F8A;
	color: #FFFFFF;
	border: none;
	border-radius: var(--bsa-radius, 10px);
	font-size: 1.1rem;
	font-weight: 600;
	font-family: 'PT Serif', Georgia, serif;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

#loginform input[type="submit"]:hover,
#loginform .button-primary:hover {
	background-color: #0F1F38;
}

/* Two login forms side by side — isolate with wrapper */
.wp-block-column #loginform {
	margin-top: 1rem;
}

.bsa-form-success {
	background: rgba(39, 174, 96, 0.08);
	border-left: 3px solid #27ae60;
	border-radius: var(--bsa-radius, 10px);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	font-size: var(--bsa-type-small);
	color: #1a6e2e;
}

.bsa-form-error {
	background: #fdf0f0;
	border-left: 3px solid #c0392b;
	border-radius: var(--bsa-radius, 10px);
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	font-size: var(--bsa-type-small);
	color: #8b2020;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
	.bsa-whatsapp-btn  { bottom: 20px; right: 20px; width: 50px; height: 50px; }

}

/* =============================================
   NAVIGATION — SUBMENU DROPDOWN
   ============================================= */

.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: inherit;
}

/* =============================================
   LOGIN PAGE — single centred card
   ============================================= */

.bsa-login-page {
	min-height: 60vh;
	padding: 5rem 1.5rem;
	background: #F4F5F7;
}

.bsa-login-footnote {
	font-size: var(--bsa-type-small);
	color: #6B7C8D;
	text-align: center;
	margin-top: 1.25rem;
}

.bsa-login-footnote a { color: #2C5F8A; }

/* ── Header & footer on-load animations ────────────────────── */
@media (prefers-reduced-motion: no-preference) {
	@keyframes bsa-header-in {
		from { transform: translateY(-100%); }
		to   { transform: translateY(0); }
	}
	@keyframes bsa-footer-in {
		from { opacity: 0; transform: translateY(60px); }
		to   { opacity: 1; transform: translateY(0); }
	}
	.bsa-header {
		animation: bsa-header-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
	}
	/* The footer's content rises in; its black background stays put, so the
	   page behind never shows below it */
	.bsa-footer {
		overflow: clip;
	}
	.bsa-footer > * {
		opacity: 0;
		transform: translateY(60px);
		transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
	}
	.bsa-footer.is-visible > * {
		opacity: 1;
		transform: translateY(0);
	}
}

/* While the header slides in on the home page, the page behind it shows:
   keep it the header's deep navy so there is no seam. */
body.home,
body.home .wp-site-blocks {
	background-color: #03122B;
}

/* The first content section remains white beneath the navy hero transition. */
body.home .bsa-why-ad {
	background-color: #FFFFFF !important;
}

.bsa-login-card {
	max-width: 420px;
	margin: 0 auto;
	background: #FFFFFF;
	border-top: 3px solid #0F1F38;
	box-shadow: 0 4px 32px rgba(15,31,56,0.10);
	padding: 2.5rem !important;
}

/* =============================================
   CAREERS PAGE
   ============================================= */

/* Notice card — outreach checklist */
.bsa-notice-card {
	background: #F7F9FC;
	border: 1px solid #DDE4EC;
	border-left: 4px solid #2C5F8A;
	padding: 2rem 2rem 2.25rem;
	height: 100%;
}

.bsa-notice-card h2.wp-block-heading {
	font-size: var(--bsa-type-sub) !important;
	font-weight: 700 !important;
	color: #0F1F38 !important;
	margin-bottom: 1.25rem !important;
}

/* CTA stack — email + WhatsApp buttons */
.bsa-careers-cta-stack {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 2rem 2rem 2.25rem;
	background: #0F1F38;
	height: 100%;
}

.bsa-careers-cta-stack > p {
	color: rgba(255,255,255,0.65) !important;
}

.bsa-careers-cta-stack .wp-block-buttons {
	flex-direction: column !important;
}

/* Override button colours inside the dark CTA stack */
.bsa-careers-cta-stack .wp-block-button__link[style*="background-color:#0F1F38"] {
	background-color: #FFFFFF !important;
	color: #0F1F38 !important;
}

/* Philosophy inner — reused on careers culture quote; a 16px gap to each
   screen edge on narrow screens */
.bsa-philosophy-inner {
	max-width: min(740px, calc(100% - 32px));
	margin: 0 auto;
	padding: clamp(1.5rem, 3vw, 2.5rem) 1.5rem;
}

@media (max-width: 600px) {
	.bsa-philosophy-inner {
		padding-left: 24px !important;
		padding-right: 24px !important;
	}
}

/* ══════════════════════════════════════════════════════
   Unified scroll-reveal — site-wide.
   JS sets data-bsa-reveal attribute and adds .is-revealed.
   Three variants:
     (default)         — subtle rise, for body elements
     data-bsa-reveal="hero"    — deeper rise, for hero sections
     data-bsa-reveal="heading" — rise + blur-to-sharp, for headings
   ══════════════════════════════════════════════════════ */

@keyframes bsa-reveal {
	from { opacity: 0; transform: translateY(44px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes bsa-reveal-hero {
	from { opacity: 0; transform: translateY(64px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes bsa-reveal-heading {
	from { opacity: 0; transform: translateY(32px); filter: blur(4px); }
	to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

@media (prefers-reduced-motion: no-preference) {
	[data-bsa-reveal] {
		opacity: 0;
	}
	[data-bsa-reveal].is-revealed {
		animation: bsa-reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--bsa-reveal-delay, 0ms) both;
	}
	[data-bsa-reveal="hero"].is-revealed {
		animation: bsa-reveal-hero 1.8s cubic-bezier(0.16, 1, 0.3, 1) var(--bsa-reveal-delay, 0ms) both;
	}
	[data-bsa-reveal="heading"].is-revealed {
		animation: bsa-reveal-heading 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--bsa-reveal-delay, 0ms) both;
	}
}

/* Phones and tablets: headings rise without the blur. Animating a blur over a
   large heading is costly on touch devices and made scrolling stutter. */
@media (prefers-reduced-motion: no-preference) and (max-width: 1024px), (prefers-reduced-motion: no-preference) and (pointer: coarse) {
	[data-bsa-reveal="heading"].is-revealed {
		animation-name: bsa-reveal;
	}
}

/* =============================================
   HEADER — PORTAL LOOK (desktop menu, 1440px+)
   The public header's menu and Client Login button take the client
   portal header's look: 44px-tall items with 8px corners, a navy pill
   (#1A2E44) that fades in on hover and stays on the current page,
   0.15s transitions and the portal's text sizes. The current page is
   flagged by assets/js/website/header.js (.bsa-nav-current). Below 1440px the
   hamburger menu is unchanged.
   ============================================= */
@media (min-width: 1440px) {
	.bsa-header .wp-block-navigation__container {
		gap: 4px !important;
		align-items: center;
	}

	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item:not(.bsa-nav-login):not(.bsa-nav-signup):not(.bsa-nav-portal):not(.bsa-nav-logout) {
		display: flex;
		align-items: center;
		min-height: 44px;
		padding: 0 14px;
		border-radius: var(--bsa-radius, 10px);
		font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.417), 18px);
		cursor: pointer;
		transition: background-color 0.15s, color 0.15s;
	}

	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		padding: 0 !important;
		color: rgba(255, 255, 255, 0.85) !important;
		letter-spacing: 0.02em;
		transition: color 0.15s !important;
	}

	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item:hover,
	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item:focus-within,
	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-current {
		background-color: #1A2E44;
	}

	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item:focus-within > .wp-block-navigation-item__content,
	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-current > .wp-block-navigation-item__content {
		color: #FFFFFF !important;
	}

	/* The dropdown chevron follows the link colour */
	.bsa-header .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-icon {
		color: rgba(255, 255, 255, 0.85);
		margin-left: 6px;
	}

	/* Keyboard focus: the portal's sky-blue ring */
	.bsa-header .wp-block-navigation-item__content:focus-visible,
	.bsa-header .wp-block-button__link:focus-visible {
		outline: 2px solid #A8C4DE;
		outline-offset: 3px;
		border-radius: var(--bsa-radius, 10px);
	}

	/* Breathing room between the menu and Client Login (88px from the last
	   pill to the button; the row's own gap counts this margin twice) */
	.bsa-header .bsa-header-row .wp-block-navigation {
		margin-right: 16px !important;
	}

	/* Client Login: the portal's outline button */
	.bsa-header .bsa-header-right .wp-block-button__link {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0 18px !important;
		border: 1px solid #2B425C !important;
		border-radius: var(--bsa-radius, 10px) !important;
		background-color: transparent !important;
		color: #FFFFFF !important;
		font-size: clamp(14px, 13.34px + 0.207vw, 16px) !important;
		font-weight: 500;
		letter-spacing: 0.02em;
		box-shadow: none !important;
		transform: none !important;
		transition: background-color 0.15s, color 0.15s, border-color 0.15s !important;
	}

	.bsa-header .bsa-header-right .wp-block-button__link:hover,
	.bsa-header .bsa-header-right .wp-block-button__link:focus-visible {
		background-color: #1A2E44 !important;
		border-color: #4A7FA5 !important;
	}

	.bsa-header .bsa-header-right .wp-block-button__link:active {
		background-color: #0F1F38 !important;
	}
}

/* =============================================
   HEADER — NO UNDERLINES, MODERN DROPDOWN
   The parent theme underlines links on hover and focus; the header's
   pills already show those states, so the header never underlines.
   The Company dropdown is a white card (12px corners, thin border, soft
   shadow) whose rows take the header's navy pill on hover and on the
   current page. Only the full desktop menu (1440px+) has a dropdown.
   ============================================= */
.bsa-header a,
.bsa-header a:hover,
.bsa-header a:focus,
.bsa-header a:active,
.bsa-header a:visited,
.bsa-header .wp-block-navigation-item__content,
.bsa-header .wp-block-navigation-item__content:hover,
.bsa-header .wp-block-navigation-item__content:focus,
.bsa-header .wp-block-navigation-item__content:active,
.bsa-header .wp-block-navigation-item__label {
	text-decoration: none !important;
}

@media (min-width: 1440px) {
	.bsa-header .wp-block-navigation__submenu-container {
		top: calc(100% + 8px) !important;
		left: 0 !important;
		/* As wide as its longest item, never narrower than the menu button */
		min-width: 100% !important;
		width: max-content !important;
		padding: 0 !important;
		background-color: #FFFFFF !important;
		border: 1px solid #DDE4EC !important;
		border-top: 1px solid #DDE4EC !important;
		border-radius: var(--bsa-radius, 10px) !important;
		box-shadow: 0 8px 20px rgba(15, 31, 56, 0.1) !important;
		overflow: visible !important;
	}

	/* An invisible bridge over the 8px gap, so the menu stays open while the
	   pointer moves from "Company" down to it */
	.bsa-header .wp-block-navigation__submenu-container::before {
		content: '';
		position: absolute;
		left: 0;
		right: 0;
		top: -10px;
		height: 10px;
	}

	/* Rows run edge to edge: the first and last share the card's corners
	   (9px inside its 1px border, so the curves line up) */
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item {
		margin: 0 !important;
		border-radius: 0;
		transition: background-color 0.15s;
	}

	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:first-child,
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:first-child > a {
		border-top-left-radius: calc(var(--bsa-radius, 10px) - 1px);
		border-top-right-radius: calc(var(--bsa-radius, 10px) - 1px);
	}

	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:last-child,
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:last-child > a {
		border-bottom-left-radius: calc(var(--bsa-radius, 10px) - 1px);
		border-bottom-right-radius: calc(var(--bsa-radius, 10px) - 1px);
	}

	.bsa-header .wp-block-navigation__submenu-container a,
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		display: flex !important;
		align-items: center;
		min-height: 40px;
		padding: 0 18px !important;
		border: 0 !important;
		border-radius: 0;
		background: transparent !important;
		color: #1A2E44 !important;
		font-size: 15px !important;
		letter-spacing: 0.02em;
		white-space: nowrap;
		transition: background-color 0.15s, color 0.15s !important;
	}

	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:hover,
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:focus-within,
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item.bsa-nav-current {
		background-color: #1A2E44;
	}

	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > a,
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item:focus-within > a,
	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item.bsa-nav-current > a {
		color: #FFFFFF !important;
	}

	.bsa-header .wp-block-navigation__submenu-container .wp-block-navigation-item + .wp-block-navigation-item {
		margin-top: 2px;
	}
}

/* =============================================
   HEADER — HAMBURGER MENU, DESKTOP LOOK (below 1440px)
   The open menu takes the desktop header's look: the header's deep navy,
   44px items with 8px corners and the navy pill on hover and on the
   current page (Company's links indented under it), and Client Login as
   the outline button.
   ============================================= */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: #03122B !important;
}

.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 4px !important;
}

.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	border: 0 !important;
}

/* Top-level links: pills, no divider lines */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > a {
	display: flex !important;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	padding: 0 14px !important;
	border-radius: var(--bsa-radius, 10px) !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	letter-spacing: 0.02em !important;
	color: rgba(255, 255, 255, 0.85) !important;
	transition: background-color 0.15s, color 0.15s !important;
}

.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:not(.bsa-nav-login) > a:hover,
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item:not(.bsa-nav-login) > a:focus-visible,
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-current > a {
	background-color: #1A2E44 !important;
	color: #FFFFFF !important;
}

/* Company: its links indented under it along a thin rule, as navy pills */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	box-sizing: border-box;
	margin: 2px 0 6px 14px !important;
	padding: 0 0 0 10px !important;
	background-color: transparent !important;
	border: 0 !important;
	border-left: 1px solid #2B425C !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	gap: 2px;
}

.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a {
	display: flex !important;
	align-items: center;
	min-height: 40px;
	box-sizing: border-box;
	padding: 0 14px !important;
	border-radius: var(--bsa-radius, 10px);
	color: rgba(255, 255, 255, 0.7) !important;
	font-size: 15px !important;
	letter-spacing: 0.02em;
	transition: background-color 0.15s, color 0.15s !important;
}

.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a:hover,
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a:focus-visible,
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item.bsa-nav-current > a {
	background-color: #1A2E44 !important;
	color: #FFFFFF !important;
}

/* Client Login: the desktop's outline button */
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-login {
	margin-top: 1.25rem !important;
	padding: 0 !important;
}

.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-login > a {
	justify-content: center !important;
	padding: 0 18px !important;
	border: 1px solid #2B425C !important;
	background: transparent !important;
	color: #FFFFFF !important;
	font-weight: 500 !important;
	transition: background-color 0.15s, border-color 0.15s !important;
}

.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-login > a:hover,
.bsa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > .wp-block-navigation-item.bsa-nav-login > a:focus-visible {
	background: #1A2E44 !important;
	border-color: #4A7FA5 !important;
	color: #FFFFFF !important;
}

/* =============================================
   CALENDAR LOADING — cover over a Calendly embed while it loads
   (portal "Book a call": portal.js; website Book a Consultation:
   assets/js/website/calendly-fit.js). Lifts with .is-done.
   ============================================= */
.bsa-cal-loading {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	z-index: 5;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 0 16px;
	border-radius: var(--bsa-radius, 10px);
	/* Portal: light, near-white with a hint of silver blue (opaque enough to hide Calendly's spinner) */
	background: #F7F9FB;
	border: 1px solid #D9E3EB;
	text-align: center;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}
.bsa-cal-loading.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.bsa-cal-loading__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	background: #E3EDF6;
	color: #2C5F8A;
}

.bsa-cal-loading__text {
	margin: 0;
	font-family: 'PT Serif', Georgia, serif;
	font-size: var(--bsa-type-body, 18px);
	letter-spacing: 0.02em;
	color: #0F1F38;
}

/* Website: navy, like the portal's welcome tile; text near the top, as the
   embed can be taller than the screen */
.bsa-cal-loading--dark {
	justify-content: flex-start;
	padding-top: min(28%, 200px);
	background: #0F1F38;
	border-color: #1A2E44;
}
.bsa-cal-loading--dark .bsa-cal-loading__icon {
	background: #1A2E44;
	border: 1px solid #2C5F8A;
	color: #A8C4DE;
}
.bsa-cal-loading--dark .bsa-cal-loading__text { color: #FFFFFF; }

/* The three dots appear one after another, as on the portal loading screen */
.bsa-cal-loading__dots span { opacity: 0; animation: 1.6s ease-in-out infinite; }
.bsa-cal-loading__dots span:nth-child(1) { animation-name: bsa-cal-dot-1; }
.bsa-cal-loading__dots span:nth-child(2) { animation-name: bsa-cal-dot-2; }
.bsa-cal-loading__dots span:nth-child(3) { animation-name: bsa-cal-dot-3; }
@keyframes bsa-cal-dot-1 { 0%, 10% { opacity: 0; } 20%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bsa-cal-dot-2 { 0%, 35% { opacity: 0; } 45%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bsa-cal-dot-3 { 0%, 60% { opacity: 0; } 70%, 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.bsa-cal-loading__dots span { animation: none; opacity: 1; }
}


/* =============================================
   PORTAL EXIT / SIGN-OUT CONFIRMATION MODAL
   Used in the portal and by the site header's Log Out
   (bluesilver-advisory-core/assets/js/website/user-bar-logout.js).
   ============================================= */

/* The page shows through a frosted navy layer (as on the after-login loading
   screen); the dialog is a translucent glass card on top of it. */
.bsa-exit-overlay {
	position: fixed;
	inset: 0;
	background: rgba(3, 18, 43, 0.55);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	z-index: 100000;               /* above the open phone menu (99999) */
	display: flex;
	align-items: center;
	justify-content: center;
}
.bsa-exit-overlay[hidden] { display: none; }

.bsa-exit-modal {
	background: rgba(15, 31, 56, 0.55);
	border: 1px solid rgba(168, 196, 222, 0.22);
	border-radius: var(--bsa-radius, 10px);
	box-shadow: 0 24px 60px rgba(3, 18, 43, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
	box-sizing: border-box;
	padding: 2rem 2.25rem;
	max-width: 460px;
	width: calc(100% - 32px);
	text-align: center;
}

/* No blur support: solid layers instead, so the text stays readable */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.bsa-exit-overlay { background: rgba(3, 18, 43, 0.9); }
	.bsa-exit-modal { background: #0F1F38; }
}

.bsa-exit-modal__title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #FFFFFF;
	margin-bottom: 0.75rem;
}

.bsa-exit-modal__msg {
	font-size: 1rem;
	color: rgba(232, 237, 242, 0.78);
	line-height: 1.6;
	margin-bottom: 1.5rem;
}

.bsa-exit-modal__actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
}

/* Stay: the portal's navy button (as "Book a consultation" on the portal home) */
.bsa-exit-modal__stay {
	background: #0F1F38;
	border: 1px solid rgba(168, 196, 222, 0.28);
	color: #FFFFFF;
	padding: 0.75rem 1.25rem;
	white-space: nowrap;
	border-radius: var(--bsa-radius, 10px);
	cursor: pointer;
	font-size: 1rem;
	transition: background 0.15s, border-color 0.15s;
}
.bsa-exit-modal__stay:hover { background: #1A2E44; border-color: rgba(168, 196, 222, 0.5); color: #FFFFFF; }

.bsa-exit-modal__go {
	background: #2C5F8A;
	color: #FFFFFF;
	padding: 0.75rem 1.25rem;
	white-space: nowrap;
	border-radius: var(--bsa-radius, 10px);
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	transition: background 0.15s;
}
.bsa-exit-modal__go:hover { background: #3B7AB5; color: #FFFFFF; }

/* Log Out: dark red, so signing out reads as the final step */
.bsa-exit-modal__go--logout { background: #9B2C2C; }
.bsa-exit-modal__go--logout:hover { background: #B23A3A; }

@media (max-width: 480px) {
	.bsa-exit-modal {
		padding: 1.75rem 1.25rem;
	}
	.bsa-exit-modal__actions {
		flex-direction: column;
	}
	.bsa-exit-modal__stay,
	.bsa-exit-modal__go {
		width: 100%;
		padding: 0.8rem 1rem;
		text-align: center;
		box-sizing: border-box;
	}
}

/* =============================================
   BUTTONS — one size per device: every button on a phone is the same
   height, width and text size, likewise on tablets and on laptops/desktops.
     phones   (<600px)      240 × 44, 14px
     tablets  (600–1023px)  280 × 48, 15px
     desktops (1024px+)     280 × 52, 16px
   and the site's one corner (--bsa-radius, 10px) on every size.
   Widths fit the longest label ("Join our talent community →") and the
   narrowest box a button sits in on a 360px phone; a button never runs
   past the screen's 16px side margins. Covers block buttons (the Home and
   Careers heroes), button-styled links outside a button block (the Services
   CTA sits in a paragraph) and the form, video and parallax-hero
   buttons; text links styled as buttons (.bsa-cr-btn-link), the header and
   its menu, chips, toggles and the portal keep their own. The html/body
   prefix outweighs the page stylesheets' own button rules.
   ============================================= */
:root {
	--bsa-btn-w: 280px;
	--bsa-btn-h: 52px;
	--bsa-btn-fs: 16px;
}

@media (max-width: 1023.98px) {
	:root {
		--bsa-btn-h: 48px;
		--bsa-btn-fs: 15px;
	}
}

@media (max-width: 599.98px) {
	:root {
		--bsa-btn-w: 240px;
		--bsa-btn-h: 44px;
		--bsa-btn-fs: 14px;
	}
}

html body .wp-site-blocks > :not(header) .wp-block-buttons .wp-block-button:not(.bsa-cr-btn-link) {
	width: auto !important;
	flex: 0 0 auto !important;
	max-width: 100%;
}

html body .wp-site-blocks > :not(header) .wp-block-button:not(.bsa-cr-btn-link) .wp-block-button__link,
html body .wp-site-blocks > :not(header) .bsa-cta-strip .wp-block-button__link,
html body .wp-site-blocks > :not(header) :not(.wp-block-button) > .wp-block-button__link,
html body .wp-site-blocks > :not(header) .bsa-tc-submit,
html body .wp-site-blocks > :not(header) .bsa-bc-submit,
html body .wp-site-blocks > :not(header) .bsa-login-card input[type="submit"],
html body .wp-site-blocks > :not(header) .bsa-card-action,
html body .wp-site-blocks > :not(header) .bsa-ph-btn {
	box-sizing: border-box;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: var(--bsa-btn-w) !important;
	max-width: calc(100vw - 32px);
	min-width: 0 !important;
	height: var(--bsa-btn-h) !important;
	min-height: var(--bsa-btn-h) !important;
	padding: 0 12px !important;
	border-radius: var(--bsa-radius, 10px) !important;
	font-size: var(--bsa-btn-fs) !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em !important;
	line-height: 1.2 !important;
	text-align: center;
	text-transform: none !important;
	white-space: nowrap;
}

html body .wp-site-blocks > :not(header) .wp-block-button__link strong {
	font-weight: inherit;
}

/* Exception: a form's submit button spans the form, lined up with its fields
   (Client Log-In, Sign Up, Become a Client, Talent Community). Height and text
   size still follow the device sizes above. */
html body .wp-site-blocks > :not(header) .bsa-tc-submit,
html body .wp-site-blocks > :not(header) .bsa-bc-submit,
html body .wp-site-blocks > :not(header) .bsa-login-card input[type="submit"] {
	width: 100% !important;
	max-width: none;
}
