/* ============================================================
   "get a computer" call to action — loaded on every page.
   The nav link carries the .donate class, so it looks and behaves
   exactly like the donate button (white pill, clear on hover, same
   mobile-menu layout) in whichever page stylesheet is in use.
   ============================================================ */

.donate.nav-cta {
  /* .donate's margin-right: 3% makes the flex row overflow; the gap on
     .nav-links already spaces it */
  margin-right: 0;
}

/* In the hamburger menu, line its right edge up with donate (which has an
   inline margin-right: 1rem) */
@media (max-width: 900px) {
  .nav-links .donate.nav-cta {
    margin-right: 1rem;
  }
}

/* Footer: same treatment as the donate footer link, but bold and white */
.footer-link-request {
  font-family: "Josefin Sans", sans-serif;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.footer-link-request::after {
  content: "";
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: white;
  transform-origin: bottom left;
  transition: transform 0.25s ease-out;
}

.footer-link-request:hover::after,
.footer-link-request:focus-visible::after {
  transform: scaleX(1);
}

/* ---------- Fitting seven nav items on one row ----------
   With "get a computer" added, the desktop nav overflows between the
   900px hamburger breakpoint and ~1365px. Inside that band only, swap the
   percentage padding the page stylesheets use (which also makes flex rows
   overflow) for fixed spacing, and step the type down. Wider screens are
   untouched. */
@media (min-width: 901px) and (max-width: 1365px) {
  .logo-text {
    white-space: nowrap;
    font-size: 1.25rem;
  }

  .nav-links {
    gap: 0.3rem;
  }

  .navlink {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .navlink,
  .donate {
    font-size: 1.2rem;
  }

  .nav-links .donate.nav-cta {
    margin-left: 0.35rem;
    margin-right: 0.5rem;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .logo-text {
    font-size: 1.1rem;
  }

  .navlink {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  .navlink,
  .donate {
    font-size: 1.02rem;
  }
}

@media (min-width: 901px) and (max-width: 1020px) {
  .logo-text {
    font-size: 1rem;
  }

  .navlink {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  .navlink,
  .donate {
    font-size: 0.92rem;
  }
}

/* The extra footer link makes the links row wrap at some widths, which left
   "donate" alone on its own line. Balancing splits it into even lines. */
.footer-links {
  text-wrap: balance;
}
