/* Desktop-only final correction. Mobile design (<=900px) is intentionally untouched. */
@media (min-width: 901px) {
  :root { --jmf-desktop-header-height: 146px; }

  /* One reliable two-row desktop header on every page. */
  html body .jmf-header {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    height: var(--jmf-desktop-header-height) !important;
    min-height: var(--jmf-desktop-header-height) !important;
    display: block !important;
    padding: 0 34px !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(7,26,58,.08) !important;
    box-shadow: 0 2px 10px rgba(7,26,58,.08) !important;
    overflow: visible !important;
    z-index: 50000 !important;
  }

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

  html body .jmf-nav {
    position: absolute !important;
    left: 50vw !important;
    right: auto !important;
    bottom: 0 !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    width: max-content !important;
    max-width: none !important;
    height: 66px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(30px, 3.5vw, 58px) !important;
    z-index: 3 !important;
  }
  html body .jmf-nav-link {
    padding: 23px 0 20px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  html body .jmf-nav-link.active:after { bottom: 12px !important; }

  html body .jmf-header-actions {
    display: flex !important;
    position: absolute !important;
    right: 34px !important;
    bottom: 14px !important;
    z-index: 4 !important;
  }
  html body .jmf-quote {
    background: #0756d9 !important;
    color: #fff !important;
    border-radius: 7px !important;
    padding: 15px 25px !important;
    box-shadow: none !important;
    text-transform: uppercase !important;
  }
  html body .jmf-announcement { display: none !important; }

  /* Interior pages: sticky header stays in normal flow, so no hero text can hide beneath it. */
  html body:not(.home):not(.home-page) > main,
  html body:not(.home):not(.home-page) > main[style],
  html body.interior-page > main,
  html body.interior-page > main[style] {
    margin-top: 0 !important;
    padding-top: 0 !important;
    transform: none !important;
  }
  html body:not(.home):not(.home-page) main > :first-child,
  html body.interior-page main > :first-child {
    margin-top: 0 !important;
    transform: none !important;
  }

  /* Homepage only: transparent overlay header that scrolls away with the hero. */
  html body.home .jmf-header,
  html body.home-page .jmf-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !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;
  }
  html body.home .desktop-hero-logo,
  html body.home-page .desktop-hero-logo { display: none !important; }

  /* Show the entire approved hero—including buckets—within the opening viewport. */
  html body.home .jmf-hero,
  html body.home-page .jmf-hero {
    position: relative !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 680px !important;
    margin: 0 !important;
    padding: 24px 0 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: calc(100% - 24px) !important;
  }
  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;
    margin: 0 !important;
    object-fit: fill !important;
    object-position: center center !important;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  :root { --jmf-desktop-header-height: 136px; }
  html body .jmf-logo-link { width: 400px !important; height: 72px !important; top: 3px !important; }
  html body .jmf-header .jmf-logo { width: 400px !important; max-height: 68px !important; }
  html body .jmf-nav { height: 62px !important; gap: 24px !important; }
  html body .jmf-nav-link { font-size: 14px !important; }
  html body .jmf-header-actions { right: 22px !important; bottom: 12px !important; }
  html body .jmf-quote { padding: 13px 18px !important; font-size: 13px !important; }
}
