/* Shared site header: this file is the single visual source for every page header. */
:root {
  --site-header-ink: #0a1628;
  --site-header-primary: #1a3c6e;
  --site-header-text: #475569;
  --site-header-border: rgba(15, 23, 42, 0.06);
  --site-header-brand: #b41b1b;
  --site-header-brand-dark: #9a1010;
  --site-header-font: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

body .topbar {
  min-height: 34px;
  padding: 7px 0;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, var(--site-header-ink), var(--site-header-primary));
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--site-header-font);
  font-size: 12.5px;
  line-height: 20px;
  letter-spacing: 0.02em;
}

body .topbar-inner {
  width: 100%;
  max-width: 1280px;
  min-height: 20px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

body .topbar-tags {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}

body .topbar-tags span {
  position: relative;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

body .topbar-tags span:first-child { padding-left: 0; }
body .topbar-tags span::before { content: "✦ "; color: #fff; font-size: 10px; margin-right: 3px; }
body .topbar-tags span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 12px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
}
body .topbar-tags span:last-child::after { display: none; }

body .topbar-phone {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--site-header-font);
  font-size: 12.5px;
  line-height: 20px;
  white-space: nowrap;
}

body .topbar-phone-icon {
  width: 1em;
  height: 1em;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1em;
  line-height: 1;
}

body .topbar-phone strong { color: #fff; font-weight: 700; }

body #main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--site-header-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  font-family: var(--site-header-font);
  transition: box-shadow 0.3s ease;
}

body #main-header.scrolled { box-shadow: 0 2px 24px rgba(15, 23, 42, 0.08); }

body #main-header > nav {
  width: 100%;
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-sizing: border-box;
}

body #main-header .logo {
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

body #main-header .logo-image {
  width: auto;
  max-width: none;
  height: 32px;
  display: block;
}

body #main-header .nav-links {
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
}

body #main-header .nav-links > a {
  min-width: 0;
  flex: 0 0 auto;
  padding: 7px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  border-radius: 7px;
  background: transparent;
  color: var(--site-header-text);
  font-family: var(--site-header-font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

body #main-header .nav-links > a:hover,
body #main-header .nav-links > a.active {
  color: var(--site-header-brand);
  background: transparent;
}

body #main-header .nav-links > a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 32px;
  height: 2px;
  border-radius: 2px;
  transform: translateX(-50%);
  background: var(--site-header-brand);
}

body #main-header .nav-links > a.active:has(.nav-badge)::after { left: calc(50% - 13px); }

body #main-header .nav-badge {
  margin-left: 2px;
  padding: 2px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: linear-gradient(135deg, #7c3aed, #f43f5e);
  color: #fff;
  font-family: var(--site-header-font);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
}

body #main-header .nav-links > .nav-cta {
  padding: 8px 20px !important;
  border-radius: 999px !important;
  background: var(--site-header-brand) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(180, 27, 27, 0.28);
  font-size: 13.5px !important;
  font-weight: 600 !important;
}

body #main-header .nav-links > .nav-cta:hover {
  background: var(--site-header-brand-dark) !important;
  box-shadow: 0 5px 22px rgba(180, 27, 27, 0.38);
  transform: translateY(-1px);
}

@media (max-width: 1280px) {
  body #main-header .nav-links > a { padding-right: 10px; padding-left: 10px; font-size: 14px; }
}

@media (max-width: 1180px) {
  body #main-header .nav-links { display: none !important; }
}

@media (max-width: 980px) {
  body .topbar-inner { justify-content: center; }
  body .topbar-tags { display: none; }
}

@media (max-width: 768px) {
  body .topbar-inner { justify-content: center; padding-right: 20px; padding-left: 20px; }
  body #main-header > nav { height: 68px; padding-right: 20px; padding-left: 20px; }
  body #main-header .logo-image { height: 32px; }
}
