/* Section nav ("slim bar"): template-parts/shared/section-nav.php + assets/js/section-nav.js.
   Page-specific looks: pass 'class' => 'section-nav--x' and style that class in the page's own CSS,
   or override the custom properties below. */
.section-nav {
  --sn-bg: rgba(15, 15, 13, 0.92);
  --sn-link: rgba(251, 249, 244, 0.6);
  --sn-link-on: var(--bone);
  --sn-accent: #7FA68D;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 210;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 3vw, 36px);
  padding: 12px var(--container-pad);
  background: var(--sn-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(251, 249, 244, 0.12);
  font-family: var(--f-sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 0.25s ease, transform 0.25s ease, top 0.3s ease;
}
.section-nav[hidden] { display: none; }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav.is-on { opacity: 1; pointer-events: auto; transform: none; }
/* A moment without scrolling: slide away (scroll or move the mouse to the top to bring it back) */
.section-nav.is-on.is-idle:not(:hover):not(:has(:focus-visible)) { opacity: 0; pointer-events: none; transform: translateY(-100%); transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, top 0.3s ease; }
body.admin-bar .section-nav { top: 32px; }
/* While the site bar is showing, the section bar sits flush under it */
body:has(#site-nav.compact:not(.nav-hidden)) .section-nav,
body.admin-bar:has(#site-nav.compact:not(.nav-hidden)) .section-nav { top: 57px; }

.section-nav a { color: var(--sn-link); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.section-nav a:hover { color: var(--sn-link-on); }
.section-nav a.is-current { color: var(--sn-link-on); border-bottom-color: var(--sn-accent); }
.section-nav .section-nav-cta { color: var(--sn-accent); }
.section-nav .section-nav-cta:hover { color: var(--sn-link-on); }

/* Anchor jumps land clear of the site bar and the section bar */
html:has(.section-nav) { scroll-padding-top: 110px; }

@media (max-width: 700px) {
  .section-nav { justify-content: flex-start; }
}
