/* VIBGYOR v3.3 — final, authoritative navigation animation layer.
   jQuery handles height, horizontal position, open/close. CSS handles appearance.
   This stylesheet must load AFTER header-v3.css. */

/* Desktop: remove legacy CSS slide/visibility transitions which override jQuery. */
@media (min-width:1051px){
  .site-header .mega,
  .site-header .mega.open {
    display:none;
    height:auto;
    overflow:hidden;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:none;
    transition:none;
    background:#fff;
    box-shadow:0 27px 55px rgba(16,40,21,.13);
    border-radius:0 0 20px 20px;
    will-change:height;
  }
  /* Align with screenshot: small eyebrow above the four service columns. */
  .site-header .mega-inner::before {
    content:'EXPLORE OUR EXPERTISE';
    display:block;
    grid-column:1/-1;
    border-bottom:1px solid #e2ecdf;
    padding-bottom:16px;
    margin-bottom:2px;
    color:#788779;
    font-size:11px;
    font-weight:800;
    letter-spacing:.17em;
  }
  .site-header #mega-solutions .mega-inner::before {content:'EXPLORE SOLUTIONS'}
  /* Subtle staggered content reveal starts once jQuery begins slideDown. */
  .site-header .mega.open .mega-col,
  .site-header .mega.open .mega-feature {
    opacity:0;
    transform:translateY(-13px);
  }
  .site-header .mega.is-revealed .mega-col,
  .site-header .mega.is-revealed .mega-feature {
    opacity:1;
    transform:translateY(0);
  }
  .site-header .mega-col,.site-header .mega-feature {
    transition:opacity .32s ease,transform .44s cubic-bezier(.16,1,.3,1);
  }
  .site-header .mega.is-revealed .mega-col:nth-child(1){transition-delay:.02s}
  .site-header .mega.is-revealed .mega-col:nth-child(2){transition-delay:.065s}
  .site-header .mega.is-revealed .mega-col:nth-child(3){transition-delay:.11s}
  .site-header .mega.is-revealed .mega-col:nth-child(4){transition-delay:.155s}
  .site-header .mega.is-revealed .mega-feature {transition-delay:.2s}
}
/* Mega menu HOVER: pale green rounded selection shown in user's screenshot.
   Same effect works with keyboard focus and current page. */
.site-header .mega-col a,
.site-header .mega-col a:link {
  display:block;
  padding:9px 12px;
  margin:0 -8px;
  border-radius:10px;
  background:transparent;
  color:#354336;
  transition:background-color .2s ease,color .2s ease,padding-left .2s ease,box-shadow .2s ease;
}
.site-header .mega-col a:hover,
.site-header .mega-col a:focus-visible,
.site-header .mega-col a.is-current {
  padding-left:18px;
  background:#ebf8e5;
  color:#25831d;
  box-shadow:inset 0 0 0 1px rgba(106,200,63,.05);
  outline:none;
}
.site-header .mega-col a:focus-visible {outline:2px solid #6ac83f;outline-offset:1px}

/* Mobile: keep the existing right-hand drawer; jQuery animates its left offset. */
@media (max-width:1050px){
  .mobile-panel,.mobile-panel.open {
    display:block;
    position:fixed;
    right:auto;
    left:100%;
    width:100%;
    height:auto;
    max-height:none;
    opacity:1;
    transform:none;
    transition:none;
    will-change:left;
    visibility:hidden;
    pointer-events:none;
  }
  .mobile-panel.open {
    visibility:visible;
    pointer-events:auto;
  }
  .mobile-panel>a,.mobile-panel>button,
  .mobile-panel.open>a,.mobile-panel.open>button {
    opacity:1;
    transform:none;
    transition:background-color .2s ease,color .2s ease;
  }
  .mobile-panel>a:hover,.mobile-panel>button:hover,
  .mobile-panel>a:focus-visible,.mobile-panel>button:focus-visible {
    background:#ecf9e5;
    color:#267f1d;
    border-radius:8px;
  }
  /* Real jQuery slideDown/slideUp on submenu instead of CSS grid expansion. */
  .mobile-panel .mobile-sub,
  .mobile-panel .mobile-sub.is-open {
    display:none;
    grid-template-rows:none;
    overflow:hidden;
    opacity:1;
    visibility:visible;
    height:auto;
    transition:none;
    margin:10px 0 15px!important;
    padding:10px 18px!important;
  }
  .mobile-panel .mobile-sub-content {overflow:visible}
  .mobile-panel .mobile-sub a:hover,
  .mobile-panel .mobile-sub a:focus-visible {
    color:#267f1d;
    background:#e4f5db;
    border-radius:7px;
  }
}
@media (prefers-reduced-motion:reduce){
  .site-header .mega-col,.site-header .mega-feature,
  .site-header .mega-col a {transition:none!important}
}
