/* ==========================================================================
   FTW Robotics — Canonical Site Nav
   Single source of truth for nav styling. Linked last in <head> on every page
   so it overrides any stale inline nav CSS. Self-contained: no CSS-variable
   dependency, brand values hardcoded so it renders correctly on any page.
   Source of truth: index.html nav as of June 2026.
   ========================================================================== */

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 80px;
  background: #000000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-logo {
  display: flex; flex-direction: column; line-height: 1; flex-shrink: 0;
}
.nav-logo .ftw-top {
  font-family: 'Montserrat', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; color: #f0f0f0; opacity: 0.7;
  text-transform: uppercase;
}
.nav-logo .ftw-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 0.08em; color: #f0f0f0;
}
.nav-logo .nav-dots { display: flex; gap: 3px; margin-top: 2px; }
.nav-logo .nav-dots span { width: 8px; height: 5px; border-radius: 1px; }
.nav-logo .nav-dots .d1 { background: #B22234; }
.nav-logo .nav-dots .d2 { background: #ffffff; opacity: 0.85; }
.nav-logo .nav-dots .d3 { background: #3C3B6E; }

.nav-links {
  display: flex; gap: 0; list-style: none;
}
.nav-links a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px; font-weight: 400; letter-spacing: 0;
  color: #f0f0f0; text-decoration: none;
  padding: 0.4rem 1.1rem; border-radius: 4px;
  opacity: 1; transition: opacity 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { opacity: 0.8; background: rgba(255,255,255,0.06); }
.nav-links a.active { color: #7ab648; }

/* Dropdown nav */
.nav-links .has-dropdown { position: relative; }
.nav-links .has-dropdown > a { cursor: pointer; }
.nav-links .has-dropdown > a::after {
  content: " \25BE"; margin-left: 4px; font-size: 11px; opacity: 0.7;
}
.dropdown-menu {
  position: absolute; top: 100%; left: 0;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  min-width: 260px;
  padding: 8px 0;
  margin: 8px 0 0; list-style: none;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms, transform 180ms, visibility 180ms;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav-links .has-dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu li { padding: 0; }
.dropdown-menu a {
  display: block; padding: 10px 18px;
  font-size: 14px; white-space: nowrap;
  border-radius: 0;
}
.dropdown-menu a:hover { background: rgba(122,182,72,0.1); color: #7ab648; opacity: 1; }

.nav-cta {
  display: flex; gap: 0.75rem; align-items: center;
}
.nav-cta .shop-btn {
  background: #7ab648; color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: 0;
  padding: 0.6rem 2rem; border-radius: 6px;
  text-decoration: none; transition: background 0.2s;
}
.nav-cta .shop-btn:hover { background: #8dd44e; }
.nav-cta .grants-btn {
  color: rgba(122,182,72,0.9);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px; font-weight: 700;
  padding: 0.5rem 1rem; border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(122,182,72,0.35);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-cta .grants-btn:hover { color: #7ab648; border-color: rgba(122,182,72,0.6); background: rgba(122,182,72,0.08); }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
  background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: #f0f0f0; border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed; top: 80px; left: 0; right: 0;
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 99; padding: 1rem 0;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; }
.mobile-menu ul li a {
  display: block; padding: 0.9rem 2rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px; color: #f0f0f0;
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu ul li:last-child a { border-bottom: none; }
.mobile-menu .mobile-shop {
  display: block; margin: 1rem 2rem;
  background: #7ab648; color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px; font-weight: 700;
  padding: 0.7rem 1.5rem; border-radius: 6px;
  text-decoration: none; text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  nav { height: 70px; padding: 0 1.2rem; }
  .nav-logo img { height: 38px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { top: 70px; }
}
