.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end; /* Alinha os itens na base */
  z-index: 1000;
  padding: 8rem 2rem 1.5rem; /* Aumentei de 0.5rem para 8rem para subir o topo do desfoque */
  pointer-events: none;
}

/* Camada de desfoque (Blur) */
.bottom-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, rgb(255, 255, 255) 30%, transparent 80%);
  mask-image: linear-gradient(to top, rgb(255, 255, 255) 30%, transparent 80%);
  z-index: -2;
}

/* Camada de fundo e gradiente */
.bottom-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.8);
  background-image: url(../assets/bg_branco_com_ruido.jpg);
  -webkit-mask-image: linear-gradient(to top, rgb(255, 255, 255) 20%, transparent 80%);
  mask-image: linear-gradient(to top, rgb(255, 255, 255) 20%, transparent 80%);
  z-index: -1;
  mix-blend-mode: multiply;
}

.bottom-nav__items {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem;
  pointer-events: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--texto-escuro);
  padding: 0.8rem 1.2rem 0.6rem 1.2rem;
  border-radius: 50px;
  pointer-events: auto;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.nav-item:hover,
.nav-item.active {
  background-color: rgba(255, 255, 255, 1);
}

/* Efeito granulado no hover e active */
.nav-item:hover::before,
.nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(../assets/ruido.png);
  opacity: 0.7;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
}

/* Garante que o conteúdo fique acima do ruído */
.nav-item > * {
  position: relative;
  z-index: 1;
}

/* Ajuste específico para o botão de pesquisa ser circular */
.nav-item[aria-label="Pesquisar"] {
  padding: 0.8rem;
  aspect-ratio: 1 / 1;
}

.nav-label {
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 900; /* Super Bold conforme pedido */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: inherit;
  white-space: nowrap;
}

/* Estilos para os ícones */
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-search {
  width: 20px;
  height: 20px;
  background-image: url(../assets/icon_pesquisar.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .bottom-nav {
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: flex-end; /* Coloca o toggle na direita */
    pointer-events: none;
    z-index: 3000; /* Supera o overlay (1500) */
  }

  .bottom-nav.is-active::before,
  .bottom-nav.is-active::after {
    display: none;
  }

  .bottom-nav__items,
  .bottom-nav__spacer,
  .footer {
    display: none;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #8fb1a4;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    z-index: 2500;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  .mobile-nav-icon {
    width: 28px;
    height: auto;
  }

  /* Close Icon (X) */
  .close-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0;
    visibility: hidden;
  }

  .close-icon::before,
  .close-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: white;
  }

  .close-icon::before {
    transform: rotate(45deg);
  }

  .close-icon::after {
    transform: rotate(-45deg);
  }

  /* Active State (X visible, Icon hidden) */
  .mobile-nav-toggle.is-active .mobile-nav-icon {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
  }

  .mobile-nav-toggle.is-active .close-icon {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  /* Overlay Styles */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2b2b2b; /* Cor escura conforme print */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 15vh;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
  }

  .mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-content {
    text-align: right;
    width: 100%;
    padding: 0 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .mobile-menu-logo {
    width: 200px;
    margin-bottom: 4rem;
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .mobile-menu-link {
    font-family: var(--font-main);
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
  }

  .mobile-menu-link.active,
  .mobile-menu-link:hover {
    color: #8fb1a4;
  }
}

@media (min-width: 769px) {
  .mobile-nav-toggle,
  .mobile-menu-overlay {
    display: none;
  }
}
