/* =====================================================================
                    FAQ СЕКЦИЯ С АККОРДЕОНАМИ
   ===================================================================== */

.faq-section {
  padding: 3rem var(--padding-x);
  background: #ffffff;
  margin: 2rem 0;
}

.faq-section__container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-section__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.faq-section__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem;
}

.faq-section__subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

.faq-section__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}

.faq-item__header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.3s ease;
  gap: 1rem;
  min-width: 0;
  box-sizing: border-box;
}

.faq-item__header:hover {
  background: #f9fafb;
}

.faq-item.is-open .faq-item__header {
  background: #f9fafb;
}

.faq-item__header[aria-expanded="true"] {
  background: #f9fafb;
}

.faq-item__question {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  word-wrap: break-word !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  display: block;
  line-height: 1.4;
}

.faq-item__icon {
  width: 20px;
  height: 20px;
  color: #6b7280;
  flex-shrink: 0;
  transition: transform 0.3s ease, color 0.3s ease;
  margin-top: 0.125rem;
}

.faq-item.is-open .faq-item__icon,
.faq-item__header[aria-expanded="true"] .faq-item__icon {
  transform: rotate(180deg);
  color: #dc2626;
}

.faq-item__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease-out;
}

.faq-item__body-inner {
  padding: 0.5rem 1.5rem 1.25rem;
}

.faq-item__body-inner p {
  font-size: 1rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
  .faq-section {
    padding: 2rem var(--padding-x);
  }

  .faq-section__title {
    font-size: 1.5rem;
  }

  .faq-item__header {
    padding: 1rem 1rem;
    gap: 0.75rem;
  }

  .faq-item__question {
    font-size: 1rem;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    min-width: 0;
    max-width: 100%;
    display: block;
  }

  .faq-item__body-inner {
    padding: 0.5rem 1rem 1rem;
  }
}

@media (max-width: 480px) {
  .faq-item__header {
    padding: 0.875rem 0.75rem;
    gap: 0.5rem;
  }

  .faq-item__question {
    font-size: 0.9375rem;
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: block;
  }

  .faq-item__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
}

@media (max-width: 360px) {
  .faq-item__header {
    padding: 0.75rem 0.5rem;
    gap: 0.5rem;
  }

  .faq-item__question {
    font-size: 0.875rem;
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: block;
  }
}

@media (max-width: 320px) {
  .faq-item__header {
    padding: 0.625rem 0.5rem;
    gap: 0.375rem;
  }

  .faq-item__question {
    font-size: 0.8125rem;
    line-height: 1.4;
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: block;
  }

  .faq-item__icon {
    width: 16px;
    height: 16px;
  }
}
