/* ============================================
   ECOFACTOR - FAQ Section Styles
   "Питання та відповіді"
   ============================================ */

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

.faq {
  position: relative;
  background-color: var(--color-gray-20);
  padding: 80px 0;
  width: 100%;
  overflow: hidden;
}

/* Background pattern */
.faq__bg-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.faq__content {
  position: relative;
  z-index: 1;
  max-width: 1148px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.faq__title {
  font-family: var(--font-primary);
  font-size: var(--h2-size);
  font-weight: var(--font-bold);
  line-height: var(--h2-line-height);
  color: var(--color-white);
  margin: 0;
}

/* ============================================
   ACCORDION LIST
   ============================================ */

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

/* ============================================
   ACCORDION ITEM
   ============================================ */

.faq-item {
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-95);
  border-radius: var(--radius-lg); /* 12px */
  padding: 16px;
  overflow: hidden;
}

/* Toggle header */
.faq-item__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-item__question {
  flex: 1;
  font-family: var(--font-primary);
  font-size: var(--body-size);
  font-weight: var(--font-medium);
  line-height: var(--body-line-height);
  color: var(--color-gray-20);
  margin: 0;
}

.faq-item__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* Plus icon (closed state) */
.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  background-color: var(--color-gray-30);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.faq-item__icon::before {
  width: 12px;
  height: 2px;
}

.faq-item__icon::after {
  width: 2px;
  height: 12px;
}

/* Open state - rotate to minus */
.faq-item--open .faq-item__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-item--open .faq-item__icon::before {
  background-color: var(--color-gray-20);
}

/* Answer content */
.faq-item__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base), padding var(--transition-base);
}

.faq-item--open .faq-item__content {
  max-height: 500px;
  padding-top: 16px;
}

.faq-item__answer {
  font-family: var(--font-primary);
  font-size: var(--body-small-size); /* 14px */
  font-weight: var(--font-regular);
  line-height: 1.6;
  color: var(--color-gray-20);
  margin: 0;
}

/* Hover state */
.faq-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background-color: var(--color-gray-95);
    border: 1px solid var(--color-white);
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */

@media (max-width: 1200px) {
  .faq__content {
    padding: 0 40px;
  }
}

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

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 768px) {
  .faq {
    padding: 40px 0;
  }
  
  .faq__content {
    padding: 0 20px;
    gap: 24px;
  }
  
  .faq-item {
    padding: 12px;
  }
  
  .faq-item__question {
    font-size: var(--body-small-size); /* 14px */
  }
}

