/* ============================================================
   EDC Solutions Mega-Menu — Stylesheet
   ============================================================ */

/* --- Trigger <li> must be position:relative for dropdown --- */
.nav-solutions,
li.menu-item:has(> .solutions-dropdown) {
  position: relative;
}

/* --- Dropdown container ------------------------------------ */
.solutions-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #e0dff8;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(83,74,183,0.12);
  overflow: hidden;
  min-width: 760px;
}

.nav-solutions:hover .solutions-dropdown,
.solutions-dropdown:hover,
li:has(> a + .solutions-dropdown):hover .solutions-dropdown {
  display: flex;
}

/* --- Left column ------------------------------------------- */
.sdrop-left {
  width: 210px;
  flex-shrink: 0;
  padding: 14px 0;
  border-right: 1px solid #e8e7f9;
  background: #fff;
}

.sdrop-left-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9994c8;
  padding: 0 18px 10px;
}

.sdrop-left-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #2d2a5e;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}

.sdrop-left-item:hover,
.sdrop-left-item.is-active {
  background: #EEEDFE;
  color: #3C3489;
}

.sdrop-left-item .sdrop-chevron {
  font-size: 11px;
  opacity: 0.5;
  margin-left: 6px;
}

.sdrop-left-item.is-active .sdrop-chevron {
  opacity: 1;
  color: #7F77DD;
}

.sdrop-divider {
  height: 1px;
  background: #e8e7f9;
  margin: 8px 0;
}

/* --- Right panel ------------------------------------------- */
.sdrop-right {
  flex: 1;
  background: #EEEDFE;
  padding: 20px 24px 24px;
  min-height: 300px;
}

.sdrop-right-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #534AB7;
  margin-bottom: 16px;
}

.sdrop-panel {
  display: none !important;
}

.sdrop-panel.is-visible {
  display: block !important;
  width: 100% !important;
}

.sdrop-product {
  text-decoration: none;
  cursor: pointer;
}

.sdrop-product-name {
  font-size: 13px;
  font-weight: 700;
  color: #3C3489;
  margin: 0 0 2px;
  transition: color 0.12s;
}

.sdrop-product:hover .sdrop-product-name {
  color: #534AB7;
  text-decoration: underline;
}

.sdrop-product-desc {
  font-size: 12px;
  color: #534AB7;
  opacity: 0.72;
  margin: 0;
  line-height: 1.45;
}

/* --- Section rows inside a panel --------------------------- */
.sdrop-section {
  display: block !important;
  width: 100% !important;
  float: none !important;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.sdrop-section:last-child {
  margin-bottom: 0;
}

.sdrop-section-title {
  display: block !important;
  width: 100% !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9994c8;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d4d2f0;
  box-sizing: border-box;
}

.sdrop-section-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px 32px;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   MOBILE — hide desktop dropdown, show tap accordion
   ============================================================ */

/* Hide mobile accordion on desktop */
.sdrop-mobile-panel {
  display: none !important;
}

@media (max-width: 767px) {

  /* Kill the hover dropdown */
  .solutions-dropdown {
    display: none !important;
    position: static !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    min-width: unset !important;
  }

  /* Toggle arrow on the top-level Solutions link */
  .nav-solutions > a,
  li.edc-solutions-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .nav-solutions > a::after,
  li.edc-solutions-item > a::after {
    content: "▸";
    font-size: 12px;
    transition: transform 0.2s;
    margin-left: 8px;
    flex-shrink: 0;
  }

  .nav-solutions.mobile-open > a::after,
  li.edc-solutions-item.mobile-open > a::after {
    transform: rotate(90deg);
  }

  /* Accordion panel */
  .sdrop-mobile-panel {
    display: none !important;
    padding: 0 0 12px 12px;
    border-left: 3px solid #EEEDFE;
    margin: 4px 0 8px 8px;
  }

  .nav-solutions.mobile-open .sdrop-mobile-panel,
  li.edc-solutions-item.mobile-open .sdrop-mobile-panel {
    display: block !important;
  }

  /* Category labels */
  .sdrop-mob-cat {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #9994c8;
    padding: 10px 0 4px;
    border-bottom: 1px solid #e0dff8;
    margin-bottom: 6px;
  }

  /* Product rows */
  .sdrop-mob-item {
    display: block;
    padding: 7px 4px;
    text-decoration: none;
    border-bottom: 1px solid #f0eff9;
  }

  .sdrop-mob-item:last-child {
    border-bottom: none;
  }

  .sdrop-mob-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3C3489;
    margin: 0;
    line-height: 1.3;
  }

  .sdrop-mob-desc {
    display: block;
    font-size: 11px;
    color: #534AB7;
    opacity: 0.75;
    margin: 1px 0 0;
    line-height: 1.35;
  }
}
