/* Shared site header — loaded after page-specific styles to prevent drift. */
.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  height: 74px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1240px, calc(100% - 48px));
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 34px;
}

.header-inner .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
}

.header-inner .brand img {
  display: block;
  width: 170px;
  height: auto;
}

.header-inner .primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(17px, 2vw, 30px);
  margin-left: auto;
  padding: 0;
  border: 0;
}

.header-inner .primary-nav a,
.header-inner .primary-nav a:nth-child(n) {
  display: block;
  padding: 0;
  color: #38534b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.header-inner .primary-nav a:hover,
.header-inner .primary-nav a[aria-current] {
  color: var(--green);
}

.header-inner .header-search {
  position: relative;
  display: block;
  width: 240px;
  margin: 0;
}

.header-inner .header-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: #80928c;
  pointer-events: none;
  transform: translateY(-50%);
}

.header-inner .header-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 39px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafcfb;
  font: 500 13px var(--body, var(--font-body, Arial, sans-serif));
}

.header-inner .menu-toggle {
  display: none;
  width: 42px;
  height: 40px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.header-inner .menu-toggle i {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
}

@media (max-width: 800px) {
  .site-header { height: 66px; }
  .header-inner { width: calc(100% - 32px); }
  .header-inner .brand img { width: 145px; }
  .header-inner .menu-toggle { display: block; margin-left: auto; }
  .header-inner .primary-nav {
    position: absolute;
    top: 65px;
    right: 16px;
    left: 16px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow);
  }
  .header-inner .primary-nav.open { display: grid; }
  .header-inner .primary-nav a,
  .header-inner .primary-nav a:nth-child(n) { padding: 9px; }
  .header-inner .header-search { display: none; }
}
