/* =========================================================================
   HEADER — Reutilizável em todas as páginas
   Vidal Gestão Tributária
   ========================================================================= */

#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--color-navy-dark);
  transition: background var(--transition-normal),
              box-shadow var(--transition-normal),
              backdrop-filter var(--transition-normal);
}

/* Admin bar do WordPress (apenas quando logado) */
.admin-bar #site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar #site-header {
    top: 46px;
  }
}

#site-header.scrolled {
  background: rgba(7, 30, 43, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 32px rgba(0, 0, 0, 0.4);
}

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

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

.logo img {
  width: 120px;
  height: auto;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.04em;
}

.logo-tagline {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* === MENU DESKTOP === */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  flex: 1;
  margin: 0 auto;
  justify-content: center;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition-normal);
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-gold);
  transition: width var(--transition-normal);
}

.nav-links a:hover {
  color: var(--color-gold);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--color-gold);
}

.header-cta {
  padding: 10px 22px;
  font-size: 13.5px;
  white-space: nowrap;
}

/* === HAMBURGER === */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === MOBILE MENU === */
.mobile-nav {
  display: none;
  background: var(--color-navy-dark);
  padding: 20px 24px 28px;
  border-top: 1px solid rgba(230, 191, 121, 0.15);
  flex-direction: column;
  gap: 0;
}

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

.mobile-nav a {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color var(--transition-normal);
  text-decoration: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--color-gold);
}

.mobile-nav .btn {
  display: block;
  text-align: center;
  margin-top: 20px;
  padding: 13px;
  border-bottom: none;
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    transition: max-height var(--transition-slow);
  }

  .admin-bar .mobile-nav {
    top: 72px;
  }

  .mobile-nav.open {
    max-height: 500px;
    overflow-y: auto;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

  .logo img {
    width: 100px;
  }

  .header-cta {
    padding: 8px 16px;
    font-size: 12.5px;
  }
}
