/* =====================================================
   Saste Tools — Header component overrides
   Loads AFTER style.css, so rules here win on shared
   selectors. Only carries what style.css does NOT already
   define: the Academy link, the Reseller Portal pill
   (part of the main nav on every screen size), the mobile
   search toggle, and the mobile sidebar separators.
   ===================================================== */

/* ---------- Academy nav link ---------- */
.main-nav a.nav-academy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.main-nav a.nav-academy i {
  color: var(--yellow);
  font-size: 0.85rem;
}
.main-nav a.nav-academy:hover i,
.main-nav a.nav-academy.active i {
  color: var(--yellow);
}

/* ---------- Reseller Portal link ----------
   Part of the main nav itself, so on desktop it sits in the
   same row as Home/Products/.../Academy, and on mobile it's
   the last entry in the sidebar list. Styled as a plain nav
   link (no pill background, no icon). */
.nav-reseller-pill {
  white-space: nowrap;
}
.nav-reseller-pill:hover,
.nav-reseller-pill.active {
  color: var(--yellow);
}

/* ---------- Mobile search toggle ----------
   Hidden on desktop (the full search box is already visible
   there); becomes a small round icon button once style.css
   hides the search box on mobile, so search stays reachable. */
.search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--black-soft);
  border: 1px solid var(--card-border);
  color: var(--text-light);
  font-size: 0.95rem;
}
.search-toggle:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}
@media (max-width: 768px) {
  .search-toggle { display: inline-flex; }
}

/* ---------- Mobile sidebar ---------- */
@media (max-width: 768px) {
  /* Light separator under every plain link (Home, Products,
     Blog, Reviews, Academy) — the pill button keeps its own
     shape instead of a line. */
  .main-nav.mobile-active > a:not(.nav-reseller-pill) {
    width: 100%;
    text-align: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--card-border);
  }
  /* Academy is inline-flex (icon + text) on desktop, which ignores
     text-align and made it hug the left edge in the mobile menu.
     Make it a full-width flex row centred like the other links. */
  .main-nav.mobile-active > a.nav-academy {
    display: flex;
    justify-content: center;
  }
  .main-nav.mobile-active > a.nav-reseller-pill {
    margin-top: 4px;
    justify-content: center;
    padding: 12px 24px;
  }
}

/* ---------- Overflow guards ---------- */
@media (max-width: 1240px) {
  .main-nav { gap: 18px; }
  .search-box { min-width: 170px; }
}
@media (max-width: 900px) {
  .search-box { min-width: 140px; }
}