/* Final desktop layout stabilization. Mobile (900px and below) is untouched. */
@media (min-width: 901px) {
  :root { --jmf-desktop-header-h: 146px; }

  html, body { margin: 0 !important; padding: 0 !important; }
  body { overflow-x: hidden !important; }

  /* Remove legacy announcement/top spacers on desktop. */
  html body .jmf-announcement { display: none !important; margin: 0 !important; height: 0 !important; }

  /* Shared header geometry. Interior pages remain in normal flow. */
  html body .jmf-header {
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: var(--jmf-desktop-header-h) !important;
    min-height: var(--jmf-desktop-header-h) !important;
    margin: 0 !important;
    padding: 0 32px !important;
    display: block !important;
    overflow: visible !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(7,31,67,.08) !important;
    box-shadow: none !important;
    z-index: 10000 !important;
    transform: none !important;
  }

  html body .jmf-logo-link {
    position: absolute !important;
    top: 5px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: 430px !important;
    height: 78px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
  }
  html body .jmf-header .jmf-logo {
    width: 430px !important;
    height: auto !important;
    max-width: none !important;
    max-height: 76px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* Nav is mathematically centered to the full viewport, independent of quote button. */
  html body .jmf-nav {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    top: 82px !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    height: 64px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: clamp(28px, 3.2vw, 54px) !important;
    overflow: visible !important;
    z-index: 5 !important;
  }
  html body .jmf-nav-item {
    position: relative !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: visible !important;
  }
  html body .jmf-nav-link {
    display: flex !important;
    align-items: center !important;
    height: 64px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    position: relative !important;
  }
  html body .jmf-nav-link.active::after { bottom: 10px !important; }

  html body .jmf-header-actions {
    position: absolute !important;
    right: 32px !important;
    left: auto !important;
    top: 84px !important;
    bottom: auto !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    z-index: 7 !important;
  }
  html body .jmf-quote {
    background: #0756d9 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 7px !important;
    padding: 15px 25px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
  }

  /* Stable dropdown hover corridor: no gap between link and panel. */
  html body .jmf-dropdown-menu {
    position: absolute !important;
    top: 63px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    z-index: 20000 !important;
    overflow: visible !important;
  }
  html body .jmf-dropdown-menu::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: -10px !important;
    height: 12px !important;
  }
  html body .jmf-nav-item:hover > .jmf-dropdown-menu,
  html body .jmf-nav-item:focus-within > .jmf-dropdown-menu,
  html body .jmf-dropdown-menu:hover {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Every interior page: no artificial blank band and no hidden leader/kicker. */
  html body.interior-page > main,
  html body:not(.home):not(.home-page) > main,
  html body.interior-page > main[style],
  html body:not(.home):not(.home-page) > main[style] {
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    position: relative !important;
    top: auto !important;
  }
  html body.interior-page > main > :first-child,
  html body:not(.home):not(.home-page) > main > :first-child {
    margin-top: 0 !important;
    transform: none !important;
    top: auto !important;
  }

  /* Homepage: both logo row and nav row sit over the image; image begins at y=0. */
  html body.home .jmf-header,
  html body.home-page .jmf-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html body.home > main,
  html body.home-page > main,
  html body.home > main[style],
  html body.home-page > main[style] {
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  html body.home .desktop-hero-logo,
  html body.home-page .desktop-hero-logo { display: none !important; }

  /* Full hero is visible in one desktop viewport, including buckets and reflection. */
  html body.home .jmf-hero,
  html body.home-page .jmf-hero {
    position: relative !important;
    inset: auto !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 640px !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    line-height: 0 !important;
  }
  html body.home .jmf-hero picture,
  html body.home-page .jmf-hero picture {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html body.home .jmf-hero picture > img,
  html body.home-page .jmf-hero picture > img,
  html body.home .jmf-hero img,
  html body.home-page .jmf-hero img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill !important;
    object-position: center center !important;
  }
}

@media (min-width: 901px) and (max-width: 1250px) {
  :root { --jmf-desktop-header-h: 138px; }
  html body .jmf-logo-link { width: 380px !important; height: 72px !important; top: 3px !important; }
  html body .jmf-header .jmf-logo { width: 380px !important; max-height: 70px !important; }
  html body .jmf-nav { top: 76px !important; height: 62px !important; gap: 24px !important; }
  html body .jmf-nav-link { height: 62px !important; font-size: 14px !important; }
  html body .jmf-header-actions { top: 78px !important; right: 20px !important; }
  html body .jmf-quote { padding: 13px 17px !important; font-size: 13px !important; }
  html body .jmf-dropdown-menu { top: 61px !important; }
}

/* 2026-08-02: compact fixed one-row desktop header across every desktop page. */
@media (min-width:901px) {
  :root { --jmf-desktop-header-h:82px !important; }
  html { scroll-padding-top:var(--jmf-desktop-header-h) !important; }
  html body {
    padding-top:var(--jmf-desktop-header-h) !important;
  }

  html body .jmf-header,
  html body.home .jmf-header,
  html body.home-page .jmf-header {
    position:fixed !important;
    inset:0 0 auto 0 !important;
    width:100% !important;
    height:var(--jmf-desktop-header-h) !important;
    min-height:var(--jmf-desktop-header-h) !important;
    padding:0 28px !important;
    display:flex !important;
    align-items:center !important;
    background:#fff !important;
    background-color:#fff !important;
    border:0 !important;
    border-bottom:1px solid rgba(7,31,67,.10) !important;
    box-shadow:0 2px 10px rgba(7,31,67,.05) !important;
    overflow:visible !important;
    z-index:100000 !important;
  }

  html body .jmf-logo-link,
  html body.home .jmf-logo-link,
  html body.home-page .jmf-logo-link {
    position:absolute !important;
    left:28px !important;
    top:50% !important;
    right:auto !important;
    bottom:auto !important;
    transform:translateY(-50%) !important;
    width:270px !important;
    height:62px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    margin:0 !important;
    padding:0 0 7px !important;
    border-bottom:2px solid #d61f35 !important;
    box-sizing:border-box !important;
    z-index:5 !important;
  }
  html body .jmf-header .jmf-logo {
    width:260px !important;
    height:auto !important;
    max-width:100% !important;
    max-height:52px !important;
    object-fit:contain !important;
    object-position:left center !important;
    margin:0 !important;
  }

  html body .jmf-nav {
    position:absolute !important;
    left:50% !important;
    top:0 !important;
    right:auto !important;
    bottom:auto !important;
    transform:translateX(-50%) !important;
    width:max-content !important;
    height:var(--jmf-desktop-header-h) !important;
    margin:0 !important;
    padding:0 !important;
    display:flex !important;
    align-items:stretch !important;
    justify-content:center !important;
    gap:clamp(22px,2.5vw,42px) !important;
    overflow:visible !important;
    z-index:6 !important;
  }
  html body .jmf-nav-item { align-items:stretch !important; }
  html body .jmf-nav-link {
    height:var(--jmf-desktop-header-h) !important;
    display:flex !important;
    align-items:center !important;
    padding:0 !important;
    font-size:15px !important;
    line-height:1 !important;
  }
  html body .jmf-nav-link.active::after { bottom:12px !important; }

  html body .jmf-header-actions {
    position:absolute !important;
    right:28px !important;
    top:50% !important;
    left:auto !important;
    bottom:auto !important;
    transform:translateY(-50%) !important;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
    display:flex !important;
    align-items:center !important;
    z-index:7 !important;
  }
  html body .jmf-quote {
    padding:14px 22px !important;
    font-size:14px !important;
  }

  html body .jmf-dropdown-menu {
    top:calc(var(--jmf-desktop-header-h) - 1px) !important;
  }

  /* One and only one desktop header offset. Every page starts flush below it. */
  html body > main,
  html body > main[style],
  html body.interior-page > main,
  html body:not(.home):not(.home-page) > main,
  html body.home > main,
  html body.home-page > main {
    position:relative !important;
    top:auto !important;
    margin:0 !important;
    padding:0 !important;
    transform:none !important;
  }
  html body > main > :first-child,
  html body.interior-page > main > :first-child,
  html body:not(.home):not(.home-page) > main > :first-child {
    margin-top:0 !important;
    top:auto !important;
    transform:none !important;
  }

  html body.home .jmf-hero,
  html body.home-page .jmf-hero {
    height:calc(100vh - var(--jmf-desktop-header-h)) !important;
    min-height:560px !important;
    margin:0 !important;
  }
}

@media (min-width:901px) and (max-width:1250px) {
  :root { --jmf-desktop-header-h:76px !important; }
  html body .jmf-header { padding-left:18px !important; padding-right:18px !important; }
  html body .jmf-logo-link,
  html body.home .jmf-logo-link,
  html body.home-page .jmf-logo-link {
    left:18px !important;
    width:218px !important;
    height:58px !important;
  }
  html body .jmf-header .jmf-logo { width:210px !important; max-height:47px !important; }
  html body .jmf-nav { gap:17px !important; }
  html body .jmf-nav-link { font-size:13px !important; }
  html body .jmf-header-actions { right:18px !important; }
  html body .jmf-quote { padding:12px 15px !important; font-size:12px !important; }
}
