/* === Level 1 Accordion Grid Layout === */
.cta-accordion {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 2.5rem;
}

/* Each accordion tile — fixed width box */
.cta-lvl1-item {
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--e-global-color-primary);
  box-shadow: 0 0 0.625rem 0 rgba(37, 55, 97, 0.02),
    0 1.25rem 1.5rem 0 rgba(37, 55, 97, 0.07), 0 0.625rem 0.625rem 0 rgba(37, 55, 97, 0.06);
}

/* Expanded accordion: show below the grid without shifting */
.cta-lvl1-item.expanded {
  grid-column: 1 / -1;
  /* spans full width across grid */
  z-index: 2;
}

/* === Level 1 Accordion Header === */
.cta-lvl1-header {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: transparent !important;
  color: var(--e-global-color-ec6316a);
  padding:  1.25rem;
  transition: all 0.3s ease-in-out;
  font-size: 1.25rem;
  font-weight: 500;
}
.cta-lvl1-header.open {
	background-color: var(--e-global-color-9fab1be) !important;
    height: auto;
}
.cta-lvl1-header img {
  transition: opacity 0.2s ease-in-out;
}

/* === Level 1 Content (Grid of Level 2 cards) === */
.cta-lvl1-content {
  display: grid;
  background: transparent !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, padding 0.3s ease-in-out;
  padding: 0 1.25rem;
}

.cta-lvl1-content.open {
  max-height: 125rem;
  padding: 1.25rem ;
  background: #fff !important;
}

/* === Level 2 Accordion Cards === */
.cta-lvl2-item {
  display: flex;
  flex-direction: column;
  background: var(--e-global-color-2589612);
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.cta-lvl2-item:hover {
  transform: translateY(-0.1875rem);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* === Level 2 Header === */
.cta-lvl2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  color: var(--e-global-color-text);
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  padding: 1.125rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.cta-lvl2-header img {
  border-radius: 50%;
  transition: transform 0.25s ease-in-out, opacity 0.2s ease-in-out;
}

.cta-lvl2-header.open img {
  transform: rotate(180deg);
}

/* === Level 2 Content === */
.cta-lvl2-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-in-out, padding 0.25s ease-in-out;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  padding: 0 1.25rem;
}

.cta-lvl2-content.open {
  max-height: 75rem;
  padding: 0 1.25rem 1.25rem;
}

/* === Level 3 Links === */

.cta-lvl2-content .cta-lvl3-item {
  padding: 0.125rem 0.625rem;
}

.cta-lvl2-content .cta-lvl3-item:not(:last-child) {
  border-bottom: 0.125rem solid var(--e-global-color-ec6316a);
}

.cta-lvl3-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--e-global-color-primary);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.cta-lvl3-item a:hover {
  color: var(--e-global-color-secondary);
}

.cta-lvl3-item svg.arrow.right,
.cta-lvl3-item img {
  fill: currentColor;
  width: 0.75rem;
  height: 0.75rem;
  transition: all 0.2s ease-in-out;
}

/* === Arrow Rotation === */
.cta-accordion svg.arrow {
  transition: transform 0.3s ease-in-out;
}

/* === Responsive Breakpoints === */
@media (max-width: 64rem) {
  .cta-accordion {
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  }

  .cta-lvl1-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 48rem) {
  .cta-accordion {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  }
}

@media (max-width: 37.5rem) {
  .cta-accordion {
    grid-template-columns: 1fr;
  }

  .cta-lvl1-content {
    grid-template-columns: 1fr;
  }
}
