/* StarAPI Nav Bar Fix v3
   1) Floating glass card header — restyled to match site palette (teal + cream)
   2) Desktop: 3-column grid layout, nav menu perfectly centered
   3) Desktop menu: teal hover / gradient active pills, teal CTA for login
   4) Mobile fullscreen menu overlay styling (lives at app root, NOT inside header)
   Injected via Nginx sub_filter on all pages. */

/* ===== 1. Header: fully transparent, full-width, flush with top ===== */
header div[class*="pointer-events-auto"][class*="mx-auto"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  border-radius: 0 !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}
html.dark header div[class*="pointer-events-auto"][class*="mx-auto"],
.dark header div[class*="pointer-events-auto"][class*="mx-auto"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* ===== 2. Desktop: brand left, menu pushed to the right ===== */
/* columns: brand | spacer(1fr) | menu | actions — menu hugs the right edge next to actions */
@media (min-width: 768px) {
  header div[class*="pointer-events-auto"] > nav {
    display: grid !important;
    grid-template-columns: auto 1fr auto auto !important;
    align-items: center !important;
  }
  header nav > div:nth-child(1) { grid-column: 1 !important; }
  header nav > div:nth-child(2) {
    grid-column: 3 !important;
    justify-self: end !important;
    gap: 3px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    background: rgba(13, 148, 136, 0.06) !important;
    border: 1px solid rgba(13, 148, 136, 0.12) !important;
  }
  html.dark header nav > div:nth-child(2) {
    background: rgba(20, 184, 166, 0.08) !important;
    border-color: rgba(20, 184, 166, 0.16) !important;
  }
  header nav > div:nth-child(3) { grid-column: 4 !important; justify-self: end !important; }
}

/* ===== 3. Desktop menu items: teal pills ===== */
header nav > div:nth-child(2) > a {
  white-space: nowrap !important;
  flex: none !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
  transition: background 0.18s ease, color 0.18s ease !important;
}
header nav > div:nth-child(2) > a:hover {
  background: rgba(13, 148, 136, 0.10) !important;
  color: #0f766e !important;
}
html.dark header nav > div:nth-child(2) > a:hover {
  background: rgba(20, 184, 166, 0.15) !important;
  color: #5eead4 !important;
}
/* active page: teal gradient pill */
header nav > div:nth-child(2) > a[aria-current="page"],
header nav > div:nth-child(2) > a[data-status="active"] {
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}
/* login CTA (last item of the desktop menu) */
header nav > div:nth-child(2) > :last-child:not(div) {
  padding: 6px 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.30);
  transition: filter 0.18s ease !important;
}
header nav > div:nth-child(2) > :last-child:not(div):hover {
  filter: brightness(1.08) !important;
}

/* ===== 4. Desktop menu: prevent squeeze (kept from v2) ===== */
header nav > div[class*="hidden"][class*="lg:flex"] > a {
  white-space: nowrap !important;
  flex: none !important;
}

/* ===== 5. Mobile fullscreen menu overlay (app root, z-40) ===== */
/* content column: start below the floating header card */
div[class*="bg-background/98"] > div[class*="justify-between"] {
  padding: 88px 24px 36px !important;
}
/* menu list */
div[class*="bg-background/98"] nav[class*="flex-col"] {
  gap: 6px !important;
  width: 100% !important;
}
/* menu items: card-like rows, text centered */
div[class*="bg-background/98"] nav[class*="flex-col"] > a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 13px 18px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  background: rgba(15, 23, 42, 0.035);
  transition: background 0.15s ease;
}
div[class*="bg-background/98"] nav[class*="flex-col"] > a:hover {
  background: rgba(13, 148, 136, 0.12) !important;
}
html.dark div[class*="bg-background/98"] nav[class*="flex-col"] > a {
  background: rgba(255, 255, 255, 0.05);
}
html.dark div[class*="bg-background/98"] nav[class*="flex-col"] > a:hover {
  background: rgba(20, 184, 166, 0.18) !important;
}
/* mobile overlay: login CTA -> teal gradient (match site palette) */
div[class*="bg-background/98"] a[class*="bg-foreground"][class*="text-background"] {
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.30);
}
