.mega-element-menu {
  position: relative;
}

/* Desktop Menu */
.mega-menu-desktop {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: center; /* Centralizando horizontalmente os labels do menu */
}

.mega-menu-desktop li {
  margin: 0;
}

.mega-menu-desktop a {
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  transition: opacity 0.3s ease;
}

.mega-menu-desktop a:hover {
  opacity: 0.7;
}

/* Mobile Menu */
.mega-menu-mobile {
  display: none;
}

.mega-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 40px;
  height: 40px;
  justify-content: center;
  align-items: center;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background-color: currentColor;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mega-menu-toggle:hover .hamburger-line {
  opacity: 0.7;
}

/* Modal */
.mega-menu-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
}

.mega-menu-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mega-menu-modal-content {
  background: white;
  width: 90%;
  max-width: 500px;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 10px;
  position: relative;
  padding: 40px 20px 20px;
}

.mega-menu-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: #666;
  line-height: 1;
}

.mega-menu-close:hover {
  color: #000;
}

.mega-menu-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu-mobile-list li {
  margin: 0;
  border-bottom: 1px solid #eee;
}

.mega-menu-mobile-list li:last-child {
  border-bottom: none;
}

.mega-menu-mobile-list a {
  display: block;
  padding: 20px;
  text-decoration: none;
  font-size: 18px;
  transition: background-color 0.3s ease;
}

.mega-menu-mobile-list a:hover {
  background-color: #f5f5f5;
}

/* Responsive */
@media (max-width: 768px) {
  .mega-menu-desktop {
    display: none;
  }

  .mega-menu-mobile {
    display: block;
  }
}

/* Animações do hamburger */
.mega-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mega-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mega-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}
