/* GOR-129: clickable header logo + centered desktop nav
   US sites only (kacema.org, study.kacema.org). Does not change page content. */

a.kacema-logo-link {
  display: block;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
a.kacema-logo-link:focus-visible {
  outline: 3px solid #1a365d;
  outline-offset: 4px;
}
a.kacema-logo-link .gatsby-image-wrapper,
a.kacema-logo-link img {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Full-width header bar; do not let nested .container max-widths clip HOME */
nav.navbr {
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}
nav.navbr > .container {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center !important;
}
nav.navbr > .container > .container {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center !important;
  min-width: 0;
}

/* Desktop / laptop: keep all items visible and horizontally centered */
@media (min-width: 1024px) {
  nav.navbr .lg\:flex {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    column-gap: 0.15rem;
    row-gap: 0.15rem;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
  }
  nav.navbr .lg\:flex > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 0 0 auto;
  }
}

/* 1024–1279: tighter type and padding so 10 items fit without pushing HOME off-screen */
@media (min-width: 1024px) and (max-width: 1279px) {
  nav.navbr .lg\:flex {
    font-size: 11px;
    column-gap: 0;
  }
  nav.navbr .lg\:flex > a,
  nav.navbr .lg\:flex > button {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
  }
}

/* 1280–1439 */
@media (min-width: 1280px) and (max-width: 1439px) {
  nav.navbr .lg\:flex {
    font-size: 12px;
    column-gap: 0.1rem;
  }
  nav.navbr .lg\:flex > a,
  nav.navbr .lg\:flex > button {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}

/* 1440+ — roomy but still centered */
@media (min-width: 1440px) {
  nav.navbr .lg\:flex {
    font-size: 0.875rem;
    column-gap: 0.25rem;
  }
}

/* Mobile: hamburger stays left; stacked menu remains usable */
@media (max-width: 1023px) {
  nav.navbr > .container {
    justify-content: flex-start !important;
  }
}
