/* Sticky navigation and scroll-spy state. Kept separate from the visual stylesheet. */
:root {
  --header-height: 66px;
}

.header {
  position: sticky;
  top: 10px;
  z-index: 100;
  height: var(--header-height);
  margin-bottom: 10px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(23, 23, 23, 0.82);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.header nav {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.header nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.header nav a:hover {
  background: rgba(255, 255, 255, 0.055);
}

.header nav a.is-active {
  color: var(--lime);
  background: rgba(157, 233, 26, 0.055);
  box-shadow: none;
}

.header .header-cta.is-active {
  color: #171717 !important;
  background: var(--lime);
  box-shadow: 0 0 22px rgba(189, 255, 60, 0.32);
}

#top,
#about,
#progress,
#program,
#reviews,
#prices,
#contact {
  scroll-margin-top: calc(var(--header-height) + 28px);
}

@media (max-width: 650px) {
  :root {
    --header-height: 92px;
  }

  .header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 39px 41px;
    gap: 0 8px;
    top: 6px;
    height: var(--header-height);
    width: calc(100% - 16px);
    padding: 6px 8px;
    border-radius: 15px;
  }

  .header .logo {
    justify-self: start;
    font-size: 9px;
    padding: 5px 9px;
  }

  .header .header-cta {
    justify-self: end;
    padding: 5px 11px;
    font-size: 9px;
  }

  .header nav {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    gap: 2px;
    padding: 3px;
  }

  .header nav a {
    overflow: hidden;
    padding: 6px 3px;
    font-size: 8px;
    text-align: center;
    text-overflow: ellipsis;
  }
}
