/* ==========================================================================
   Audacia — Custom header (Editorial Glass capsule)
   Rendered via finbiz-child/inc/header-html.php, injected after <body>.
   Style: floating pill-shaped header with backdrop blur, centered menu,
   pill-fill hover, dropdown with animated arrows, mobile drawer.
   ========================================================================== */

:root {
	--audacia-vert: #046166;
	--audacia-vert-deep: #034146;
	--audacia-or: #e5bf21;
	--audacia-or-warm: #f2d24a;
	--audacia-noir: #071c1d;
	--audacia-blanc: #faf8f3;
	--audacia-white: #ffffff;
	--audacia-header-height: 74px;
}

/* ---------- 0. INNER PAGES: hide the legacy finbiz breadcrumbs hero ----------
   The finbiz theme renders a duplicate top hero (.reactheme-breadcrumbs with
   a stock "MAME-DIARRA" portrait) BEFORE the real page content (.aud-hero)
   on every non-home page. Since the custom .aud-hero sections inside the
   Elementor page template are already the definitive hero for each service,
   we hide the legacy one entirely — no overlap trick, no mask seam, one
   clean hero per page that starts flush below the transparent header. */
body:not(.home) .reactheme-breadcrumbs,
body:not(.home) .breadcrumbs-single {
	display: none !important;
}

/* Remove any default vertical whitespace finbiz parent theme applies on top
   of .main-contain so the .aud-hero can start right under the header. */
body:not(.home) .main-contain {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* Same for the #content wrapper inside .main-contain */
body:not(.home) .main-contain #content,
body:not(.home) #page .main-contain {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* ---------- 0.c HOME: hide legacy rt-portfolio-grid section ----------
   The old "Nos Services" block used a finbiz rt-portfolio-grid widget
   (elementor-element-95e927f parent container) which has been replaced
   by a custom horizontal scroll section injected via buffer callback. */
.elementor-element-95e927f {
	display: none !important;
}

/* ---------- 1. Hide the legacy Elementor header template 10067 ---------- */
.elementor-10067,
.elementor.elementor-10067,
[data-elementor-id="10067"],
[data-elementor-post-type="rts-header"] {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* Also hide the finbiz parent theme's search popup (bug fix retained). */
.sticky_form.rts-search-popup {
	display: none !important;
}
.sticky_form.rts-search-popup[style*="display: block"],
.sticky_form.rts-search-popup[style*="display:block"] {
	display: block !important;
}

/* Hide the preloader body-close overlay left behind by finbiz header. */
body > .close-button.body-close {
	display: none !important;
}

/* ---------- 2. Custom header wrap (sticky pill) ---------- */
.audacia-header-wrap {
	position: sticky;
	top: 0;
	z-index: 1000;
	padding: 14px 24px 0;
	pointer-events: none;
	/* Negative margin-bottom equal to the wrap's total visual height
	   (14px padding-top + 74px header capsule + ~14px safety) = ~102px.
	   This pulls the next sibling (hero / main content) UP behind the
	   header so the page background never shows behind the transparent
	   capsule — the hero image flows seamlessly under the header. */
	margin-bottom: -102px;
}

.audacia-header {
	max-width: 1440px;
	margin: 0 auto;
	/* State A — top of page: transparent dark glass so the hero shows through */
	background: rgba(7, 28, 29, 0.22);
	-webkit-backdrop-filter: saturate(140%) blur(14px);
	backdrop-filter: saturate(140%) blur(14px);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 100px;
	padding: 12px 12px 12px 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	box-shadow: 0 20px 50px rgba(7, 28, 29, 0.18);
	pointer-events: auto;
	transition:
		background 0.35s ease,
		border-color 0.35s ease,
		box-shadow 0.35s ease,
		backdrop-filter 0.35s ease,
		-webkit-backdrop-filter 0.35s ease,
		padding 0.35s ease;
	min-height: var(--audacia-header-height);
}

.audacia-header.is-scrolled {
	/* State B — scrolled: white editorial glass */
	background: rgba(255, 255, 255, 0.96);
	-webkit-backdrop-filter: saturate(180%) blur(22px);
	backdrop-filter: saturate(180%) blur(22px);
	border-color: rgba(7, 28, 29, 0.06);
	box-shadow: 0 24px 70px rgba(7, 28, 29, 0.14);
}

/* ---------- 3. Logo ---------- */
.audacia-header__logo {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
	transition: transform 0.25s ease;
}

.audacia-header__logo:hover {
	transform: translateY(-1px);
}

.audacia-header__logo {
	position: relative;
	display: inline-flex;
	align-items: center;
	/* Reserve a stable box the same size as one logo so the two stacked
	   images never reflow the layout when swapping via opacity. */
	height: 52px;
	width: 220px;
}

.audacia-header__logo-img {
	/* Both logo versions are absolutely positioned inside the 220x52 box,
	   anchored top-left, at their NATURAL aspect ratio (height driven, width auto).
	   This prevents the cropped/stretched glyph artifact seen on scroll when the
	   container forced a width different from the image's intrinsic ratio. */
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	display: block;
	height: 52px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
	transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.audacia-header__logo-img--light { opacity: 1; }
.audacia-header__logo-img--dark  { opacity: 0; }

.audacia-header.is-scrolled .audacia-header__logo-img--light { opacity: 0; }
.audacia-header.is-scrolled .audacia-header__logo-img--dark  { opacity: 1; }

/* Responsive: tighten the reserve box on smaller viewports. */
@media (max-width: 1024px) {
	.audacia-header__logo { width: 180px; height: 44px; }
	.audacia-header__logo-img { height: 44px; }
}

@media (max-width: 560px) {
	.audacia-header__logo { width: 150px; height: 38px; }
	.audacia-header__logo-img { height: 38px; }
}

/* ---------- 4. Navigation ---------- */
.audacia-header__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
}

.audacia-header__nav ul,
.audacia-menu {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2px;
	align-items: center;
}

.audacia-menu li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.audacia-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	/* Default (top): white text on dark glass */
	color: var(--audacia-blanc);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.005em;
	text-decoration: none;
	border-radius: 999px;
	transition: color 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	overflow: hidden;
	z-index: 1;
	white-space: nowrap;
}

/* Scrolled state: dark text on white glass */
.audacia-header.is-scrolled .audacia-menu > li > a {
	color: var(--audacia-noir);
}

/* Scrolled state: active/current menu item in brand gold for visibility
   against the white glass capsule (overrides the default pill-fill hover). */
.audacia-header.is-scrolled .audacia-menu > li.current-menu-item > a,
.audacia-header.is-scrolled .audacia-menu > li.current-menu-ancestor > a,
.audacia-header.is-scrolled .audacia-menu > li.current-menu-parent > a {
	color: var(--audacia-or);
}

/* Keep the pill-fill gradient hidden for active items in the scrolled state
   so the gold text is directly visible on the white capsule without a
   conflicting dark-green pill behind it. */
.audacia-header.is-scrolled .audacia-menu > li.current-menu-item > a::before,
.audacia-header.is-scrolled .audacia-menu > li.current-menu-ancestor > a::before,
.audacia-header.is-scrolled .audacia-menu > li.current-menu-parent > a::before {
	opacity: 0;
	transform: scale(0.6);
}

/* Hover in scrolled state keeps the dark pill fill + white text (unchanged) */
.audacia-header.is-scrolled .audacia-menu > li > a:hover {
	color: var(--audacia-blanc);
}

.audacia-header.is-scrolled .audacia-menu > li > a:hover::before {
	opacity: 1;
	transform: scale(1);
}

.audacia-menu > li > a::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--audacia-vert) 0%, var(--audacia-vert-deep) 100%);
	border-radius: 999px;
	transform: scale(0.6);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
	z-index: -1;
}

.audacia-menu > li > a:hover,
.audacia-menu > li.current-menu-item > a,
.audacia-menu > li.current-menu-ancestor > a,
.audacia-menu > li.current-menu-parent > a {
	color: var(--audacia-blanc);
}

.audacia-menu > li > a:hover::before,
.audacia-menu > li.current-menu-item > a::before,
.audacia-menu > li.current-menu-ancestor > a::before,
.audacia-menu > li.current-menu-parent > a::before {
	transform: scale(1);
	opacity: 1;
}

/* Dropdown caret (auto-inserted for items that have a submenu) */
.audacia-menu > li.menu-item-has-children > a::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-left: 4px;
	/* Default: white caret on dark glass (SVG stroke is white) */
	background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none'><path d='M1 3l4 4 4-4' stroke='%23faf8f3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-size: contain;
	transition: transform 0.3s ease, filter 0.3s ease, background-image 0.3s ease;
}

/* Scrolled: dark caret */
.audacia-header.is-scrolled .audacia-menu > li.menu-item-has-children > a::after {
	background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none'><path d='M1 3l4 4 4-4' stroke='%23071c1d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.audacia-menu > li.menu-item-has-children > a:hover::after,
.audacia-menu > li.menu-item-has-children.current-menu-ancestor > a::after {
	transform: rotate(180deg);
	/* On hover the pill becomes vert — force the caret to white for contrast */
	filter: brightness(0) invert(1);
}

/* ---------- 5. Submenu (dropdown) ---------- */
.audacia-menu .sub-menu {
	position: absolute;
	top: calc(100% + 14px);
	left: 50%;
	transform: translateX(-50%) translateY(-8px);
	min-width: 260px;
	background: var(--audacia-white);
	border: 1px solid rgba(7, 28, 29, 0.06);
	border-radius: 22px;
	box-shadow: 0 30px 80px rgba(7, 28, 29, 0.16);
	padding: 14px;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		visibility 0.3s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* Invisible hover bridge: keeps :hover active while the cursor crosses
   the 14px visual gap between the parent <a> and the dropdown. */
.audacia-menu > li.menu-item-has-children > .sub-menu::before {
	content: "";
	position: absolute;
	top: -14px;
	left: 0;
	right: 0;
	height: 14px;
	background: transparent;
	pointer-events: auto;
}

.audacia-menu > li:hover > .sub-menu,
.audacia-menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.audacia-menu .sub-menu li {
	width: 100%;
}

.audacia-menu .sub-menu li a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 500;
	color: var(--audacia-noir);
	text-decoration: none;
	border-radius: 12px;
	transition: background 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
	white-space: nowrap;
	position: relative;
}

.audacia-menu .sub-menu li a::before {
	content: "→";
	font-family: "Cormorant Garamond", "Inter", serif;
	color: var(--audacia-or);
	font-weight: 700;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.audacia-menu .sub-menu li a:hover,
.audacia-menu .sub-menu li.current-menu-item > a {
	/* Gold highlight (brand color) with subtle fill and warm vert-deep text
	   for max legibility on the white glass dropdown. */
	background: linear-gradient(135deg, rgba(229, 191, 33, 0.18) 0%, rgba(229, 191, 33, 0.28) 100%);
	color: var(--audacia-vert-deep);
	box-shadow: inset 0 0 0 1px rgba(229, 191, 33, 0.25);
	padding-left: 22px;
}

.audacia-menu .sub-menu li a:hover::before,
.audacia-menu .sub-menu li.current-menu-item > a::before {
	opacity: 1;
	transform: translateX(0);
	color: var(--audacia-or);
}

/* ---------- 6. CTA button (right side) ---------- */
.audacia-header__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 22px;
	/* State A — top: gold on dark glass for max pop */
	background: var(--audacia-or);
	color: var(--audacia-noir);
	font-family: "Inter", sans-serif;
	font-weight: 700;
	font-size: 13.5px;
	letter-spacing: 0.01em;
	text-decoration: none;
	border-radius: 999px;
	flex-shrink: 0;
	transition: background 0.35s ease, color 0.35s ease, transform 0.25s ease;
}

/* State B — scrolled: dark button on white glass */
.audacia-header.is-scrolled .audacia-header__cta {
	background: var(--audacia-noir);
	color: var(--audacia-blanc);
}

.audacia-header__cta:hover,
.audacia-header__cta:focus-visible {
	background: var(--audacia-noir);
	color: var(--audacia-blanc);
	transform: translateY(-2px);
	outline: none;
}

.audacia-header.is-scrolled .audacia-header__cta:hover,
.audacia-header.is-scrolled .audacia-header__cta:focus-visible {
	background: var(--audacia-or);
	color: var(--audacia-noir);
}

.audacia-header__cta-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 999px;
	/* State A — gold CTA → noir badge */
	background: var(--audacia-noir);
	color: var(--audacia-or);
	transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.audacia-header.is-scrolled .audacia-header__cta-arrow {
	background: var(--audacia-or);
	color: var(--audacia-noir);
}

.audacia-header__cta:hover .audacia-header__cta-arrow {
	background: var(--audacia-or);
	color: var(--audacia-noir);
	transform: translate(2px, -2px);
}

.audacia-header.is-scrolled .audacia-header__cta:hover .audacia-header__cta-arrow {
	background: var(--audacia-noir);
	color: var(--audacia-or);
}

/* ---------- 7. Focus states (a11y) ---------- */
.audacia-header a:focus-visible,
.audacia-header button:focus-visible {
	outline: 2px solid var(--audacia-or);
	outline-offset: 4px;
	border-radius: 999px;
}

/* ---------- 8. Burger (mobile only) ---------- */
.audacia-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 48px;
	height: 48px;
	background: var(--audacia-noir);
	border: none;
	border-radius: 999px;
	cursor: pointer;
	padding: 0;
	transition: background 0.25s ease;
	flex-shrink: 0;
}

.audacia-header__burger:hover {
	background: var(--audacia-or);
}

.audacia-header__burger span {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--audacia-blanc);
	border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.25s ease, background 0.25s ease;
}

.audacia-header__burger:hover span {
	background: var(--audacia-noir);
}

.audacia-header__burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.audacia-header__burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.audacia-header__burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 9. Mobile drawer ---------- */
.audacia-mobile-drawer {
	position: fixed;
	inset: 0;
	background: linear-gradient(180deg, var(--audacia-vert) 0%, var(--audacia-vert-deep) 100%);
	color: var(--audacia-blanc);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
		visibility 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 999;
	overflow-y: auto;
	padding: 120px 28px 40px;
}

.audacia-mobile-drawer.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.audacia-mobile-drawer__inner {
	max-width: 600px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.audacia-mobile-drawer__nav ul.audacia-mobile-menu,
.audacia-mobile-drawer__nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.audacia-mobile-drawer__nav li {
	border-bottom: 1px solid rgba(250, 248, 243, 0.1);
}

.audacia-mobile-drawer__nav li a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 2px;
	color: var(--audacia-blanc);
	font-family: "Inter", sans-serif;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.25s ease, padding-left 0.25s ease;
}

.audacia-mobile-drawer__nav li a:hover,
.audacia-mobile-drawer__nav li.current-menu-item > a {
	color: var(--audacia-or);
	padding-left: 10px;
}

.audacia-mobile-drawer__nav .sub-menu {
	list-style: none;
	padding-left: 16px;
	margin: 0 0 8px;
	background: rgba(0, 0, 0, 0.12);
	border-radius: 10px;
}

.audacia-mobile-drawer__nav .sub-menu li {
	border-bottom: 1px solid rgba(250, 248, 243, 0.06);
}

.audacia-mobile-drawer__nav .sub-menu li:last-child {
	border-bottom: none;
}

.audacia-mobile-drawer__nav .sub-menu li a {
	font-size: 15px;
	padding: 14px 16px;
	color: rgba(250, 248, 243, 0.82);
}

.audacia-mobile-drawer__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 28px;
	background: var(--audacia-or);
	color: var(--audacia-noir);
	font-weight: 800;
	font-size: 16px;
	text-decoration: none;
	border-radius: 999px;
	text-align: center;
	box-shadow: 0 14px 32px rgba(229, 191, 33, 0.3);
	transition: transform 0.25s ease;
}

.audacia-mobile-drawer__cta:hover {
	transform: translateY(-2px);
}

body.audacia-drawer-open {
	overflow: hidden;
}

/* ---------- 10. Responsive breakpoints ---------- */
@media (max-width: 1180px) {
	.audacia-menu > li > a {
		padding: 10px 14px;
		font-size: 13.5px;
	}
}

@media (max-width: 1024px) {
	.audacia-header-wrap {
		padding: 10px 16px 0;
	}
	.audacia-header {
		padding: 8px 8px 8px 20px;
		border-radius: 70px;
	}
	.audacia-header__nav,
	.audacia-header__cta {
		display: none;
	}
	.audacia-header__burger {
		display: inline-flex;
	}
	.audacia-header__logo img {
		height: 44px;
		max-width: 240px;
	}
}

@media (max-width: 560px) {
	.audacia-header-wrap {
		padding: 8px 12px 0;
	}
	.audacia-header {
		padding: 6px 6px 6px 16px;
	}
	.audacia-header__logo img {
		height: 38px;
		max-width: 200px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.audacia-menu > li > a::before,
	.audacia-menu .sub-menu,
	.audacia-header__cta,
	.audacia-header__cta-arrow,
	.audacia-mobile-drawer,
	.audacia-header__burger span {
		transition-duration: 0.01ms !important;
	}
}
