/* ============================================================
   BBX MOBILE NAV v1 — premium off-canvas for Elementor header (post 344)
   Scope: <=1024px ONLY (UAE nav widget 968fb6e, dropdown breakpoint: tablet).
   Desktop (>=1025px) is completely untouched by every rule below.
   Injected DOM (bbx-mnav.js): .bbx-mnav-backdrop, .bbx-mnav-head, .bbx-mnav-cta
   ============================================================ */
@media (max-width: 1024px) {

  /* --- hamburger toggle: tidy 44px chip, pinned right next to CTA --- */
  .elementor-element-968fb6e .hfe-nav-menu__toggle {
    display: flex !important;
    margin: 0 0 0 auto !important;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #E2E9F5;
    border-radius: 10px;
    background: #fff;
    color: #0F1C3A;
  }
  .elementor-element-968fb6e .hfe-nav-menu-icon { padding: 0; line-height: 0; }

  /* --- off-canvas panel (replaces the in-flow dropdown) --- */
  .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: min(340px, 88vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    z-index: 100001;
    opacity: 1 !important;
    visibility: hidden;
    transform: translateX(105%);
    transition: transform .42s cubic-bezier(.22,.61,.36,1), visibility 0s linear .45s;
    box-shadow: -28px 0 70px rgba(15,28,58,.25);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex !important;
    flex-direction: column;
  }
  .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active {
    visibility: visible;
    transform: translateX(0);
    transition: transform .42s cubic-bezier(.22,.61,.36,1);
  }
  /* the list itself always renders; the panel handles show/hide.
     UAE's 768-1024 band keeps items inline — force a vertical stack. */
  .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal .hfe-nav-menu {
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
    flex: 1 0 auto;
    display: flex !important;
    flex-direction: column !important;
  }
  .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal .hfe-nav-menu > li.menu-item {
    width: 100% !important;
    float: none !important;
  }

  /* --- injected panel header --- */
  .bbx-mnav-head {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 12px 22px;
    background: #fff;
    border-bottom: 1px solid #EFF4FB;
  }
  .bbx-mnav-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #51627F;
  }
  .bbx-mnav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #E2E9F5;
    border-radius: 10px;
    background: #F7FAFF;
    color: #0F1C3A;
    cursor: pointer;
    padding: 0;
  }
  .bbx-mnav-close:active { background: #E8F0FE; }

  /* --- menu items: 50px comfortable rows, no dead space --- */
  .elementor-element-968fb6e nav li.menu-item {
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    list-style: none;
  }
  /* desktop underline pointer has no business inside the panel */
  .elementor-element-968fb6e nav li.menu-item a.hfe-menu-item::before,
  .elementor-element-968fb6e nav li.menu-item a.hfe-menu-item::after {
    display: none !important;
    content: none !important;
  }
  .elementor-element-968fb6e nav .hfe-has-submenu-container { display: flex; width: 100%; align-items: center; }
  .elementor-element-968fb6e nav li.menu-item a.hfe-menu-item {
    display: flex !important;
    align-items: center;
    flex: 1;
    height: auto !important; /* UAE's 768-1024 band sets a fixed height */
    min-height: 50px;
    padding: 13px 22px !important;
    font-size: 15.5px;
    font-weight: 600;
    color: #0F1C3A !important;
    border-bottom: 1px solid #EFF4FB !important;
  }
  /* active page stays clearly marked */
  .elementor-element-968fb6e nav li.current-menu-item > a.hfe-menu-item,
  .elementor-element-968fb6e nav li.current-menu-item > .hfe-has-submenu-container a.hfe-menu-item,
  .elementor-element-968fb6e nav li.current-menu-ancestor > .hfe-has-submenu-container a.hfe-menu-item {
    color: #1D4ED8 !important;
    background: #F4F8FF;
    box-shadow: inset 3px 0 0 #2563EB;
  }

  /* --- Services submenu: indented, calm, tappable --- */
  .elementor-element-968fb6e nav .sub-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #F6F9FF !important;
    border: 0 !important;
    box-shadow: none !important;
    animation: none !important;
    transition: opacity .25s ease !important;
  }
  /* UAE leaves a fade animation fighting its own inline opacity:1 — pin the
     open state so the accordion is fully readable */
  .elementor-element-968fb6e nav .sub-menu.sub-menu-open {
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
  }
  .elementor-element-968fb6e nav .sub-menu li a.hfe-sub-menu-item {
    display: flex !important;
    align-items: center;
    height: auto !important;
    min-height: 46px;
    padding: 11px 22px 11px 38px !important;
    font-size: 14.5px;
    font-weight: 500;
    color: #51627F !important;
    background: transparent !important;
    border-bottom: 1px solid #EDF2FA !important;
  }
  .elementor-element-968fb6e nav .sub-menu li a.hfe-sub-menu-item:hover,
  .elementor-element-968fb6e nav .sub-menu li a.hfe-sub-menu-item:active { color: #1D4ED8 !important; }

  /* chevron rotates when Services is open */
  .elementor-element-968fb6e nav .hfe-menu-toggle,
  .elementor-element-968fb6e nav .sub-arrow { transition: transform .3s ease; }
  .elementor-element-968fb6e nav li.menu-active > .hfe-has-submenu-container .sub-arrow,
  .elementor-element-968fb6e nav li.menu-active > .hfe-has-submenu-container .hfe-menu-toggle,
  .elementor-element-968fb6e nav .sub-menu-active .sub-arrow,
  .elementor-element-968fb6e nav .sub-menu-active .hfe-menu-toggle { transform: rotate(180deg); }

  /* UAE's own submenu icon fails to render (hfe-submenu-icon-Array), so give
     parent rows a CSS chevron that flips when the submenu is open */
  .elementor-element-968fb6e nav li.parent > .hfe-has-submenu-container::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-right: 24px;
    border-right: 2px solid #51627F;
    border-bottom: 2px solid #51627F;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .3s ease, border-color .3s ease;
  }
  .elementor-element-968fb6e nav li.menu-active > .hfe-has-submenu-container::after,
  .elementor-element-968fb6e nav li.parent > .hfe-has-submenu-container.sub-menu-active::after {
    transform: rotate(225deg) translateY(-2px);
    border-color: #2563EB;
  }

  /* --- injected bottom CTA (replaces hidden header button while open) --- */
  .bbx-mnav-cta {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: auto;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(255,255,255,0), #FFFFFF 38%);
  }
  .bbx-mnav-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1D4ED8, #2563EB);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37,99,235,.35);
  }
  .bbx-mnav-cta a:active { transform: translateY(1px); }

  /* --- backdrop + body scroll lock + hide header CTA while open --- */
  .bbx-mnav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11,18,38,.52);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
    z-index: 100000;
  }
  body.bbx-mnav-open .bbx-mnav-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity .35s ease;
  }
  body.bbx-mnav-open { overflow: hidden !important; }
  /* the panel lives inside the header widget: lift that widget's stacking
     context above the body-level backdrop while the menu is open */
  body.bbx-mnav-open .elementor-element-968fb6e { z-index: 100001; }
  body.bbx-mnav-open .elementor-element-e22d6ac {
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
  }

  /* --- staggered item entrance (motion-safe only) --- */
  @media (prefers-reduced-motion: no-preference) {
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal > ul > li.menu-item {
      opacity: 0;
      transform: translateX(18px);
      transition: opacity .3s ease, transform .3s ease;
    }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item {
      opacity: 1;
      transform: none;
    }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(1) { transition-delay: .05s; }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(2) { transition-delay: .09s; }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(3) { transition-delay: .13s; }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(4) { transition-delay: .17s; }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(5) { transition-delay: .21s; }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(6) { transition-delay: .25s; }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(7) { transition-delay: .29s; }
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal.menu-is-active > ul > li.menu-item:nth-child(8) { transition-delay: .33s; }
  }

  @media (prefers-reduced-motion: reduce) {
    .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal,
    .bbx-mnav-backdrop { transition: none !important; }
  }
}

/* injected mobile-panel chrome must never appear on desktop */
@media (min-width: 1025px) {
  .bbx-mnav-head,
  .bbx-mnav-cta,
  .bbx-mnav-backdrop { display: none !important; }
}

/* ============================================================
   NARROW-DESKTOP BAND (1025-1220px): the full horizontal menu plus
   brand + CTA is tight here; compress instead of clipping the CTA.
   ============================================================ */
@media (min-width: 1025px) and (max-width: 1220px) {
  .elementor-element-968fb6e .menu-item a.hfe-menu-item {
    padding-left: 8px !important;
    padding-right: 8px !important;
    font-size: 13.5px;
  }
  /* tagline is the widest part of the brand block — drop it in this band */
  .elementor-element-c193e80 { display: none; }
  .elementor-element-e22d6ac .elementor-button {
    padding: 10px 16px;
    font-size: 13px;
  }
}


/* ============================================================
   DESKTOP HEADER — CENTERED NAVIGATION (three-zone layout)  2026-07-07
   Logo pinned far-left, "Start Project" pinned far-right (both flex:none in
   the Elementor row); the nav widget 968fb6e grows (_flex_size:grow) and its
   menu is centered in the space between them -> equal breathing room both sides.
   UAE's navmenu_align emits no horizontal-center rule, so force it here.
   Desktop-only (>=1025px); the <=1024 off-canvas panel is untouched.
   ============================================================ */
@media (min-width: 1025px) {
  .elementor-344 .elementor-element-968fb6e > .elementor-widget-container { width: 100% !important; }
  .elementor-344 .elementor-element-968fb6e .hfe-nav-menu.hfe-layout-horizontal { width: 100% !important; }
  .elementor-344 .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  /* the menu list keeps its natural width and sits centered as a flex item */
  .elementor-344 .elementor-element-968fb6e nav.hfe-nav-menu__layout-horizontal > ul.hfe-nav-menu {
    width: auto !important;
    margin: 0 !important;
  }
}
