/* ===== FAQ ===== */
.faq { display: flex; flex-direction: column; gap: 0.75rem; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.faq__item.is-open { border-color: var(--primary-border); box-shadow: var(--shadow); }

/* Шестерёнка из логотипа поворачивается вместе с раскрытием */
.faq__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.faq__q {
  position: relative;
  padding: 1.125rem 3.5rem 1.125rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__gear {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  color: var(--primary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}
.faq__item.is-open .faq__gear {
  color: var(--primary-hover);
  transform: rotate(90deg);
}
.faq__q:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }

/* Высоту панели задаёт js на время раскрытия, поэтому overflow здесь не нужен */
.faq__a { padding: 0 1.5rem 1.25rem; color: var(--text-muted); }

/* ===== FAQ layout ===== */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}


/* ===== FAQ aside ===== */
.faq-aside {
  position: sticky;
  top: 9rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}
.faq-aside__title { margin: 0; font-size: 1.25rem; }
.faq-aside__text { margin: 0; color: var(--text-muted); }

.faq-aside__facts {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.faq-aside__facts li {
  position: relative;
  padding-left: 1.75rem;
  font-weight: 500;
}
.faq-aside__facts li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.35em;
  width: 6px;
  height: 11px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.faq-aside__btn {
  display: inline-block;
  padding: 0.875rem 1.25rem;
  text-align: center;
  font-weight: 600;
  color: var(--text-inverse);
  background: var(--primary);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.faq-aside__messengers { display: grid; gap: 0.5rem; }
.faq-aside__link {
  display: block;
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-weight: 600;
  color: var(--primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.faq-aside__link:hover { background: var(--bg); text-decoration: none; }
.faq-aside__btn:hover {
  color: var(--text-inverse);
  background: var(--primary-hover);
}

/* Планшеты и мобильные: карточка уходит под FAQ */
@media (max-width: 1180px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
}

@media (max-width: 640px) {
  .faq__q { padding: 1rem 3.25rem 1rem 1.125rem; }
  .faq__gear { right: 1.125rem; }
  .faq__a { padding: 0 1.125rem 1rem; }
}
