/* Menu Serviços — divisões + ícones */

/* position:static para o mega-menu ancorar no .header (evita corte à esquerda) */
.nav-item {
  position: static;
}

.nav-item__btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-family: var(--navfont, Montserrat, sans-serif);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item__btn::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.85;
  transition: transform 0.18s ease;
}

.nav-item.is-open > .nav-item__btn::after,
.nav-item:hover > .nav-item__btn::after {
  transform: rotate(225deg) translateY(-1px);
}

.nav-item__btn.is-active,
.nav-item.is-current > .nav-item__btn {
  color: #c9b6ff;
}

/* Header fixo em 85px não pode cortar o mega-menu */
.header {
  overflow: visible;
}

.nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  /* Alinha à direita do header (onde fica Serviços), sem sair da tela */
  left: auto;
  right: 1.25rem;
  transform: none;
  width: min(1080px, calc(100vw - 2.5rem));
  max-width: calc(100vw - 2.5rem);
  padding: 0.85rem 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  z-index: 120;
}

.nav-item.is-open > .nav-panel,
.nav-item:hover > .nav-panel:not([hidden]) {
  display: grid;
}

.nav-panel__grid,
.nav-panel__foot {
  background: linear-gradient(165deg, #1e1736 0%, #151028 100%);
  border-color: rgba(114, 255, 255, 0.22);
  border-style: solid;
}

.nav-panel__grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.55fr);
  gap: 0;
  padding: 0;
  border-width: 1px 1px 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.nav-panel__foot {
  margin-top: 0;
  padding: 0.75rem 1.15rem 1.05rem;
  border-width: 0 1px 1px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.85rem;
}

/* Colunas */
.nav-panel__col--featured {
  padding: 1.05rem 1rem 1rem;
  background: rgba(128, 81, 255, 0.1);
  border-right: 1px solid rgba(114, 255, 255, 0.14);
}

.nav-panel__col--groups {
  padding: 1.05rem 1rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem 1.1rem;
  align-content: start;
  max-height: none;
  overflow: visible;
}

.nav-panel__group {
  min-width: 0;
}

.nav-panel__col h3,
.nav-panel__group h3 {
  margin: 0 0 0.7rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(114, 255, 255, 0.18);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #72ffff;
  font-family: var(--navfont, Montserrat, sans-serif);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-panel__col h3::before,
.nav-panel__group h3::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: linear-gradient(135deg, #72ffff, #8051ff);
  flex: 0 0 auto;
}

.nav-panel__col ul,
.nav-panel__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

/* Links com ícone */
.nav-svc {
  display: flex !important;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.28rem 0.4rem !important;
  border-radius: 8px !important;
  color: #f2efff;
  font-size: 0.76rem;
  line-height: 1.25;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-svc__ico {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.02rem;
  border-radius: 6px;
  background: rgba(114, 255, 255, 0.08);
  border: 1px solid rgba(114, 255, 255, 0.22);
  display: grid;
  place-items: center;
}

.nav-svc__ico::before {
  content: "";
  width: 0.78rem;
  height: 0.78rem;
  background: #72ffff;
  -webkit-mask: var(--nav-ico) center / contain no-repeat;
  mask: var(--nav-ico) center / contain no-repeat;
}

.nav-svc__label {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-panel a:hover,
.nav-panel a:focus-visible,
.nav-svc:hover,
.nav-svc:focus-visible {
  background: rgba(114, 255, 255, 0.1) !important;
  color: #72ffff !important;
  outline: none;
}

.nav-svc:hover .nav-svc__ico,
.nav-svc:focus-visible .nav-svc__ico {
  border-color: rgba(114, 255, 255, 0.45);
  background: rgba(114, 255, 255, 0.14);
}

.nav-panel a.is-active,
.nav-svc.is-active {
  color: #72ffff !important;
  background: rgba(114, 255, 255, 0.08) !important;
}

.nav-panel__foot a {
  color: #c9b6ff;
  font-size: 0.82rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-panel__foot a:hover {
  color: #72ffff;
  background: transparent !important;
}

/* Ícones (mask SVG) */
.nav-svc__ico[data-ico="card"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20M6 15h4'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="shield"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V6l8-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="bank"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10l9-6 9 6M5 10v8h14v-8M3 20h18'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="search"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="chart"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5M4 19h16M8 16v-5M12 16V8M16 16v-3'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="globe"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 010 18M12 3a14 14 0 000 18'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="building"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V8l8-4 8 4v12M9 20v-6h6v6'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="fund"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v10M9 10h4.5a2 2 0 010 4H9'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="wallet"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='2'/%3E%3Cpath d='M3 10h18M16 13h2'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="layers"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 5-9 5-9-5z'/%3E%3Cpath d='M3 13l9 5 9-5M3 17l9 5 9-5'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="brands"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='8' cy='12' r='1.5'/%3E%3Ccircle cx='12' cy='12' r='1.5'/%3E%3Ccircle cx='16' cy='12' r='1.5'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="users"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3 19c0-3 2.5-5 6-5s6 2 6 5M16 11a3 3 0 100-6M21 19c0-2.5-1.5-4-4-4'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="pos"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2'/%3E%3Cpath d='M9 6h6M9 10h6M9 14h3'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="capture"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M8 11l4 4 4-4M5 19h14'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="gateway"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8L4 12l4 4M16 8l4 4-4 4M14 5l-4 14'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="link"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 007.07 0l2.12-2.12a5 5 0 00-7.07-7.07L10.7 5.2'/%3E%3Cpath d='M14 11a5 5 0 00-7.07 0L4.8 13.12a5 5 0 007.07 7.07L13.3 18.8'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="split"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3v18M12 12l7.8 4.5M12 12l7.8-4.5'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="lock"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 018 0v3'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="secure"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V6l8-3z'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="repeat"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0114.5-4.5M20 4v4h-4M20 12a8 8 0 01-14.5 4.5M4 20v-4h4'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="pix"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7l5 5-5 5M17 7l-5 5 5 5'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="onboard"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M19 8v6M16 11h6'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="slc"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M4 12h10M4 17h7'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="reconcile"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="flow"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="agenda"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="advance"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M7 10l5-5 5 5'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="dispute"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16h.01'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="badge"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.2 4.5L19 8.2l-3.5 3.4.8 4.9L12 14.2 7.7 16.5l.8-4.9L5 8.2l4.8-.7L12 3z'/%3E%3C/svg%3E"); }
.nav-svc__ico[data-ico="law"] { --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 8l7-3 7 3M5 8l7 3 7-3M5 8v3c0 2.5 3.1 4.5 7 4.5s7-2 7-4.5V8'/%3E%3C/svg%3E"); }

/* Páginas internas (sem hero): header sólido */
body:not(:has(.hero)) .header {
  position: sticky;
  top: 0;
  background: #231b3b;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

body:not(:has(.hero)) .page-hero {
  padding-top: 3.5rem;
}

@media (max-width: 900px) {
  .nav-panel__col--groups {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  /* Dropdown mobile: rolável e acima do conteúdo */
  .nav.is-open {
    max-height: min(78vh, calc(100dvh - 5.5rem));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 1.25rem;
  }

  .nav-item {
    position: relative;
    width: 100%;
  }

  .nav-item__btn {
    width: 100%;
    justify-content: space-between;
    padding: 0.55rem 0;
    min-height: 44px;
  }

  .nav-panel {
    position: static;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin: 0.2rem 0 0.45rem;
    padding: 0;
    box-shadow: none;
    /* Fechado por padrão no mobile — só .is-open abre (evita :hover sticky em touch) */
    display: none;
  }

  /* Touch deixa :hover "grudado"; nunca deixar hover ganhar de .is-open */
  .nav-item:hover > .nav-panel {
    display: none;
  }

  .nav-item.is-open > .nav-panel,
  .nav-item.is-open:hover > .nav-panel {
    display: grid !important;
  }

  .nav-panel[hidden] {
    display: none !important;
  }

  .nav-panel__grid {
    grid-template-columns: 1fr;
  }

  .nav-panel__col--featured {
    border-right: 0;
    border-bottom: 1px solid rgba(114, 255, 255, 0.14);
  }

  .nav-panel__col--groups {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .nav-panel__foot {
    padding: 0.65rem 0.75rem 0.85rem;
  }

  .nav-svc {
    padding: 0.45rem 0.5rem !important;
    min-height: 44px;
    align-items: center;
  }
}

@media (hover: hover) and (min-width: 861px) {
  .nav-item:focus-within > .nav-panel {
    display: grid;
  }
}
