/* NorthStar header + homepage hero placement, 2026-11-30.
   Loaded from header.php after the theme and Additional CSS so it wins without !important where possible. */

/* 1. Header stays with the visitor on every page. */
.theme-header {
  position: sticky;
  top: 0;
  z-index: 10050;
  box-shadow: 0 2px 10px rgba(0, 28, 69, .10);
}
body.admin-bar .theme-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .theme-header { top: 0; } }
/* Keep in-page anchors from hiding under the sticky header. */
html { scroll-padding-top: 170px; }
@media (max-width: 991px) {
  html { scroll-padding-top: 115px; }
  /* Opened phone menu scrolls inside the header instead of running off screen. */
  .theme-header #northstar-menu.show,
  .theme-header #northstar-menu.collapsing { max-height: calc(100vh - 110px); overflow-y: auto; }
}

/* 2. "See if I Qualify" pinned to the top-right of the header. */
.theme-header .nsf-header-qualify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #b07a18;
  border-radius: 999px;
  background: #d39f3f;
  color: #102b3a !important;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.theme-header .nsf-header-qualify:hover {
  background: #e2b25a;
  color: #102b3a !important;
  box-shadow: 0 4px 14px rgba(176, 122, 24, .35);
  transform: translateY(-1px);
}
.theme-header .nsf-header-qualify:focus-visible { outline: 3px solid #001c45; outline-offset: 3px; }
.theme-header .header-menu .menutop > li.nsf-header-qualify-item { display: flex; align-items: center; order: 99; }
.theme-header .header-menu .menutop > li.nsf-header-qualify-item > a.nsf-header-qualify { margin: 0; }

/* Compact copy sits beside the menu button where the top bar is hidden. */
.theme-header .nsf-header-qualify--compact { display: none; }
@media (max-width: 991px) {
  .theme-header .menu-colum { display: flex; align-items: center; gap: 10px; }
  .theme-header .nsf-header-qualify--compact {
    display: inline-flex;
    min-height: 38px;
    padding: 0 13px;
    font-size: 15px;
  }
  .theme-header .menutop > li.nsf-header-qualify-item { display: none !important; }
}
@media (max-width: 420px) {
  .theme-header .brand-logo { width: min(178px, 100%); }
  .theme-header .nsf-header-qualify--compact { padding: 0 11px; font-size: 14px; min-height: 36px; }
}

/* Mid-width desktop: tighten the top bar so five actions fit on one line. */
@media (min-width: 992px) and (max-width: 1299px) {
  .theme-header .header-menu .menutop > li > a { font-size: 15px; }
  .theme-header .header-menu .menutop > li.list-item-cm-1 > a,
  .theme-header .header-menu .menutop > li.list-item-cm-2 > a,
  .theme-header .nsf-header-qualify { font-size: 15px; padding: 0 13px; min-height: 38px; height: 38px; }
  .theme-header .brand-logo { width: 200px; }
  .theme-header .brand-logo img { width: 100%; height: auto; }
}

/* Small desktop and landscape tablet: keep every top-bar label on one line. */
.theme-header .header-menu .menutop > li > a,
.theme-header .nsf-header-qualify { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1199px) {
  .theme-header .header-menu .menutop { gap: 8px; flex-wrap: nowrap; }
  .theme-header .header-menu .menutop > li { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .theme-header .header-menu .menutop > li > a { font-size: 13.5px; }
  .theme-header .header-menu .menutop > li.list-item-cm-1 > a,
  .theme-header .header-menu .menutop > li.list-item-cm-2 > a,
  .theme-header .nsf-header-qualify { font-size: 13.5px; padding: 0 11px; min-height: 34px; height: 34px; }
  .theme-header .brand-logo { width: 170px; }
  .theme-header .header-mainmenu .main-menu > li > a { white-space: nowrap; font-size: 14.5px; padding-left: 7px; padding-right: 7px; }
}

/* The floating homepage button is replaced by the header button. */
.nsf-home-education .nsf-sticky-cta { display: none !important; }

/* 3. Purchase and Refinance: navy, with a slight highlight on hover (all widths). */
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button,
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button:not(.nsf-primary) {
  background: #001c45;
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(0, 12, 32, .35);
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button:hover,
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button:not(.nsf-primary):hover {
  background: #0d3470;
  border-color: rgba(255, 255, 255, .85);
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(186, 223, 230, .35), 0 8px 22px rgba(0, 12, 32, .45);
  transform: translateY(-1px);
}

/* 4. Wide desktop: place the actions on the picture.
   The framed picture is 1675 x 939, drawn at 115% of the hero width and centred
   (Additional CSS). One picture pixel = 0.068657cqw, and its centre (837.5, 469.5)
   sits at the hero centre, so these anchors track the same rooftops at any width. */
@media (min-width: 1200px) {
  body.nsf-continuity .nsf-home-education .nsf-hero { position: relative; container-type: inline-size; }
  /* Headline keeps clear of the buttons: it ends 40px before the button group starts. */
  body.nsf-continuity .nsf-home-education .nsf-hero h1 {
    font-size: clamp(56px, 5.2cqw, 84px);
    max-width: min(50cqw, calc(82.5cqw - 448px - max((100cqw - 1180px) / 2, 50px)));
  }

  /* Buttons sit above the brick-row roofline, right edge at picture x 1280 (owner asked: up, right, closer to Let's Talk). */
  body.nsf-continuity .nsf-home-education .nsf-hero .nsf-wrap > .nsf-transaction-actions {
    position: absolute;
    right: 17.5cqw;
    top: calc(50% - 10.31cqw);
    transform: translateY(calc(-100% - 6px));
    margin: 0;
    width: auto;
    flex-wrap: nowrap;
    z-index: 2;
  }
  /* Let's Talk sits directly under the buttons with a small gap. */
  body.nsf-continuity .nsf-home-education .nsf-hero .nsf-wrap > .nsf-call-content {
    position: absolute;
    right: 17.5cqw;
    top: calc(50% - 17.4cqw);
    width: 408px !important;
    max-width: 408px !important;
    box-sizing: border-box;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    max-width: none;
    white-space: nowrap;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .65);
    z-index: 2;
  }
}

/* 5. Owner's mockup (2026-11-30): Let's Talk above the buttons, larger navy buttons with a bright teal edge, larger gold Qualify pill. */
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button,
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button:not(.nsf-primary) {
  border: 2px solid #38c4dc;
  border-radius: 6px;
  font-weight: 700;
}
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button:hover,
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button:not(.nsf-primary):hover { border-color: #7fe3f2; }
body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button span[aria-hidden] { font-size: 1.45em; line-height: 1; color: #7fe3f2; position: relative; top: -2px; }
.theme-header .nsf-header-qualify {
  background: linear-gradient(180deg, #f4c862 0%, #d79b2e 100%);
  border-color: #b57d1c;
  box-shadow: 0 4px 10px rgba(120, 80, 10, .30);
}
.theme-header .nsf-header-qualify:hover { background: linear-gradient(180deg, #f8d47a 0%, #e0a83c 100%); }
.theme-header .nsf-header-qualify span[aria-hidden] { font-size: 1.4em; line-height: 1; position: relative; top: -2px; }
@media (min-width: 1200px) {
  body.nsf-continuity .nsf-home-education .nsf-hero .nsf-wrap > .nsf-transaction-actions { gap: 16px; }
  body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button,
  body.nsf-continuity .nsf-home-education .nsf-hero .nsf-transaction-actions .nsf-button:not(.nsf-primary) {
    display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    width: 196px; min-height: 58px; padding: 0 20px; font-size: 21px;
  }
  .theme-header .header-menu .menutop > li.nsf-header-qualify-item > a.nsf-header-qualify { min-height: 46px; padding: 0 22px; font-size: 19px; }
}
