/* Страница «Ответы на вопросы» (/faq) в стиле воронки.

   Подключается ПОСЛЕ nf-funnel.css и переиспользует его каркас: .nff-page,
   .nff-shell, .nff-top, .nff-head, .nff-list, .nff-item. Здесь — только то,
   чего в воронке нет: плитка с иконкой темы, бейджи (число вопросов и лайки),
   раскрытие темы и карточка видео со всеми площадками сразу.

   Размеры — в единицах эталона 853 × масштаб --s, как во всей воронке. */

/* ── Тема (аккордеон) ────────────────────────────────────────────────────── */
.nff-faq { margin-bottom: calc(22 * var(--s)); }

/* Заголовок темы — тот же блок, что пункт списка воронки, но кликабельный
   <summary>. Свой отступ снизу обнуляем: им управляет .nff-faq. */
.nff-faq__sum {
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: calc(20 * var(--s));
}
.nff-faq__sum::-webkit-details-marker { display: none; }
.nff-faq[open] > .nff-faq__sum {
  background-color: #071021;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 calc(34 * var(--s)) rgba(37,231,255,.26),
    0 0 calc(38 * var(--s)) rgba(240,79,255,.22);
}

/* Плитка с иконкой темы. Оттенок задаётся модификатором --cyan/--violet/… —
   иначе длинный список выглядит одноцветной простынёй. */
.nff-faq__ico {
  width: calc(96 * var(--s)); height: calc(96 * var(--s));
  flex: none; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  border-radius: calc(26 * var(--s));
  background: #060b16;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.nff-faq__ico svg { width: 58%; height: 58%; display: block; }
.nff-faq__ico--cyan    { background: radial-gradient(circle at 50% 45%, rgba(37,231,255,.20), rgba(6,11,22,1) 72%);
                         box-shadow: inset 0 0 0 1px rgba(37,231,255,.28), 0 0 calc(20 * var(--s)) rgba(37,231,255,.18); }
.nff-faq__ico--violet  { background: radial-gradient(circle at 50% 45%, rgba(118,88,255,.24), rgba(6,11,22,1) 72%);
                         box-shadow: inset 0 0 0 1px rgba(118,88,255,.32), 0 0 calc(20 * var(--s)) rgba(118,88,255,.20); }
.nff-faq__ico--blue    { background: radial-gradient(circle at 50% 45%, rgba(63,147,255,.22), rgba(6,11,22,1) 72%);
                         box-shadow: inset 0 0 0 1px rgba(63,147,255,.30), 0 0 calc(20 * var(--s)) rgba(63,147,255,.18); }
.nff-faq__ico--magenta { background: radial-gradient(circle at 50% 45%, rgba(240,79,255,.20), rgba(6,11,22,1) 72%);
                         box-shadow: inset 0 0 0 1px rgba(240,79,255,.30), 0 0 calc(20 * var(--s)) rgba(240,79,255,.18); }

/* Название темы чуть мельче пунктов воронки: рядом ещё два бейджа. */
.nff-faq__title { font-size: calc(32 * var(--s)); }

/* ── Бейджи ──────────────────────────────────────────────────────────────── */
.nff-badge {
  flex: none; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  gap: calc(8 * var(--s));
  min-width: calc(56 * var(--s));
  padding: calc(8 * var(--s)) calc(16 * var(--s));
  border-radius: 999px;
  font-size: calc(26 * var(--s)); font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* Бейдж может быть и кнопкой (лайк, «Скоро») — снимаем системные стили. */
button.nff-badge { border: 0; cursor: pointer; font-family: inherit; }
.nff-badge--count {
  color: #8ee9f2;
  background: rgba(37,231,255,.10);
  box-shadow: inset 0 0 0 1px rgba(37,231,255,.42);
}
/* Лайк — кнопка, поэтому сбрасываем системные стили button. */
.nff-badge--like {
  border: 0; cursor: pointer; font-family: inherit;
  color: #ff9bd6;
  background: rgba(240,79,255,.10);
  box-shadow: inset 0 0 0 1px rgba(240,79,255,.44);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.nff-badge--like svg {
  width: calc(28 * var(--s)); height: calc(28 * var(--s));
  fill: none; stroke: currentColor; stroke-width: 2;
}
.nff-badge--like:active { transform: scale(.93); }
.nff-badge--like.on {
  color: #fff;
  background: linear-gradient(135deg, #f04fff 0%, #b85fa3 100%);
  box-shadow: 0 0 calc(18 * var(--s)) rgba(240,79,255,.45);
}
.nff-badge--like.on svg { fill: #fff; }
@keyframes nffLikePop { 0%{transform:scale(1)} 35%{transform:scale(1.24)} 60%{transform:scale(.96)} 100%{transform:scale(1)} }
.nff-badge--like.burst { animation: nffLikePop .38s ease; }

/* Бейдж «Скоро» */
.nff-badge--soon {
  color: #ffd08a;
  background: rgba(255,184,77,.12);
  box-shadow: inset 0 0 0 1px rgba(255,184,77,.42);
  white-space: nowrap;
}

/* Шеврон: вниз при раскрытии. */
.nff-faq__chev {
  flex: none; z-index: 3;
  width: calc(26 * var(--s)); height: calc(26 * var(--s));
  color: #4fd4e8;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.nff-faq__chev svg { width: 100%; height: 100%; display: block; }
.nff-faq[open] > .nff-faq__sum .nff-faq__chev { transform: rotate(90deg); }

/* ── Карточки внутри темы ────────────────────────────────────────────────── */
.nff-faq__cards {
  display: flex; flex-direction: column;
  gap: calc(26 * var(--s));
  padding: calc(24 * var(--s)) 0 calc(10 * var(--s));
}

.nff-card {
  position: relative;
  border-radius: calc(30 * var(--s));
  background-color: #04070f;
  background: linear-gradient(100deg, rgba(37,231,255,.07), rgba(2,4,10,0) 46%, rgba(240,79,255,.08));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 0 calc(24 * var(--s)) rgba(37,231,255,.12),
    0 0 calc(28 * var(--s)) rgba(240,79,255,.10);
  overflow: hidden;
  isolation: isolate;
}
.nff-card::before {
  content: ''; position: absolute; inset: 0; z-index: 2;
  border-radius: inherit; padding: calc(1.4 * var(--s) + 0.6px);
  background: linear-gradient(115deg, rgba(37,231,255,.55), rgba(63,147,255,.32) 40%,
                              rgba(118,88,255,.38) 72%, rgba(240,79,255,.48));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; pointer-events: none;
}

.nff-card__thumb {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  object-fit: cover; background: #060b16;
}
.nff-card__thumb--empty {
  display: flex; align-items: center; justify-content: center;
  color: #5c6076; font-size: calc(24 * var(--s));
  background: rgba(255,255,255,.03);
}

.nff-card__body {
  position: relative; z-index: 3;
  padding: calc(24 * var(--s)) calc(26 * var(--s)) calc(26 * var(--s));
}
.nff-card__q {
  margin: 0; font-size: calc(30 * var(--s)); font-weight: 500;
  line-height: 1.28; color: #f7f7f8;
}
.nff-card__row {
  display: flex; align-items: center; gap: calc(14 * var(--s));
  margin-top: calc(18 * var(--s));
}
.nff-card__off {
  display: block; margin-top: calc(8 * var(--s));
  font-size: calc(24 * var(--s)); font-weight: 400; color: #ff8fdc;
}

/* ── Площадки: видны сразу, без кнопки «Смотреть» ────────────────────────── */
.nff-plats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(14 * var(--s));
  margin-top: calc(20 * var(--s));
}
/* Мало площадок — раскладываем по их числу, а не по четыре колонки. */
.nff-plats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nff-plats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Единственная площадка — широкая строка «значок + подпись», как кнопка. */
.nff-plats--1 { grid-template-columns: 1fr; }
.nff-plats--1 .nff-plat { flex-direction: row; justify-content: center; gap: calc(14 * var(--s)); }
.nff-plats--1 .nff-plat__ic { width: calc(40 * var(--s)); height: calc(40 * var(--s)); }
.nff-plats--1 .nff-plat__lb { font-size: calc(26 * var(--s)); color: #e7ebf5; }

.nff-plat {
  display: flex; flex-direction: column; align-items: center;
  gap: calc(10 * var(--s));
  padding: calc(18 * var(--s)) calc(6 * var(--s)) calc(14 * var(--s));
  border-radius: calc(22 * var(--s));
  background: #070c17;
  box-shadow: inset 0 0 0 1px rgba(120,150,200,.18);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow .15s ease, background .15s ease, transform .12s ease;
}
.nff-plat:active { transform: scale(.96); background: #0a1223; }
.nff-plat:hover { box-shadow: inset 0 0 0 1px rgba(37,231,255,.5), 0 0 calc(16 * var(--s)) rgba(37,231,255,.16); }
.nff-plat__ic { width: calc(48 * var(--s)); height: calc(48 * var(--s)); display: block; }
.nff-plat__ic svg { width: 100%; height: 100%; display: block; }
.nff-plat__lb {
  font-size: calc(20 * var(--s)); font-weight: 400; color: #aab2c6;
  text-align: center; line-height: 1.1;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Карточка без ссылок / помеченная «Скоро» */
.nff-card--soon .nff-card__thumb { filter: grayscale(.5) brightness(.7); }
.nff-card--off { opacity: .55; }

/* ── Оверлей «Скоро» ─────────────────────────────────────────────────────── */
.nff-soon {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center;
  background: rgba(2,4,10,.78); backdrop-filter: blur(6px); padding: 24px;
}
.nff-soon.show { display: flex; }
.nff-soon__card {
  width: 100%; max-width: 340px; text-align: center;
  padding: 34px 24px 26px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(12,18,32,.96), rgba(4,7,15,.98));
  box-shadow: inset 0 0 0 1px rgba(37,231,255,.28), 0 24px 70px rgba(0,0,0,.62);
}
.nff-soon__orb {
  width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7fe9f2 0%, #25e7ff 32%, #7658ff 72%, #f04fff 100%);
  box-shadow: 0 0 40px rgba(37,231,255,.5), 0 0 72px rgba(240,79,255,.34);
  animation: nffBreathe 3.4s ease-in-out infinite;
}
@keyframes nffBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}
.nff-soon__title { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: #f7f7f8; }
.nff-soon__text { margin: 0 0 20px; font-size: 13.5px; line-height: 1.55; color: #9ca3b5; }
.nff-soon__btn {
  padding: 11px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 14px; color: #04121a;
  background: linear-gradient(115deg, #25e7ff, #7658ff);
}
@media (prefers-reduced-motion: reduce) { .nff-soon__orb { animation: none; } }

/* Обложки роликов дышат — как фото на главной и в базе знаний.
   Анимируем только transform: он считается видеокартой, а в раскрытой теме
   таких карточек могут быть десятки, и анимация теней их бы подтормаживала.
   Размах меньше, чем у обложек базы: на превью есть надписи у самого края,
   и сильный наезд начал бы их подрезать. */
.nff-card__thumb {
  animation: nffThumbBreath 4.6s ease-in-out infinite;
  will-change: transform;
}
@keyframes nffThumbBreath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .nff-card__thumb { animation: none; }
}
/* Заглушка «обложка появится позже» — не картинка, дышать ей незачем. */
.nff-card__thumb--empty { animation: none; }

/* ── Десктоп ─────────────────────────────────────────────────────────────────
   Темы оставляем в одну колонку: раскрытая тема «выталкивает» соседей, и в
   сетке список бы прыгал. А карточки внутри раскрытой темы, наоборот,
   раскладываем в несколько колонок — их бывает много. */
@media (min-width: 900px) {
  .nff-list { max-width: 1040px; margin-left: auto; margin-right: auto; }
  .nff-faq__sum { min-height: 96px; }
  .nff-faq__ico { width: 62px; height: 62px; border-radius: 17px; }
  .nff-faq__title { font-size: 21px; }
  .nff-badge { font-size: 15px; padding: 6px 12px; min-width: 38px; }
  .nff-badge--like svg { width: 17px; height: 17px; }

  .nff-faq__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 18px 0 8px;
  }
  .nff-card__q { font-size: 18px; }
  .nff-plat__lb { font-size: 13px; }
}
