/* ======= Раздел FAQ ======= */
.faq-section {
  background-color: #A6D8FF;
  padding: 60px 0;
}


/* Список вопросов */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Карточка вопроса */
.faq-item {
  background-color: #D6EDFF;
  border-radius: 32px;
  overflow: hidden;
  padding: 50px;
}

/* Строка с вопросом */
.faq-item__question {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 16px;
  padding-bottom: 30px;
}


/* Номер */
.faq-item__number {
  color: #F285BE;
  flex-shrink: 0;
}

/* Текст вопроса */
.faq-item__question-text {
  max-width: 750px;
  width: 100%;
  margin: auto;
  text-align: left;
}


/* Кнопка плюс/крестик */
.faq-item__toggle {
  position: relative; /* нужно для абсолютного позиционирования иконок */
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-item__icon {
  position: absolute;
  width: 40px;
  height: 40px;
  transition: opacity 0.3s ease, transform 0.3s ease, rotate 0.3s ease;
  pointer-events: none;
}

.faq-item__toggle:hover .faq-item__icon {
  transform: scale(1.25);
}

.faq-item__icon--plus {
  opacity: 1;
}

.faq-item__icon--x {
  rotate: -45deg;
  opacity: 0;
}

.faq-item.open .faq-item__icon--plus {
  opacity: 0;
  rotate: 45deg;
}

.faq-item.open .faq-item__icon--x {
  opacity: 1;
  rotate: 0deg;
}


.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0;
  max-width: 750px;
  margin: 0 auto;
}

.faq-item.open .faq-item__answer {
  padding-bottom: auto;
}

.faq-item__answer p {
  margin: 0 0 16px;
}

@media (max-width: 768px) {
  .faq-item {
    padding: 20px;
    padding-bottom: 8px;
  }
  .faq-item__question {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 20px;
    align-items: center;
    padding: 0;
  }

  .faq-item__number {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }

  .faq-item__toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .faq-item__question-text {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 12px;
  }
}
