/* ==========================================================================
   Header Mega Menu
   ========================================================================== */

/* Header gradient overlay — radial glow centered on active nav item */
#header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
  background: radial-gradient(ellipse 50% 100% at var(--header-glow-x, 50%) 50%,
      var(--header-gradient-color) 0%,
      transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 0;
}

#header.menu-open::before {
  opacity: .65;
}

/* Underline on nav link — driven by --menu-color */
.nav-menu-group>a::after {
  background-color: var(--menu-color) !important;
  display: none;
}

.nav-menu-group.menu-item-active>a::after {
  display: block;
}

/* Dropdown panel — hidden by default, shown via JS class */
.nav-menu-group .mega-dropdown {
  visibility: hidden;
  opacity: 0;
}

.nav-menu-group.menu-item-active .mega-dropdown {
  visibility: visible;
  opacity: 1;
}

/* Close button — bordered square with X, uses --menu-color */
.mega-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
  position: absolute;
  top: 1.5rem;
  right: 15px;
  border-radius: 6px;
}

.mega-close-btn:hover {
  opacity: 0.7;
}

.mega-close-btn svg {
  width: 16px;
  height: 16px;
}

/* @media(max-width: 767px) {
  nav > div > .nav-cta-btn:nth-of-type(1) {
    position: absolute;
    top: 20px;
  }
} */

/* Logo transition for shrink animation */
.site-container>a>img {
  transition: height 0.25s ease-in-out;
}

/* Site Socials Icons */
/* Sitemenu */
.sidemenu {
  position: fixed;
  right: 0;
  top: 210px;
  background: #363636;
  margin: 0;
  padding: 0;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  z-index: 999
}

.sidemenu .sidenav {
  list-style: none;
  margin: 0;
  padding: .75rem;
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out
}

.sidemenu .sidenav:hover {
  padding: .75rem 1.5rem .75rem .75rem
}

.sidemenu .sidenav li {
  -webkit-transition: all .3s ease-in-out;
  transition: all .3s ease-in-out
}

.sidemenu .sidenav li:last-child {
  margin-bottom: 0
}

.sidemenu .sidenav li a {
  color: #fff;
  opacity: .7;
  font-size: 18px
}

.sidemenu .sidenav li a:focus,
.sidemenu .sidenav li a:hover {
  opacity: 1
}

/* Header shrink — desktop only */
@media (min-width: 768px) {

  /* Pin to explicit height so the transition owns the animation,
     not content — prevents the bounce caused by min-height/content interplay */
  #header {
    height: 146px;
    overflow: hidden;
    /* clips content during transition; fixed mega-dropdown is unaffected */
  }

  #header.shrink {
    min-height: 0;
    /* clear Tailwind's min-h-[146px] */
    height: 100px;
  }

  #header.shrink .site-container>a>img {
    height: 55px;
  }

  #header.shrink .nav-menu-group>a {
    padding-top: 2.3rem;
    padding-bottom: 2.5rem;
  }

  #header.shrink .mega-dropdown {
    top: 100px;
  }
}