/* =============================================================================
   Akkordeon — auf die Liste gescopet, weil sie auch in about-me steckt.
   [data-open] setzt scripts/modules/accordion.js.
   ========================================================================== */

@scope (.faq_list-grid) {
  :scope {
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: 100%;
    grid-auto-columns: 100%;
    place-items: start stretch;
    gap: 1rem;
  }

  .faq_accordion {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    border-radius: var(--radius-l);
    background-color: var(--color-ivory);
  }

  .faq_question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 2rem;
    cursor: pointer;
  }

  .faq_icon-wrapper {
    align-self: flex-start;
    transition: transform 200ms ease;
  }

  .faq_accordion[data-open] .faq_icon-wrapper {
    transform: rotate(45deg);
  }

  .faq_icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2rem;
    color: var(--color-green-brighter);
  }

  .faq_answer {
    width: 100%;
    height: 0;
    overflow: hidden;
    padding-inline: 2rem;
    transition: height 400ms ease;
  }

  .faq_answer-wrapper {
    margin-bottom: 1.5rem;
  }

  @media (width <= 767px) {
    .faq_icon-wrapper {
      width: 1.75rem;
    }

    .faq_answer-wrapper {
      margin-bottom: 1.25rem;
    }

    .faq_answer {
      padding-inline: 1.25rem;
    }

    .faq_question {
      padding: 1rem 1.25rem;
    }

    .faq_icon {
      width: 1.75rem;
      height: 1.75rem;
    }
  }
}

/* Antworten: Optik von .text-size-regular, damit auch <p> aus dem Editor passen */
@scope (.faq) {
  .faq_answer-wrapper p {
    margin-bottom: 0.8rem;
    font-size: 1.125rem;
    line-height: 1.5;
  }

  .faq_answer-wrapper p:last-child {
    margin-bottom: 0;
  }
}
