/* Shared header styles for every Site.master page.
   Each page loads its own CSS set (homepage, blog, live, franchise, teacher training, careers...)
   and those files gave the header different sizes: menu links 12px on blog/teacher-training pages,
   14px on Live Classes, 15px on the homepage, and the Login / Get in touch buttons had different
   padding, borders and heights. Site.master loads this file after the page's own CSS so the header
   looks the same everywhere. Values are the homepage's (style.css + refinements.css).
   Layout and breakpoints stay with each page.
   Selectors start with body header / #navigation so they outrank the page rules (including the
   guide pages' .abacus-guide-page header #navigation rules) without !important.
   Menu link sizes between 901 and 1150px are left to each page: some pages show the dropdown
   menu there, others still show the links in one row, so one size cannot suit both. */

header #navigation a,
header .nav .nav-login,
header .nav .menu {
  font-family: Manrope, sans-serif;
}

/* ---------- Login button (homepage values, every width) ---------- */
body header .nav a.nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid #b2c3a3;
  border-radius: 999px;
  background: #eaf0df;
  color: var(--green, #123f2b);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}
body header .nav a.nav-login svg { width: 18px; height: 18px; flex-shrink: 0; }
body header .nav a.nav-login:hover { background: #dce7cd; border-color: #789263; }
body header .nav a.nav-login:focus-visible { outline: 3px solid #628751; outline-offset: 3px; }
@media (max-width: 480px) {
  body header .nav a.nav-login { padding: 8px 10px; font-size: 14px; gap: 5px; }
}

/* ---------- Get in touch button (homepage .btn.btn-secondary.small, every width) ----------
   A link on most pages, a <button> on Home, Portal and Live Classes: both are covered. */
body header #navigation .btn.small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 48px;
  padding: 11px 18px;
  border: 1.5px solid var(--green, #123f2b);
  border-radius: 40px;
  background: transparent;
  color: var(--green, #123f2b);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}
body header #navigation .btn.small span { font-size: 20px; line-height: 1; }
body header #navigation .btn.small:hover { background: #e6eedb; color: var(--green, #123f2b); }

/* ---------- Desktop header layout (homepage / Learning Portal / Live Classes values) ----------
   Franchise (.partner-page .nav{gap:8px}) and Teacher Training (tt.css: Login order/margins,
   22px menu gap, 230px logo) moved the header items around; these rules pin one layout:
   logo on the left, then the menu links, Get in touch and Login on the right. */
@media (min-width: 1151px) {
  body header .nav.wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    gap: 24px;
    width: min(1280px, calc(100% - 96px));
    margin: 0 auto;
    padding: 0;
  }
  body header .nav.wrap #navigation {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 21px;
    margin: 0 0 0 auto;
    padding: 0;
    order: 1;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body header .nav.wrap a.nav-login { order: 2; margin: 0; }
  body header .nav.wrap .menu { display: none; }
  body header #navigation > a:not(.btn) { font-size: 15px; font-weight: 700; letter-spacing: 0; padding: 0; margin: 0; }
  body header #navigation .btn.small { margin: 0; }
}

/* ---------- Menu links ---------- */
/* Mobile dropdown menu (every page switches to the Menu button by 900px) */
@media (max-width: 900px) {
  body header #navigation > a:not(.btn) { font-size: 17px; font-weight: 700; }
  header .nav .menu { font-size: 16px; }
}
@media (max-width: 650px) {
  header .nav .menu { font-size: 15px; }
}

/* Current section in the menu (pages set Master.NavKey + Master.NavCurrent = true).
   Was only styled in the Teacher Training and Franchise CSS; now the same on every page. */
body header #navigation > a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}
