/**
 * Header & Navigation
 * Header fixo com fundo escuro para contraste em qualquer background
 */

/* ========================================
 Header - Transparente no Hero, Escuro no conteúdo
======================================== */
.site-header {
 position: fixed;
 top: 0;
 left: 0;
 right: 0;
 z-index: var(--z-fixed);
 padding: var(--space-4) 0;
 background: rgba(26, 26, 46, 0.98);
 backdrop-filter: blur(12px);
 -webkit-backdrop-filter: blur(12px);
 transition: all var(--transition-base);
 box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* Header transparente no Hero (apenas na home) - sem nenhum bg */
.site-header.header-transparent {
 background: transparent;
 box-shadow: none;
 backdrop-filter: none;
 -webkit-backdrop-filter: none;
}

/* Header após scroll ou em conteúdo claro - fundo escuro compacto */
.site-header.scrolled,
.site-header.header-solid {
 background: rgba(26, 26, 46, 0.98);
 padding: var(--space-3) 0;
 box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
 backdrop-filter: blur(12px);
 -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.header-logo:hover {
  opacity: 0.9;
  color: var(--color-white);
}

.header-logo img {
  height: 40px;
  width: auto;
}

.header-logo .logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-logo .logo-highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - var(--space-6));
}

.nav-link.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-cta .btn {
  padding: var(--space-2) var(--space-5);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: var(--space-2);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
  }
  
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-secondary);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-8);
    padding: var(--space-8);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    transition: right var(--transition-base);
  }
  
  .header-nav.active {
    right: 0;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: var(--space-2);
    width: 100%;
  }
  
  .nav-link {
    font-size: var(--text-lg);
    padding: var(--space-4);
    width: 100%;
    border-radius: var(--radius-lg);
    text-align: center;
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: rgba(255, 255, 255, 0.08);
  }
  
  .header-cta {
    flex-direction: column;
    width: 100%;
    gap: var(--space-3);
  }
  
  .header-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: calc(var(--z-fixed) - 1);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ========================================
 Páginas Internas - Header sempre sólido
============================================ */
body.internal-page .site-header,
.page-hero ~ .site-header {
 background: rgba(26, 26, 46, 0.98);
 box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}
