/**
 * AGÊNCIA 2E — HEADER.CSS v1.1
 *
 * Componente global — carregado de forma assíncrona em TODAS as páginas:
 *   index.html · google-meu-negocio.html · consultoria.html
 *   trafego-pago.html · contato.html
 *
 * Injetado via: <link rel="preload" as="style" onload="this.onload=null;this.rel='stylesheet'">
 *
 * CONTEÚDO:
 *   1. .header — posição fixa, glassmorphism, compacto ao scroll
 *   2. .header-container — layout interno
 *   3. .logo
 *   4. .nav (desktop) — links + estados hover / aria-current
 *   5. .nav-cta — botão CTA do header
 *   6. .menu-toggle — hamburguer mobile
 *   7. .nav-mobile — menu dropdown mobile
 *   8. Media queries (tablet 768px)
 */


/* ============================================================
   1. HEADER — fixo, fundo escuro com glassmorphism sutil
   ============================================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borda-sutil);
  padding: 16px 0;
  transition: padding 0.3s ease;
}

/* Header compacto ao rolar (classe adicionada pelo components.js) */
.header.scrolled {
  padding: 10px 0;
}


/* ============================================================
   2. HEADER-CONTAINER — layout interno
   ============================================================ */

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* ============================================================
   3. LOGO
   ============================================================ */

.logo {
  height: 38px;
  width: auto;
  flex-shrink: 0;
}


/* ============================================================
   4. NAV DESKTOP
   Oculto em mobile, visível em tablet+ (ver media query)
   ============================================================ */

.nav {
  display: none;
  gap: 28px;
  align-items: center;
}

.nav a {
  color: var(--cinza-claro);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

/* Underline animado ao hover */
.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--roxo-neon);
  transition: width 0.3s ease;
}

.nav a:hover {
  color: var(--roxo-neon);
}

.nav a:hover::after {
  width: 100%;
}

/* Link ativo — página atual (marcado via aria-current pelo components.js) */
.nav a[aria-current="page"] {
  color: var(--roxo-neon);
}

.nav a[aria-current="page"]::after {
  width: 100%;
}


/* ============================================================
   5. NAV-CTA — botão de conversão no header desktop
   ============================================================ */

.nav-cta {
  background: linear-gradient(135deg, var(--roxo-primario), var(--roxo-escuro));
  color: var(--branco) !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 700 !important;
  transition: box-shadow 0.3s ease, transform 0.2s ease !important;
}

.nav-cta:hover {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

/* Remove o underline animado do .nav-cta */
.nav-cta::after {
  display: none !important;
}


/* ============================================================
   6. MENU-TOGGLE — hamburguer mobile
   ============================================================ */

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--branco);
  border-radius: 2px;
  transition: all 0.3s ease;
}


/* ============================================================
   7. NAV-MOBILE — menu dropdown
   Ativado pela classe .active (via components.js)
   Todos os links têm visual uniforme — sem estilo de botão no último item
   ============================================================ */

.nav-mobile {
  display: none;
  flex-direction: column;
  background: rgba(10, 10, 10, 0.98);
  border-top: 1px solid var(--borda-sutil);
  padding: 16px 24px 20px;
  gap: 0;
}

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

.nav-mobile a {
  color: var(--cinza-claro);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--borda-sutil);
  transition: color 0.2s ease;
}

/* Último item — sem borda inferior (todos os links mobile têm visual uniforme) */
/* .nav-mobile a:last-child {
  border-bottom: none;
}

.nav-mobile a:hover {
  color: var(--roxo-neon);
} */

/* Link ativo no menu mobile */
/* .nav-mobile a[aria-current="page"] {
  color: var(--roxo-neon);
} */


/* ============================================================
   8. MEDIA QUERIES
   ============================================================ */

@media (min-width: 768px) {

  /* Nav desktop visível, hamburguer some */
  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

}
