/* ==========================================================================
   NAVBAR — cobre os dois padrões de marcação usados no site:
   nav clássica (index/produtos: .nav-hamburger, z-index 100, logo 44px) e
   nav compacta (solucoes/empresa/contato: .nav-hbg, z-index 200, logo 44px)
   ========================================================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 70px;
  background: rgba(5, 13, 26, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 207, 255, 0.15);
}

body.light-theme nav {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 153, 204, 0.22);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo img,
.logo-core,
footer .nav-logo img {
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 10px rgba(0, 207, 255, 0.4),
    0 0 30px rgba(0, 207, 255, 0.2),
    0 0 60px rgba(240, 165, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-logo img:hover,
.logo-core:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 20px rgba(0, 207, 255, 0.7),
    0 0 50px rgba(0, 207, 255, 0.3),
    0 0 80px rgba(240, 165, 0, 0.2);
}

.nav-logo img {
  height: 44px;
  width: 44px;
}

.nav-brand {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #fff 40%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

body.light-theme .nav-brand {
  background: linear-gradient(135deg, #071321 38%, var(--gold));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s;
  position: relative;
}

body.light-theme .nav-links a {
  color: #334D68;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--electric);
  transition: right 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--electric);
}

body.light-theme .nav-links a:hover,
body.light-theme .nav-links a.active {
  color: var(--electric-dim);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  right: 0;
  box-shadow: var(--glow-blue);
}

/* ── Hamburger (aceita tanto .nav-hamburger quanto .nav-hbg) ── */
.nav-hamburger,
.nav-hbg {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

nav .nav-hamburger,
nav .nav-hbg {
  position: relative;
  z-index: 310;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger span,
.nav-hbg span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--electric);
  transition: all 0.3s;
}

.nav-hamburger.open span:nth-child(1),
.nav-hbg.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2),
.nav-hbg.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3),
.nav-hbg.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Menu mobile overlay ── */
.nav-mobile {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 260;
  background: rgba(5, 13, 26, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  max-height: calc(100dvh - 70px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-mobile.open {
  display: flex;
}

body.light-theme .nav-mobile {
  background: rgba(255, 255, 255, 0.98);
}

.nav-mobile a {
  color: var(--white);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  transition: color 0.2s;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.nav-mobile a.active,
.nav-mobile a:hover {
  color: var(--electric);
}

body.light-theme .nav-mobile a {
  color: #334D68;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger,
  .nav-hbg {
    display: flex;
  }

  .nav-logo img {
    height: 38px;
    width: 38px;
  }

  .nav-mobile {
    padding: 24px;
  }

  .nav-mobile a {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-logo img {
    height: 32px;
    width: 32px;
  }
}
