.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--blur-glass));
  box-shadow: 0 1px 0 rgba(196, 200, 190, 0.15);
}

.header-shell {
  width: min(100% - (var(--container-padding) * 2), var(--container-width));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  overflow: hidden;
}

.site-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
  width: 100%;
  height: 100%;
}

.site-logo img,
.site-logo .custom-logo,
.site-logo .custom-logo-link img.custom-logo {
  display: block;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
}

.site-branding-copy {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}

.site-tagline {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.header-icon-btn:hover {
  background: var(--surface-container-low);
  color: var(--primary);
}

.header-search {
  position: relative;
}

.header-search-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: min(22rem, 80vw);
  padding: 1rem 1.25rem;
  background: rgba(250, 249, 245, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--surface-container-lowest);
  box-shadow: var(--shadow-editorial);
}

@media (max-width: 1023px) {
  .main-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 1rem;
    right: 1rem;
    display: none;
    padding: 1rem;
    background: rgba(250, 249, 245, 0.97);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float);
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 767px) {
  .site-header {
    padding: 0.6rem 0;
  }

  .header-shell {
    gap: 0.75rem;
  }

  .site-logo {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .site-logo .custom-logo-link {
    flex-basis: 48px;
  }

  .site-logo img,
  .site-logo .custom-logo,
  .site-logo .custom-logo-link img.custom-logo {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
  }

  .site-branding {
    flex: 0 0 auto;
    gap: 0;
  }

  .site-branding-copy,
  .header-search,
  .site-tagline,
  .header-cta {
    display: none;
  }

  .header-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 0.55rem;
    min-width: 0;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }
}
