/* NSBM chrome <-> Eikra integration. Hand-written; loaded only while the new chrome is on (body.nsbm-chrome).
   Each rule exists because of a specific Eikra/WordPress wrapper; the reason is noted beside it. */

/* Eikra prints <header id="masthead" class="site-header"> around our header. Remove its box so the design's
   sticky .site-header is positioned against the page, not trapped inside a wrapper of its own height. */
body.nsbm-chrome #masthead.site-header { display: contents; }
.nsbm-ui.nsbm-chrome-head { display: contents; }

/* Eikra: `@media (max-width:1023px) { .site-header { display:none } }` and `.site-header { transition: all .4s }`.
   The design's header shares the class name, so restate both for it, on every width. */
body.nsbm-chrome .nsbm-ui .site-header { display: block; transition: none; }

/* Eikra sets #page { overflow: hidden !important }, which disables position: sticky for everything inside it.
   overflow: clip still clips horizontal overspill but does not create a scroll container. */
body.nsbm-chrome #page { overflow: clip !important; overflow-x: clip !important; }

/* Eikra's preloader and its sticky-header clone are switched off in PHP; hide any leftovers from cached markup. */
body.nsbm-chrome #preloader,
body.nsbm-chrome #sticky-header-wrapper,
body.nsbm-chrome .offscreen-navigation,
body.nsbm-chrome #meanmenu { display: none !important; }

/* Admin bar: keep the sticky header below it. */
body.admin-bar.nsbm-chrome .nsbm-ui .site-header { top: calc(var(--s2, 8px) + 32px); }
@media (max-width: 782px) { body.admin-bar.nsbm-chrome .nsbm-ui .site-header { top: var(--s2, 8px); } }

/* Eikra/Bootstrap give <ul> margins and <a> colours with element selectors; the scoped design rules win on
   specificity, but list markers inherited from Elementor kits can still leak through. */
.nsbm-ui ul { list-style: none; }
.nsbm-ui .main-nav ul, .nsbm-ui .mega-panel ul, .nsbm-ui .footer-grid ul, .nsbm-ui .utility ul { margin: 0; padding: 0; }

/* Footer wrapper sits outside Eikra's #content; give it the design's page background. */
.nsbm-ui.nsbm-chrome-foot { display: block; }

/* Inner pages: no gap under the header (1.3.9). The 8px margin dates from the floating glass bar; the bar is solid
   since 1.3.0. Elementor-built pages also lose Eikra's per-page top padding (#primary, 10px on staging): they open
   with their own banner section, which now sits right under the bar. Other pages keep Eikra's padding. */
body.nsbm-chrome:not(.nsbm-home) .nsbm-ui .site-header { margin-bottom: 0; }
body.nsbm-chrome.elementor-page:not(.nsbm-home) #primary.content-area { padding-top: 0 !important; }

/* Mega-menu panels built from WordPress menus: a third level is listed under its parent link, indented. */
.nsbm-ui .mega-panel li.is-sub > a { padding-left: 1.25em; font-size: .95em; opacity: .9; }
.nsbm-ui .mobile-menu-panel nav li.is-sub > a { padding-left: 1.5em; }

/* Note: styles.css has `.site-header + main > .banner-slider { margin-top:-72px }`. It never matches in the design
   (a <script> sits between header and main) and does not match here either, so the banner starts below the bar,
   as in the approved design. Deliberately not restated. */

/* Mobile menu: a top-level menu item with no link of its own (an Eikra "#" parent) shows as a plain heading. */
.nsbm-ui .mobile-menu-panel .mobile-heading { display: block; padding: 12px 0 4px; font-weight: 800; color: var(--ink); }

/* Copyright line under the credit: same style, a little apart. */
.nsbm-ui .foot-copyright { margin-top: 4px; }

/* 1.3.8: page content width as on the live site. Eikra's style.css widens content for header style 9
   (`.header-style-9 .elementor-container, .header-style-9 .container:not(.site-footer-wrap .container)
   { max-width: 1510px !important; width: 97% }`, at 1200px and up). With the new header the body class is
   header-style-nsbm, so that rule stopped matching and Elementor pages fell back to 1140px: narrower text, longer
   pages, squeezed sections. chrome.php adds body.nsbm-was-header-style-9; the same rule is repeated here for page
   content, leaving out the new header and footer (.nsbm-ui). */
@media (min-width: 1200px) {
	body.nsbm-was-header-style-9 .elementor-container,
	body.nsbm-was-header-style-9 .container:not(.site-footer-wrap .container):not(.nsbm-ui .container) {
		max-width: 1510px !important;
		width: 97%;
	}
}
