/* ============================================================
   БЛОК "FAQ" С АККОРДЕОНОМ — СТИЛЬ АФОР
   ============================================================ */

.atelier-faq {
  background: #ffffff;
  padding: 110px 24px;
}

.atelier-faq__wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- ЭЛЕМЕНТ АККОРДЕОНА ---------- */
.atelier-faq__item {
  position: relative;
  border: 1px solid #ececec;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.atelier-faq__item:hover {
  border-color: var(--afor-gold);
  box-shadow: 0 2px 8px rgba(176, 141, 87, 0.08);
}

/* ---------- ЧЕКБОКС (скрытый) ---------- */
.atelier-faq__checkbox {
  display: none;
}

/* ---------- ЛЕЙБЛ / ВОПРОС ---------- */
.atelier-faq__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.3s ease;
  user-select: none;
}

.atelier-faq__item:hover .atelier-faq__label {
  background: #fafafa;
}

.atelier-faq__question {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: var(--afor-charcoal);
  flex: 1;
}

/* ---------- ИКОНКА СТРЕЛКИ ---------- */
.atelier-faq__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 16px;
  color: var(--afor-gold);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* Иконка при активном чекбоксе */
.atelier-faq__checkbox:checked ~ .atelier-faq__label .atelier-faq__icon {
  transform: rotate(180deg);
}

/* ---------- КОНТЕНТ ОТВЕТА ---------- */
.atelier-faq__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background: #fafafa;
}

.atelier-faq__checkbox:checked ~ .atelier-faq__content {
  max-height: 500px;
  padding: 0 24px 24px;
}

/* Если ответ длинный, увеличиваем max-height */
.atelier-faq__checkbox:checked ~ .atelier-faq__content {
  max-height: 1000px;
}

.atelier-faq__answer {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: var(--afor-text);
}

.atelier-faq__answer p {
  margin: 0;
}

.atelier-faq__answer p + p {
  margin-top: 12px;
}

/* ---------- АКТИВНОЕ СОСТОЯНИЕ ---------- */
.atelier-faq__checkbox:checked ~ .atelier-faq__label {
  border-bottom: 1px solid #ececec;
}

.atelier-faq__item .atelier-faq__checkbox:checked ~ .atelier-faq__label {
  background: #ffffff;
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 768px) {
  .atelier-faq {
    padding: 80px 24px;
  }

  .atelier-faq__wrapper {
    gap: 10px;
  }

  .atelier-faq__label {
    padding: 16px 16px;
  }

  .atelier-faq__question {
    font-size: 14px;
  }

  .atelier-faq__checkbox:checked ~ .atelier-faq__content {
    padding: 0 16px 16px;
  }

  .atelier-faq__icon {
    width: 20px;
    height: 20px;
    margin-left: 12px;
  }

  .atelier-faq__answer {
    font-size: 14px;
    line-height: 1.6;
  }
}

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

  .atelier-faq__label {
    padding: 14px 12px;
    flex-wrap: wrap;
  }

  .atelier-faq__question {
    font-size: 13px;
    min-width: calc(100% - 36px);
    word-break: break-word;
  }

  .atelier-faq__icon {
    margin-left: 8px;
  }

  .atelier-faq__checkbox:checked ~ .atelier-faq__content {
    padding: 0 12px 12px;
  }

  .atelier-faq__answer {
    font-size: 13px;
  }
}
