/* ================= БЛОК FAQ ================= */
.faq-block {
  padding: 100px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.faq-block .section-title {
  text-align: center;
  margin-bottom: 50px;
}

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ================= ЭЛЕМЕНТ ================= */
.faq-item {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.faq-item[open] {
  border-color: rgba(58, 160, 255, 0.3);
  background: #15171a;
}

/* ================= ВОПРОС (SUMMARY) ================= */
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 25px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  list-style: none; /* Убираем стандартный треугольник */
  transition: color 0.3s ease;
}

/* Убираем стандартный маркер в Safari */
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question span:first-child {
  flex: 1; /* Текст занимает всё свободное место */
}

/* ================= ИКОНКА (ПЛЮС / МИНУС) ================= */
.faq-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--accent);
  transition: transform 0.3s ease;
}

/* Горизонтальная линия */
.faq-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

/* Вертикальная линия */
.faq-icon::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

/* При открытии вертикальная линия исчезает (превращается в минус) */
.faq-item[open] .faq-icon::after {
  transform: translateX(-50%) scaleY(0);
}

/* ================= ОТВЕТ ================= */
.faq-answer {
  padding: 0 25px 25px 25px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.faq-answer p {
  margin: 0;
}

/* ================= ПЛАВНАЯ АНИМАЦИЯ ================= */
/* Браузеры с поддержкой (Chrome 129+, Safari 17.4+) анимируют сами */
@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }
  
  .faq-item::details-content {
    transition: height 0.4s ease, content-visibility 0.4s ease allow-discrete;
    height: 0;
    overflow: hidden;
  }
  
  .faq-item[open]::details-content {
    height: auto;
  }
}