/* Menu Sanduíche para BioVida */

/* Botão do menu hambúrguer - oculto por padrão */
.hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
  position: relative;
}

.hamburger-menu span {
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Animação do X quando menu está aberto */
.hamburger-menu.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Menu mobile overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(59, 18, 77, 0.95);
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.mobile-menu-overlay.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Lista do menu mobile */
.mobile-menu-overlay ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.mobile-menu-overlay ul li {
  margin: 30px 0;
  transform: translateY(20px);
  opacity: 0;
  animation: slideInUp 0.5s ease-out forwards;
}

.mobile-menu-overlay ul li:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu-overlay ul li:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu-overlay ul li:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu-overlay ul li:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mobile-menu-overlay ul li a {
  color: white;
  text-decoration: none;
  font-size: 28px;
  font-weight: 500;
  padding: 15px 30px;
  display: block;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mobile-menu-overlay ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.mobile-menu-overlay ul li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.mobile-menu-overlay ul li a:hover::before {
  left: 100%;
}

/* Botão Acessar no menu mobile */
.mobile-menu-button {
  margin-top: 40px;
  padding: 15px 30px;
  background-color: #35bcad;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
  animation: slideInUp 0.5s ease-out 0.5s forwards;
}

.mobile-menu-button:hover {
  background-color: #2da89a;
  transform: scale(1.05);
}

.mobile-menu-button:active {
  transform: scale(0.95);
}

/* Fechar menu ao clicar fora */
.mobile-menu-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Media Queries para mostrar menu hambúrguer */
@media (max-width: 768px) {
  /* Mostrar botão hambúrguer */
  .hamburger-menu {
    display: flex;
  }
  
  /* Ocultar menu desktop */
  #header > ul {
    display: none;
  }
  
  /* Ocultar botão desktop */
  #header > button {
    display: none;
  }
  
  /* Ajustar header para mobile */
  #header {
    justify-content: space-between;
    align-items: center;
    padding-inline: 5%;
    flex-direction: row;
  }

  #header > div > img {
    width: 80px;
    height: 80px;
  }
  
  /* Logo ou título do header */
  .header-logo {
    color: white;
    font-size: 20px;
    font-weight: bold;
  }
}

@media (max-width: 480px) {
  .mobile-menu-overlay ul li a {
    font-size: 24px;
    padding: 12px 25px;
  }
  
  .mobile-menu-button {
    padding: 12px 25px;
    font-size: 18px;
  }
  
  .hamburger-menu span {
    width: 22px;
    height: 2px;
  }
}

@media (max-width: 320px) {
  .mobile-menu-overlay ul li {
    margin: 25px 0;
  }
  
  .mobile-menu-overlay ul li a {
    font-size: 22px;
    padding: 10px 20px;
  }
  
  .mobile-menu-button {
    padding: 10px 20px;
    font-size: 16px;
  }
}

/* Prevenir scroll quando menu está aberto */
body.menu-open {
  overflow: hidden;
}

/* Efeito de blur no conteúdo quando menu está aberto */
.content-blur {
  filter: blur(3px);
  transition: filter 0.3s ease;
}

/* Indicador visual de menu ativo */
.mobile-menu-overlay ul li a.active {
  background-color: rgba(53, 188, 173, 0.3);
  color: #35bcad;
}

/* Animação de entrada suave */
.mobile-menu-overlay.active ul {
  animation: menuSlideIn 0.4s ease-out;
}

@keyframes menuSlideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsividade para landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-menu-overlay ul li {
    margin: 15px 0;
  }
  
  .mobile-menu-overlay ul li a {
    font-size: 22px;
    padding: 8px 20px;
  }
  
  .mobile-menu-button {
    margin-top: 20px;
    padding: 10px 25px;
    font-size: 16px;
  }
}