/* PBC Swiss — site header */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
}

.head-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 18px var(--gutter);
  gap: var(--s-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  font-family: inherit;
  text-decoration: none;
  color: var(--ink);
}
.brand img,
.brand .custom-logo,
.brand .custom-logo-link img {
  height: 38px;
  width: auto;
  max-width: none;
  display: block;
}
.brand .custom-logo-link {
  display: block;
  line-height: 0;
}
.brand-text {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.nav-primary { justify-self: center; }
.nav-primary ul {
  display: flex;
  gap: 30px;
  font-size: var(--t-meta);
  font-weight: 500;
}
.nav-primary a {
  padding: 6px 0;
  position: relative;
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
}
.nav-primary li.current-menu-item > a::after,
.nav-primary li.current_page_item > a::after,
.nav-primary a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--ink);
}

/* Dropdown: Collection submenu (Artifacts / People / Organizations). */
.nav-primary .has-dropdown { position: relative; }
/* Transparent hover bridge: covers the 6px visual gap between the toggle
   button and the submenu card so :hover doesn't drop while the cursor is
   travelling from one to the other. */
.nav-primary .has-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
  /* Stays clear of clicks unless the dropdown is actually open. */
  pointer-events: none;
}
.nav-primary .has-dropdown:hover::after,
.nav-primary .has-dropdown:focus-within::after,
.nav-primary .has-dropdown.is-open::after {
  pointer-events: auto;
}
.nav-primary .nav-dropdown-toggle {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.nav-primary .nav-dropdown-caret {
  font-size: 0.7em;
  line-height: 1;
  transition: transform 0.15s ease;
}
.nav-primary .has-dropdown.is-open .nav-dropdown-caret,
.nav-primary .has-dropdown:hover .nav-dropdown-caret,
.nav-primary .has-dropdown:focus-within .nav-dropdown-caret {
  transform: rotate(180deg);
}
.nav-primary .has-dropdown .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 180px;
  margin-top: 6px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #e6e3da;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0s linear 0.12s;
  z-index: 1000;
}
.nav-primary .has-dropdown:hover .sub-menu,
.nav-primary .has-dropdown:focus-within .sub-menu,
.nav-primary .has-dropdown.is-open .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.nav-primary .has-dropdown .sub-menu li { display: block; }
.nav-primary .has-dropdown .sub-menu a {
  display: block;
  padding: 8px 18px;
  white-space: nowrap;
  font-weight: 500;
}
.nav-primary .has-dropdown .sub-menu a::after { display: none; }
.nav-primary .has-dropdown .sub-menu a:hover {
  background: #f5f4f0;
}

.head-utility {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  font-size: var(--t-meta);
  color: var(--ink);
}
.head-utility ul {
  display: flex;
  gap: 18px;
}
.head-utility a {
  color: var(--ink);
  text-decoration: none;
}
.head-utility a:hover { color: var(--ink); }

@media (max-width: 600px) {
  .head-row { grid-template-columns: 1fr; }
  .nav-primary,
  .head-utility { display: none; }
}
