/* ===== Base nav ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.75rem 1.5rem;
  width: 100%;
  background-color: var(--color-secondary-950);
  box-sizing: border-box;
}

.nav.is-open {
  background-color: var(--color-secondary-900);
}

/* ===== Brand/logo ===== */
.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #fff;
  margin-right: 1.5rem;
}

.nav-brand a {
  color: var(--primary-color);
  font-size: calc(26rem / 16);
  text-decoration: none;
}

.nav-brand span {
  font-size: 1.25rem;
  padding-left: 0.5rem;
}

/* ===== Toggle button ===== */
.nav-toggle {
  display: block;
  padding: 0;
  line-height: 1;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus {
  color: #fff;
  outline: none;
}

.nav-toggle svg {
  height: 24px;
  width: 24px;
  stroke: currentColor;
}

/* ===== Links group ===== */
.nav-links {
  width: 100%;
  flex-grow: 1;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.nav-links.is-open {
  max-height: 500px;
  opacity: 1;
}

.nav-links__list {
  list-style: none;
  margin: 0;
  padding: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
}

.nav-links__list li {
  margin-right: 0px;
}

.nav-links__list a {
  display: inline-block;
  padding: 0.5rem 1rem 0.5rem 0rem;
  color: var(--white-color);
  text-decoration: none;
}

.nav-links__list a:hover {
  color: var(--color-primary-600);
  text-decoration: none;
}


/* ===== Actions group (login/logout) ===== */
.nav-actions {
  width: 100%;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.nav-actions.is-open {
  max-height: 200px;
  opacity: 1;
  padding: 0.5rem 0rem 0.5rem 0rem;
  box-sizing: border-box;
}

.nav-auth__action {
  display: block;
  width: 100%;
  text-align: center;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
}

.nav-auth__action:hover {
  text-decoration: underline;
}

.nav-actions .primary-button {
  width: 100%;
  box-sizing: border-box;
}

/* ===== Responsive (desktop) ===== */
@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    align-items: center;
    width: auto;
    flex: 1;
    max-height: none;
    opacity: 1;
    overflow: visible;
  }

  .nav-links__list {
    padding-top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    width: auto;
    max-height: none;
    opacity: 1;
    overflow: visible;
  }

  .nav-auth__action {
    display: inline-block;
    width: auto;
  }

  .nav-actions .primary-button {
    width: auto;
  }
}
