/* Shared desktop sidebar + mobile horizontal section navigation. */

.reach-section-nav-column {
  flex: 0 0 var(--reach-sidebar-width);
  width: var(--reach-sidebar-width);
  align-self: stretch;
}

.reach-section-sidebar {
  position: sticky;
  top: calc(var(--reach-nav-height) + 1rem);
}

.reach-section-nav-label {
  margin: 0 0 0.75rem;
  color: var(--theme-text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reach-section-nav .nav-link {
  position: relative;
  flex: 0 0 auto;
  padding: 0.72rem 0.9rem;
  border-radius: 0.7rem;
  color: var(--theme-text-soft);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.reach-section-nav .nav-link:hover {
  color: var(--theme-text);
  transform: translateX(2px);
}

.reach-section-nav .nav-link.active::before {
  content: "•";
  position: absolute;
  top: 50%;
  left: 0;
  color: var(--theme-text);
  font-size: 1rem;
  line-height: 1;
  transform: translateY(-50%);
}

@media (max-width: 991.98px) {
  .reach-section-nav-column {
    flex: 0 0 auto;
    width: 100%;
    position: sticky;
    top: var(--reach-nav-height);
    z-index: 1000;
    padding: 0.9rem 0 0.9rem 1.25rem;
    background: color-mix(in srgb, var(--theme-background) 96%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--theme-text) 6%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .reach-section-sidebar {
    position: static;
    width: 100%;
  }

  .reach-section-nav-label {
    margin-bottom: 0.65rem;
    padding-right: 1.25rem;
  }

  .reach-section-nav {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 0.2rem;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .reach-section-nav::-webkit-scrollbar {
    display: none;
  }

  .reach-section-nav .nav-link {
    padding: 0.8rem 1.3rem;
    border-radius: var(--theme-radius-pill);
    background: var(--theme-surface-muted);
    color: var(--theme-text-soft);
    white-space: nowrap;
    transform: none;
  }

  .reach-section-nav .nav-link:hover {
    color: var(--theme-text);
    transform: none;
  }

  .reach-section-nav .nav-link.active {
    background: var(--theme-text);
    color: var(--theme-background);
  }

  .reach-section-nav .nav-link.active::before {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .reach-section-nav .nav-link {
    padding: 0.7rem 1.1rem;
    font-size: 0.9rem;
  }
}
