/**
 * FAQ-аккордеон: плавное раскрытие (grid 0fr/1fr + max-height:0 как fallback).
 */
.faq-list {
  gap: 12px;
  overflow-anchor: none;
}

.faq,
.faq-svc {
  overflow-anchor: none;
}

.faq-item {
  border: 1px solid rgba(11, 37, 69, 0.08);
  background: var(--white);
  box-shadow: 0 4px 18px rgba(11, 37, 69, 0.06);
  overflow: hidden;
  transition:
    border-color 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.open {
  border-color: rgba(62, 207, 178, 0.32);
  box-shadow: 0 14px 36px rgba(11, 37, 69, 0.1);
}

.faq-q {
  gap: 16px;
  cursor: pointer;
  transition: background-color 0.28s ease;
}

.faq-item.open .faq-q {
  background: rgba(62, 207, 178, 0.07);
}

.faq-q-icon {
  transition:
    transform 0.44s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.32s ease,
    color 0.32s ease;
}

/* Закрыто: обязательно 0 — иначе inline max-height перестаёт работать */
.faq-list .faq-item:not(.open) .faq-a {
  display: grid !important;
  grid-template-rows: 0fr !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 28px !important;
  padding-right: 28px !important;
  transition:
    grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.faq-list .faq-item.open .faq-a {
  display: grid !important;
  grid-template-rows: 1fr !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 28px 24px !important;
  transition:
    grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.faq-a__inner {
  overflow: hidden;
  min-height: 0;
}

.faq-item:not(.open) .faq-a__inner {
  opacity: 0;
  visibility: hidden;
}

.faq-item.open .faq-a__inner {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease 0.06s;
}

.faq-a__inner > p {
  margin: 0 0 0.75em;
}

.faq-a__inner > p:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .faq-q {
    padding-left: 18px !important;
    padding-right: 18px !important;
    gap: 12px !important;
  }

  .faq-list .faq-item:not(.open) .faq-a,
  .faq-list .faq-item.open .faq-a {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .faq-list .faq-item.open .faq-a {
    padding-bottom: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-q,
  .faq-q-icon,
  .faq-list .faq-item .faq-a,
  .faq-a__inner {
    transition: none !important;
  }

  .faq-item:not(.open) .faq-a__inner {
    opacity: 0;
    visibility: hidden;
  }

  .faq-item.open .faq-a__inner {
    opacity: 1;
    visibility: visible;
  }
}
