/*
  Public site header - homepage, About, Contact and the legal pages.
  Logo left, section navigation, Vet Portal action right. Legal links live in
  the footer, never here. Portal pages use their own .topbar-brand in vet.css.
*/

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

/* Pages without the homepage .page wrapper centre the header themselves. */
.topbar.topbar-standalone {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 22px 18px 0;
}

.topbar .brand-logo {
  display: block;
  width: 166px;
  max-width: 48vw;
  height: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.nav-links a {
  color: inherit;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-portal {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border-purple);
  border-radius: 999px;
  background: var(--panel);
  color: var(--brand-dark);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease;
}

.nav-portal:hover {
  background: var(--primary-soft);
  transform: translateY(-1px);
}

/* Pale-purple fill reads as a grey panel in dark, matching the homepage chips. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-portal:hover {
    background: var(--panel);
  }
}

:root[data-theme="dark"] .nav-portal:hover {
  background: var(--panel);
}

@media (max-width: 940px) {
  .nav-links { display: none; }
}

@media (max-width: 620px) {
  .topbar .brand-logo { width: 150px; }
  .topbar.topbar-standalone { padding: 18px 14px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-portal { transition: none; }
}
