/* =========================================================
   NORSAFE HEADER / FOOTER WIDTH MATCH
   Layout-only CSS. No content edits. No builder run.
   ========================================================= */

:root {
  --nsf-site-inner-max: 1240px;
  --nsf-site-gutter: 40px;
}

/* Break Norsafe built pages out of narrow Elementor/theme containers */
body:not(.wp-admin) .entry-content > .nsf-contact-page,
body:not(.wp-admin) .elementor-widget-container > .nsf-contact-page,
body:not(.wp-admin) .elementor-shortcode > .nsf-contact-page,
body:not(.wp-admin) .nsf-contact-page {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

/* Every major contact page band must span the same full width */
body:not(.wp-admin) .nsf-contact-hero,
body:not(.wp-admin) .nsf-contact-section,
body:not(.wp-admin) .nsf-contact-section-tight,
body:not(.wp-admin) .nsf-contact-map-section,
body:not(.wp-admin) .nsf-contact-footer {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Keep inner content aligned with the header/nav content */
body:not(.wp-admin) .nsf-contact-wrap,
body:not(.wp-admin) .nsf-header-inner,
body:not(.wp-admin) .nsf-header .nsf-wrap,
body:not(.wp-admin) .nsf-site-header .nsf-wrap,
body:not(.wp-admin) .norsafe-header .nsf-wrap {
  width: min(calc(100% - var(--nsf-site-gutter)), var(--nsf-site-inner-max)) !important;
  max-width: var(--nsf-site-inner-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Footer specifically: full band, controlled content */
body:not(.wp-admin) .nsf-contact-footer {
  display: block !important;
  clear: both !important;
  background: #050c18 !important;
  padding-top: 44px !important;
  padding-bottom: 18px !important;
}

body:not(.wp-admin) .nsf-contact-footer-inner {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1.25fr 0.8fr 0.95fr 0.8fr 1fr !important;
  gap: clamp(22px, 3vw, 42px) !important;
  align-items: start !important;
}

body:not(.wp-admin) .nsf-contact-footer-bottom {
  width: 100% !important;
  margin-top: 32px !important;
}

/* Map should not leave a boxed footer feeling underneath */
body:not(.wp-admin) .nsf-contact-map-frame {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: #091125 !important;
}

body:not(.wp-admin) .nsf-contact-map-frame iframe,
body:not(.wp-admin) .nsf-contact-map-frame .wpgsv,
body:not(.wp-admin) .nsf-contact-map-frame [class*="wpgsv"],
body:not(.wp-admin) .nsf-contact-map-frame > div {
  width: 100% !important;
  max-width: 100% !important;
}

/* Responsive header safety: menus wrap/scroll instead of crashing into logo/button */
body:not(.wp-admin) .nsf-header,
body:not(.wp-admin) .nsf-site-header,
body:not(.wp-admin) .norsafe-header {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

@media (max-width: 1100px) {
  :root {
    --nsf-site-gutter: 28px;
  }

  body:not(.wp-admin) .nsf-contact-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  :root {
    --nsf-site-gutter: 22px;
  }

  body:not(.wp-admin) .nsf-contact-footer {
    padding-top: 34px !important;
  }

  body:not(.wp-admin) .nsf-contact-footer-inner {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
}
