/* ============================================================
   BLOCK 10 «FAQ» (Figma node 922:2830) — вопросы/ответы.
   Шапка (заголовок + dash + текст) → меню категорий (табы) слева
   + аккордеон вопросов справа. Низ — декоративные gradient-бары.
   ============================================================ */
/* подложка под блок FAQ — чёрный фон #0A0A0A БЕЗ скругления (full-bleed),
   серая SVG-карта .faq растянута на всю ширину/высоту (padding 0), скругление у неё */
.faq-bg {
  background: #0A0A0A;
  padding: 0;
  border-radius: 0;
}
.faq {
  position: relative;
  margin: 0;
  border-radius: 32px;
  /* фон-артборд из Figma (assets/bg 03.svg): тёмная панель + градиентные колонны */
  background: #090909 url('../../public/assets/block10/bg03.svg') no-repeat center bottom / cover;
  overflow: hidden;
  isolation: isolate;
  padding: 88px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
}

/* ── Фон: gradient-бары + вертикальные линии (низ) ──────────── */
.faq__bg {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 1440px;
  height: 784px;
  z-index: 0;
  pointer-events: none;
}
.faq__bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.faq__bars span {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.04) 100%);
  flex: none;
}
.faq__bars span:nth-child(1), .faq__bars span:nth-child(10) { width: 88px; height: 784px; }
.faq__bars span:nth-child(2), .faq__bars span:nth-child(9)  { width: 158px; height: 558px; }
.faq__bars span:nth-child(3), .faq__bars span:nth-child(8)  { width: 158px; height: 302px; }
.faq__bars span:nth-child(4), .faq__bars span:nth-child(7)  { width: 158px; height: 173px; }
.faq__bars span:nth-child(5), .faq__bars span:nth-child(6)  { width: 158px; height: 84px; }
.faq__lines {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  padding: 0 84px;
  gap: 151px;
  opacity: 0.04;
}
.faq__lines span {
  flex: 1;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0) 100%) no-repeat left top;
  background-size: 1px 100%;
}

/* ── Шапка ──────────────────────────────────────────────────── */
.faq__head {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}
.faq__title {
  position: relative;
  z-index: 1;
  width: 563px;
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 700; font-style: italic;
  font-size: 72px; line-height: 72px; text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #717171 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; letter-spacing: normal; }
.faq__line {
  position: absolute;
  left: -70px;
  top: 139px;
  width: 394px;
  height: 1px;
  z-index: 0;
  pointer-events: none;
  transform: rotate(-2deg);
}
.faq__line svg { display: block; width: 100%; height: 100%; overflow: visible; }
.faq__sub {
  width: 590px;
  margin: 0;
  font-family: var(--ff-body);
  font-size: 24px; line-height: 32px;
  text-align: right;
  color: var(--light-1000);
}
.faq__sub b { font-weight: 700; letter-spacing: normal; }

/* ── Тело: меню категорий + аккордеон ───────────────────────── */
.faq__body {
  position: relative;
  z-index: 2;
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

/* меню категорий (табы) */
.faq__menu {
  width: 512px;
  flex: none;
  border-radius: 12px;
  background: #191919;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  overflow: hidden;
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.faq__tab {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  font-family: var(--ff-body); font-weight: 700;
  font-size: 16px; line-height: 24px; letter-spacing: .04em;
  text-transform: uppercase; text-align: left;
  color: var(--light-600);
  cursor: pointer;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease;
}
.faq__tab .icon { width: 24px; height: 24px; flex: none; opacity: .5; display: block; background: none; transition: opacity .2s ease; }
.faq__tab .icon img { width: 100%; height: 100%; display: block; object-fit: contain; }
/* разделитель снизу (inset 16px), кроме последнего пункта */
.faq__tab:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 1px;
  background: var(--light-40); pointer-events: none;
}
/* hover + active — ОДИНАКОВАЯ подсветка у любого пункта */
.faq__tab:hover,
.faq__tab--active {
  background: var(--light-40);
  color: var(--light-1000);
}
.faq__tab:hover::after,
.faq__tab--active::after { opacity: 0; }
.faq__tab:hover .icon,
.faq__tab--active .icon { opacity: 1; }

/* аккордеон */
.faq__list {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.faq__item { display: flex; align-items: flex-start; }
.faq__q {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 8px 0 0 8px;
  background: #191919;
  border-right: 1px solid var(--light-40);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;   /* текст по центру по вертикали */
  gap: 0;
  cursor: pointer;
}
.faq__q-title {
  margin: 0;
  align-self: stretch;
  font-family: var(--ff-body); font-weight: 700;
  font-size: 20px; line-height: 28px; text-transform: uppercase;
  color: var(--light-1000); letter-spacing: normal; }
.faq__a {
  margin: 0;
  align-self: stretch;
  font-family: var(--ff-body); font-weight: 400;
  font-size: 18px; line-height: 28px; letter-spacing: var(--ls-body);
  color: rgba(255,255,255,.63);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .35s ease, opacity .3s ease, margin-top .35s ease;
}
.faq__a b { font-weight: 700; letter-spacing: normal; }
.faq__item.is-open .faq__a { max-height: 400px; opacity: 1; margin-top: 8px; }

.faq__toggle {
  align-self: stretch;
  width: 48px; flex: none;
  border-radius: 0 8px 8px 0;
  background: #191919;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--light-1000);
  transition: background .2s ease;
}
.faq__item.is-open .faq__toggle { background: var(--light-1000); color: var(--dark-1000); }
.faq__toggle svg { width: 18px; height: 18px; display: block; }
.faq__toggle .faq__minus { display: none; }
.faq__item.is-open .faq__toggle .faq__plus { display: none; }
.faq__item.is-open .faq__toggle .faq__minus { display: block; }

/* ховер пункта аккордеона — как у карточек: лёгкий лифт + подсветка фона */
.faq__item { transition: transform .18s ease; }
.faq__q { transition: background .18s ease; }
.faq__item:hover { transform: translateY(-4px); }
.faq__item:hover .faq__q { background: #202020; }
.faq__item:not(.is-open):hover .faq__toggle { background: #202020; }

/* мобайл-вариант «темы со своими дропдаунами» — по умолчанию скрыт (десктоп = табы) */
.faq__topics { display: none; }

/* ── Адаптив ────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .faq { padding: 56px; }
  .faq__title { font-size: 48px; line-height: 48px; width: auto; }
  .faq__head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .faq__sub { width: auto; text-align: left; }
  .faq__line { display: none; }
  .faq__body { flex-direction: column; }
  .faq__menu { width: 100%; }
  .faq__list { width: 100%; }
}
@media (max-width: 768px) {
  /* мобайл pixel-perfect (Figma 477:2175): pad 48/16, заголовок Druk 40, подзаг 18/26, radius 24 */
  .faq-bg { padding: 0; border-radius: 0; }
  .faq { padding: 48px 16px; border-radius: 24px; gap: 32px; }
  .faq__title { font-size: 40px; line-height: 40px; width: auto; }
  .faq__sub { font-size: 18px; line-height: 26px; }
  .faq__head { gap: 16px; position: relative; }
  /* dash под заголовком FAQ (2 строки Druk 40), поднят на 18px */
  .faq__line {
    display: block; position: absolute; left: 50%; top: 70px;
    width: min(300px, calc(100% - 40px)); height: 1px; z-index: 1;
    transform: translateX(-50%) rotate(-2.4deg);
  }
  .faq__body { gap: 8px; }
  .faq__q { padding: 16px 20px; }
  .faq__q-title { font-size: 18px; line-height: 26px; }

  /* ── FAQ по темам (Figma 477:2245): табы и одиночный список скрыты, темы стеком ── */
  .faq__menu { display: none; }
  .faq__list[data-faq-acc] { display: none; }
  .faq__topics { display: flex; flex-direction: column; gap: 12px; width: 100%; }
  .faq__topic {
    border-radius: 12px; background: #191919; padding: 4px;
    display: flex; flex-direction: column; gap: 0;   /* gap 0 → закрытая плашка симметрична (зазор только когда открыта) */
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  /* шапка темы: иконка + название + шеврон (тап раскрывает тему) */
  .faq__topic-head {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 12px 16px; border-radius: 8px; background: var(--light-40);
  }
  .faq__topic-title { flex: 1 1 auto; }
  .faq__topic-chev { width: 18px; height: 18px; flex: none; color: var(--light-600); transition: transform .25s ease; }
  .faq__topic.is-open .faq__topic-chev { transform: rotate(180deg); }
  /* вопросы темы скрыты по умолчанию, раскрываются при .is-open темы */
  .faq__list--topic { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
  .faq__topic.is-open .faq__list--topic { max-height: 1600px; margin-top: 4px; }   /* зазор head↔вопросы только в раскрытой теме */
  .faq__topic-ic { width: 24px; height: 24px; flex: none; display: block; opacity: .7; }
  .faq__topic-ic img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .faq__topic-title {
    margin: 0; font-family: var(--ff-body); font-weight: 700;
    font-size: 16px; line-height: 24px; letter-spacing: .04em;
    text-transform: uppercase; color: var(--light-1000);
  }
  /* аккордеон внутри темы */
  .faq__list--topic { gap: 4px; width: 100%; flex: none; }   /* не flex:1 (иначе высота 0 при max-height) */
  .faq__topic .faq__q { background: rgba(15,15,15,.6); }
  .faq__topic .faq__a { font-size: 16px; line-height: 24px; }
  /* тоггл инвертирован (как в макете): закрытый = белый «+», открытый = тёмный «−» */
  .faq__topic .faq__item .faq__toggle { background: var(--light-1000); color: var(--dark-1000); }
  .faq__topic .faq__item.is-open .faq__toggle { background: rgba(15,15,15,.6); color: var(--light-1000); }
  /* без hover-лифта на тач */
  .faq__topic .faq__item:hover { transform: none; }
  .faq__topic .faq__item:hover .faq__q { background: rgba(15,15,15,.6); }
}
@media (max-width: 600px) {
  .faq__title { font-size: 34px; line-height: 36px; }
}
