/* ========================================
   HEADER PRINCIPAL - ENERGIA CERTA BRASIL
   CSS para desktop e base do header
   ======================================== */

/* ========================================
   RESET E BASE
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header.hidden {
  transform: translateY(-100%);
}

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

/* ========================================
   LOGO
   ======================================== */
.header .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 2rem;
}

.header .logo img {
  height: 45px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* ========================================
   MENU DE NAVEGAÇÃO DESKTOP
   ======================================== */
.nav-menu {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nav-menu li {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.nav-menu .nav-link {
  display: block;
  color: #374151;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.nav-menu .nav-link:hover {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
  transform: translateY(-1px);
}

.nav-menu .nav-link.active {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  font-weight: 600;
}

/* ========================================
   BOTÃO CTA DESKTOP
   ======================================== */
.cta-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #2e3d6a 0%, #1e2d5a 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(46, 61, 106, 0.3);
  border: none;
  flex-shrink: 0;
  min-width: 200px;
  justify-content: center;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 61, 106, 0.4);
  background: linear-gradient(135deg, #1e2d5a 0%, #0f1d4a 100%);
}

.cta-button i {
  font-size: 1.1rem;
}

/* ========================================
   MENU TOGGLE (HIDDEN NO DESKTOP)
   ======================================== */
.menu-toggle {
  display: none;
}

/* ========================================
   RESPONSIVIDADE DESKTOP
   ======================================== */
@media (max-width: 1200px) {
  .header .container {
    padding: 1rem 1.5rem;
    gap: 1.5rem;
  }
  
  .header .logo {
    margin-right: 1.5rem;
  }
  
  .header .logo img {
    height: 40px;
    max-width: 160px;
  }
  
  .nav-menu .nav-link {
    font-size: 0.9rem;
    padding: 0.625rem 0.875rem;
  }
  
  .cta-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    min-width: 180px;
  }
}

@media (max-width: 1024px) {
  .header .container {
    padding: 0.875rem 1.25rem;
    gap: 1.25rem;
  }
  
  .header .logo {
    margin-right: 1.25rem;
  }
  
  .header .logo img {
    height: 38px;
    max-width: 150px;
  }
  
  .nav-menu .nav-link {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
  
  .cta-button {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    min-width: 160px;
  }
}

@media (max-width: 900px) {
  .header .container {
    padding: 0.75rem 1rem;
    gap: 1rem;
  }
  
  .header .logo {
    margin-right: 1rem;
  }
  
  .header .logo img {
    height: 35px;
    max-width: 140px;
  }
  
  .nav-menu .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.625rem;
  }
  
  .cta-button {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    min-width: 140px;
  }
}

/* ========================================
   BREAKPOINT MOBILE - ESCONDER DESKTOP
   ======================================== */
@media (max-width: 768px) {
  /* Esconder elementos desktop */
  .nav-menu {
    display: none; /* Escondido por padrão, mas o CSS mobile vai sobrescrever */
  }
  
  .cta-button {
    display: none;
  }
  
  /* Mostrar menu toggle */
  .menu-toggle {
    display: flex;
  }
  
  /* Ajustar container para mobile */
  .header .container {
    padding: 0.75rem 1rem;
    gap: 0;
    justify-content: space-between;
  }
  
  .header .logo {
    margin-right: 0;
  }
  
  .header .logo img {
    height: 32px;
    max-width: 140px;
  }
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */
.nav-menu .nav-link:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.cta-button:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

/* ========================================
   ANIMAÇÕES
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  animation: fadeIn 0.5s ease-out;
}

/* ========================================
   ESTADOS ESPECIAIS
   ======================================== */
.header.menu-open {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   UTILITÁRIOS
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

