/* ========== FAQ SECTION ========== */

.faq * {
  box-sizing: border-box;
}

.faq {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 100px 24px;
  background-color: #fff;
  position: relative;
}

.faq__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  width: 100%;
  max-width: 920px;
}

/* ---------- INTRO ---------- */

.faq__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.faq__border-wrapper {
  display: flex;
  justify-content: center;
}

.faq__border {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid #28e485;
}

.faq__tag {
  font-family: "Outfit", Helvetica, sans-serif;
  font-weight: 400;
  color: #188a50;
  font-size: 16px;
  letter-spacing: 0.32px;
  line-height: 24px;
  white-space: nowrap;
}

.faq__title {
  margin: 0;
  font-family: "Red Hat Display", Helvetica, sans-serif;
  font-weight: 700;
  color: #333333;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.25;
}

.faq__title em {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 700;
  color: #333333;
}

.faq__subtitle {
  margin: 0;
  font-family: "Outfit", Helvetica, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: #525252;
}

/* ---------- LIST ---------- */

.faq__list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.faq__item {
  border-bottom: 1px solid #e5e5e5;
}

.faq__item:first-child {
  border-top: 1px solid #e5e5e5;
}

button.faq__question {
    background: white;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 28px 4px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq__question-text {
  font-family: "Outfit", Helvetica, sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 2.2vw, 20px);
  color: #0a0a0a;
  line-height: 1.4;
}


.faq__toggle {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(89, 45, 181, 0.3);
  color: #592db5;
  background: #ffffff;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.faq__toggle svg {
  transition: transform 0.3s ease;
}

.faq__item--active .faq__toggle {
  background: linear-gradient(
    180deg,
    rgba(89, 45, 181, 1) 25%,
    rgba(125, 64, 255, 1) 100%
  );
  border-color: transparent;
  color: #fafafa;
}

.faq__item--active .faq__toggle svg {
  transform: rotate(180deg);
}

/* Animación de acordeón vía grid-template-rows (0fr -> 1fr) */
.faq__answer-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.faq__item--active .faq__answer-wrapper {
  grid-template-rows: 1fr;
}

.faq__answer {
  overflow: hidden;
}

.faq__answer p {
  margin: 0;
  padding: 0 4px 28px;
  max-width: 720px;
  font-family: "Outfit", Helvetica, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: #525252;
}

/* ---------- REVEAL ANIMATION ---------- */

.faq__reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i, 0) * 80ms);
}

.faq__reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .faq__reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .faq__answer-wrapper {
    transition: none;
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 768px) {
  .faq {
    padding: 60px 24px;
  }

  .faq__container {
    gap: 40px;
  }

  .faq__question {
    padding: 20px 0;
    gap: 16px;
  }

  .faq__toggle {
    width: 34px;
    height: 34px;
  }

  .faq__answer p {
    padding-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .faq {
    padding: 48px 16px;
  }

  .faq__subtitle {
    font-size: 15px;
  }
}
