/*
Theme Name: bf-theme
Description: BidFox Blog — static theme, zero DB writes (замена Impreza + Elementor). По макету Figma «Лендинги ВП и РК» (node 1617:18605).
Version: 1.1.0
Author: BidFox
Text Domain: bf-theme
*/

/* =====================================================================
   ТОКЕНЫ (единственный источник правды по дизайну)
   ===================================================================== */
:root {
  --bf-bg: #efe8ff; /* фон страницы */
  --bf-bg2: #f0e8ff; /* фон страницы статьи */
  --bf-white: #ffffff; /* карточки/капсулы */
  --bf-ink: #0d0d0d; /* основной текст (Figma black/main) */
  --bf-muted: rgba(13, 13, 13, 0.6);
  --bf-muted-2: rgba(13, 13, 13, 0.45);
  --bf-gray-main: #b9b9b9; /* неактивные крошки (Figma gray/main) */
  --bf-violet: #7a2bdb; /* обложки, активный таб, акценты */
  --bf-violet-soft: rgba(122, 43, 219, 0.1);
  --bf-blue: #3435d4; /* Telegram-карта */
  --bf-orange: #ff7302; /* CTA (Вход / Найти / Подписаться) */
  --bf-orange-hover: #e56600;
  --bf-gray-btn: #f0f0f0; /* кнопка «Регистрация» */
  --black-main: #0d0d0d;

  --bf-radius-card: 15px;
  --bf-radius-btn: 6px;
  --bf-radius-ui: 10px;

  --bf-container: 1200px;
  --bf-gutter: 40px;

  --bf-font: "Cera Pro", "Manrope", Arial, sans-serif;

  --bf-fs-h1: 48px;
  --bf-lh-h1: 1.26;
  --bf-fs-card-title: 22px;
  --bf-fs-body: 18px;
  --bf-lh-body: 1.55;
  --gray-900: #9c9c9c;
}

@media (max-width: 1024px) {
  :root {
    --bf-fs-h1: 36px;
  }
}
@media (max-width: 760px) {
  :root {
    --bf-fs-h1: 30px;
    --bf-lh-h1: 1.07;
    --bf-fs-body: 17px;
  }
}

@media (max-width: 400px) {
  :root {
    --bf-fs-h1: 26px;
    --bf-fs-body: 16px;
  }
}
/* =====================================================================
   FONTS (self-hosted, как на текущем сайте)
   ===================================================================== */
@font-face {
  font-family: "Cera Pro";
  src: url("assets/fonts/CeraPro-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cera Pro";
  src: url("assets/fonts/CeraPro-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cera Pro";
  src: url("assets/fonts/CeraPro-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cera Pro";
  src: url("assets/fonts/CeraPro-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =====================================================================
   RESET / BASE
   ===================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bf-bg);
  color: var(--bf-ink);
  font-family: var(--bf-font);
  font-weight: 400;
  font-size: var(--bf-fs-body);
  line-height: var(--bf-lh-body);
  font-synthesis: weight;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

.bf-container {
  width: min(var(--bf-container), calc(100% - 2 * 24px));
  margin-inline: auto;
}

.bf-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bf-content img.alignleft {
  float: left;
  margin: 0 24px 16px 0;
  border-radius: 10px;
}
.bf-content img.alignright {
  float: right;
  margin: 0 0 16px 24px;
  border-radius: 10px;
}
.bf-content img.aligncenter {
  margin-inline: auto;
}
.bf-content .wp-caption-text {
  font-size: 13px;
  color: var(--bf-muted);
  text-align: center;
  margin-top: 8px;
}
.bf-content::after {
  content: "";
  display: table;
  clear: both;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .bf-container {
    width: min(var(--bf-container), calc(100% - 24px));
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
/* =====================================================================
   ШАПКА (капсула r10)
   ===================================================================== */
.bf-header {
  padding: 32px 0 0;
}
.bf-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--bf-white);
  border-radius: var(--bf-radius-ui);
  min-height: 77px;
  padding: 6px;
  padding-left: 24px;
}
.bf-header__logo {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: 0.01em;
}
.bf-header .custom-logo-link {
  display: inline-flex;
  align-items: center;
}
.bf-header .custom-logo {
  max-width: 120px;
  max-height: 24px;
  width: auto;
  height: auto;
}
.bf-header__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.bf-header__nav a {
  font-size: 20px;
  color: var(--bf-ink);
  padding: 4px 2px;
}
.bf-header__nav a:hover {
  color: var(--bf-violet);
}
.bf-header__contact {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--bf-ink);
  padding: 4px 2px;
}
.bf-header__buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.bf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  font-family: var(--bf-font);
  font-weight: 500;
  font-size: 20px;
  color: var(--bf-ink);
  background: none;
  border-radius: var(--bf-radius-btn);
  padding: 20px 24px;
  min-height: 65px;
  line-height: normal;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.bf-btn--gray {
  background: var(--bf-gray-btn);
}
.bf-btn--gray:hover {
  background: #e6e6e6;
}
.bf-btn--orange {
  background: var(--bf-orange);
  color: #fff;
}
.bf-btn--orange:hover {
  background: var(--bf-orange-hover);
}
.bf-btn--dark {
  background: var(--bf-ink);
  color: #fff;
}
.bf-btn--dark:hover {
  background: #2a2a2a;
}

.bf-burger {
  display: none;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--bf-gray-btn);
  border-radius: 6px;
  cursor: pointer;
}
.bf-burger__btn {
  position: relative;
  width: 16px;
  height: 16px;
  overflow: hidden;
}
.bf-burger__bar {
  position: absolute;
  width: 15px;
  height: 3px;
  border-radius: 10px;
  background: var(--bf-ink);
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}
.bf-burger__bar:nth-child(1) {
  top: 50%;
}
.bf-burger__bar:nth-child(2) {
  top: calc(50% - 6px);
}
.bf-burger__bar:nth-child(3) {
  top: calc(50% + 6px);
  width: 10px;
  left: 68%;
}

.bf-header__user {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--bf-orange);
  color: #fff;
}
.bf-header__user:hover {
  background: var(--bf-orange-hover);
}

@media (max-width: 899px) {
  .bf-header__bar {
    position: relative;
  }
  .bf-burger {
    display: flex;
  }

  .bf-header__bar > * {
    position: relative;
    z-index: 2;
  }
  .bf-burger[aria-expanded="true"] {
    position: relative;
    background: var(--bf-white);
    box-shadow:
      0 2px 10px rgba(13, 13, 13, 0.1),
      0 0 0 1px rgba(13, 13, 13, 0.06);
    border-radius: 10px;
  }
  .bf-burger[aria-expanded="true"] .bf-burger__bar:nth-child(3) {
    display: none;
  }
  .bf-burger[aria-expanded="true"] .bf-burger__bar:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }
  .bf-burger[aria-expanded="true"] .bf-burger__bar:nth-child(2) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  .bf-header__nav {
    display: none;
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    top: 0;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 92px 16px 24px;
    background: var(--bf-white);
    border-radius: 15px;
    box-shadow: 0 12px 40px rgba(13, 13, 13, 0.16);
  }
  .bf-header__nav.is-open {
    display: flex;
  }
  .bf-header__nav a {
    padding: 12px 8px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
  }
  .bf-header__nav .bf-header__contact {
    display: inline-flex;
    padding: 12px 8px;
  }
}

@media (min-width: 761px) and (max-width: 899px) {
  .bf-burger {
    order: 1;
    min-height: 65px;
    min-width: 65px;
  }
  .bf-header__buttons {
    order: 3;
  }
  .bf-header__logo {
    order: 2;
    margin-inline: auto;
  }
  .bf-header__bar {
    padding: 6px;
  }
}

@media (max-width: 760px) {
  .bf-header {
    padding: 16px 0 0;
  }
  .bf-header__bar {
    min-height: 60px;
    padding: 6px;
  }
  .bf-burger {
    order: 1;
  }
  .bf-header__logo {
    order: 2;
    font-size: 28px;
    margin-inline: auto;
  }
  .bf-header__user {
    order: 3;
    display: inline-flex;
  }
  .bf-header__buttons {
    display: none;
  }
  .bf-header__bar.is-menu-open {
    background: transparent;
  }
  .bf-header__nav {
    padding-top: 76px;
  }
}

@media (max-width: 760px) {
  .bf-btn {
    min-height: 48px;
    font-size: 15px;
  }
}
.bf-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 28px 0 0;
  margin-bottom: 48px;
  font-size: 16px;
  line-height: 1.2;
  color: var(--bf-gray-main);
}
.bf-breadcrumbs a {
  color: var(--bf-gray-main);
  border-bottom: none;
}
.bf-breadcrumbs a:hover {
  color: var(--bf-violet);
}
.bf-breadcrumbs > :last-child {
  color: var(--black-main, #0d0d0d);
}
.bf-breadcrumbs .sep {
  flex: 0 0 4px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  font-size: 0;
  color: transparent;
  background: var(--black-main, #0d0d0d);
}

@media (max-width: 760px) {
  .bf-breadcrumbs {
    font-size: 12px;
    padding: 12px 0 0;
    margin-bottom: 12px;
  }
}
/* =====================================================================
   ЛЕНТА: H1 + ПОИСК
   ===================================================================== */
.bf-home-h1 {
  max-width: 1144px;
  font-family: var(--bf-font);
  font-weight: 700;
  font-size: var(--bf-fs-h1);
  line-height: var(--bf-lh-h1);
  text-transform: uppercase;
  text-align: left;
  color: var(--bf-ink);
  margin-block: 0;
}

.bf-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bf-white);
  border-radius: var(--bf-radius-ui);
  min-height: 65px;
  padding: 6px 8px 6px 32px;
}
.bf-search__icon {
  flex: 0 0 28px;
}
.bf-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--bf-font);
  font-size: 18px;
  color: var(--bf-ink);
}
.bf-search input[type="search"]::placeholder {
  color: var(--gray-900);
  font-size: 20px;
}
/* Chrome/Safari рисуют для type="search" собственный крестик
   (::-webkit-search-cancel-button) — он дублирует кастомный
   .bf-search__clear, поэтому скрываем нативные элементы движка. */
.bf-search input[type="search"]::-webkit-search-cancel-button,
.bf-search input[type="search"]::-webkit-search-decoration,
.bf-search input[type="search"]::-webkit-search-results-button,
.bf-search input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.bf-search__clear {
  display: none;
  background-color: unset;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bf-search__clear:hover {
}
.bf-search.has-value .bf-search__clear {
  display: inline-flex;
}

@media (max-width: 760px) {
  .bf-home-h1 {
    font-size: 20px;
    margin: 20px auto 24px;
    max-width: none;
    letter-spacing: 0.01em;
  }

  .bf-search {
    min-height: 60px;
    padding: 6px 16px;
    gap: 12px;
    border-radius: 10px;
  }
  .bf-search__icon {
    flex-basis: 28px;
  }
  .bf-search input[type="search"] {
    font-size: 16px;
  }
}
/* =====================================================================
   ФИЛЬТРЫ: ТАБЫ КАТЕГОРИЙ + СОРТИРОВКА
   ===================================================================== */
.bf-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bf-tab {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 12px 20px;
  border-radius: var(--bf-radius-btn);
  background: var(--bf-white);
  font-weight: 400;
  font-size: 20px;
  color: var(--bf-ink);
  line-height: normal;
  transition: background-color 0.15s ease;
}
.bf-tab__count {
  font-size: 16px;
  opacity: 0.55;
}
.bf-tab:hover {
  background: var(--bf-violet-soft);
}
.bf-tab.is-active {
  background: var(--bf-violet);
  color: #fff;
}
.bf-tab.is-active .bf-tab__count {
  opacity: 0.8;
}

.bf-sort {
  position: relative;
}
.bf-sort__toggle {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--bf-font);
  font-weight: 500;
  font-size: 16px;
  color: var(--bf-ink);
  padding: 12px 2px;
}
.bf-sort__caret {
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border-right: 1.6px solid var(--bf-ink);
  border-bottom: 1.6px solid var(--bf-ink);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.bf-sort__toggle[aria-expanded="true"] .bf-sort__caret {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.bf-sort__menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background: var(--bf-white);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(13, 13, 13, 0.18);
}
.bf-sort__menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--bf-font);
  font-size: 16px;
  color: var(--bf-ink);
  padding: 12px 20px;
}
.bf-sort__menu button:hover {
  background: var(--bf-violet-soft);
}
.bf-sort__menu button.is-active {
  color: var(--bf-violet);
  font-weight: 500;
}

@media (max-width: 760px) {
  .bf-search input[type="search"]::placeholder {
    font-size: 14px;
  }

  .bf-sort__menu button {
    font-size: 14px;
  }

  .bf-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .bf-tabs {
    gap: 10px;
  }
  .bf-tab {
    padding: 12px;
    font-size: 14px;
    border-radius: 12px;
    background: var(--bf-white);
  }
  .bf-tab:hover {
    background: var(--bf-white);
  }
  .bf-tab.is-active {
    background: var(--bf-violet);
  }
  .bf-tab__count {
    font-size: 12px;
    opacity: 0.5;
  }
  .bf-sort {
    align-self: flex-start;
  }
  .bf-sort__toggle {
    padding: 6px 2px;
    font-size: 14px;
    font-weight: 400;
  }
  .bf-sort__menu {
    left: 0;
    right: auto;
    min-width: 210px;
  }
}

@media (max-width: 400px) {
  .bf-tab {
    padding: 10px 14px;
    font-size: 14px;
  }
}
/* =====================================================================
   СТАТЬЯ НЕДЕЛИ
   ===================================================================== */
.bf-post-week {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  background: var(--bf-white);
  border-radius: var(--bf-radius-card);
  overflow: hidden;
}
.bf-post-week__cover {
  align-self: center;
  position: relative;
  width: fit-content;
  height: fit-content;
  margin: 6px 0 6px 6px;
  border-radius: 10px;
  overflow: hidden;
}

.bf-post-week__cover img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 332px;
}

.bf-post-week__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 28px 40px 28px 20px;
}
.bf-post-week__meta {
  font-size: 20px;
  color: var(--gray-900);
}
.bf-post-week__title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.22;
}
.bf-post-week__title a:hover {
  color: var(--bf-violet);
}
.bf-post-week__excerpt {
  margin: 0;
  color: var(--black-main);
  opacity: 0.8;
  font-size: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -moz-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bf-post-week__btn,
.bf-article-share {
  min-height: 70px;
  padding: 6px 6px 6px 28px;
  border-radius: 10px;
  gap: 14px;
  font-size: 24px;
  font-weight: 500;
}
.bf-post-week__btn {
  align-self: flex-start;
}

.bf-post-week__btn .arrow,
.bf-article-share .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  .bf-post-week {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
  }
  .bf-post-week__cover {
    margin: 6px 6px 0;
  }
  .bf-post-week__body {
    padding: 24px;
  }
}

@media (max-width: 760px) {
  .bf-post-week {
    display: block;
    padding: 6px;
  }

  .bf-post-week__btn,
  .bf-article-share {
    min-height: 56px;
    font-size: 14px;
    width: 100%;
    justify-content: space-between;
    svg {
      width: 44px;
      height: 44px;
    }
  }
  .bf-post-week__cover {
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bf-violet);
  }
  .bf-post-week__cover img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
  }
  .bf-post-week__body {
    padding: 16px 12px 12px;
    gap: 12px;
    justify-content: flex-start;
    display: flex;
  }
  .bf-post-week__meta {
    font-size: 14px;
  }
  .bf-post-week__title {
    font-size: 20px;
    line-height: 1.22;
  }
  .bf-post-week__excerpt {
    font-size: 14px;
  }
  .bf-post-week__btn {
    align-self: flex-start;
  }
}
/* =====================================================================
   КАРТОЧКА ПОСТА + СЕТКА
   ===================================================================== */
.bf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.bf-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bf-white);
  border-radius: var(--bf-radius-card);
  overflow: hidden;
  padding: 6px 6px 24px;
  transition: transform 0.15s ease;
}
.bf-card__cover {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 27 / 16;
  background: var(--bf-violet);
}
.bf-card__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.bf-card:hover .bf-card__cover img {
  transform: scale(1.03);
}
.bf-card__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(
      90% 140% at 100% 0%,
      rgba(255, 255, 255, 0.16) 0%,
      transparent 55%
    ),
    var(--bf-violet);
}
.bf-card__fallback .t {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
}
.bf-card__fallback .b {
  font-weight: 300;
  font-size: 13px;
  opacity: 0.85;
}
.bf-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px;
}
.bf-card__meta {
  font-size: 16px;
  color: var(--gray-900);
}
.bf-card__title {
  margin: 0;
  font-size: var(--bf-fs-card-title);
  font-weight: 700;
  line-height: 1.25;
}
.bf-card__title a:hover {
  color: var(--bf-violet);
}
.bf-card__excerpt {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--black-main);
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .bf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .bf-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bf-card {
    padding: 6px;
    gap: 8px;
  }
  .bf-card__cover {
    margin-bottom: 0;
    border-radius: 10px;
    aspect-ratio: auto;
    min-height: 120px;
  }
  .bf-card__cover img {
    position: static;
    width: 100%;
    height: auto;
  }
  .bf-card__body {
    gap: 8px;
    padding: 0px 10px 14px;
  }
  .bf-card__meta {
    font-size: 14px;
  }
  .bf-card__title {
    font-size: 20px;
    line-height: 1.25;
  }
  .bf-card__excerpt {
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    opacity: 0.7;
  }
}
/* =====================================================================
   CTA: РАССЫЛКА + TELEGRAM
   ===================================================================== */
.bf-cta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}
.bf-cta__newsletter {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bf-white);
  border-radius: var(--bf-radius-card);
  padding: 40px;
  min-height: 302px;
  max-width: 792px;
}

.bf-cta__newsletter p.bf-cta__newsletter-sub-slogan {
  font-size: 20px;
}

.bf-cta__newsletter h3 {
  font-size: 32px;
  font-weight: 700;
  margin-block: unset;
}
.bf-cta__newsletter p {
  color: var(--black-main, #0d0d0d);
  font-size: 16px;
  margin-block: unset;
}
.bf-cta__form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}
.bf-cta__form input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  outline: none;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  padding: 14px 18px;
  font-family: var(--bf-font);
  font-size: 20px;
  color: var(--bf-ink);
}
.bf-cta__form input[type="email"]::placeholder {
  color: var(--gray-900);
}
.bf-cta__form .bf-btn--sm {
  min-height: 47px;
}
.bf-cta__consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 100%;
}
.bf-cta__consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  border: 2px solid #e5e5e5;
  border-radius: 2px;
  background: var(--bf-white);
  cursor: pointer;
}
.bf-cta__consent input[type="checkbox"]:checked {
  border-color: var(--bf-orange);
  background: var(--bf-orange)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 10px no-repeat;
}
.bf-cta__consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--bf-violet);
  outline-offset: 2px;
}
.bf-cta__note {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  color: var(--gray-900) !important;
}
.bf-cta__note label {
  cursor: pointer;
}
.bf-cta__note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bf-cta__ok {
  color: #1a7f37;
  font-weight: 500;
}
.bf-cta__err {
  color: #c00;
  font-weight: 500;
}

.bf-cta__tg {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  background: linear-gradient(
    127deg,
    #7b2bdb 1.86%,
    #3435d4 30.46%,
    #7b2bdb 80.23%
  );
  border-radius: var(--bf-radius-card);
  color: #fff;
  padding: 40px 32px;
  min-height: 302px;
  overflow: hidden;
  max-width: 400px;
}

.bf-cta__tg h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
}
.bf-cta__tg p {
  position: relative;
  margin: 0 0 28px;
  font-size: 20px;
  opacity: 0.9;
}
.bf-cta__tg .bf-btn {
  margin-top: auto;
  position: relative;
  background: #fff;
  color: var(--black-main, #0d0d0d);
  padding: 20px 24px;
  min-height: 0;
  max-width: 234px;
  line-height: normal;
}
.bf-cta__tg .bf-btn:hover {
  background: var(--gray-200, #e5e5e5);
}

@media (max-width: 1170px) {
  .bf-cta {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bf-cta__newsletter {
    max-width: 100%;
  }
  .bf-cta__tg {
    max-width: unset;
  }
}

@media (max-width: 760px) {
  .bf-cta {
    gap: 16px;
    margin: 0 0 16px;
  }
  .bf-cta__consent {
    /* форма тут column: flex-basis 100% = 100% ВЫСОТЫ (не ширины) —
       блок «новой колонкой» уезжает за карточку. Гасим. */
    flex: 0 0 auto;
    margin: 0;
  }
  .bf-cta__newsletter {
    padding: 20px 16px;
    min-height: 0;
    gap: 12px;
  }
  .bf-cta__newsletter h3 {
    font-size: 20px;
  }
  .bf-cta__newsletter p {
    font-size: 14px;
  }
  .bf-cta__newsletter p.bf-cta__newsletter-sub-slogan {
    font-size: 14px;
    line-height: 120%;
  }
  .bf-cta__form {
    flex-direction: column;
    gap: 12px;
    max-width: none;
  }
  .bf-cta__form input[type="email"] {
    /* в column-форме flex-grow растягивает поле по высоте — гасим */
    flex: 0 0 auto;
    min-height: 48px;
    padding: 16px 20px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    font-size: 14px;
  }
  .bf-cta__form .bf-btn {
    padding: 16px 20px;
    border-radius: 6px;
    width: 100%;
    min-height: 48px;
    font-size: 14px;
  }
  .bf-cta__note {
    font-size: 12px;
  }
  .bf-cta__note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .bf-cta__tg {
    gap: 12px;
    padding: 20px 16px;
    min-height: 0;
  }
  .bf-cta__tg h3 {
    font-size: 20px;
    margin: 0;
  }
  .bf-cta__tg p {
    font-size: 14px;
    margin: 0;
    max-width: none;
  }
  .bf-cta__tg .bf-btn {
    background: #fff;
    color: var(--bf-ink);
    border: 0;
    min-height: 48px;
    padding: 12px 24px;
    font-size: 14px;
    max-width: unset;
  }
  .bf-cta__tg .bf-btn svg {
    color: #2ea3e8;
  }
  .bf-cta__tg .bf-btn:hover {
    background: rgba(255, 255, 255, 0.9);
  }
}
/* =====================================================================
   ОДИНОЧНАЯ СТАТЬЯ
   ===================================================================== */
.bf-single-wrap {
  background: var(--bf-bg2);
}

.bf-article-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  gap: 0;
  background: var(--bf-white);
  border-radius: var(--bf-radius-card);
  padding: 6px;
}
.bf-article-head__cover {
  align-self: center;
  position: relative;
  width: fit-content;
  height: fit-content;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bf-violet);
}
.bf-article-head__cover img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 248px;
}
.bf-article-head__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 24px;
  width: 100%;
}
.bf-article-head__body .bf-article-share {
  margin-top: auto;
}
.bf-article-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  color: var(--gray-900);
}
.bf-article-head__meta .views {
  color: var(--bf-orange);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bf-article-head__meta .views svg {
  display: inline;
}
.bf-article-head__title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.bf-article-share {
  padding-left: 24px;
}
.bf-article-head__lead {
  margin: 24px 0 0;
  font-size: var(--bf-fs-body);
  line-height: var(--bf-lh-body);
  color: var(--bf-ink);
}

.bf-content {
  color: var(--bf-ink);
  overflow-wrap: break-word;
}
.bf-content h1,
.bf-content h2,
.bf-content h3,
.bf-content h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--bf-ink);
}
.bf-content h2 {
  font-size: 30px;
  margin: 44px 0 16px;
}
.bf-content h3 {
  font-size: 24px;
  margin: 36px 0 14px;
}
.bf-content h4 {
  font-size: 20px;
  margin: 28px 0 12px;
}
.bf-content p {
  margin: 0 0 18px;
}
.bf-content ul,
.bf-content ol {
  margin: 0 0 18px;
  padding-left: 24px;
}
.bf-content li {
  margin-bottom: 8px;
}
.bf-content a {
  color: var(--bf-violet);
  border-bottom: 1px solid currentColor;
}
.bf-content a:hover {
  color: var(--bf-ink);
}
.bf-content img {
  border-radius: 10px;
}
.bf-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
}

.bf-table-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 13, 13, 0.25) transparent;
}
.bf-table-scroll::-webkit-scrollbar {
  height: 6px;
}
.bf-table-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.bf-table-scroll::-webkit-scrollbar-thumb {
  background: rgba(13, 13, 13, 0.25);
  border-radius: 4px;
}
.bf-table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(13, 13, 13, 0.4);
}
.bf-content td,
.bf-content th {
  border: 0;
  border-bottom: 1px solid rgba(13, 13, 13, 0.12);
  padding: 12px 16px;
  font-size: 15px;
  text-align: left;
  vertical-align: top;
}
.bf-content tr:last-child td,
.bf-content tr:last-child th {
  border-bottom: 0;
}
.bf-content td:first-child,
.bf-content th:first-child {
  padding-left: 0;
}
.bf-content td:last-child,
.bf-content th:last-child {
  padding-right: 0;
}
.bf-content th {
  background: transparent;
  font-weight: 500;
}
.bf-content blockquote {
  position: relative;
  margin: 28px 0;
  padding: 8px 24px 8px 48px;
  border-left: 3px solid var(--bf-violet);
  background: var(--bf-white);
  border-radius: 0 10px 10px 0;
  font-size: 17px;
}
.bf-content blockquote p {
  margin: 0 0 10px;
}
.bf-content blockquote > p:first-child::before {
  content: "“";
  position: absolute;
  left: 14px;
  top: 2px;
  font-size: 34px;
  font-weight: 700;
  color: var(--bf-violet);
  opacity: 0.9;
}
.bf-content hr {
  border: 0;
  border-top: 1px solid rgba(13, 13, 13, 0.12);
  margin: 32px 0;
}
.bf-content .wp-block-image figcaption {
  font-size: 13px;
  color: var(--bf-muted);
}

.bf-content.entry-content {
  padding: 28px;
}

.bf-readmore {
  margin-top: 72px;
}

.bf-readmore-wrapper {
  display: flex;
  gap: 16px;
  flex-direction: column;
}
.bf-readmore__title {
  margin: 0 0 32px;
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .bf-article-head {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
  }
}

@media (max-width: 760px) {
  .bf-content.entry-content {
    padding: 28px 0;
  }

  .bf-article-head {
    display: grid;
    grid-template-columns: 1fr;
    padding: 6px;
    border-radius: 20px;
  }
  .bf-article-head__cover {
    border-radius: 10px;
  }
  .bf-article-head__cover img {
    width: 100%;
    height: auto;
    max-height: none;
  }
  .bf-article-head__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 12px 16px;
  }
  .bf-article-share {
    width: 100%;
    margin-top: 4px;
    padding-left: 16px;
  }
  .bf-article-share .arrow {
    margin-left: auto;
  }
  .bf-article-head__meta {
    font-size: 14px;
    gap: 6px;
    line-height: 100%;
  }
  .bf-article-head__title {
    font-size: 20px;
    line-height: 1.22;
  }
  .bf-article-head__lead {
    margin: 12px 0 0;
    font-size: 17px;
  }

  .bf-content h2 {
    font-size: 22px;
    margin: 32px 0 12px;
  }
  .bf-content h3 {
    font-size: 20px;
    margin: 28px 0 10px;
  }
  .bf-content h4 {
    font-size: 18px;
  }
  .bf-content p {
    margin-bottom: 14px;
  }
  .bf-content blockquote {
    padding: 10px 16px 10px 40px;
    font-size: 16px;
    margin: 20px 0;
  }
  .bf-content blockquote > p:first-child::before {
    font-size: 28px;
    left: 10px;
  }
  .bf-content img {
    float: none !important;
    margin: 12px 0 !important;
  }
  .bf-content table {
    font-size: 14px;
  }

  .bf-readmore {
    margin-top: 36px;
  }
  .bf-readmore__title {
    font-size: 26px;
    margin: 0 0 16px;
  }
  .bf-readmore .bf-grid {
    margin-bottom: 8px;
  }
}
/* =====================================================================
   ФУТЕР
   ===================================================================== */
.bf-footer {
  margin-top: 16px;
  padding: 0 0 32px;
}
.bf-footer__inner {
  background: var(--bf-ink);
  color: #fff;
  border-radius: var(--bf-radius-card);
  padding: 36px;
}
.bf-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.bf-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.bf-footer__label {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
}

.bf-footer__services-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, auto);
  column-gap: 16px;
  row-gap: 8px;
}

.bf-footer__services-list a {
  color: #fff;
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.bf-footer__services-list a:hover {
  text-decoration: none;
}

.bf-footer__logo {
  font-weight: 900;
  font-size: 36px;
  color: #fff;
  line-height: 100%;
}
.bf-footer__copy {
  font-weight: 400;
  font-size: 16px;
}
.bf-footer__copy small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  font-style: italic;
  opacity: 0.75;
  margin-top: 4px;
}
.bf-footer__social {
  display: flex;
  gap: 8px;
}
.bf-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--bf-white);
  color: var(--bf-ink);
}

.bf-footer__requisites {
  margin-top: 24px;
  font-size: 16px;
  line-height: 120%;
  color: white;
  opacity: 0.6;
  text-align: center;
  letter-spacing: 0;
  font-style: normal;
}

.bf-footer__requisites pre {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

@media (max-width: 760px) {
  .bf-footer {
    padding: unset;
    margin: unset;
  }
  .bf-footer__inner {
    padding: 20px;
  }
  .bf-footer__top {
    flex-direction: column;
    gap: 20px;
  }

  .bf-footer__logo {
    font-size: 28px;
  }

  .bf-footer__copy {
    font-size: 14px;
    opacity: 0.95;
    text-align: right;
  }
  .bf-footer__copy small {
    display: none;
  }
  .bf-footer__services-list {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .bf-footer__group-sn {
    align-items: center;
  }
  .bf-footer__col {
    width: 100%;
  }
  .bf-footer__col.bf-footer__brand {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .bf-footer__services {
    align-items: center;
  }
  .bf-footer__social {
    gap: 8px;
  }

  .bf-footer__requisites {
    margin-top: 16px;
    padding-top: 16px;
    font-size: 13px;
  }
}
/* =====================================================================
   ПАГИНАЦИЯ
   ===================================================================== */
.bf-pagination.navigation {
  margin: 8px 0;
}
.bf-pagination .nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.bf-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--bf-white);
  border-radius: var(--bf-radius-btn);
  font-weight: 500;
  font-size: 15px;
  color: var(--bf-ink);
}
.bf-pagination .page-numbers.current {
  background: var(--bf-violet);
  color: #fff;
}
.bf-pagination .page-numbers:hover:not(.current) {
  background: var(--bf-violet-soft);
}
.bf-pagination.page-load-status {
  display: none;
}

/* =====================================================================
   404 / СТРАНИЦЫ
   Страница (Политика и т.п.) — как страница статьи:
   капсула с заголовком + контент на фоне bg2. Заголовок 20px.
   ===================================================================== */

.bf-policy {
  margin-bottom: 48px;
}
.bf-policy h1 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 900;
  color: var(--bf-ink);
}
.bf-policy h3 {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--bf-ink);
}
.bf-policy h4 {
  margin: 28px 0 12px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--bf-ink);
}

@media (max-width: 760px) {
  .bf-page-head {
    padding: 14px 16px;
  }
  .bf-policy h4 {
    margin: 24px 0 10px;
  }
}
.bf-404 {
  text-align: center;
}
.bf-404 h1 {
  font-size: 150px;
  font-weight: 700;
  line-height: 100%;
  margin-block: 20px;
}
.bf-404 p {
  color: var(--bf-muted);
  margin: 0 0 28px;
}

body.error404 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
body.error404 #page {
  flex: 1;
  display: flex;
  flex-direction: column;
}
body.error404 .site-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
body.error404 .bf-single-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 40px;
}
body.error404 .bf-404 {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 760px) {
  .bf-404 h1 {
    font-size: 48px;
  }
}
