.wp-block-cdc-faq-section .cdc-faq,
.cdc-faq {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1em 4em 1em;
}

.cdc-faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cdc-faq__item {
  background: #a8cf63;
  border-radius: 14px;
  overflow: hidden;
  transition:
    background-color 0.28s ease,
    box-shadow 0.28s ease;
  box-shadow: 0 2px 0 rgba(73, 103, 18, 0.08);
}

.cdc-faq__item.is-open {
  background: linear-gradient(135deg, #dcecc0 0%, #d3e7ab 100%);
}

.cdc-faq__heading {
  margin: 0;
  padding: 8px 0 0 0;
  font-family: "Josefin Sans";
}

.cdc-faq__trigger,
.cdc-faq__question-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  margin: 0;
  padding: 1.2rem 1.6rem;
  background: transparent;
  border: 0;
  color: #533091;
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.cdc-faq__trigger {
  cursor: pointer;
}

.cdc-faq__trigger:focus-visible,
.cdc-faq__question-input:focus {
  outline: 2px solid #5520c6;
  outline-offset: -2px;
}

.cdc-faq__icon {
  position: relative;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  margin-left: auto;
}

.cdc-faq__icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-right: 4.5px solid #533091;
  border-bottom: 4.5px solid #533091;
  transform: rotate(-45deg);
  transition: transform 0.28s ease;
}

.cdc-faq__item.is-open .cdc-faq__icon::before,
.cdc-faq__trigger[aria-expanded="true"] .cdc-faq__icon::before {
  transform: rotate(45deg);
}

.cdc-faq__panel {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.6rem;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease;
}

.cdc-faq__item.is-open .cdc-faq__panel {
  opacity: 1;
}

.cdc-faq__answer,
.cdc-faq__answer-input {
  color: #533091;
  font-size: 20px;
  line-height: 1.2;
  padding-bottom: 1.5rem;
}

.cdc-faq__answer > *:first-child,
.cdc-faq__answer-input > *:first-child {
  margin-top: 0;
}

.cdc-faq__answer > *:last-child,
.cdc-faq__answer-input > *:last-child {
  margin-bottom: 0;
}

.editor-styles-wrapper .cdc-faq--editor .cdc-faq__item,
.cdc-faq--editor .cdc-faq__item {
  padding: 0 0 1.2rem;
}

.editor-styles-wrapper .cdc-faq--editor .cdc-faq__item.is-open,
.cdc-faq--editor .cdc-faq__item.is-open {
  background: linear-gradient(135deg, #dcecc0 0%, #d3e7ab 100%);
}

.cdc-faq__editor-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1rem 0;
}

.cdc-faq__question-input {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.cdc-faq__question-input .block-editor-rich-text__editable,
.cdc-faq__answer-input .block-editor-rich-text__editable {
  width: 100%;
}

.cdc-faq__answer-input {
  padding: 0 1.6rem;
}

.cdc-faq__editor-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
}

@media (max-width: 640px) {
  .cdc-faq__trigger,
  .cdc-faq__question-input {
    padding: 1rem 1.15rem;
  }

  .cdc-faq__panel,
  .cdc-faq__answer-input {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .cdc-faq__answer,
  .cdc-faq__answer-input {
    padding-bottom: 2rem;
  }
}
