/*
 * Global header & footer built in Elementor (Ultimate Addons for Elementor —
 * Header & Footer Builder). Reproduces the approved theme header/footer
 * (navigation.css) on the Elementor markup through the CSS classes set in
 * Elementor → Advanced → CSS Classes (bc-hfb-* header, bc-hff-* footer).
 *
 * Loaded only while an Elementor header/footer is active. Selectors stay at a
 * lower specificity than Elementor's per-element CSS, so anything the client
 * changes in the Elementor panel (colours, typography, spacing …) wins.
 * Container spacing is set through Elementor's own CSS variables for the same
 * reason.
 */

/* Elementor neutralisation inside the header/footer templates --------------- */
.e-con.bc-hf-box {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--gap: 0px 0px;
	--row-gap: 0px;
	--column-gap: 0px;
	--flex-wrap: nowrap;
	--widgets-spacing: 0px;
	--widgets-spacing-row: 0px;
	--widgets-spacing-column: 0px;
}
.bc-hf-box .elementor-heading-title { font-family: var(--bc-font); }
.bc-hf-box .elementor-widget-text-editor p { margin: 0; }

/* Two approved header variants in one global header: the brand header on the
   Home page, the navigation header everywhere else. Both stay visible while
   editing in Elementor. */
body:not(.bc-home):not(.elementor-editor-active) .e-con.bc-hfb-brand,
body.bc-home:not(.elementor-editor-active) .e-con.bc-hfb-nav {
	display: none;
}

/* Header frame (= .bc-header) */
.e-con.bc-hfb-brand,
.e-con.bc-hfb-nav {
	position: relative;
	background-color: var(--bc-white);
	border-top: 2px solid var(--bc-red);
	border-bottom: 2px solid var(--bc-red);
}

/* Logo (= .bc-header__brand / .bc-header__logo) */
.e-con .elementor-widget.bc-hfb-logo {
	display: flex;
	align-items: center;
	flex: none;
	min-width: auto;
	line-height: 0;
	text-align: left;
}
.bc-hfb-logo a { display: inline-flex; line-height: 0; }
.e-con .bc-hfb-logo img {
	height: clamp(70px, 9.4vh, 102px);
	width: auto;
	max-width: 102px;
	display: block;
}

/* Home brand variant (= .bc-header--brand) */
.e-con.bc-hfb-brand {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	--row-gap: 10px;
	--column-gap: 20px;
	--padding-top: 18px;
	--padding-right: var(--bc-gutter);
	--padding-bottom: 16px;
	--padding-left: var(--bc-gutter);
	--min-height: 84px;
}
.e-con.bc-hfb-brand__id {
	--flex-direction: row;
	--align-items: center;
	--column-gap: 16px;
	--flex-wrap: nowrap;
	min-width: 0;
}
.e-con .elementor-widget.bc-hfb-company { min-width: auto; }
.bc-hfb-company .elementor-heading-title {
	font-family: var(--bc-font-brand);
	font-weight: 400;
	font-size: clamp(24px, 3.2vh, 36px);
	line-height: 1.1;
	letter-spacing: 0.01em;
	color: var(--bc-red);
	white-space: nowrap;
}
.bc-hfb-company .elementor-heading-title a,
.bc-hfb-company .elementor-heading-title a:hover { color: inherit; }
.e-con .elementor-widget.bc-hfb-tagline {
	min-width: auto;
	margin: 0 clamp(28px, 6vw, 88px) 0 0;
}
.bc-hfb-tagline .elementor-heading-title {
	text-align: right;
	color: var(--bc-blue);
	font-size: clamp(18px, 2.4vh, 24px);
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: 0.01em;
	white-space: nowrap;
}
.e-con .elementor-widget.bc-hfb-concept { grid-column: 1 / -1; }
.bc-hfb-concept .elementor-heading-title {
	padding-top: 4px;
	text-align: center;
	font-size: clamp(16px, 2.1vh, 22px);
	line-height: 1.45;
	font-weight: 500;
	font-style: italic;
	color: var(--bc-body);
}

/* Inner-page navigation variant (= .bc-header--nav) */
.e-con.bc-hfb-nav {
	--flex-direction: row;
	--align-items: center;
	--justify-content: space-between;
	--row-gap: 16px;
	--column-gap: 28px;
	--padding-top: 10px;
	--padding-right: var(--bc-gutter);
	--padding-bottom: 10px;
	--padding-left: var(--bc-gutter);
}

/* Menus: Elementor "Navigation Menu" widget showing the WordPress menus ------- */
.bc-hf-menu .hfe-nav-menu::after { content: none; }
.bc-hf-menu .hfe-nav-menu li.menu-item { font-size: inherit; }
.bc-hf-menu .hfe-nav-menu a.hfe-menu-item {
	display: inline;
	line-height: inherit;
}

/* Main navigation (= .bc-nav / .bc-nav__list) */
.e-con .elementor-widget.bc-hfb-menu { margin-left: auto; min-width: auto; }
.bc-hfb-menu ul.hfe-nav-menu {
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 6px 22px;
	font-size: 14px;
	font-weight: 600;
}
.bc-hfb-menu .hfe-nav-menu a.hfe-menu-item { color: var(--bc-navy); }
.bc-hfb-menu .hfe-nav-menu a.hfe-menu-item:hover { color: var(--bc-blue); }
.bc-hfb-menu .hfe-nav-menu .current-menu-item > a.hfe-menu-item,
.bc-hfb-menu .hfe-nav-menu .current_page_item > a.hfe-menu-item {
	color: var(--bc-blue);
	border-bottom: 2px solid var(--bc-blue);
	padding-bottom: 2px;
}

@media (max-width: 760px) {
	.e-con.bc-hfb-brand {
		grid-template-columns: 1fr;
		--row-gap: 10px;
		--column-gap: 10px;
		--padding-top: 12px;
		--padding-right: clamp(12px, 3vw, 48px);
		--padding-bottom: 12px;
		--padding-left: clamp(12px, 3vw, 48px);
	}
	.e-con .bc-hfb-logo img { height: clamp(56px, 12vw, 76px); max-width: 76px; }
	.bc-hfb-company .elementor-heading-title { font-size: clamp(18px, 5vw, 24px); white-space: normal; }
	.e-con .elementor-widget.bc-hfb-tagline { margin-right: 0; }
	.bc-hfb-tagline .elementor-heading-title {
		text-align: left;
		font-size: clamp(16px, 2.4vh, 20px);
		white-space: normal;
	}
	.bc-hfb-concept .elementor-heading-title { font-size: 15px; }
	.e-con.bc-hfb-nav {
		--flex-wrap: wrap;
		--padding-top: 12px;
		--padding-right: 20px;
		--padding-bottom: 12px;
		--padding-left: 20px;
		--row-gap: 10px;
		--column-gap: 16px;
	}
	.bc-hfb-menu ul.hfe-nav-menu { gap: 8px 16px; font-size: 13px; }
}
/* Phone navigation: the Navigation Menu widget's own toggle becomes a menu
   button and its menu a full-width dropdown under the header. The widget's
   script already opens/closes it (hfe-active-menu); tablets and desktop keep
   the inline menu. */
@media (max-width: 767px) {
	.e-con .elementor-widget.bc-hfb-menu { position: static; }
	.bc-hfb-menu .hfe-layout-horizontal .hfe-nav-menu__toggle {
		display: flex;
		visibility: visible;
		opacity: 1;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border: 1px solid var(--bc-line);
		border-radius: var(--bc-radius);
		color: var(--bc-navy);
		background: var(--bc-white);
	}
	.bc-hfb-menu .hfe-nav-menu__toggle:focus-visible { outline: 2px solid var(--bc-blue); outline-offset: 2px; }
	.bc-hfb-menu .hfe-nav-menu__toggle .hfe-nav-menu-icon {
		position: relative;
		display: block;
		width: 22px;
		height: 2px;
		padding: 0;
		background: currentColor;
		transition: background 0.15s ease;
	}
	.bc-hfb-menu .hfe-nav-menu__toggle .hfe-nav-menu-icon::before,
	.bc-hfb-menu .hfe-nav-menu__toggle .hfe-nav-menu-icon::after {
		content: "";
		position: absolute;
		left: 0;
		width: 22px;
		height: 2px;
		background: currentColor;
		transition: transform 0.15s ease, top 0.15s ease;
	}
	.bc-hfb-menu .hfe-nav-menu__toggle .hfe-nav-menu-icon::before { top: -7px; }
	.bc-hfb-menu .hfe-nav-menu__toggle .hfe-nav-menu-icon::after { top: 7px; }
	.bc-hfb-menu .hfe-nav-menu__toggle.hfe-active-menu .hfe-nav-menu-icon { background: transparent; }
	.bc-hfb-menu .hfe-nav-menu__toggle.hfe-active-menu .hfe-nav-menu-icon::before { top: 0; transform: rotate(45deg); }
	.bc-hfb-menu .hfe-nav-menu__toggle.hfe-active-menu .hfe-nav-menu-icon::after { top: 0; transform: rotate(-45deg); }

	.bc-hfb-menu .hfe-layout-horizontal nav.hfe-nav-menu__layout-horizontal { display: none; }
	.bc-hfb-menu .hfe-layout-horizontal .hfe-active-menu + nav.hfe-nav-menu__layout-horizontal {
		display: block;
		position: absolute;
		top: calc(100% + 2px);
		left: 0;
		right: 0;
		/* the widget script writes an inline pixel width on this element */
		width: auto !important;
		z-index: 150;
		background: var(--bc-white);
		border-bottom: 2px solid var(--bc-red);
		box-shadow: 0 8px 18px rgba(10, 23, 41, 0.12);
	}
	.bc-hfb-menu .hfe-active-menu + nav ul.hfe-nav-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		font-size: 15px;
	}
	.bc-hfb-menu .hfe-active-menu + nav li.menu-item + li.menu-item { border-top: 1px solid var(--bc-border); }
	.bc-hfb-menu .hfe-active-menu + nav a.hfe-menu-item {
		display: block;
		padding: 14px 20px;
		line-height: 1.3;
	}
	.bc-hfb-menu .hfe-active-menu + nav .current-menu-item > a.hfe-menu-item,
	.bc-hfb-menu .hfe-active-menu + nav .current_page_item > a.hfe-menu-item {
		border-bottom: 0;
		padding-bottom: 14px;
		box-shadow: inset 3px 0 0 var(--bc-blue);
	}
}
@media (max-width: 400px) {
	.bc-hfb-tagline .elementor-heading-title { font-size: 14px; }
	.bc-hfb-company .elementor-heading-title { font-size: 16px; }
}
@media (max-width: 360px) {
	.e-con.bc-hfb-brand,
	.e-con.bc-hfb-nav { --padding-left: 10px; --padding-right: 10px; }
}

/* Footer (= .bc-footer) ------------------------------------------------------ */
.e-con.bc-hff {
	background-color: var(--bc-navy);
	--flex-direction: row;
	--align-items: center;
	--justify-content: space-between;
	--flex-wrap: wrap;
	--row-gap: 16px;
	--column-gap: 28px;
	--padding-top: 10px;
	--padding-right: var(--bc-gutter);
	--padding-bottom: 10px;
	--padding-left: var(--bc-gutter);
	--min-height: 56px;
}
.e-con.bc-hff-left {
	--width: auto;
	--flex-direction: column;
	--row-gap: 5px;
	--column-gap: 5px;
	min-width: 0;
}
.e-con.bc-hff-right {
	--width: auto;
	--flex-direction: row;
	--align-items: center;
	--flex-wrap: wrap;
	--row-gap: 14px;
	--column-gap: 18px;
	--margin-left: auto;
	min-width: auto;
}
.e-con .elementor-widget.bc-hff-legal,
.e-con .elementor-widget.bc-hff-tagline,
.e-con .elementor-widget.bc-hff-actions { min-width: auto; }

/* Legal links (= .bc-footer__legal-list) */
.bc-hff-legal ul.hfe-nav-menu {
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
	font-size: 13.5px;
}
.bc-hff-legal .hfe-nav-menu li + li::before {
	content: "·";
	color: var(--bc-legal-sep);
	margin-right: 14px;
}
.bc-hff-legal .hfe-nav-menu a.hfe-menu-item { color: var(--bc-legal); }
.bc-hff-legal .hfe-nav-menu a.hfe-menu-item:hover { color: var(--bc-white); }

/* Tagline (= .bc-footer__tagline) */
.bc-hff-tagline p {
	color: var(--bc-white);
	font-style: italic;
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 1.2;
	white-space: nowrap;
}
.bc-hff-tagline .sol { font-size: clamp(17px, 2vh, 22px); font-weight: 500; letter-spacing: 0.04em; }
.bc-hff-tagline .to { font-size: clamp(12px, 1.5vh, 14px); color: var(--bc-mono-muted); margin: 0 0.28em; }
.bc-hff-tagline .prob { font-size: clamp(18px, 2.2vh, 24px); font-weight: 700; color: var(--bc-sky); letter-spacing: 0.02em; }
.bc-hff-tagline .just { font-size: clamp(13px, 1.7vh, 16px); font-weight: 500; color: var(--bc-mist); margin-left: 0.35em; letter-spacing: 0.06em; }

/* Buttons (= .bc-footer__actions; the first menu item is solid) */
.bc-hff-actions ul.hfe-nav-menu { flex-wrap: wrap; gap: 10px; }
.bc-hff-actions .hfe-nav-menu a.hfe-menu-item {
	display: inline-block;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	padding: 11px 20px;
	border-radius: 2px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: var(--bc-white);
	background: transparent;
}
.bc-hff-actions .hfe-nav-menu a.hfe-menu-item:hover { border-color: var(--bc-white); color: var(--bc-white); background: rgba(255, 255, 255, 0.08); }
.bc-hff-actions .hfe-nav-menu li:first-child > a.hfe-menu-item { background: var(--bc-blue); border-color: var(--bc-blue); }
.bc-hff-actions .hfe-nav-menu li:first-child > a.hfe-menu-item:hover { background: var(--bc-blue-hover); border-color: var(--bc-blue-hover); }

@media (max-width: 640px) {
	.bc-hff-tagline p { white-space: normal; }
	.e-con.bc-hff-right { --margin-left: 0px; }
}
@media (max-width: 360px) {
	.e-con.bc-hff { --padding-left: 10px; --padding-right: 10px; }
}
