/* ===================================================
   NexGen AIvolution: Header Component Styles
   All values reference tokens from nexgen-tokens.css.

   Component-specific variables (header heights, logo
   heights) are defined here because they apply only to
   this component and have no entry in the global token
   set. The spacing scale does not include 80 / 72 / 64px
   or 40 / 36 / 32px, so they live here as named vars
   rather than as hardcoded literals in the rules below.
   =================================================== */

/* --- Component variables --------------------------- */
:root {
  --h-header: 64px;
  --h-logo:   32px;
}

@media (min-width: 768px) {
  :root {
    --h-header: 72px;
    --h-logo:   36px;
  }
}

@media (min-width: 1025px) {
  :root {
    --h-header: 80px;
    --h-logo:   40px;
  }
}

/* --- Logo ------------------------------------------
   Atomic e-image renders as: a.e-image-link-base > img.e-image-base
   (no .elementor-element-{id} wrapper — e-image is not a classic widget)

   Hello's reset.css (0,0,1): img { height:auto; max-width:100% }
   Elementor base CSS (0,1,0): .e-image-link-base { all:unset; width:fit-content }
   — all:unset resets min-width to 0, allowing the link to compress.
   Our (0,3,0) rules on both elements beat both at every property we declare. */

.elementor .elementor-element-128276c .e-image-base {
  height: var(--h-logo);
  width: auto;
  max-width: none;
  aspect-ratio: 1200 / 175;
  display: block;
}

/* flex-shrink:0 keeps the flex algorithm from taking width from the logo.
   min-width:fit-content restores the minimum the link lost to all:unset. */
.elementor .elementor-element-128276c .e-image-link-base {
  min-width: fit-content;
  flex-shrink: 0;
}

/* --- CTA button ------------------------------------
   Atomic e-button renders as:
   .elementor > .elementor-element-128276c > a.e-0b6e064-dd437fc.e-button-base
   Elementor compiles to .elementor .e-0b6e064-dd437fc (0,2,0).
   Three-class selector here is (0,3,0) — wins on specificity,
   not load order, so LiteSpeed CSS combine cannot flip it. */
.elementor .elementor-element-128276c .e-0b6e064-dd437fc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: var(--fw-ui);
  font-size: var(--fs-btn);
  letter-spacing: var(--tr-ui);
  line-height: var(--lh-ui);
  border-radius: var(--r-btn);
  padding: var(--pad-btn-y) var(--pad-btn-x);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .elementor .elementor-element-128276c .e-0b6e064-dd437fc {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .elementor .elementor-element-128276c .e-0b6e064-dd437fc:hover {
    transform: translateY(-2px);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent),
      0 8px 28px color-mix(in srgb, var(--gold) 20%, transparent);
  }
}

.elementor .elementor-element-128276c .e-0b6e064-dd437fc:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* --- CTA button: hidden below 768px ---
   At mobile the nav CTA item (9th menu item, class nav-cta-item)
   is the primary action. display:none removes this element from
   the flex flow entirely — visibility:hidden would leave a gap. */
@media (max-width: 767px) {
  .elementor .elementor-element-128276c .e-0b6e064-dd437fc {
    display: none;
  }
}

/* ===================================================
   Section 3: Navigation
   UAE navigation-menu widget (element 473302d) stores
   literal hex in all color and typography controls —
   no CSS variable support. All nav styling in this file.

   The UAE inline <style> block renders in <body>, after
   this external stylesheet in <head>. Same specificity
   means UAE wins by source order. Every override below
   uses .elementor.elementor-60 as a compound class
   (0,2,0) where UAE uses only .elementor-60 (0,1,0),
   gaining one class tier at each specificity level.
   LiteSpeed CSS combine cannot flip this.
   =================================================== */

/* --- Nav typography --------------------------------
   UAE at (0,4,1): font-family:"Inter"; font-size:15px;
   font-weight:500. Ours at (0,5,1) wins. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d a.hfe-menu-item {
  font-family: var(--font-display);
  font-weight: var(--fw-ui);
  font-size: var(--fs-nav);
  letter-spacing: var(--tr-ui);
  text-decoration: none;
  white-space: nowrap;
}

/* --- Nav rest color --------------------------------
   UAE at (0,5,1): color:#E2E8F0. Ours at (0,6,1) wins. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d .menu-item a.hfe-menu-item {
  color: var(--secondary);
}

/* --- Nav hover color -------------------------------
   UAE at (0,6,1): color:#C8881A. Ours at (0,7,1) wins. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d .menu-item a.hfe-menu-item:hover {
  color: var(--text);
}

/* --- Nav active-page underline ---------------------
   UAE at (0,6,1): color:#C8881A on .current-menu-item.
   Ours at (0,7,1) wins. Sets color to --text and adds
   a 2px --gold underline.
   Inert: WordPress does not assign current-menu-item
   to anchors whose href is "#". This rule fires only
   once real page URLs replace the # placeholders. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d .menu-item.current-menu-item a.hfe-menu-item {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* --- Nav focus-visible -----------------------------
   UAE has no focus-visible rule. 2px gold outline
   per brief. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d a.hfe-menu-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- Nav wrapper: global size safety net --------
   The stored _element_custom_width of 55.629% was removed from
   post 60 in the overflow fix. This holds the natural sizing
   regardless of what Elementor or UAE compiles later.

   Centres the nav in whatever space is left between the logo
   and the button, rather than letting it sit against one of
   them. The logo and button keep their natural widths. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d.elementor-element {
  width: auto;
  max-width: 100%;
  flex-shrink: 1;
  min-width: 0;
  flex-grow: 1;
  display: flex;
  justify-content: center;
}

/* --- Nav ul: contain items inside the wrapper ------
   At 18px the items sum to 805px. At any viewport below BP the
   wrapper is narrower than the items. overflow:visible (the default)
   let them spill rightward into the CTA button. Clamping the ul to
   its wrapper width and hiding the overflow prevents that collision
   at every viewport where the horizontal nav is active. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-nav-menu {
  max-width: 100%;
  overflow: hidden;
}

/* --- Nav wrapper + ul: desktop-only overrides ------
   UAE uses ONE nav element with both .hfe-nav-menu__layout-horizontal
   and .hfe-dropdown classes at every width. A selector alone cannot
   distinguish desktop horizontal from mobile overlay — a media query
   is required.

   Below 1385px UAE shows the hamburger. The nav wrapper collapses to
   the button's footprint (~40px) and the dropdown is position:absolute
   relative to it. Applying flex-wrap:nowrap below 1385px would pin the
   overlay items into one unscrollable row. This rule must be
   desktop-only.

   At ≥1385px:
   - flex-basis:auto lets the nav size to its content then grow via the global rule.
   - flex-wrap:nowrap prevents items from dropping to a second row.
   width, max-width, flex-shrink, flex-grow, and min-width are set in the global
   rule above so they apply at every viewport. */
@media (min-width: 1385px) {
  .elementor.elementor-60 .elementor-element.elementor-element-473302d.elementor-element {
    flex-basis: auto;
  }

  .elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-nav-menu__layout-horizontal .hfe-nav-menu {
    flex-wrap: nowrap;
  }
}

/* ===================================================
   Hamburger overlay (below 1385 px)
   UAE's JS breakpoint stays at tablet (1025px). Our CSS
   extends the overlay to 1384px, where the items first
   fit without collision. The UAE JS override block below
   re-shows the toggle and hides the horizontal nav between
   1025px and 1384px.
   =================================================== */

/* --- Hamburger toggle icon -------------------------
   The UAE toggle uses inline SVG (e-fas-align-justify).
   SVG path fill defaults to black — not currentColor — so
   the CSS color property has no visual effect on the paths.
   color rule kept as a non-SVG fallback. fill rule targets
   the SVG directly. SVG fill is inherited, so it reaches
   all child path elements without a separate path selector.
   UAE JS swaps the close SVG into the same .hfe-nav-menu-icon
   container on open; the same fill rule covers it. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-nav-menu-icon {
  color: var(--text);
}

.elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-nav-menu-icon svg {
  fill: var(--text);
}

/* --- Hamburger toggle focus-visible ----------------
   The toggle div has role="button" and tabindex="0". */
.elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-nav-menu__toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- Hamburger overlay: full-width panel ------------
   UAE renders nav.hfe-dropdown as position:absolute relative to the
   nav wrapper widget (~186px wide on the right side of the header).
   At mobile/tablet the overlay must span the full viewport width.
   position:fixed escapes the containing-block chain and positions
   directly relative to the viewport. top:--h-header anchors it flush
   below the sticky bar. max-height + overflow-y keeps the panel
   scrollable on short screens without the page scrolling under it.
   z-index:200 clears the header's z-index:100. */
/* 1384px: at 18px the items sum to 805px. Logo (274) + gap (24) +
   items (805) + gap (24) + CTA (161) = 1288px content; plus 96px
   gutters = 1384px required viewport. This was measured at runtime,
   not estimated. UAE's JS threshold stays at 1025px — the UAE JS
   override block extends the overlay up to here. */
@media (max-width: 1384px) {
  .elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown,
  .elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible {
    position: fixed;
    top: var(--h-header);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--h-header));
    overflow-y: auto;
    z-index: 200;
  }
}

/* --- Hamburger overlay background ------------------
   UAE at (0,4,1): background-color:#fff on
   nav.hfe-dropdown and nav.hfe-dropdown-expandible.
   UAE at (0,4,0): background-color:#fff on .sub-menu.
   Ours at (0,5,1) and (0,5,0) win. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown,
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible {
  background-color: var(--deep);
}

.elementor.elementor-60 .elementor-element.elementor-element-473302d .sub-menu {
  background-color: var(--deep);
}

/* --- Hamburger link background and rest color ------
   UAE at (0,6,2): background-color:#fff and inherits
   rest color on nav.hfe-dropdown .menu-item a.hfe-menu-item.
   Ours at (0,7,2) wins. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown .menu-item a.hfe-menu-item,
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible .menu-item a.hfe-menu-item {
  background-color: transparent;
  color: var(--secondary);
}

/* --- Hamburger link hover --------------------------
   UAE has no hover rule for hamburger links. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown .menu-item a.hfe-menu-item:hover,
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible .menu-item a.hfe-menu-item:hover {
  color: var(--text);
}

/* --- Hamburger focus-visible -----------------------
   Gold outline for keyboard navigation in the overlay. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown a.hfe-menu-item:focus-visible,
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible a.hfe-menu-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- Hamburger dividers ----------------------------
   UAE at (0,6,2): border-bottom-color:#c4c4c4.
   Ours at (0,7,2) wins. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown li.menu-item:not(:last-child),
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible li.menu-item:not(:last-child) {
  border-bottom-color: var(--border);
}

/* --- Extended UAE overlay CSS for 1025–1384px ------
   UAE's tablet overlay rules are inside @media (max-width: 1024px).
   nav-breakpoint.js adds hfe-dropdown to the nav in this range.
   These rules extend UAE's class-based show/hide pattern to cover
   the 1025–1384 gap. No !important needed: our selectors are
   (0,6,0) vs UAE's (0,2,0) for the toggle, and (0,5,0) vs (0,2,0)
   for the nav. Both win by specificity, not load order. */
@media (min-width: 1025px) and (max-width: 1384px) {
  /* Toggle: UAE global rule opacity:0 at (0,2,0). Ours at (0,6,0) wins.
     display:flex overrides UAE's CSS that hides the toggle at desktop
     widths; the JS patch also removes any inline display:none that
     UAE's _borderClass writes on init and resize.
     visibility:visible is explicit because the nav below sets
     visibility:hidden — the toggle is a child and inherits it. An
     explicit rule on the child always beats inheritance. */
  .elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-nav-menu__toggle {
    display: flex;
    visibility: visible;
    opacity: 1;
  }
  /* Nav: UAE has no hide rule above 1024px. Hiding by default so the
     overlay only shows on toggle click. visibility:hidden covers all
     descendants; height:0 collapses the fixed box. */
  .elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-nav-menu__layout-horizontal {
    visibility: hidden;
    height: 0;
  }
  /* Nav: adjacency rule mirrors UAE's own pattern. hfe-active-menu goes
     on the toggle when clicked; this selector shows the adjacent nav.
     height:auto restores natural height; overflow-y:auto and max-height
     from the nav.hfe-dropdown positioning block below are still in effect. */
  .elementor.elementor-60 .elementor-element.elementor-element-473302d .hfe-active-menu + .hfe-nav-menu__layout-horizontal {
    visibility: visible;
    height: auto;
  }
}

/* ===================================================
   Nav CTA item (class nav-cta-item, 9th menu item)

   One media query handles all scoping. The same WordPress
   menu drives both the desktop horizontal nav and the
   hamburger overlay.

   ≥768px → hidden in all views. The atomic CTA button
            (e-0b6e064-dd437fc, display:none below 768px)
            is the sole CTA at those widths.
   <768px → visible in the overlay; atomic button gone.
   CTA is never in two places on the same screen.
   =================================================== */

@media (min-width: 768px) {
  .elementor.elementor-60 .elementor-element.elementor-element-473302d .nav-cta-item {
    display: none;
  }
}

/* Button style in mobile overlay: gold bg, ink text, btn radius.
   Same specificity (0,7,2) as hamburger link rest-color rule above;
   wins by source order since this block follows. */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown .nav-cta-item a.hfe-menu-item,
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible .nav-cta-item a.hfe-menu-item {
  background-color: var(--gold);
  color: var(--ink);
  border-radius: var(--r-btn);
  font-weight: var(--fw-ui);
  text-align: center;
  display: block;
  margin-block: 8px;
}

/* Hover: explicitly hold ink — the standard hamburger hover above sets --text (near-white) */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown .nav-cta-item a.hfe-menu-item:hover,
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible .nav-cta-item a.hfe-menu-item:hover {
  color: var(--ink);
}

/* Focus-visible: ink outline is visible on the gold background */
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown .nav-cta-item a.hfe-menu-item:focus-visible,
.elementor.elementor-60 .elementor-element.elementor-element-473302d nav.hfe-dropdown-expandible .nav-cta-item a.hfe-menu-item:focus-visible {
  outline-color: var(--ink);
}

/* ===================================================
   Section 4: Sticky header bar

   Ancestor chain verified clean before execution:
   html, body, div#page.hfeed.site — no overflow
   (hidden/auto/clip), transform, filter, backdrop-filter,
   perspective, or contain on any element between the
   document root and #masthead. position:sticky is safe.

   Elementor's compiled CSS for the e-flexbox (class
   e-e927d24) already sets position:sticky with no top
   value, which acts as position:relative and does not
   stick. The actual sticky goes on #masthead.
   =================================================== */

/* --- Sticky bar: #masthead -------------------------
   Hello's header-footer.css (0,1,0): .site-header { position:relative }
   UAE's header-footer-elementor.css (1,1,0): .ehf-header #masthead { position:relative; z-index:99 }
   — the UAE rule is the blocker; it wins on both position and z-index.

   The base #masthead rule (1,0,0) carries all other bar properties (background,
   border, padding, min-height, flex layout). It would beat Hello's (0,1,0) alone,
   but loses to UAE's (1,1,0). We leave it here so all non-conflicting properties
   remain in one clear block.

   The override below uses body.ehf-header #masthead = body(0,0,1) + .ehf-header(0,1,0)
   + #masthead(1,0,0) = (1,1,1), which beats UAE's (1,1,0) by the body element type.
   Only position, top, and z-index need to be in the override; the rest stay below. */
#masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-block: 0;
  min-height: var(--h-header);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  box-sizing: border-box;
}

/* body.ehf-header #masthead (1,1,1) > UAE .ehf-header #masthead (1,1,0) */
body.ehf-header #masthead {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- Content width constraint ----------------------
   .elementor.elementor-60 is the single flex item inside
   #masthead. max-width and margin:auto constrain content
   to --w-wide (1440px) and centre it within the full-bleed
   bar. margin:auto in a flex context absorbs free space
   before justify-content can distribute it.
   Wins over Elementor's .elementor-60 (0,1,0) at (0,2,0). */
.elementor.elementor-60 {
  width: 100%;
  max-width: var(--w-wide);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* --- Inner e-flexbox: gutters and token compliance -
   Elementor compiles .elementor .e-e927d24 at (0,2,0)
   with three values that need replacing:
     position:sticky (no top) → position:relative
     background-color:#07101E (literal) → var(--ink)
     padding-inline:30px (static) → var(--gutter)
   Our selector (0,4,0) wins on specificity.

   Nothing anywhere sets this: the compiled Elementor CSS was
   confirmed by CDP to contain no justify-content for this
   element, so it resolved to flex-start and all free space
   piled up after the CTA button. Logo hard left, nav centred,
   CTA hard right. */
.elementor.elementor-60 .elementor-element.elementor-element-128276c {
  position: relative;
  background-color: var(--ink);
  padding-inline-start: var(--gutter);
  padding-inline-end: var(--gutter);
  box-sizing: border-box;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-5);
}
