/* Shared header. Edit this file to change the menu on every page. */

#site-nav {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, .25);
  backdrop-filter: blur(10px);
  z-index: 10;
}

#site-nav .nav-inner {
  max-width: var(--maxw, 1080px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  position: relative;
}

#site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

#site-nav .brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

#site-nav .brand span {
  font-weight: 700;
  letter-spacing: .2px;
}

#site-nav .links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

#site-nav .links a {
  color: #fff;
  text-decoration: none;
  opacity: .9;
}

#site-nav .links a:hover {
  text-decoration: underline;
  opacity: 1;
}

#site-nav .links a.active {
  opacity: 1;
  font-weight: 700;
}

#site-nav .menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

#site-nav .menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
  border-radius: 2px;
}

#site-nav .menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

#site-nav .menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

#site-nav .menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 600px) {
  #site-nav .menu-toggle {
    display: flex;
  }

  #site-nav .links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 12px;
    gap: 0;
    font-size: 18px;
    z-index: 1000;
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  #site-nav .links a {
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(92, 35, 169, 0.25), rgba(18, 24, 72, 0.25));
    border: 1px solid rgba(92, 35, 169, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    font-weight: 500;
    margin-bottom: 8px;
  }

  #site-nav .links a:last-child {
    margin-bottom: 0;
  }

  #site-nav .links a:hover,
  #site-nav .links a:active {
    background: linear-gradient(135deg, rgba(92, 35, 169, 0.4), rgba(18, 24, 72, 0.4));
    border-color: rgba(92, 35, 169, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 35, 169, 0.3);
    text-decoration: none;
  }

  #site-nav .links a.active {
    background: linear-gradient(135deg, rgba(92, 35, 169, 0.35), rgba(18, 24, 72, 0.35));
    border-color: rgba(92, 35, 169, 0.6);
    box-shadow: 0 0 0 2px rgba(92, 35, 169, 0.2);
  }

  #site-nav .links.active {
    display: flex;
  }
}
