/* ===== HEADER ISOLADO - SEM CONFLITOS ===== */

/* AJUSTE DO SCROLL PADDING PARA LINKS ÂNCORA */
html {
  scroll-padding-top: 140px;
  scroll-behavior: smooth;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(11, 15, 23, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  height: 120px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(11, 15, 23, 0.95);
  backdrop-filter: blur(15px);
  border-bottom-color: rgba(0, 229, 255, 0.1);
  height: 80px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Container do Header */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* Navegação do Header */
.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  width: 100%;
}

/* ESTILOS DA LOGO DO HEADER */
.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.02);
}

.header-logo-img {
  height: 138px;
  width: auto;
  transition: transform 0.3s ease;
  margin-left: -10px;
}

.header-logo-img:hover {
  transform: scale(1.05);
}

.header-logo-mark {
  display: inline-block;
  font-weight: 800;
  letter-spacing: .06em;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 20px;
}

/* Fallback para quando a imagem não carrega */
.header-logo:has(.header-logo-img) .header-logo-mark {
  display: none;
}

.header-logo:not(:has(.header-logo-img)) .header-logo-mark {
  display: inline-block;
}

/* MENU DESKTOP DO HEADER */
.header-menu {
  display: none;
  gap: 18px;
  margin: 0 auto;
}

.header-menu-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  position: relative;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.header-menu-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.header-menu-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.header-menu-link:hover::after {
  transform: scaleX(1);
}

/* AÇÕES DO MENU DESKTOP DO HEADER */
.header-menu-actions {
  display: none;
  gap: 12px;
  align-items: center;
  margin-right: -8px;
}

/* TOGGLE MENU MOBILE DO HEADER */
.header-menu-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  transition: all 0.3s ease;
  cursor: pointer;
}

.header-menu-toggle:hover {
  border-color: rgba(0, 229, 255, 0.25);
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.05);
}

/* PANEL MOBILE DO HEADER */
.header-mobile-panel {
  position: fixed;
  top: 120px;
  left: 0;
  right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  display: none;
  backdrop-filter: blur(10px);
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}

.header-mobile-panel.open {
  display: block;
  transform: translateY(0);
  opacity: 1;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-mobile-link {
  display: block;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
}

.header-mobile-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
}

.header-mobile-panel .btn {
  margin: 12px 16px;
  width: calc(100% - 32px);
  justify-content: center;
}

/* Linha Divisória do Header */
.header-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  margin: 0;
  opacity: 0.3;
  width: 100%;
}

/* BOTÕES (apenas os específicos do header) */
.header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.header .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.25);
}

.header .btn-cta {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #00141c;
  border: 0;
  font-weight: 700;
}

.header .btn-cta:hover {
  box-shadow: 0 8px 20px rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}

/* Ajuste para tablets */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 100px;
  }
  
  .header {
    height: 80px;
  }
  
  .header-logo-img {
    height: 120px;
  }
  
  .header-nav {
    height: auto;
    gap: 10px;
  }
  
  .header-mobile-panel {
    top: 80px;
  }
  
  .header .btn {
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }
  
  .header-menu-toggle {
    height: 36px;
    width: 36px;
  }
  
  .header-container {
    padding: 0 12px;
  }
}

/* Ajuste para mobile pequeno */
@media (max-width: 480px) {
  html {
    scroll-padding-top: 90px;
  }
  
  .header {
    height: 70px;
  }
  
  .header-logo-img {
    height: 96px;
  }
  
  .header-nav {
    height: auto;
    gap: 8px;
  }
  
  .header-mobile-panel {
    top: 70px;
  }
  
  .header-menu-toggle {
    height: 34px;
    width: 34px;
  }
  
  .header-container {
    padding: 0 12px;
  }
}

/* Desktop Styles */
@media (min-width: 900px) {
  .header-menu {
    display: flex;
  }
  
  .header-menu-actions {
    display: flex;
  }
  
  .header-menu-toggle {
    display: none;
  }
  
  .header-mobile-panel {
    display: none !important;
  }
  
  .header-nav {
    gap: 24px;
  }
  
  .header-menu {
    margin: 0 auto;
  }
}

/* Ajustes para telas muito grandes */
@media (min-width: 1200px) {
  .header-nav {
    gap: 32px;
  }
  
  .header-menu {
    gap: 24px;
  }
  
  .header-menu-link {
    font-size: 15px;
  }
  
  .header-container {
    padding: 0 24px;
  }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .header,
  .header-logo,
  .header-logo-img,
  .header-menu-link,
  .header .btn,
  .header-menu-toggle,
  .header-mobile-panel {
    transition: none;
  }
  
  .header-mobile-panel.open {
    animation: none;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Foco visível para acessibilidade */
.header-logo:focus,
.header-menu-link:focus,
.header .btn:focus,
.header-menu-toggle:focus,
.header-mobile-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Estado ativo para links */
.header-menu-link.active {
  color: var(--primary);
}

.header-menu-link.active::after {
  transform: scaleX(1);
}