/* ════════════════════════════════════════════════════════
   HEADER + MENU MOBILE
════════════════════════════════════════════════════════ */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  padding: 1.1rem var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* fundo sempre presente — sem ele o header some no hero escuro no mobile */
  background: rgba(6, 8, 16, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-mid), backdrop-filter var(--transition-mid),
              border-color var(--transition-mid);
}

.header.scrolled {
  background: rgba(6, 8, 16, 0.92);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--color-border);
}

/* ── Logo ── */
.header-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 2;
}

/* ── Nav desktop ── */
.header-nav {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.header-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.header-nav a:hover { color: var(--color-white); }

.header-nav .btn-nav {
  background: var(--grad-accent);
  color: var(--color-white);
  padding: var(--space-sm) 1.3rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}
.header-nav .btn-nav:hover { opacity: 0.88; }

/* ════════════════════════════════════════════════════════
   BOTÃO HAMBÚRGUER
════════════════════════════════════════════════════════ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0 9px;
  position: relative;
  z-index: calc(var(--z-header) + 2);
  transition: background var(--transition-fast);
}
.hamburger:hover { background: rgba(255,255,255,0.1); }

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* hambúrguer vira X quando sidebar está aberta */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════
   OVERLAY
════════════════════════════════════════════════════════ */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: calc(var(--z-header) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ════════════════════════════════════════════════════════
   SIDEBAR MOBILE
════════════════════════════════════════════════════════ */

.sidebar {
  position: fixed;
  top: 0; right: 0;
  width: min(300px, 85vw);
  height: 100dvh;
  background: #0d1120;
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: var(--z-header);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.6);
}
.sidebar.active { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--color-white);
}

.sidebar-close {
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.sidebar-close:hover { background: rgba(255,255,255,0.12); color: var(--color-white); }

.sidebar-menu {
  display: flex;
  flex-direction: column;
  padding: var(--space-md) 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.95rem var(--space-xl);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 1rem;
  font-family: var(--font-body);
  border-left: 3px solid transparent;
  transition: color var(--transition-fast), background var(--transition-fast),
              border-color var(--transition-fast);
  cursor: pointer;
  background: none;
  border-top: none; border-right: none; border-bottom: none;
  width: 100%;
  text-align: left;
}
.sidebar-link:hover {
  color: var(--color-white);
  background: rgba(255,255,255,0.04);
  border-left-color: var(--color-accent);
}

/* botão WhatsApp no fim da sidebar */
.sidebar-link-whatsapp {
  margin: auto var(--space-xl) var(--space-xl);
  justify-content: center;
  background: var(--color-whatsapp);
  color: var(--color-white) !important;
  border-radius: var(--radius-md);
  border-left-color: transparent !important;
  font-weight: 500;
  margin-top: auto;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.sidebar-link-whatsapp:hover {
  background: var(--color-whatsapp) !important;
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── Responsivo ── */
@media (max-width: 680px) {
  .header-nav { display: none; }
  .hamburger  { display: flex; }
}

/* trava o scroll do body quando sidebar está aberta */
body.sidebar-open { overflow: hidden; }
