/* CSS for FAQ layout */

.acf-layout-faq {
  background-color: var(--color-dark, #000000);
}

.faq-heading {
  margin-bottom: 70px;
}

/* Ensure headings inside the layout are white so they are visible on dark background */
.faq-heading,
.faq-heading h1,
.faq-heading h2,
.faq-heading h3,
.faq-heading h4,
.faq-heading h5,
.faq-heading h6,
.faq-heading p,
.faq-heading span {
  color: #ffffff;
}

.faq-accordion-wrapper {
  /* Separate card style - no divider on wrapper */
}

.faq-item {
  background-color: #ffffff;
  margin-bottom: 16px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 24px;
  background: #ffffff;
  border: none;
  outline: none;
  cursor: pointer;
  text-align: left;
  gap: 20px;
  color: #808080; /* Heading normal color */
  transition: color 0.3s ease;
}

.faq-header:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-1, #e65125);
}

.faq-question {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.3s ease;
}

/* Opened heading color #000000 */
.faq-item.is-open .faq-header,
.faq-item.is-open .faq-question {
  color: #000000;
}

.faq-icon-wrapper {
  position: relative;
  width: 20px;
  height: 20px;
  color: #000000; /* Toggle icon always black */
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.faq-icon-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.faq-line {
  display: block;
  background-color: currentColor;
  border-radius: 1px;
}

.faq-line-h {
  position: absolute;
  width: 8px;
  height: 2px;
  left: 6px;
  top: 9px;
  transition: transform 0.3s ease;
}

.faq-line-v {
  position: absolute;
  width: 2px;
  height: 8px;
  left: 9px;
  top: 6px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.faq-item.is-open .faq-line-v {
  transform: rotate(90deg);
  opacity: 0;
}

/* FAQ Body/Answer Collapsible */
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ffffff;
}

.faq-answer {
  padding: 0 24px 20px 24px;
  color: #484848; /* Content color */
  line-height: 1.6;
  font-size: 15px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .faq-header {
    padding: 20px 24px; /* Maintain padding per request */
  }

  .faq-answer {
    padding: 0 24px 20px 24px; /* Maintain padding per request */
  }

  .faq-question {
    font-size: 16px;
  }
}
