header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(32, 55, 127, 0.08);
}

.menu-barra {
  display: block;
  width: 20px;
  height: 1px;
  background-color: white;
  transition: all 0.3s ease;
}

.mobile-cta {
  display: none;
}

.menu-toggle.active .menu-barra:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .menu-barra:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .menu-barra:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

.mobile-nav {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  min-height: 74px;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo img {
  height: 50px;
  width: auto;
}
.logo-text strong {
  display: block;
  font-size: 1rem;
  color: var(--azul-escuro);
}
.logo-text span {
  display: block;
  font-size: 0.82rem;
  color: var(--texto-suave);
}

/* BOTÃO MENU (Sempre visível) */
.menu-toggle {
  display: flex !important; /* Força aparecer */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 14px;
  background: #3a51a1;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

/* DRAWER (O Menu que abre) */
.mobile-drawer {
  display: block !important; /* Sempre bloco, mas altura 0 */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
  background: #fff;
}

.mobile-drawer.open {
  max-height: 600px;
}

.mobile-nav {
  display: grid;

  grid-auto-flow: column;
  grid-auto-columns: 1fr;

  gap: 10px;
  padding: 15px;
  width: 100%;
  overflow-x: auto; /* Caso tenha muitos itens, permite scroll horizontal */
}

.mobile-nav a {
  text-align: center;
  white-space: nowrap;
  padding: 10px 5px;
  background: #f4f4f4;
  text-decoration: none;
  font-size: 14px;
}

@media (min-width: 761px) {
  .mobile-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mobile-nav a {
  font-weight: 700;
  color: var(--azul-escuro);
  padding: 12px;
  background: #f4f7ff;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
}

/* ESCONDE A NAV ANTIGA DEFINITIVAMENTE */
.desktop-nav {
  display: none !important;
}

/* CTA */
.header-cta {
  display: inline-flex !important;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Ajustes Mobile */
@media (max-width: 760px) {
  .logo img {
    height: 40px;
  }
  .logo-text span {
    display: none;
  }
  .header-cta {
    font-size: 0.8rem;
    padding: 8px 12px;
  }
}

.mobile-cta {
  display: none;
}

@media (max-width: 760px) {
  .header-cta {
    display: none !important;
  }

  .mobile-cta {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .mobile-drawer {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
  }

  .mobile-drawer.open {
    max-height: 600px;
  }

  .mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
  }

  .mobile-nav a {
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    width: 100%;
    display: block;
  }
}
