/* Shared navigation rendered by routes.js. Keep page-specific styles out of here. */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  background: rgba(2, 8, 23, .84);
  backdrop-filter: blur(12px);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.brand-badge {
  width: 32px;
  height: 38px;
  flex: 0 0 32px;
  display: block;
}

.brand-badge img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-text {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 12px 14px;
  border-radius: 999px;
  color: #dbe8ff;
  font-weight: 600;
  position: relative;
  transition: .25s ease;
}

.nav-links a:hover { color: #fff; }
.nav-links > a.active { color: var(--green); }

.nav-links > a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(20, 230, 110, .5);
}
.nav-cta {
  align-self: center;
  margin-top: 0;
  margin-left: 8px;
}

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border: 0;
  border-radius: 999px;
  color: #dbe8ff;
  background: transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: .25s ease;
}

.nav-dropdown-arrow {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-right: 1.5px solid var(--green);
  border-bottom: 1.5px solid var(--green);
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  transition: transform .2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle,
.nav-dropdown.is-open .nav-dropdown-toggle {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown:focus-within .nav-dropdown-arrow,
.nav-dropdown.is-open .nav-dropdown-arrow {
  transform: rotate(225deg) translate(-1px, -1px);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  width: 260px;
  display: none;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(5, 15, 35, .98);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .35);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu { display: grid; }

.nav-dropdown-menu a {
  display: block;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.nav-dropdown-menu a:hover {
  color: var(--green);
  border-color: rgba(255, 255, 255, .055);
  background: rgba(255, 255, 255, .075);
}

.nav-dropdown-menu a:focus-visible {
  color: #fff;
  border-color: rgba(20, 230, 110, .42);
  background: rgba(255, 255, 255, .085);
  outline: 2px solid rgba(20, 230, 110, .55);
  outline-offset: 1px;
}

.nav-dropdown-menu a[aria-current="page"] {
  color: var(--green);
  border-color: rgba(20, 230, 110, .16);
  background: rgba(20, 230, 110, .075);
}

.nav-dropdown-toggle.is-current { color: var(--green); }

@media (max-width: 1060px) {
  .menu-toggle { display: inline-flex; }

  .nav {
    flex-wrap: wrap;
    padding: 16px 0;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 8px;
  }

  .nav-links.show { display: flex; }

  .nav-dropdown,
  .nav-dropdown-toggle,
  .nav-cta { width: 100%; }

  .nav-dropdown-toggle {
    justify-content: space-between;
    text-align: left;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 4px;
    padding: 5px 8px 7px 18px;
    border: 0;
    border-left: 1px solid rgba(20, 230, 110, .25);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.is-open .nav-dropdown-menu { display: grid; }

  .nav-cta {
    margin-top: 8px;
    margin-left: 0;
  }
}
