/* =============================================
   10-HEADER — CABEÇALHO/NAVEGAÇÃO + MENU MÓVEL
   - Header fixo com brilho neon
   - Navegação desktop + estados de link
   - Menu lateral mobile e overlay
============================================= */

/* -- Header fixo com glow -- */
header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  backdrop-filter: blur(5px);
  background: rgba(0,180,255,0.2);
  border-bottom: 0.22vw solid var(--primary-color);
  color: #fff;
  box-shadow: 0 0 0.5vw rgba(0,180,255,0.4);
  padding: 0.9rem 0;
  transition: all 0.3s ease;
  animation: pulseMenu 2s ease-in-out infinite;
}
@keyframes pulseMenu {
  0% { box-shadow: 0 0 5px var(--primary-color); }
  50% { box-shadow: 0 0 20px var(--primary-color); }
  100% { box-shadow: 0 0 5px var(--primary-color); }
}

/* -- Layout do nav (desktop) -- */
nav { display: flex; justify-content: space-between; align-items: center; }

/* -- Marca / Logo animada -- */
.logo {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 700; color: inherit; text-decoration: none;
  position: relative;
  animation: pulseLogo 1.8s ease-in-out infinite;
  transition: transform .2s ease, color .3s ease;
}
.logo:hover { transform: scale(1.08); color: var(--primary-color); }
@keyframes pulseLogo {
  0% { text-shadow: 0 0 4px var(--primary-color); }
  50% { text-shadow: 0 0 12px var(--primary-color); }
  100% { text-shadow: 0 0 4px var(--primary-color); }
}

/* -- Grupo de itens da direita -- */
.nav-items { display: flex; align-items: center; gap: .8rem; }

/* -- Links do menu desktop -- */
.nav-links { display: flex; gap: clamp(.8rem, 2vw, 1.8rem); }
.nav-link {
  color: inherit; text-decoration: none; font-weight: 500;
  font-size: clamp(.9rem, 2.4vw, 1rem);
  position: relative; transition: color .3s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 0%; height: 2px;
  background-color: var(--primary-color); transition: width .3s ease;
}
.nav-link:hover { color: var(--primary-color); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { font-weight: 600; color: var(--primary-color); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 2px;
  background: var(--primary-color); animation: pulseGlow 1.5s ease-in-out infinite; border-radius: 2px;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 4px var(--primary-color); opacity: .6; }
  50% { box-shadow: 0 0 12px var(--primary-color); opacity: 1; }
  100% { box-shadow: 0 0 4px var(--primary-color); opacity: .6; }
}

/* -- Botões do topo -- */
.theme-btn, .mobile-menu-btn {
  background: none; border: none; color: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
}
.mobile-menu-btn { display: none; font-size: 1.4rem; }

/* -- Menu lateral (mobile) -- */
.mobile-nav {
  position: fixed; top: 0; right: -100%; width: 75%; max-width: 400px; height: 100vh;
  background-color: var(--dark-bg);
  box-shadow: -5px 0 15px rgba(0, 180, 255, 0.15);
  z-index: 999; transition: right .3s ease, box-shadow .3s ease;
  padding: clamp(4rem, 12vw, 6rem) clamp(1.5rem, 4vw, 2rem) 2rem;
  display: flex; flex-direction: column; gap: 1.2rem; overflow-y: auto;
}
.mobile-nav.active { right: 0; box-shadow: -5px 0 25px rgba(0, 180, 255, 0.4); }
.mobile-nav a {
  color: var(--secondary-color); text-decoration: none; font-weight: 500;
  font-size: clamp(1rem, 3vw, 1.1rem); padding: .5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color .3s ease, box-shadow .3s ease; position: relative;
}
.mobile-nav a:hover { color: var(--primary-color); box-shadow: 0 2px 0 rgba(0,180,255,.6); }
.mobile-nav a.active { color: var(--primary-color); font-weight: 600; }
.mobile-nav a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 30px; height: 2px; background: var(--primary-color); border-radius: 2px;
}

/* -- Overlay escuro (menu aberto) -- */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 998; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.overlay.active { opacity: 1; visibility: visible; }

/* -- Responsividade do header/menu -- */
@media (max-width: 1024px) {
  .mobile-menu-btn { display: inline-flex; }
  nav .nav-links { display: none; }
}
