

@layer components {
@media (max-width: 1023px) {

  .mobile-overlay-menu .mobile-nav-title {
    transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
  }
  .mobile-overlay-menu[data-nivel="grupo"] .mobile-nav-title {
    transform: translateX(-100vw);
    visibility: hidden;
    transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 280ms;
  }

  .mobile-overlay-menu .mobile-dropdown-links {
    position: fixed;
    top: var(--navbar-h);
    left: 0;
    width: 100%;
    height: calc(100dvh - var(--navbar-h) - 88px - env(safe-area-inset-bottom, 0px));
    padding: 16px var(--space-5) 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg-secondary);
    animation: mob-grupo-entra 280ms cubic-bezier(0.32, 0.72, 0, 1);
  }
  .mobile-overlay-menu .mobile-dropdown-links.is-saindo {
    animation: mob-grupo-sai 280ms cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }

  .mobile-overlay-menu .mobile-group + .mobile-group { margin-top: 20px; }

  .mobile-overlay-menu .mobile-dropdown-links .column-title {
    margin: 0;
    padding: 6px 0;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
  }

  .mobile-overlay-menu .mobile-dropdown-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.375;
    letter-spacing: -0.01em;
    color: var(--text-primary);
  }
  .mobile-overlay-menu .mobile-dropdown-links a::after {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-top: 1.5px solid var(--text-secondary);
    border-right: 1.5px solid var(--text-secondary);
    transform: rotate(45deg);
  }

  .mobile-nav-head {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-h);
    display: flex;
    align-items: center;
    padding-inline: var(--gutter);
    pointer-events: none;
    animation: mob-cabeca-entra 200ms ease;
  }
  .mobile-nav-head[hidden] { display: none; }

  .mobile-nav-back {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    pointer-events: auto;
  }
  .mobile-nav-back:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }

  .mobile-nav-heading {
    position: absolute;
    inset: 0 72px;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: var(--navbar-h);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
  }

  body.nav-drawer-sub .navbar-brand { visibility: hidden; }
}

@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .mobile-overlay-menu .mobile-nav-title,
  .mobile-overlay-menu[data-nivel="grupo"] .mobile-nav-title { transition: none; }
  .mobile-overlay-menu .mobile-dropdown-links,
  .mobile-overlay-menu .mobile-dropdown-links.is-saindo,
  .mobile-nav-head { animation: none; }
}

@media (min-width: 1024px) {
  .mobile-nav-head { display: none; }
}

@keyframes mob-grupo-entra { from { transform: translateX(100%); } }
@keyframes mob-grupo-sai { to { transform: translateX(100%); } }
@keyframes mob-cabeca-entra { from { opacity: 0; } }
}
