.faq-section {
  padding: 60px 40px;
  /* Same step as .site-footer on purpose — on articles the two sit flush. */
  background-color: var(--color-surface-muted);
}

.faq-section .faq-section-title {
  text-align: center;
  margin-bottom: 40px;
  color: var(--color-navy);
  font-size: 3.2rem;
}

.faq-accordion {
  max-width: 1400px;
  margin: 0 auto;
}

.faq-item {
  overflow: hidden;
  border-bottom: 1px solid var(--color-navy);
}

.faq-question {
  width: 100%;
  border: none;
  padding: 20px;
  text-align: left;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: transparent; 
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  font-family: 'Montserrat', sans-serif;
  transition: color 0.3s ease;
}

/* Ring sits inside the button: .faq-item is overflow:hidden, so the site's usual
   outward offset would be clipped at the item's edges. Red per the site's focus
   convention (header.css:198, main-menu.css:232). */
.faq-question:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: -2px;
  border-radius: 2px;
}

.faq-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  /* stroke mirrors --color-text-muted by hand: data URIs can't read custom properties. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease, background-image 0.3s ease;
}

.faq-item.active .faq-icon,
.faq-item.closing .faq-icon {
  transform: rotate(-180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D3142' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.faq-answer {
  overflow: hidden;
  transition: height 0.3s ease;
  height: 0;
  font-size: 1.6rem;
}

.faq-item.active .faq-answer {
  height: auto;
}

.faq-answer p {
  margin: 0 20px 20px 20px;
  color: var(--color-navy);
  font-weight: 500;
  line-height: 1.6;
  font-family: 'Montserrat', sans-serif; /* Добавлено для согласованности */
}

.faq-item.active .faq-question,
.faq-item.closing .faq-question {
  color: var(--color-navy);
}

/* Медиа-запрос для экранов шириной менее 768px */
@media screen and (max-width: 767px) {
  .faq-section {
    padding: 40px 20px;
  }

  .faq-section .faq-section-title {
    font-size: 2.4rem;
    text-align: left;
  }

  .faq-question {
    font-size: 1.8rem;
    padding: 15px 10px;
  }

  .faq-answer p {
    font-size: 1.5rem;
    margin: 0 10px 15px 10px;
  }

}
