/* ============================================
   NEXUS IDEAS — HEADER
   Estilo Apple: sempre sólido, encolhe no scroll
   Mobile First — zero gambiarras
   ============================================ */

/* Altura dinâmica do header — atualizada via JS */
:root {
  --header-height: 80px;
}

/* --- BASE MOBILE --- */
.nexus-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(250, 249, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(53, 37, 35, 0.06);
  padding: 1rem 0;
  transition: padding 0.3s ease, border-color 0.3s ease;
}

.admin-bar .nexus-header {
  top: 46px;
}

/* Header encolhido no scroll */
.nexus-header.scrolled {
  padding: 0.625rem 0;
  border-bottom-color: rgba(53, 37, 35, 0.1);
}

/* --- INNER --- */
.nexus-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* --- LOGO --- */
.nexus-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nexus-logo-img {
  width: 130px;
  height: auto;
  display: block;
  transition: width 0.3s ease;
}

.nexus-header.scrolled .nexus-logo-img {
  width: 110px;
}

.nexus-header__logo-text {
  font-family: var(--fonte-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--nexus-escuro);
}

/* --- NAV DESKTOP --- */
.nexus-header__nav {
  display: none;
  flex: 1;
  justify-content: center;
}

.nexus-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nexus-nav__list li a {
  font-family: var(--fonte-corpo);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--nexus-escuro);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: 0.375rem 0.75rem;
  border-radius: 980px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nexus-nav__list li a:hover {
  background-color: rgba(53, 37, 35, 0.06);
  color: var(--nexus-escuro);
}

.nexus-nav__list li.current-menu-item a {
  color: var(--nexus-laranja);
}

/* --- ACTIONS --- */
.nexus-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Botão CTA — escondido no mobile */
.nexus-header__cta {
  display: none;
  font-family: var(--fonte-corpo);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  background-color: var(--nexus-escuro);
  padding: 0.5rem 1.125rem;
  border-radius: 980px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nexus-header__cta:hover {
  background-color: var(--nexus-laranja);
  color: #fff;
  transform: scale(1.02);
}

/* --- HAMBURGUER --- */
.nexus-header__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.nexus-header__toggle:hover {
  background-color: rgba(53, 37, 35, 0.06);
}

.nexus-header__toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background-color: var(--nexus-escuro);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Hamburguer → X */
.nexus-header__toggle.aberto span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nexus-header__toggle.aberto span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nexus-header__toggle.aberto span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- MENU MOBILE --- */
.nexus-mobile-menu {
  position: fixed;
  inset: 0;
  background-color: var(--nexus-off-white);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nexus-mobile-menu.aberto {
  opacity: 1;
  visibility: visible;
}

.nexus-mobile-menu__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.nexus-mobile-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nexus-mobile-nav__list li a {
  display: block;
  font-family: var(--fonte-display);
  font-size: clamp(2.25rem, 9vw, 4rem);
  font-weight: 300;
  color: var(--nexus-escuro);
  text-decoration: none;
  padding: 0.25rem 2rem;
  transition: color 0.2s ease;
  letter-spacing: -0.01em;
}

.nexus-mobile-nav__list li a:hover {
  color: var(--nexus-laranja);
}

.nexus-mobile-cta {
  font-family: var(--fonte-corpo);
  font-size: var(--texto-sm);
  font-weight: 500;
  color: var(--nexus-laranja);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--nexus-laranja);
  padding-bottom: 0.25rem;
  transition: opacity 0.2s ease;
}

.nexus-mobile-cta:hover {
  opacity: 0.7;
}

/* --- COMPENSAR HEADER FIXO --- */
.nexus-home .hero-inner {
  padding-top: 4.5rem;
}

/* --- PÁGINAS COM CONTEÚDO --- */
.nexus-sobre.site-main,
.nexus-contato.site-main,
.nexus-blog.site-main {
  padding-top: var(--header-height);
}

/* --- DESKTOP --- */
@media (min-width: 1024px) {
  .admin-bar .nexus-header {
    top: 32px;
  }

  .nexus-header {
    padding: 1.25rem 0;
  }

  .nexus-header.scrolled {
    padding: 0.5rem 0;
  }

  .nexus-header__nav {
    display: flex;
  }

  .nexus-header__cta {
    display: inline-flex;
    align-items: center;
  }

  .nexus-header__toggle {
    display: none;
  }

  .nexus-home .hero-inner {
    padding-top: 7rem;
  }
}