/* ==========================================================================
   BBH Mega Menu — v1.2 | Desktop + Tablet + Mobile
   Layout: REFERÊNCIA 4 | Design: REFERÊNCIA 3 | Arquitetura: BBH Genesis
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens do componente
   -------------------------------------------------------------------------- */
:root {
  --bbh-mm-bg: #05060D;
  --bbh-mm-bg-alt: #0A0B14;
  --bbh-mm-bg-stage: #0D0F1A;
  --bbh-mm-bg-footer: #080910;

  --bbh-mm-border: rgba(255, 255, 255, 0.06);
  --bbh-mm-border-active: rgba(124, 77, 255, 0.36);

  --bbh-mm-text: #F4F7FF;
  --bbh-mm-text-soft: #C8CBE0;
  --bbh-mm-text-muted: #bcc0d1;
  --bbh-mm-text-faint: #5A5470;

  --bbh-mm-violet: #7C4DFF;
  --bbh-mm-violet-soft: rgba(124, 77, 255, 0.08);
  --bbh-mm-cyan: #18D8FF;
  --bbh-mm-cyan-soft: rgba(24, 216, 255, 0.08);

  --bbh-mm-shadow: 0 16px 64px rgba(0, 0, 0, 0.56);
  --bbh-mm-glow-violet: 0 0 12px rgba(124, 77, 255, 0.3);

  --bbh-mm-max-width: 1440px;
  --bbh-mm-gutter: 24px;
  --bbh-mm-mobile-canvas: 390px;
  --bbh-mm-header-h: 68px;
  --bbh-mm-header-reduced-h: 56px;
  --bbh-mm-min-h: 540px;
  --bbh-mm-radius: 3px;

  --bbh-mm-duration: 220ms;
  --bbh-mm-ease: cubic-bezier(0.2, 0, 0, 1);

  --bbh-mm-bg-opacity: 0.90;
  --bbh-mm-panel-opacity: 0.94;
  --bbh-mm-overlay-opacity: 0.72;
  --bbh-mm-atmosphere-opacity: 0.34;

  /* BBH CTA primary — shared with HOME */
  --bbh-cta-height: 36px;
  --bbh-cta-padding-inline: 18px;
  --bbh-cta-bg: #0f4f72;
  --bbh-cta-bg-hover: #00D0FF;
  --bbh-cta-border: #09b2aa;
  --bbh-cta-text: #ffffff;
  --bbh-cta-radius: 2px;
  --bbh-cta-font-size: 10px;
  --bbh-cta-letter-spacing: 0.1em;
  --bbh-cta-shine-cycle: 2.4s;

  /* BBH CTA PRIMARY — reflection canonical (rollout governado) */
  --bbh-cta-primary-hover: #00D0FF;
  --bbh-cta-reflection-width: 45%;
  --bbh-cta-reflection-peak: rgba(255, 255, 255, 0.29);
  --bbh-cta-reflection-cycle: 5s;
}

/* --------------------------------------------------------------------------
   Page shell — body quando mega menu é contexto ativo
   -------------------------------------------------------------------------- */
.bbh-mm-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bbh-mm-bg);
  color: var(--bbh-mm-text);
  font-family: Lato, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */
.bbh-mm-overlay {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(2, 3, 10, var(--bbh-mm-overlay-opacity));
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--bbh-mm-duration) var(--bbh-mm-ease), visibility 0s linear var(--bbh-mm-duration);
}

.bbh-mm-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--bbh-mm-duration) var(--bbh-mm-ease), visibility 0s linear 0s;
}

/* --------------------------------------------------------------------------
   Header — estado expanded
   -------------------------------------------------------------------------- */
.bbh-desktop-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: var(--bbh-mm-header-h);
  background: var(--bbh-mm-bg);
  border-bottom: 1px solid var(--bbh-mm-border);
  transition: height var(--bbh-mm-duration) var(--bbh-mm-ease), background var(--bbh-mm-duration) var(--bbh-mm-ease);
}

/* Header — estado reduced/fixed no scroll */
.bbh-desktop-header[data-bbh-header-state="reduced"] {
  height: var(--bbh-mm-header-reduced-h);
  background: linear-gradient(45deg, rgba(30, 58, 138, 0.7), rgba(147, 51, 234, 0.7));
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.bbh-desktop-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - calc(var(--bbh-mm-gutter) * 2), var(--bbh-mm-max-width));
  height: 100%;
  margin-inline: auto;
}

.bbh-desktop-header__left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.bbh-desktop-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Brand */
.bbh-desktop-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.bbh-desktop-brand__image {
  height: 28px;
  width: auto;
}

/* Primary nav */
/* NÍVEL I — navegação principal do topo: PROJETOS / SERVIÇOS / CONSULTORIA / ACERVO. */
.bbh-desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bbh-desktop-nav__item {
  position: relative;
}

.bbh-desktop-nav__link {
  display: inline-flex;
  align-items: center;
  height: var(--bbh-mm-header-h);
  border: 0;
  background: transparent;
  color: var(--bbh-mm-text-muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease;
}

.bbh-desktop-nav__link:hover,
.bbh-desktop-nav__link:focus-visible {
  color: var(--bbh-mm-text);
}

.bbh-desktop-nav__link[aria-expanded="true"] {
  color: var(--bbh-mm-text);
}

.bbh-desktop-nav__link[aria-expanded="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--bbh-mm-cyan);
  border-radius: var(--bbh-mm-radius);
}

/* CTA */
.bbh-desktop-header__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: var(--bbh-cta-height);
  padding: 0 var(--bbh-cta-padding-inline);
  overflow: hidden;
  border: 1px solid var(--bbh-cta-border);
  border-radius: var(--bbh-cta-radius);
  background: var(--bbh-cta-bg);
  color: var(--bbh-cta-text);
  font-family: inherit;
  font-size: var(--bbh-cta-font-size);
  font-weight: 700;
  letter-spacing: var(--bbh-cta-letter-spacing);
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 0 12px rgba(24, 216, 255, 0.08), 0 0 12px rgba(24, 216, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.bbh-desktop-header__cta:hover,
.bbh-desktop-header__cta:focus,
.bbh-desktop-header__cta:focus-visible {
  color: var(--bbh-cta-text);
  background: var(--bbh-cta-primary-hover);
  border-color: var(--bbh-cta-primary-hover);
}

.bbh-desktop-header__cta:focus-visible {
  outline: 2px solid rgba(0, 208, 255, 0.5);
  outline-offset: 2px;
}

/*
 * BBH CTA PRIMARY — reflexão canônica.
 * A geometria do componente permanece intocada; somente a superfície recebe o sweep.
 */
.bbh-desktop-header__cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--bbh-cta-reflection-width);
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--bbh-cta-reflection-peak) 50%,
    transparent 100%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: bbh-cta-reflection-sweep var(--bbh-cta-reflection-cycle) ease-in-out infinite;
}

@keyframes bbh-cta-reflection-sweep {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateX(320%);
    opacity: 0;
  }
}

/* Divider, Dark mode, Flags */
.bbh-desktop-header__divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
}

.bbh-desktop-header__theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--bbh-mm-radius);
  background: transparent;
  color: var(--bbh-mm-text);
  cursor: pointer;
  transition: border-color 160ms ease;
}

.bbh-desktop-header__theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.bbh-desktop-header__theme-icon {
  width: 14px;
  height: 14px;
}

.bbh-desktop-header__theme-label {
  font-family: inherit;
  font-size: 9px;
  font-weight: 500;
}

.bbh-desktop-flags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bbh-desktop-flags__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--bbh-mm-radius);
  overflow: hidden;
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 160ms ease, border-color 160ms ease;
}

.bbh-desktop-flags__link:hover,
.bbh-desktop-flags__link:focus-visible {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.5);
}

.bbh-desktop-flags__link[aria-current="page"] {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.64);
  outline: 1px solid var(--bbh-mm-cyan);
  outline-offset: 1px;
}

.bbh-desktop-flags__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hamburger para mobile/tablet */
.bbh-desktop-header__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--bbh-mm-radius);
  background: transparent;
  cursor: pointer;
}

.bbh-desktop-header__hamburger-lines {
  display: grid;
  gap: 5px;
}

.bbh-desktop-header__hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--bbh-mm-text-soft);
}

/* --------------------------------------------------------------------------
   Mega Menu — wrapper
   -------------------------------------------------------------------------- */
.bbh-mega-menu {
  position: fixed;
  top: var(--bbh-mm-header-h);
  left: 0;
  right: 0;
  z-index: 50;
  background: rgb(5 6 13 / var(--bbh-mm-bg-opacity));
  border-top: 1px solid var(--bbh-mm-border);
  box-shadow: var(--bbh-mm-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--bbh-mm-duration) var(--bbh-mm-ease), transform var(--bbh-mm-duration) var(--bbh-mm-ease), visibility 0s linear var(--bbh-mm-duration);
}

.bbh-desktop-header[data-bbh-header-state="reduced"] + .bbh-mega-menu {
  top: var(--bbh-mm-header-reduced-h);
}

.bbh-mega-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--bbh-mm-duration) var(--bbh-mm-ease), transform var(--bbh-mm-duration) var(--bbh-mm-ease), visibility 0s linear 0s;
}

/* Atmosphere — gradientes orbitais REFERÊNCIA 3 */
.bbh-mega-menu__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--bbh-mm-atmosphere-opacity);
}

.bbh-mega-menu__atmosphere::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -28%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(45, 27, 90, 0.5) 0%, rgba(26, 16, 51, 0.28) 30%, rgba(10, 6, 20, 0.12) 58%, transparent 72%);
}

.bbh-mega-menu__atmosphere::after {
  content: "";
  position: absolute;
  left: -6%;
  bottom: -36%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(24, 216, 255, 0.07) 0%, transparent 70%);
  filter: blur(10px);
}

/* Container — 3 colunas desktop */
.bbh-mega-menu__container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  width: min(100% - calc(var(--bbh-mm-gutter) * 2), var(--bbh-mm-max-width));
  min-height: var(--bbh-mm-min-h);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Categories
   -------------------------------------------------------------------------- */
.bbh-mega-menu__categories {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 18px 24px;
  background: rgb(10 11 20 / var(--bbh-mm-panel-opacity));
  border-right: 1px solid var(--bbh-mm-border);
}

.bbh-mega-menu__level-group {
  min-width: 0;
}

.bbh-mega-menu__level-group--categories {
  flex: 0 0 auto;
}

.bbh-mega-menu__level-group--projects {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

/* LABELS — metainformação das colunas: CATEGORIAS / PROJETOS. */
.bbh-mega-menu__categories-label,
.bbh-mega-menu__projects-label {
  margin: 0 0 12px;
  color: #38D6FF;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bbh-mega-menu__categories-list,
.bbh-mega-menu__projects-list {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.bbh-mega-menu__projects-list {
  min-height: 0;
  max-height: 238px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(124, 77, 255, 0.44) transparent;
  scrollbar-width: thin;
}

.bbh-mega-menu__projects-list::-webkit-scrollbar {
  width: 5px;
}

.bbh-mega-menu__projects-list::-webkit-scrollbar-track {
  background: transparent;
}

.bbh-mega-menu__projects-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.44);
}

.bbh-mega-menu__categories-divider {
  width: 100%;
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(90deg, rgba(124, 77, 255, 0.42), rgba(24, 216, 255, 0.08), transparent);
}

.bbh-mega-menu__category,
.bbh-mega-menu__project {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--bbh-mm-text-muted);
  font-family: inherit;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, padding-left 160ms ease;
}

/* NÍVEL II — categorias: VIDA & CURA / DEFESA & INTELIGÊNCIA / INFRAESTRUTURA & MÍDIA. */
.bbh-mega-menu__category {
  padding: 11px 6px 11px 12px;
  font-size: 14px;
  letter-spacing: 0.055em;
}

/* NÍVEL III — projetos pertencentes à categoria ativa. */
.bbh-mega-menu__project {
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 7px 6px 7px 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.25;
}

.bbh-mega-menu__category:hover,
.bbh-mega-menu__project:hover {
  color: var(--bbh-mm-text);
  padding-left: 16px;
}

.bbh-mega-menu__category:focus-visible,
.bbh-mega-menu__project:focus-visible {
  outline: 2px solid var(--bbh-mm-cyan);
  outline-offset: -2px;
}

.bbh-mega-menu__category.is-selected,
.bbh-mega-menu__project.is-selected {
  color: var(--bbh-mm-text);
  background: var(--bbh-mm-violet-soft);
  border-left-color: var(--bbh-mm-violet);
  box-shadow: inset 2px 0 0 var(--bbh-mm-violet);
}

.bbh-mega-menu__project-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bbh-mega-menu__project-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  color: var(--bbh-mm-text-faint);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.bbh-mega-menu__project-status::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bbh-mm-cyan);
  box-shadow: 0 0 6px rgba(24, 216, 255, 0.44);
}

.bbh-mega-menu__project.is-pending .bbh-mega-menu__project-status::before {
  background: var(--bbh-mm-text-faint);
  box-shadow: none;
}

.bbh-mega-menu__project.is-pending:not(.is-selected) {
  color: #74788d;
}

.bbh-mega-menu__projects-empty {
  margin: 0;
  padding: 10px 0;
  color: var(--bbh-mm-text-faint);
  font-size: 10px;
  line-height: 1.45;
}

.bbh-mega-menu__categories-meta {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bbh-mega-menu__categories-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--bbh-mm-violet);
}

.bbh-mega-menu__categories-meta-text {
  margin: 0;
  color: var(--bbh-mm-text-faint);
  font-size: 8px;
  letter-spacing: 0.065em;
}

/* --------------------------------------------------------------------------
   Stage — painel central
   -------------------------------------------------------------------------- */
.bbh-mega-menu__stage {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: rgb(13 15 26 / var(--bbh-mm-panel-opacity));
  border-right: 1px solid var(--bbh-mm-border);
}

.bbh-mega-menu__stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.bbh-mega-menu__stage-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-transform: uppercase;
}

.bbh-mega-menu__stage-title-name {
  display: inline;
  color: var(--bbh-mm-text);
}

.bbh-mega-menu__stage-title-category {
  display: inline;
  color: var(--bbh-mm-violet);
}

.bbh-mega-menu__stage-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bbh-mega-menu__stage-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #bcc0d1;  
  border-radius: var(--bbh-mm-radius);
  background: transparent;
  color: var(--bbh-mm-text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.bbh-mega-menu__stage-arrow:hover,
.bbh-mega-menu__stage-arrow:focus-visible {
  color: var(--bbh-mm-text);
  border-color: var(--bbh-mm-cyan);
}

/* Media */
.bbh-mega-menu__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(124, 77, 255, 0.18);
  border-radius: var(--bbh-mm-radius);
  background: linear-gradient(135deg, #1e1a32 0%, #2d215a 60%, #1a1630 100%);
  overflow: hidden;
}

.bbh-mega-menu__media-poster,
.bbh-mega-menu__media-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbh-mega-menu__media-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 44%, rgba(124, 77, 255, 0.18), transparent 42%),
    linear-gradient(135deg, #121426 0%, #221a43 58%, #10121f 100%);
  text-align: center;
}

.bbh-mega-menu__media[data-bbh-media-status="pending"] .bbh-mega-menu__media-placeholder {
  display: flex;
}

.bbh-mega-menu__media-placeholder-status {
  color: var(--bbh-mm-text-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.bbh-mega-menu__media-placeholder-name {
  color: var(--bbh-mm-text-soft);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

/* Ocultar badge e headline durante reprodução */
.bbh-mega-menu__media[data-bbh-mm-video-state="playing"] .bbh-mega-menu__media-badge,
.bbh-mega-menu__media[data-bbh-mm-video-state="playing"] .bbh-mega-menu__media-headline {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.bbh-mega-menu__media-badge,
.bbh-mega-menu__media-headline {
  pointer-events: none;
  transition: opacity 220ms ease;
}

.bbh-mega-menu__media-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bbh-mega-menu__media-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b30;
  animation: bbh-mm-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.bbh-mega-menu__media-badge-text {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.bbh-mega-menu__media-headline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 16px 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84) 0%, transparent 100%);
}

.bbh-mega-menu__media-headline-text {
  margin: 0;
  color: var(--bbh-mm-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.bbh-mega-menu__media-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  margin-top: 1px;
  padding: 0 12px;
  background: #0a0a0a;
  border: 1px solid var(--bbh-mm-border);
  border-top: 0;
  border-radius: 0 0 var(--bbh-mm-radius) var(--bbh-mm-radius);
}

.bbh-mega-menu__media-time {
  color: var(--bbh-mm-text-muted);
  font-size: 10px;
}

/* Stage CTA */
.bbh-mega-menu__stage-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.bbh-mega-menu__stage-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: var(--bbh-cta-height);
  padding: 0 var(--bbh-cta-padding-inline);
  overflow: hidden;
  border: 1px solid var(--bbh-cta-border);
  border-radius: var(--bbh-cta-radius);
  background: var(--bbh-cta-bg);
  color: var(--bbh-cta-text);
  font-family: inherit;
  font-size: var(--bbh-cta-font-size);
  font-weight: 700;
  letter-spacing: var(--bbh-cta-letter-spacing);
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 0 12px rgba(24, 216, 255, 0.08), 0 0 12px rgba(24, 216, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.bbh-mega-menu__stage-cta:hover,
.bbh-mega-menu__stage-cta:focus-visible {
  color: var(--bbh-cta-text);
  background: var(--bbh-cta-bg-hover);
  border-color: var(--bbh-mm-cyan);
}

.bbh-mega-menu__stage-cta::after {
  content: "";
  position: absolute;
  top: -22px;
  left: -58px;
  width: 34px;
  height: 78px;
  transform: translateX(0) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0;
  pointer-events: none;
  animation: bbh-cta-specular-sweep var(--bbh-cta-shine-cycle) ease-in-out infinite;
}

.bbh-mega-menu__stage-meta {
  color: var(--bbh-mm-text-faint);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.bbh-mega-menu__stage-preview {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(24, 216, 255, 0.14);
  border-radius: var(--bbh-mm-radius);
  background: rgba(24, 216, 255, 0.03);
}

.bbh-mega-menu__stage-preview-title {
  margin: 0;
  color: var(--bbh-mm-text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bbh-mega-menu__stage-preview-text {
  margin: 6px 0 0;
  color: var(--bbh-mm-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Related — coluna direita
   -------------------------------------------------------------------------- */
.bbh-mega-menu__related {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  background: rgb(10 11 20 / var(--bbh-mm-panel-opacity));
}

.bbh-mega-menu__related-items {
  display: flex;
  flex-direction: column;
}

.bbh-mega-menu__related-item {
  display: flex;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.bbh-mega-menu__related-item:hover {
  opacity: 0.88;
}

.bbh-mega-menu__related-item:focus-visible {
  outline: 2px solid var(--bbh-mm-cyan);
  outline-offset: 4px;
}

.bbh-mega-menu__related-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--bbh-mm-radius);
  overflow: hidden;
}

.bbh-mega-menu__related-thumb-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1630 0%, #2d215a 100%);
}

.bbh-mega-menu__related-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bbh-mega-menu__related-cat {
  margin: 0 0 4px;
  color: var(--bbh-mm-text-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bbh-mega-menu__related-title {
  margin: 0;
  color: var(--bbh-mm-text-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  transition: color 160ms ease;
}

.bbh-mega-menu__related-item:hover .bbh-mega-menu__related-title {
  color: var(--bbh-mm-cyan);
}

.bbh-mega-menu__related-sep {
  height: 1px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.04);
}

/* Assets */
.bbh-mega-menu__assets {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--bbh-mm-border);
}

.bbh-mega-menu__assets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bbh-mega-menu__assets-label {
  margin: 0;
  color: var(--bbh-mm-text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bbh-mega-menu__assets-badge {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid rgba(124, 77, 255, 0.18);
  border-radius: var(--bbh-mm-radius);
  background: rgba(124, 77, 255, 0.12);
  color: var(--bbh-mm-violet);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.bbh-mega-menu__asset-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--bbh-mm-radius);
  background: transparent;
  color: var(--bbh-mm-text-muted);
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.bbh-mega-menu__asset-link:hover,
.bbh-mega-menu__asset-link:focus-visible {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--bbh-mm-text);
}

.bbh-mega-menu__asset-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--bbh-mm-text-faint);
  flex-shrink: 0;
}

/* Curadoria */
.bbh-mega-menu__curadoria {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.bbh-mega-menu__curadoria-avatars {
  display: flex;
}

.bbh-mega-menu__curadoria-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: -4px;
  border: 2px solid var(--bbh-mm-bg-alt);
  border-radius: 50%;
  background: hsl(260 42% 18%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  font-weight: 700;
}

.bbh-mega-menu__curadoria-avatar:first-child { margin-left: 0; }
.bbh-mega-menu__curadoria-avatar:nth-child(2) { background: hsl(272 42% 24%); }
.bbh-mega-menu__curadoria-avatar:nth-child(3) { background: hsl(284 42% 30%); }

.bbh-mega-menu__curadoria-text {
  margin: 0;
  color: var(--bbh-mm-text-faint);
  font-size: 10px;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.bbh-mega-menu__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - calc(var(--bbh-mm-gutter) * 2), var(--bbh-mm-max-width));
  height: 48px;
  margin-inline: auto;
  border-top: 1px solid var(--bbh-mm-border);
}

.bbh-mega-menu__footer-left,
.bbh-mega-menu__footer-right {
  display: flex;
  align-items: center;
}

.bbh-mega-menu__footer-left { gap: 16px; }
.bbh-mega-menu__footer-right { gap: 24px; }

.bbh-mega-menu__social-label {
  margin: 0;
  color: var(--bbh-mm-text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bbh-mega-menu__social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bbh-mega-menu__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--bbh-mm-radius);
  background: transparent;
  color: var(--bbh-mm-text-faint);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.bbh-mega-menu__social-link:hover,
.bbh-mega-menu__social-link:focus-visible {
  color: var(--bbh-mm-text);
  border-color: rgba(255, 255, 255, 0.24);
}

.bbh-mega-menu__footer-link {
  border: 0;
  background: transparent;
  color: var(--bbh-mm-text-faint);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease;
}

.bbh-mega-menu__footer-link:hover,
.bbh-mega-menu__footer-link:focus-visible {
  color: var(--bbh-mm-text);
}

.bbh-mega-menu__copyright {
  margin: 0;
  color: rgba(255, 255, 255, 0.18);
  font-size: 9px;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Focus global
   -------------------------------------------------------------------------- */
.bbh-mega-menu :focus-visible {
  outline: 2px solid var(--bbh-mm-cyan);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Skip / a11y
   -------------------------------------------------------------------------- */
.bbh-mm-skip-link {
  position: fixed;
  z-index: 100;
  top: 16px;
  left: 16px;
  transform: translateY(-160%);
  padding: 8px 16px;
  border-radius: var(--bbh-mm-radius);
  background: #1e3a52;
  color: var(--bbh-mm-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.bbh-mm-skip-link:focus {
  transform: translateY(0);
}

.bbh-mm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

/* --------------------------------------------------------------------------
   Body lock — mobile menu aberto
   -------------------------------------------------------------------------- */
.bbh-mm-no-scroll {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Demo info — removível na integração final
   -------------------------------------------------------------------------- */
.bbh-mm-demo-info {
  width: min(100% - 48px, 1440px);
  margin: 120px auto;
  text-align: center;
}

.bbh-mm-demo-info__title {
  margin: 0;
  color: var(--bbh-mm-text-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bbh-mm-demo-info__text {
  margin: 8px 0 0;
  color: var(--bbh-mm-text-faint);
  font-size: 12px;
}

.bbh-mm-demo-spacer {
  height: 2000px;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes bbh-mm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --------------------------------------------------------------------------
   MOBILE — canvas 390px, navegação por níveis
   -------------------------------------------------------------------------- */
.bbh-mega-menu-mobile {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(5 6 13 / 0.98);
  transform: translateX(100%);
  transition: transform 320ms var(--bbh-mm-ease);
  overflow-y: auto;
  overflow-x: hidden;
}

.bbh-mega-menu-mobile.is-open {
  transform: translateX(0);
}

.bbh-mega-menu-mobile__canvas {
  width: min(100%, var(--bbh-mm-mobile-canvas));
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

/* Mobile header interno */
.bbh-mega-menu-mobile__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--bbh-mm-border);
}

.bbh-mega-menu-mobile__title {
  margin: 0;
  color: var(--bbh-mm-text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bbh-mega-menu-mobile__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--bbh-mm-radius);
  background: transparent;
  color: var(--bbh-mm-text-muted);
  font-size: 18px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.bbh-mega-menu-mobile__close:hover,
.bbh-mega-menu-mobile__close:focus-visible {
  color: var(--bbh-mm-text);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile — nível 1: categorias */
.bbh-mega-menu-mobile__level {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
}

.bbh-mega-menu-mobile__level[data-level="2"],
.bbh-mega-menu-mobile__level[data-level="3"] {
  display: none;
}

.bbh-mega-menu-mobile__level.is-active {
  display: flex;
}

.bbh-mega-menu-mobile__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--bbh-mm-text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease;
}

.bbh-mega-menu-mobile__back:hover {
  color: var(--bbh-mm-text);
}

.bbh-mega-menu-mobile__back-arrow {
  font-size: 16px;
}

.bbh-mega-menu-mobile__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: var(--bbh-mm-text-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease;
}

.bbh-mega-menu-mobile__item:hover,
.bbh-mega-menu-mobile__item:focus-visible {
  color: var(--bbh-mm-text);
}

.bbh-mega-menu-mobile__item-arrow {
  color: var(--bbh-mm-text-faint);
  font-size: 18px;
}

/* Mobile — projeto detail */
.bbh-mega-menu-mobile__project {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bbh-mega-menu-mobile__project-name {
  margin: 0;
  color: var(--bbh-mm-text);
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
}

.bbh-mega-menu-mobile__project-cat {
  margin: 0;
  color: var(--bbh-mm-violet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bbh-mega-menu-mobile__project-desc {
  margin: 0;
  color: var(--bbh-mm-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.bbh-mega-menu-mobile__project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(124, 77, 255, 0.18);
  border-radius: var(--bbh-mm-radius);
  background: linear-gradient(135deg, #1e1a32 0%, #2d215a 60%, #1a1630 100%);
  overflow: hidden;
}

.bbh-mega-menu-mobile__project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbh-mega-menu-mobile__project-media img[hidden] {
  display: none;
}


.bbh-mega-menu-mobile__project-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #05060d;
}

.bbh-mega-menu-mobile__project-video[hidden] { display: none; }

.bbh-mega-menu-mobile__play {
  z-index: 4;
}

.bbh-mega-menu-mobile__project-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 44%, rgba(124, 77, 255, 0.18), transparent 42%),
    linear-gradient(135deg, #121426 0%, #221a43 58%, #10121f 100%);
  color: var(--bbh-mm-text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
}

.bbh-mega-menu-mobile__project-placeholder.is-visible {
  display: flex;
}

.bbh-mega-menu-mobile__project-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: var(--bbh-cta-height);
  padding: 0 var(--bbh-cta-padding-inline);
  overflow: hidden;
  border: 1px solid var(--bbh-cta-border);
  border-radius: var(--bbh-cta-radius);
  background: var(--bbh-cta-bg);
  color: var(--bbh-cta-text);
  font-family: inherit;
  font-size: var(--bbh-cta-font-size);
  font-weight: 700;
  letter-spacing: var(--bbh-cta-letter-spacing);
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 0 12px rgba(24, 216, 255, 0.08), 0 0 12px rgba(24, 216, 255, 0.08);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.bbh-mega-menu-mobile__project-cta:hover,
.bbh-mega-menu-mobile__project-cta:focus-visible {
  color: var(--bbh-cta-text);
  background: var(--bbh-cta-bg-hover);
  border-color: var(--bbh-mm-cyan);
}

.bbh-mega-menu-mobile__project-cta::after {
  content: "";
  position: absolute;
  top: -22px;
  left: -58px;
  width: 34px;
  height: 78px;
  transform: translateX(0) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0;
  pointer-events: none;
  animation: bbh-cta-specular-sweep var(--bbh-cta-shine-cycle) ease-in-out infinite;
}

@keyframes bbh-cta-specular-sweep {
  0%, 54% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  58% { opacity: .9; }
  82% { transform: translateX(320px) skewX(-18deg); opacity: .42; }
  100% { transform: translateX(320px) skewX(-18deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bbh-desktop-header__cta::before {
    animation: none;
    opacity: 0;
  }

  .bbh-mega-menu__stage-cta::after,
  .bbh-mega-menu-mobile__project-cta::after { animation: none; }
}

/* Mobile footer */
.bbh-mega-menu-mobile__footer {
  padding: 20px 20px 40px;
  border-top: 1px solid var(--bbh-mm-border);
  margin-top: auto;
}

.bbh-mega-menu-mobile__footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.bbh-mega-menu-mobile__footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.bbh-mega-menu-mobile__footer-link {
  border: 0;
  background: transparent;
  color: var(--bbh-mm-text-faint);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease;
}

.bbh-mega-menu-mobile__footer-link:hover {
  color: var(--bbh-mm-text);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .bbh-mega-menu,
  .bbh-mm-overlay,
  .bbh-mega-menu-mobile,
  .bbh-desktop-header {
    transition: none;
  }
  .bbh-mega-menu__media-badge-dot {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   TABLET — 768px a 1023px
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .bbh-desktop-nav { display: none; }
  .bbh-desktop-header__cta { display: none; }
  .bbh-desktop-header__divider { display: none; }
  .bbh-desktop-header__theme-toggle { display: none; }
  .bbh-desktop-header__hamburger { display: inline-flex; }

  .bbh-mega-menu {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   MOBILE — até 767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .bbh-desktop-header {
    height: 56px;
  }

  .bbh-desktop-header__left {
    gap: 12px;
  }

  .bbh-desktop-brand__image {
    height: 22px;
  }

  .bbh-desktop-flags__link {
    width: 20px;
    height: 14px;
  }
}