/**
 * FAQ Block Styles
 */

/* Block headline */
.toggle-cards .faq__block-headline {
  text-align: center;
  margin-bottom: 1rem;
}

/* FAQ Container */
.toggle-cards .faq {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin: 0;
}

/* Individual FAQ Item */
.toggle-cards .faq__item {
  overflow: hidden;
  background: var(--lightgrey, #f5f5f5);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.06);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.toggle-cards .faq__item:hover {
  border-color: rgba(239, 124, 0, 0.3);
  box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.09);
}

/* Reset heading */
.toggle-cards .faq__heading {
  margin: 0;
}

/* Question Button */
.toggle-cards .faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 2.5vw, 2rem);
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Question Text */
.toggle-cards .faq__question-text {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s ease-in-out;
}

/* Hover / Open State */
.toggle-cards .faq__question:hover .faq__question-text,
.toggle-cards .faq__item.is-open .faq__question-text {
  color: var(--brand-accent-color, var(--bs-link-color));
}

/* Keyboard Focus */
.toggle-cards .faq__question:focus-visible {
  outline: 2px solid var(--brand-primary-color, var(--bs-primary));
  outline-offset: -4px;
  border-radius: inherit;
}

/* Plus / Minus Icon */
.toggle-cards .faq__icon {
  position: relative;
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
}

/* Horizontal line */
.toggle-cards .faq__icon::before,
.toggle-cards .faq__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease-in-out;
}

/* Vertical line */
.toggle-cards .faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* Turn + into - */
.toggle-cards .faq__item.is-open .faq__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Answer */
.toggle-cards .faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.22s ease,
    visibility 0s linear 0.3s;
}

.toggle-cards .faq__item.is-open .faq__answer {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Native hidden attribute */
.toggle-cards .faq__answer[hidden] {
  display: none;
}

/* Answer Inner */
.toggle-cards .faq__answer-inner {
  min-height: 0;
  overflow: hidden;
  max-width: 60rem;
  padding: 0 clamp(1.25rem, 2.5vw, 2rem);
  padding-bottom: 0;
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  line-height: 1.6;
  transition: padding-bottom 0.22s ease;
}

.toggle-cards .faq__item.is-open .faq__answer-inner {
  padding: 0 clamp(1.25rem, 2.5vw, 2rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* Remove unnecessary bottom margin */
.toggle-cards .faq__answer-inner > :last-child {
  margin-bottom: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .toggle-cards .faq__item {
    border-radius: 18px;
  }

  .toggle-cards .faq__question {
    gap: 1rem;
    padding: 1.25rem;
  }

  .toggle-cards .faq__answer-inner {
    padding: 0 1.25rem 1.5rem;
  }
}
