/* =========================================================================
   Alpha Oak — Header canvas (site-wide nav pill + flyout chrome)
   Loaded on every page; home.css holds body.home page sections only.
   ========================================================================= */

body.ao-header-canvas {
  --ao-home-nav-pill-max: min(1240px, calc(100vw - clamp(1.75rem, 6.5vw, 3.75rem)));
}

/* Inner routes: floated shell like MC canvas (front page uses rules in home.css). */
body.ao-header-canvas:not(.is-front-page) .ao-header.ao-header--home-canvas {
  min-height: 0;
  padding: 0.3rem var(--container-px) 0.35rem;
  background: transparent;
  box-shadow: none;
  z-index: 1000;
}

body.ao-header-canvas .ao-solutions-flyout,
body.ao-header-canvas .ao-saudi-flyout { z-index: 999; }

body.ao-header-canvas .ao-mobile-menu {
  top: var(--ao-header-stack-below, calc(var(--ao-home-announce-h, 0px) + var(--header-h)));
  z-index: 1006;
}
body.ao-header-canvas.admin-bar .ao-mobile-menu {
  top: var(--ao-header-stack-below, calc(32px + var(--ao-home-announce-h, 0px) + var(--header-h)));
}

@media screen and (max-width: 782px) {
  body.ao-header-canvas.admin-bar .ao-mobile-menu {
    top: var(--ao-header-stack-below, calc(46px + var(--ao-home-announce-h, 0px) + var(--header-h)));
  }
}

/* Nav pill — premium glass (body.ao-header-canvas from functions.php) */
body.ao-header-canvas #ao-header.ao-header--home-canvas .ao-header__inner,
body.ao-header-canvas #ao-header .ao-header__inner {
  position: relative;
  max-width: var(--ao-home-nav-pill-max);
  margin-inline: auto;
  margin-top: var(--sp-1);
  padding: 0.58rem 1.35rem 0.58rem 1.45rem;
  transform: translateY(-0.12rem);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.7) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--r-full);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.05),
    0 18px 44px -16px rgba(0, 0, 0, 0.12),
    0 8px 22px -10px rgba(0, 0, 0, 0.07);
  -webkit-backdrop-filter: blur(36px) saturate(185%);
  backdrop-filter: blur(36px) saturate(185%);
  align-items: center;
  gap: var(--sp-3);
}

@media (min-width: 1024px) {
  body.ao-header-canvas #ao-header .ao-header__inner {
    padding: 0.62rem 1.65rem 0.62rem 1.55rem;
  }
}

@media (min-width: 640px) {
  body.ao-header-canvas #ao-header .ao-header__inner {
    transform: translate(-0.35rem, -0.12rem);
  }
}

body.ao-header-canvas #ao-header.ao-header--scrolled .ao-header__inner {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(252, 252, 252, 0.86) 100%
  );
  border-color: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(40px) saturate(175%);
  backdrop-filter: blur(40px) saturate(175%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 22px 50px -14px rgba(0, 0, 0, 0.14),
    0 10px 26px -12px rgba(0, 0, 0, 0.08);
}

@media (min-width: 1024px) {
  body.ao-header-canvas #ao-header.ao-header--saudi-mega-open .ao-header__inner {
    border-radius: var(--r-full) var(--r-full) 0 0;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      inset 0 0 0 1px rgba(255, 255, 255, 0.1),
      0 2px 6px rgba(0, 0, 0, 0.05),
      0 14px 40px -16px rgba(0, 0, 0, 0.11),
      0 6px 20px -10px rgba(0, 0, 0, 0.07);
  }

  body.ao-header-canvas #ao-header.ao-header--saudi-mega-open.ao-header--scrolled .ao-header__inner {
    border-radius: var(--r-full) var(--r-full) 0 0;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.88),
      inset 0 0 0 1px rgba(255, 255, 255, 0.12),
      0 2px 8px rgba(0, 0, 0, 0.06),
      0 18px 46px -14px rgba(0, 0, 0, 0.12),
      0 8px 24px -12px rgba(0, 0, 0, 0.08);
  }

  body.ao-header-canvas:has(#ao-header.ao-header--saudi-mega-open.ao-header--scrolled) .ao-saudi-flyout--open .ao-saudi-flyout__inner {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.78) 42%,
      rgba(252, 250, 247, 0.96) 100%
    );
    border-color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(40px) saturate(175%);
    backdrop-filter: blur(40px) saturate(175%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.85),
      0 4px 22px -8px rgba(0, 0, 0, 0.08),
      0 18px 48px -16px rgba(0, 0, 0, 0.13);
  }
}

body.ao-header-canvas .ao-header .ao-nav__link,
body.ao-header-canvas .ao-header .ao-nav__link--solutions { color: #0a0a0a; }
body.ao-header-canvas .ao-header .ao-nav__chevron         { color: #0a0a0a; }

body.ao-header-canvas .ao-header .ao-nav__link:hover,
body.ao-header-canvas .ao-header .ao-nav__link--solutions:hover {
  background: transparent;
}

body.ao-header-canvas .ao-header .ao-btn--primary.ao-header__cta {
  padding: 0.45rem 1.1rem;
  font-size: 0.8125rem;
}

body.ao-header-canvas .ao-header .ao-hamburger__line { background: #0a0a0a; }

body.ao-header-canvas .ao-header .ao-logo__img {
  height: 38px;
}
body.ao-header-canvas .ao-header .ao-logo__img--raster {
  height: 42px;
}

@media (max-width: 1023px) {
  body.ao-header-canvas #ao-header .ao-header__inner {
    margin-top: var(--sp-1);
    padding: 0.55rem var(--sp-4);
  }
}

body.ao-header-canvas .ao-header__search-round {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: 0.35rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.52);
  color: #0a0a0a;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
body.ao-header-canvas .ao-header__search-round:hover {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.88);
}

@media (min-width: 1024px) {
  body.ao-header-canvas .ao-header__search-round { display: inline-flex; }
}

@media (max-width: 767px) {
  body.ao-header-canvas .ao-header .ao-header__inner {
    padding-inline: var(--sp-3);
  }
}
