/* ==========================================================================
   FAQ (/faq/) — новый дизайн
   Разметка: templates/template-faq-v2.php + includes/faq-page.php
   Токены — как на новой главной, ценах и отзывах. Всё под .bf.
   ========================================================================== */

.bf {
  --ink: #231F20; --red: #E32320; --red-d: #C41D1A; --mut: #6F686A; --mut2: #8b8385;
  --line: #E5E1E1; --tint: #F6F4F3; --ground: #F1F0EF; --wa: #1FA855; --tg: #229ED9;
  --sans: "Archivo", "Proxima Nova", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --gut: clamp(16px, 5vw, 64px); --max: 1280px;
  --bf-top: 120px;
  background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5;
}
.bf *, .bf *::before, .bf *::after { box-sizing: border-box; }
.bf a:focus-visible, .bf summary:focus-visible, .bf input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.bf-wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); }
.bf p { margin: 0; }
.bf h1, .bf h2, .bf h3 { text-transform: none; }

/* шапка */
.bf-hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; box-shadow: 0 -16px 0 var(--ink); }
.bf-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(110% 90% at 88% 0%, rgba(227,35,32,.24) 0%, rgba(227,35,32,0) 56%); }
.bf-hero__crumbs { position: relative; padding-top: 18px; }
.bf .bf-hero .breadcrumbs { margin: 0; padding: 0; }
.bf .bf-hero .breadcrumbs, .bf .bf-hero .breadcrumbs * { color: rgba(255,255,255,.8) !important; font-family: var(--sans) !important; font-size: 14px !important; }
.bf-hero__in { position: relative; padding-top: 56px; padding-bottom: 72px; }
.bf-hero__title { margin: 0 0 16px; color: #fff; text-align: start; font: 800 clamp(40px, 6vw, 80px)/1 var(--sans); font-variation-settings: "wdth" 120; letter-spacing: -.015em; }
.bf-hero__lead { max-width: 680px; font-family: var(--serif); font-size: 20px; line-height: 1.5; color: rgba(255,255,255,.82); }

/* две колонки: слева поиск и контакты (липкие), справа вопросы */
.bf-body { padding: 56px 0 88px; }
.bf-layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px 56px; align-items: start; }
.bf-side { position: sticky; top: var(--bf-top); display: grid; gap: 14px; }
@supports (overflow: clip) { .site-container:has(.bf-side) { overflow: clip; } }   /* overflow: hidden темы ломает sticky */

.bf-search { display: flex; align-items: center; gap: 10px; height: 54px; padding-inline: 16px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: text; }
.bf-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(227,35,32,.18); }
.bf-search svg { flex: none; width: 20px; height: 20px; color: var(--mut); }
.bf-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 500 16px var(--sans); -webkit-appearance: none; appearance: none; }
.bf-search input::placeholder { color: #8f8789; }
.bf .bf-search input:focus-visible { outline: none; }
.bf-count { padding-inline: 4px; font-size: 14px; color: var(--mut); }

.bf-ask { margin-top: 10px; padding: 24px 24px 22px; border-radius: 16px; background: var(--ink); color: #fff; }
.bf-ask__title { margin: 0 0 6px; font: 800 22px/1.2 var(--sans); font-variation-settings: "wdth" 110; color: #fff; }
.bf-ask p { font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.74); }
.bf-ask__btns { display: grid; gap: 8px; margin-top: 18px; }
.bf-btn { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; border-radius: 10px; background: #fff; color: var(--ink); font: 700 15px var(--sans); text-decoration: none; transition: background .15s, color .15s; }
.bf-btn svg { flex: none; width: 20px; height: 20px; }
.bf-btn--wa svg { color: var(--wa); }
.bf-btn--tg svg { color: var(--tg); }
.bf-btn--tel { background: rgba(255,255,255,.1); color: #fff; }
.bf-btn--tel b { font-weight: 700; white-space: nowrap; }
.bf-btn--tel span { font-weight: 500; }
.bf-btn:hover { background: var(--tint); color: var(--ink); }
.bf-btn--tel:hover { background: rgba(255,255,255,.18); color: #fff; }

/* вопросы */
.bf-list { border-top: 1px solid var(--line); }
.bf-q { border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--bf-top) + 8px); }
.bf-q__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 4px; cursor: pointer; list-style: none; }
.bf-q__head::-webkit-details-marker { display: none; }
.bf-q__title { margin: 0; font: 700 clamp(18px, 1.6vw, 21px)/1.35 var(--sans); color: var(--ink); text-wrap: pretty; transition: color .15s; }
.bf-q__head:hover .bf-q__title, .bf-q[open] .bf-q__title { color: var(--red); }
.bf-q__icon { position: relative; flex: none; width: 32px; height: 32px; margin-top: -2px; border: 1.5px solid var(--line); border-radius: 50%; transition: background .2s, border-color .2s; }
.bf-q__icon::before, .bf-q__icon::after { content: ""; position: absolute; inset-inline-start: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 1px; background: var(--ink); transition: transform .2s, background .2s; }
.bf-q__icon::after { transform: rotate(90deg); }
.bf-q[open] .bf-q__icon { background: var(--ink); border-color: var(--ink); }
.bf-q[open] .bf-q__icon::before, .bf-q[open] .bf-q__icon::after { background: #fff; }
.bf-q[open] .bf-q__icon::after { transform: rotate(0deg); }
.bf-q__body { position: relative; padding: 0 56px 26px 4px; }
.bf-q__text { max-width: 760px; font-family: var(--serif); font-size: 17px; line-height: 1.65; color: #3d3637; overflow-wrap: anywhere; }
.bf-q__text > * + * { margin-top: 12px; }
.bf-q__text strong, .bf-q__text b { color: var(--ink); }
.bf-q__text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.bf-q__text ul, .bf-q__text ol { margin-block: 10px; padding-inline-start: 22px; }
.bf-q__text ul { list-style: disc; }
.bf-q__text ol { list-style: decimal; }
.bf-q__text li + li { margin-top: 4px; }
.bf-q__text table { width: 100%; border-collapse: collapse; margin: 14px 0; font: 15px/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.bf-q__text th, .bf-q__text td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.bf-q__text th { font-weight: 700; color: var(--ink); background: var(--tint); }
.bf-q__link { position: absolute; top: 2px; inset-inline-end: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--mut2); }
.bf-q__link:hover { color: var(--ink); background: var(--tint); }
.bf-q__link svg { width: 16px; height: 16px; }
.bf-q.is-off { display: none; }
.bf-q mark { padding: 0 1px; border-radius: 3px; background: rgba(251,188,4,.35); color: inherit; }
.bf-empty { padding: 28px 4px; font-size: 17px; color: var(--mut); }
.bf-empty[hidden] { display: none; }

@media (max-width: 1024px) {
  .bf { --bf-top: 72px; }
  .bf-layout { grid-template-columns: 1fr; }
  .bf-side { position: static; }
  .bf-ask { order: 3; }
  .bf-layout > .bf-list { order: 2; }
  .bf-side { display: contents; }
  .bf-search { order: 0; }
  .bf-count { order: 1; margin-top: -16px; }
}
@media (max-width: 700px) {
  .bf-hero__in { padding-top: 28px; padding-bottom: 40px; }
  .bf-hero__title { font-size: clamp(40px, 12vw, 52px); }
  .bf-hero__lead { font-size: 17px; }
  .bf-body { padding: 24px 0 56px; }
  .bf-layout { gap: 24px; }
  .bf-q__head { gap: 16px; padding: 18px 0; }
  .bf-q__title { font-size: 17px; }
  .bf-q__icon { width: 28px; height: 28px; }
  .bf-q__body { padding: 0 0 22px; }
  .bf-q__text { font-size: 16px; }
  .bf-q__link { display: none; }
  .bf-q__text table { display: block; overflow-x: auto; font-size: 14px; }
  .bf-ask { padding: 22px 20px; }
}
