/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.mega-menu-content {
  height: 820px;
  overflow-y: auto;
  position: absolute;
  top: 79px;
  left: 0;
  width: 100%;

  /* Hide initially (no flicker) */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  pointer-events: none;
  /* Smooth reveal animation */
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Show with animation on hover or focus */
.cerevia-nav-menu li:hover > .mega-menu-content,
.cerevia-nav-menu li:focus-within > .mega-menu-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
/* Optional: allow fade-in once Elementor fully loaded */
.elementor-initialized .mega-menu-content {
  transition-delay: 0.05s;
}

/* Keep your original static positioning adjustments */
.cerevia-nav-menu--layout-horizontal .cerevia-nav-menu {
  position: static;
}
.cerevia-nav-menu li.mega-menu-item {
  position: unset !important;
}

/* Ensure inner links appear normal */
.mega-menu-content a {
  line-height: normal;
  white-space: normal !important;
}
/* Mobile responsive behavior */
@media only screen and (max-width: 1440px) {
  .mega-menu-content {
    height: 520px;
  }
}
@media only screen and (max-width: 1366px) {
  .mega-menu-content {
    top: 100%;
  }
}

@media only screen and (max-width: 1024px) {
  .mega-menu-content {
    position: relative;
    top: 0;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: none;
  }
}
