/* ===========================
   BWB Noir — NAV & MENU
   =========================== */

/* HEADER: fundo preto, conteúdo centralizado */
.bwb-site-header {
  background: #000000;
  color: #ffffff;
  padding: 0.85rem 1rem;
  position: relative;
  /* importante */
  z-index: 1000;
  /* fica acima do hero */
}

.bwb-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* NAV container */
.bwb-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Botão hamburguer (esconde no desktop) */
.bwb-nav-toggle {
  display: none;
  /* mobile-only, via media query */
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.bwb-nav-toggle-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

/* Barras do ícone hamburguer */
.bwb-nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.bwb-nav-toggle-bars span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

/* RESET básico da lista */
.menu-items,
.menu-items ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* MENU principal (desktop) */
.menu-items {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Itens principais */
.menu-items>li {
  position: relative;
}

/* Links principais */
.menu-items>li>a {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  text-decoration: none;
  color: #ffffff;
  line-height: 1.2;
  transition:
    background-color 0.5s ease,
    color 0.15s ease,
    box-shadow 0.5s ease;
}

/* Hover/focus: fundo branco, texto escuro */
.menu-items>li>a:hover,
.menu-items>li>a:focus-visible {
  background-color: #ffffff;
  color: #111111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* SUBMENU (dropdown) */
.menu-items .sub-menu {
  position: absolute;
  top: 80%;
  left: auto;
  right: 0;
  min-width: 220px;
  max-width: 100vw;
  background: #000000;
  color: #f7f7f7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0;
  margin-top: 0.35rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

/* Links de submenu */
.menu-items .sub-menu li a {
  display: block;
  padding: 0.45rem 0.9rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
  transition:
    background-color 0.5s ease,
    color 0.15s ease;
}

/* Hover submenu: fundo branco, texto escuro */
.menu-items .sub-menu li a:hover,
.menu-items .sub-menu li a:focus-visible {
  background: #ffffff;
  color: #111111;
}

/* Mostrar dropdown em hover/focus/teclado (desktop) */
.menu-items li:hover>.sub-menu,
.menu-items li:focus-within>.sub-menu,
.menu-items li[aria-expanded="true"]>.sub-menu {
  display: block;
}

/* Submenu de segundo nível abre “pra dentro” */
.menu-items .sub-menu .sub-menu {
  top: 0;
  left: auto;
  right: 100%;
  margin-top: 0;
}

#menu-main-menu li {
  background: #000000;
  transition:
    background-color 0.5s ease,
    color 0.15s ease;
}

#menu-main-menu li:hover {
  background: #ffffff;
  color: #111111;
  transition:
    background-color 0.5s ease,
    color 0.15s ease;
}

/* ===========================
   MOBILE
   =========================== */

@media (max-width: 768px) {

  .bwb-header-inner {
    justify-content: space-between;
  }

  .bwb-nav {
    width: 100%;
  }

  /* Mostra botão hamburguer */
  .bwb-nav-toggle {
    display: inline-flex;
  }

  /* Container do menu vira dropdown abaixo do header */
  .bwb-nav-container {
    position: absolute;
    inset: 100% 0 auto 0;
    background: #000000;
    padding: 0.75rem 1rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  /* Menu em coluna, alinhado à esquerda */
  .menu-items {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .menu-items>li>a {
    width: 100%;
    padding: 0.6rem 0.8rem;
  }

  /* Submenus no mobile: posicionamento estático, abaixo do item pai */
  .menu-items .sub-menu {
    position: static;
    min-width: 0;
    max-width: none;
    border: none;
    box-shadow: none;
    padding: 0.25rem 0 0.4rem;
    margin: 0 0 0.25rem 0.5rem;
    display: none;
    /* ainda controlado via JS/ARIA */
  }

  .menu-items .sub-menu li a {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }

  @media (max-width: 768px) {

    /* Estado inicial: oculto, mas animável */
    .bwb-nav-container {
      opacity: 0;
      transform: translateY(-10px);
      max-height: 0;
      overflow: hidden;
      transition:
        opacity 0.45s ease,
        transform 0.45s ease,
        max-height 0.45s ease;
    }

    /* Quando o menu está aberto */
    .bwb-nav.is-open .bwb-nav-container {
      opacity: 1;
      transform: translateY(0);
      max-height: 500px;
      /* espaço suficiente para qualquer menu */
    }
  }

  .bwb-nav-container {
    position: absolute;
    inset: 100% 0 auto 0;
    background: #000000;
    padding: 0.75rem 1rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 1100;
    /* acima do hero também */
  }
}