/* ==========================================================================
   Fastkava — B12 FAQ / «Нас часто питають»
   Centred kicker + two-tone heading, then two columns of glass accordion
   items. Panels animate with grid-template-rows (0fr → 1fr) and degrade to a
   plain snap where that is not animatable. With JS off every panel stays open.
   ========================================================================== */

.fk-questions {
  --fk-faq-r: 14px;
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 9vw, 120px);
}

/*
 * Ambient circle behind the title — static, painted, no filter.
 *
 * `closest-side` so it is fully transparent at its own box edge: .fk-questions
 * has `overflow: hidden`, and a gradient still carrying alpha there would be
 * sliced into a hard rectangle. Centred, because this block's head is centred.
 */
.fk-questions__glow {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(300px, 36vw, 560px);
  height: clamp(300px, 36vw, 560px);
  pointer-events: none;
  background: radial-gradient(circle closest-side at 50% 50%,
    rgba(251, 83, 0, .16) 0%,
    rgba(251, 83, 0, .128) 18%,
    rgba(251, 83, 0, .092) 34%,
    rgba(251, 83, 0, .056) 50%,
    rgba(251, 83, 0, .028) 64%,
    rgba(251, 83, 0, .012) 78%,
    rgba(251, 83, 0, .003) 90%,
    transparent 100%);
}
:root[data-theme="light"] .fk-questions__glow {
  background: radial-gradient(circle closest-side at 50% 50%,
    rgba(251, 83, 0, .10) 0%,
    rgba(251, 83, 0, .08) 18%,
    rgba(251, 83, 0, .058) 34%,
    rgba(251, 83, 0, .035) 50%,
    rgba(251, 83, 0, .018) 64%,
    rgba(251, 83, 0, .008) 78%,
    rgba(251, 83, 0, .002) 90%,
    transparent 100%);
}

/* Sits above the glow: both positioned, this one later in the DOM. */
.fk-questions__inner { position: relative; }

/* ---- Head ---------------------------------------------------------------- */
.fk-questions__head {
  text-align: center;
  margin-bottom: clamp(32px, 4.5vw, 60px);
}
.fk-questions__kicker {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(10px, 1vw, 12px);
  margin-bottom: clamp(10px, 1.2vw, 16px);
  font-size: clamp(10.5px, 1vw, 13px);
  font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: var(--fk-text-muted);
}
.fk-questions__kicker-line {
  flex: none; width: clamp(26px, 2.6vw, 34px); height: 2px;
  background: var(--fk-accent);
}
.fk-questions__title {
  margin: 0 auto;
  max-width: 750px;
  font-size: clamp(27px, 4.2vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .5px;
  text-wrap: balance;
}
.fk-questions__title span { color: var(--fk-heading); }
.fk-questions__title span.fk-questions__title-accent { color: var(--fk-accent); }

/* ---- Columns ------------------------------------------------------------- */
.fk-questions__cols {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: clamp(12px, 1.8vw, 24px);
}
.fk-questions__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.2vw, 16px);
}

/* ---- Accordion item ------------------------------------------------------ */
.fk-questions__item { position: relative; }
.fk-questions__q { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; }

.fk-questions__btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(14px, 1.5vw, 20px);
  box-sizing: border-box;
  margin: 0;
  padding: clamp(17px, 1.7vw, 22px) clamp(18px, 2vw, 26px);
  text-align: left;
  font-family: inherit;
  font-size: clamp(14.5px, 1.45vw, 19px);
  font-weight: 700;
  line-height: 1.4;
  text-wrap: pretty;
  cursor: pointer;
  color: var(--fk-heading);
  background: var(--fk-surface-soft);
  border: 1px solid var(--fk-border);
  border-radius: var(--fk-faq-r);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: background .25s var(--fk-ease), border-color .25s var(--fk-ease), color .25s var(--fk-ease);
}
:root[data-theme="light"] .fk-questions__btn {
  background: rgba(255,255,255,.45);
  border-color: rgba(26,21,18,.10);
  box-shadow: 0 10px 30px rgba(26,21,18,.08);
}
.fk-questions__btn:hover { border-color: var(--fk-border-strong); }
.fk-questions__btn:focus-visible {
  outline: 2px solid var(--fk-accent);
  outline-offset: 3px;
}
.fk-questions__item.is-open .fk-questions__btn {
  background: rgba(251,83,0,.12);
  border-color: var(--fk-accent);
  border-radius: var(--fk-faq-r) var(--fk-faq-r) 0 0;
}
:root[data-theme="light"] .fk-questions__item.is-open .fk-questions__btn {
  background: rgba(251,83,0,.08);
  border-color: var(--fk-accent);
}
.fk-questions__q-text { display: block; }

/* Chevron drawn from two borders — inherits the button colour. */
.fk-questions__chev {
  flex: none;
  width: 10px; height: 10px;
  margin-top: -4px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .3s var(--fk-ease);
}
.fk-questions__item.is-open .fk-questions__chev { transform: rotate(-135deg) translate(-3px, -3px); }

/* ---- Panel --------------------------------------------------------------- */
.fk-questions__panel {
  display: grid;
  grid-template-rows: 1fr;   /* open by default → readable without JS */
}
.fk-questions[data-js="1"] .fk-questions__item:not(.is-open) .fk-questions__panel {
  grid-template-rows: 0fr;
}
.fk-questions.is-ready .fk-questions__panel {
  transition: grid-template-rows .4s ease;
}
.fk-questions__panel-clip { overflow: hidden; min-height: 0; }
.fk-questions[data-js="1"] .fk-questions__item:not(.is-open) .fk-questions__panel-clip {
  visibility: hidden;
}
.fk-questions.is-ready .fk-questions__panel-clip { transition: visibility 0s linear .4s; }
.fk-questions.is-ready .fk-questions__item.is-open .fk-questions__panel-clip { transition: visibility 0s linear 0s; }

.fk-questions__a {
  box-sizing: border-box;
  padding: clamp(16px, 1.7vw, 22px) clamp(18px, 2vw, 26px);
  color: var(--fk-text-muted);
  font-size: clamp(13.5px, 1.2vw, 16px);
  line-height: 1.65;
  font-weight: 500;
  text-wrap: pretty;
  background: rgba(18,14,10,.45);
  border: 1px solid var(--fk-border);
  border-top: none;
  border-radius: 0 0 var(--fk-faq-r) var(--fk-faq-r);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
:root[data-theme="light"] .fk-questions__a {
  background: rgba(255,255,255,.62);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  backdrop-filter: blur(28px) saturate(1.6);
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .fk-questions { --fk-faq-r: 12px; }
  /* Two narrow columns squeeze the questions onto 4+ lines — stack them. */
  .fk-questions__cols { flex-direction: column; gap: 14px; }
  .fk-questions__col { width: 100%; gap: 14px; }
}
@media (max-width: 640px) {
  .fk-questions { --fk-faq-r: 11px; }
  .fk-questions__cols { gap: 12px; }
  .fk-questions__col { gap: 12px; }
  .fk-questions__chev { width: 8px; height: 8px; border-width: 0 2px 2px 0; margin-top: -3px; }
  .fk-questions__item.is-open .fk-questions__chev { transform: rotate(-135deg) translate(-2px, -2px); }
  .fk-questions__title { max-width: 100%; }
}

/*
 * Twelve backdrop-filters (six questions × button + answer panel) re-blurring
 * their backdrop on every scroll frame. Opaque panels instead — see the same
 * note in vendings.css. Backgrounds are raised to carry the legibility the
 * blur was doing.
 */
@media (max-width: 900px) {
  .fk-questions__btn,
  .fk-questions__a {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .fk-questions__btn { background: rgba(28, 23, 18, .88); }
  .fk-questions__a   { background: rgba(18, 14, 10, .90); }
  :root[data-theme="light"] .fk-questions__btn { background: rgba(255, 255, 255, .90); }
  :root[data-theme="light"] .fk-questions__a   { background: rgba(255, 255, 255, .94); }
}

@media (prefers-reduced-motion: reduce) {
  .fk-questions.is-ready .fk-questions__panel,
  .fk-questions.is-ready .fk-questions__panel-clip,
  .fk-questions.is-ready .fk-questions__item.is-open .fk-questions__panel-clip,
  .fk-questions__btn,
  .fk-questions__chev {
    transition: none;
  }
}
