.stack-group {
  display: flex;
  align-items: flex-start;
  border-top: 1px solid #dddddd;
  padding: 48px 0;
  gap: 2rem;
}

.stack-group h3 {
  flex: 0 0 30%;
  max-width: 30%;
  margin: 0;
}

.stack-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  column-gap: 2rem;
  row-gap: 0.75rem;
}

.stack-items li {
  font-size: 18px;
  line-height: 28px;
  margin: 0;
}


.optimize-stack .stack-group:last-child {
  border-bottom: 1px solid #dddddd;
}

.optimize-stack .stack-group:not(:last-child) {
  border-bottom: none;
}

@media (min-width: 768px) and (min-width: 992px) {
  .optimize-stack .stack-group:first-child {
    border-top: 1px solid #dddddd;
    padding-top: 24px !important;
  }
}

@media (max-width: 991px) {
  .stack-items {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .stack-group {
    flex-direction: column;
    gap: 0;
    align-items: normal;
    padding: 0;
  }

  .stack-group h3 {
    max-width: 100%;
  }

  .stack-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-items li {
    padding: 0 !important;
  }

}

@media (min-width: 768px) and (max-width: 991.98px) {
  .stack-group h3 {
    max-width: 100%;
  }
}

/* Style accordion to match original design */
.optimize-stack .accordion-button {
  background: transparent;
  font-size: 28px;
  font-weight: 600;
  padding: 1rem 0;
  color: inherit;
}

.optimize-stack .accordion-button:not(.collapsed) {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

.optimize-stack .accordion-body {
  padding: 0 0 1rem 0;
}

.optimize-stack .stack-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Remove default accordion borders and shadows */
.optimize-stack .accordion-item {
  border: none;
  background: transparent;
}

.optimize-stack .accordion-button::after {
  transform: rotate(-90deg);
}

.optimize-stack .accordion-button:not(.collapsed)::after {
  transform: rotate(-180deg);
  filter: brightness(0) saturate(100%) invert(39%) sepia(13%) saturate(5895%) hue-rotate(215deg) brightness(97%) contrast(94%);
}

/* .optimize-stack .stack-group {
  border-bottom: 1px solid #DDDDDD !important;
} */