/* =====================================================================
   Emagia shell – glue for the new header/footer on Bootstrap-4 inner pages
   Loaded last by em_shell_head().
   ===================================================================== */

/* The wrapper only carries the scope + inherited fonts/colours; it never
   draws a box of its own (so "body" rules mapped onto it can't add
   backgrounds, padding or margins to the page). */
div.em-bs5 { display: contents !important; }

/* Fixed header sits above page content but below Bootstrap-4 modals (1050). */
div.em-bs5 #siteHeader { z-index: 1030 !important; }

/* Inner pages have no dark hero behind the header, so give it a solid
   background. :where() = zero specificity, so your .is-stuck style wins
   if new-menu-styles.css defines one. */
:where(div.em-bs5 #siteHeader.em-solid) { background-color: #040a1f; }

/* Space for the fixed header (height is measured by em-shell.js). */
.em-header-spacer { display: block; height: var(--em-header-h, 80px); }

/* WordPress admin bar (only when logged in). */
body.admin-bar div.em-bs5 #siteHeader { top: 32px !important; }
@media (max-width: 782px) { body.admin-bar div.em-bs5 #siteHeader { top: 46px !important; } }
@media (max-width: 600px) { body.admin-bar div.em-bs5 #siteHeader { top: 0 !important; } }

/* Long mobile menu: scroll inside the fixed header instead of off-screen. */
@media (max-width: 1199.98px) {
  div.em-bs5 #mainNav.show,
  div.em-bs5 #mainNav.collapsing { max-height: calc(100vh - var(--em-header-h, 80px)); overflow-y: auto; }
}

/* Anchor links (#overview, #solutions …) should land below the fixed header. */
html { scroll-padding-top: calc(var(--em-header-h, 80px) + 12px); }
