/* Shared site header. Load after page-specific CSS. */
.site-header,
.page-header,
.topnav,
body > nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100%, 1460px);
  min-height: 74px;
  margin: 0 auto;
  padding: 0 56px;
  box-sizing: border-box;
  background: rgba(2, 8, 20, 0.86);
  border-bottom: 1px solid rgba(57, 132, 255, 0.12);
  backdrop-filter: blur(18px);
}

.site-header > .brand,
.page-header > .brand,
.topnav > .logo,
body > nav > .logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.site-header > .brand .brand-mark,
.page-header > .brand .brand-mark,
.topnav > .logo .brand-icon,
body > nav > .logo .brand-icon {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(39, 143, 255, 0.8));
}

.site-header > .desktop-nav,
.page-header > .main-nav,
.topnav > .nav-links,
body > nav > .nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 2.1vw, 34px);
  flex: 1;
}

.site-header > .desktop-nav a,
.site-header > .desktop-nav button,
.page-header > .main-nav a,
.page-header > .main-nav button,
.topnav > .nav-links a,
.topnav > .nav-links button,
body > nav > .nav-links a,
body > nav > .nav-links button {
  display: inline-flex;
  align-items: center;
  color: #dbe8fb;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease;
}

.site-header > .desktop-nav a:hover,
.site-header > .desktop-nav button:hover,
.page-header > .main-nav a:hover,
.page-header > .main-nav button:hover,
.topnav > .nav-links a:hover,
.topnav > .nav-links button:hover,
body > nav > .nav-links a:hover,
body > nav > .nav-links button:hover,
.nav-dropdown:focus-within > button {
  color: #32a9ff;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  top: 100%;
  height: 18px;
}

.nav-dropdown > button::after {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-menu {
  position: absolute;
  z-index: 120;
  left: 50%;
  top: calc(100% + 16px);
  display: grid;
  min-width: 190px;
  padding: 10px;
  border: 1px solid rgba(79, 148, 247, 0.22);
  border-radius: 8px;
  background: rgba(4, 13, 28, 0.96);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34), 0 0 30px rgba(0, 119, 255, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-menu a {
  justify-content: flex-start;
  padding: 11px 12px !important;
  border-radius: 6px;
  color: #dbe8fb;
  white-space: nowrap;
}

.nav-menu a:hover {
  background: rgba(18, 112, 255, 0.12);
  color: #dbe8fb;
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu,
.nav-dropdown.is-open .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.site-header > .nav-action,
.page-header > .nav-action,
.topnav > .nav-links > .btn-primary,
body > nav > .nav-links > .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 144px;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: linear-gradient(135deg, #0b83ff, #1268ff);
  box-shadow: 0 0 24px rgba(10, 123, 255, 0.28);
  color: #fff;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.site-header > .nav-action:hover,
.page-header > .nav-action:hover,
.topnav > .nav-links > .btn-primary:hover,
body > nav > .nav-links > .btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 860px) {
  .site-header,
  .page-header,
  .topnav,
  body > nav {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-header > .desktop-nav,
  .page-header > .main-nav,
  .topnav > .nav-links > .nav-dropdown,
  body > nav > .nav-links > .nav-dropdown,
  .topnav > .nav-links > a:not(.btn-primary),
  body > nav > .nav-links > a:not(.btn-primary) {
    display: none;
  }

  .site-header > .nav-action,
  .page-header > .nav-action,
  .topnav > .nav-links > .btn-primary,
  body > nav > .nav-links > .btn-primary {
    min-width: auto;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.72rem;
  }
}
