/* ==========================================================================
   РЕДИЗАЙН БЛОГА И СТРАНИЦ — «Формула Строительства» (fs-redesign.css)
   Версия 1.0 | Октябрь 2026
   --------------------------------------------------------------------------
   УСТАНОВКА: загрузить файл на FTP (например /css/fs-redesign.css) и
   подключить ПОСЛЕ main2024.css:
     <link rel="stylesheet" href="/css/fs-redesign.css">
   Все стили имеют префикс fsb- / fsp- и НЕ затрагивают остальной сайт.
   Базовый шрифт сайта — Open Sans, фирменный красный — #e1000f.
   Контентная ширина — как на сайте: max-width 1200px, padding 0 15px.
   ========================================================================== */

/* ---------- ПЕРЕМЕННЫЕ ---------- */
.fsb, .fsp {
  --fs-red: #e1000f;
  --fs-red-dark: #ba1404;
  --fs-ink: #231f20;
  --fs-gray: #6b6b6b;
  --fs-bg: #f7f6f5;
  --fs-line: #e8e4e2;
  --fs-radius: 14px;
  --fs-shadow: 0 2px 14px rgba(35, 31, 32, .07);
  --fs-shadow-h: 0 14px 34px rgba(35, 31, 32, .14);
  --fs-tr: .25s ease;
  box-sizing: border-box;
}
.fsb *, .fsb *::before, .fsb *::after,
.fsp *, .fsp *::before, .fsp *::after { box-sizing: border-box; }

.fsb, .fsp {
  font-family: "Open Sans", Arial, sans-serif;
  color: var(--fs-ink);
  line-height: 1.6;
}


/* ==========================================================================
   1. СПИСОК СТАТЕЙ — ПЛИТКА (.fsb-grid)
   --------------------------------------------------------------------------
   Разметка (обёртка списка):
   <div class="fsb fsb-grid">
     <a class="fsb-card" href="...">
       <div class="fsb-card_img"><img src="..." alt="...">
         <span class="fsb-badge">Технология</span></div>
       <div class="fsb-card_body">
         <div class="fsb-card_title">Заголовок</div>
         <p class="fsb-card_text">Короткое описание...</p>
         <span class="fsb-card_more">Читать</span>
       </div>
     </a>
     ...
   </div>
   ========================================================================== */

.fsb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 30px 0 50px;
}

.fsb-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--fs-radius);
  overflow: hidden;
  box-shadow: var(--fs-shadow);
  text-decoration: none !important;
  color: var(--fs-ink) !important;
  transition: transform var(--fs-tr), box-shadow var(--fs-tr);
}
.fsb-card:hover { transform: translateY(-6px); box-shadow: var(--fs-shadow-h); }

.fsb-card_img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e3e0de;
}
.fsb-card_img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.fsb-card:hover .fsb-card_img img { transform: scale(1.06); }

/* Бейдж типа статьи */
.fsb-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 12px;
  background: var(--fs-red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 20px;
}
.fsb-badge--tech  { background: var(--fs-red); }
.fsb-badge--mat   { background: #2e7d32; }
.fsb-badge--fix   { background: #b26a00; }
.fsb-badge--check { background: #4a5a6a; }

.fsb-card_body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}
.fsb-card_title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.fsb-card_text {
  font-size: 14px;
  color: var(--fs-gray);
  margin: 0 0 16px;
  flex: 1;
}
.fsb-card_more {
  font-size: 13px;
  font-weight: 700;
  color: var(--fs-red);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.fsb-card_more::after { content: " →"; }
.fsb-card:hover .fsb-card_more { color: var(--fs-red-dark); }

@media (max-width: 1023px) { .fsb-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 599px)  { .fsb-grid { grid-template-columns: 1fr; } }


/* ==========================================================================
   2. СТРАНИЦА СТАТЬИ — ТИПОГРАФИКА (.fsb-article)
   --------------------------------------------------------------------------
   Обёртка текста статьи: <article class="fsb fsb-article"> ... </article>
   Поддерживает: h2/h3, p, ul/ol, blockquote, table, img, figure,
   выделительные блоки .fsb-note / .fsb-warn / .fsb-tip, таблицы,
   блок плюсов-минусов .fsb-pm, чек-лист .fsb-checklist.
   ========================================================================== */

.fsb-article {
  max-width: 820px;
  margin: 0 auto;
  font-size: 16px;
  background: #fff;
  padding: 36px 44px 44px;
  border-radius: var(--fs-radius);
  box-shadow: var(--fs-shadow);
}
@media (max-width: 767px) { .fsb-article { padding: 24px 18px 30px; } }

.fsb-article h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 44px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--fs-red);
}
.fsb-article h3 {
  font-size: 19px;
  margin: 32px 0 12px;
}
.fsb-article h2:first-child { margin-top: 0; }
.fsb-article p { margin: 0 0 16px; }
.fsb-article ul, .fsb-article ol { margin: 0 0 18px; padding-left: 22px; }
.fsb-article li { margin-bottom: 8px; }
.fsb-article li::marker { color: var(--fs-red); font-weight: 700; }
.fsb-article strong { font-weight: 700; }

/* Обложка и изображения */
.fsb-article > img, .fsb-article figure img {
  width: 100%;
  border-radius: 10px;
  display: block;
}
.fsb-article figure { margin: 0 0 22px; }
.fsb-article figcaption {
  font-size: 13px;
  color: var(--fs-gray);
  text-align: center;
  padding-top: 8px;
}
.fsb-article > img { margin-bottom: 26px; }

/* Цитата */
.fsb-article blockquote {
  margin: 26px 0;
  padding: 18px 24px;
  background: var(--fs-bg);
  border-left: 4px solid var(--fs-red);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #444;
}

/* Таблицы */
.fsb-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
.fsb-article th {
  background: var(--fs-ink);
  color: #fff;
  text-align: left;
  padding: 11px 14px;
  font-weight: 600;
}
.fsb-article td { padding: 10px 14px; border-bottom: 1px solid var(--fs-line); }
.fsb-article tr:nth-child(even) td { background: #faf9f8; }

/* Выделительные блоки: <div class="fsb-note">…</div> / .fsb-warn / .fsb-tip */
.fsb-note, .fsb-warn, .fsb-tip {
  position: relative;
  margin: 24px 0;
  padding: 16px 20px 16px 52px;
  border-radius: 10px;
  font-size: 15px;
}
.fsb-note::before, .fsb-warn::before, .fsb-tip::before {
  position: absolute;
  left: 16px; top: 16px;
  width: 24px; height: 24px;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  text-align: center;
  line-height: 24px;
}
.fsb-note { background: #eef4fb; border: 1px solid #cfe0f2; }
.fsb-note::before { content: "i"; background: #2f6fb2; }
.fsb-warn { background: #fdf1ef; border: 1px solid #f4d2cc; }
.fsb-warn::before { content: "!"; background: var(--fs-red); }
.fsb-tip  { background: #eef7ee; border: 1px solid #cfe8cf; }
.fsb-tip::before  { content: "✓"; background: #2e7d32; }

/* Плюсы / минусы: <div class="fsb-pm"><div class="fsb-pm_plus">…</div><div class="fsb-pm_minus">…</div></div> */
.fsb-pm { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.fsb-pm_plus, .fsb-pm_minus { padding: 18px 20px; border-radius: 10px; font-size: 14.5px; }
.fsb-pm_plus  { background: #eef7ee; border-top: 3px solid #2e7d32; }
.fsb-pm_minus { background: #fdf1ef; border-top: 3px solid var(--fs-red); }
.fsb-pm_plus > strong, .fsb-pm_minus > strong { display: block; margin-bottom: 8px; }
.fsb-pm ul { margin: 0; padding-left: 18px; }
@media (max-width: 640px) { .fsb-pm { grid-template-columns: 1fr; } }

/* Чек-лист: <ul class="fsb-checklist"><li>…</li></ul> */
.fsb-checklist { list-style: none !important; padding-left: 0 !important; }
.fsb-checklist li {
  position: relative;
  padding: 10px 14px 10px 46px;
  margin-bottom: 6px !important;
  background: var(--fs-bg);
  border-radius: 8px;
}
.fsb-checklist li::before {
  content: "";
  position: absolute;
  left: 14px; top: 12px;
  width: 18px; height: 18px;
  border: 2px solid var(--fs-red);
  border-radius: 5px;
  background: #fff;
}

/* Вывод / итог: <div class="fsb-outro">…</div> */
.fsb-outro {
  margin-top: 34px;
  padding: 24px 28px;
  background: var(--fs-ink);
  color: #fff;
  border-radius: 12px;
}
.fsb-outro strong { color: #ffd7d4; }
.fsb-outro a { color: #fff !important; text-decoration: underline !important; }


/* ==========================================================================
   3. СЛАЙДЕР «ДРУГИЕ СТАТЬИ» (.fsb-slider)
   --------------------------------------------------------------------------
   Бэкенд выводит 15 случайных статей по этой разметке:
   <div class="fsb fsb-slider" data-fsb-slider>
     <div class="fsb-slider_head">Заголовок + кнопки .fsb-slider_prev/next</div>
     <div class="fsb-slider_track">
       <a class="fsb-card fsb-slider_item" href="..."> …как в плитке… </a> ×15
     </div>
   </div>
   JS: js/fs-redesign.js (4 карточки в ряду, шаг = 1 карточка).
   ========================================================================== */

.fsb-slider { margin: 46px 0 30px; }

.fsb-slider_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.fsb-slider_title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
}
.fsb-slider_nav { display: flex; gap: 8px; }
.fsb-slider_prev, .fsb-slider_next {
  width: 42px; height: 42px;
  border: 1px solid var(--fs-line);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: var(--fs-ink);
  transition: background var(--fs-tr), color var(--fs-tr), border-color var(--fs-tr);
}
.fsb-slider_prev:hover, .fsb-slider_next:hover {
  background: var(--fs-red);
  border-color: var(--fs-red);
  color: #fff;
}
.fsb-slider_prev:disabled, .fsb-slider_next:disabled { opacity: .35; cursor: default; }
.fsb-slider_prev:disabled:hover, .fsb-slider_next:disabled:hover { background: #fff; color: var(--fs-ink); border-color: var(--fs-line); }

.fsb-slider_viewport { overflow: hidden; }
.fsb-slider_track {
  display: flex;
  gap: 20px;
  transition: transform .45s ease;
}
.fsb-slider_item {
  flex: 0 0 calc((100% - 60px) / 4);  /* 4 в ряд */
  min-width: 0;
}
.fsb-slider_item .fsb-card_text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 1023px) { .fsb-slider_item { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 599px)  { .fsb-slider_item { flex-basis: 100%; } }


/* ==========================================================================
   4. ВНУТРЕННИЕ СТРАНИЦЫ — «О КОМПАНИИ» и «КОРПОРАТИВНЫМ КЛИЕНТАМ» (.fsp)
   --------------------------------------------------------------------------
   Обёртка: <div class="fsp"> … </div> внутри текущего .container (1200px).
   ========================================================================== */

.fsp { padding: 10px 0 60px; }

/* Hero с фоновой картинкой */
.fsp-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  margin-bottom: 40px;
  background: #231f20;
}
.fsp-hero img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.fsp-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,18,.15) 0%, rgba(20,18,18,.82) 100%);
}
.fsp-hero_inner { position: relative; z-index: 1; padding: 44px; max-width: 720px; }
.fsp-hero h1 { font-size: 38px; line-height: 1.15; margin: 0 0 14px; color: #fff; }
.fsp-hero p { font-size: 17px; margin: 0 0 22px; color: rgba(255,255,255,.92); }
@media (max-width: 767px) {
  .fsp-hero_inner { padding: 26px 22px; }
  .fsp-hero h1 { font-size: 27px; }
}

/* Кнопки */
.fsp-btn {
  display: inline-block;
  padding: 14px 30px;
  background: var(--fs-red);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  border-radius: 8px;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: background var(--fs-tr), transform var(--fs-tr);
}
.fsp-btn:hover { background: var(--fs-red-dark); transform: translateY(-2px); }
.fsp-btn--ghost {
  background: transparent;
  box-shadow: inset 0 0 0 2px #fff;
}
.fsp-btn--ghost:hover { background: rgba(255,255,255,.14); }

/* Цифры (счётчики) */
.fsp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0 0 46px;
}
.fsp-stat {
  background: #fff;
  border-radius: var(--fs-radius);
  box-shadow: var(--fs-shadow);
  padding: 26px 22px;
  text-align: center;
}
.fsp-stat_num {
  font-size: 40px;
  font-weight: 800;
  color: var(--fs-red);
  line-height: 1.1;
}
.fsp-stat_num small { font-size: 22px; }
.fsp-stat_text { font-size: 14px; color: var(--fs-gray); margin-top: 6px; }
@media (max-width: 900px) { .fsp-stats { grid-template-columns: repeat(2, 1fr); } }

/* Заголовки секций */
.fsp-h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 26px;
  position: relative;
  padding-bottom: 12px;
}
.fsp-h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px; height: 4px;
  background: var(--fs-red);
  border-radius: 2px;
}
.fsp-h2--center { text-align: center; }
.fsp-h2--center::after { left: 50%; transform: translateX(-50%); }

/* Карточки-преимущества */
.fsp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 48px;
}
.fsp-card {
  background: #fff;
  border-radius: var(--fs-radius);
  box-shadow: var(--fs-shadow);
  padding: 28px 26px;
  transition: transform var(--fs-tr), box-shadow var(--fs-tr);
}
.fsp-card:hover { transform: translateY(-5px); box-shadow: var(--fs-shadow-h); }
.fsp-card_ico {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: #fdeceb;
  border-radius: 12px;
  font-size: 26px;
  margin-bottom: 16px;
}
.fsp-card h3 { font-size: 18px; margin: 0 0 10px; }
.fsp-card p { font-size: 14.5px; color: var(--fs-gray); margin: 0; }
@media (max-width: 900px) { .fsp-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .fsp-cards { grid-template-columns: 1fr; } }

/* Шаги (как мы работаем) */
.fsp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 48px; counter-reset: step; }
.fsp-step {
  position: relative;
  background: var(--fs-bg);
  border-radius: var(--fs-radius);
  padding: 56px 20px 22px;
  font-size: 14.5px;
}
.fsp-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 16px; left: 20px;
  font-size: 28px;
  font-weight: 800;
  color: var(--fs-red);
}
.fsp-step h3 { font-size: 16px; margin: 0 0 8px; }
.fsp-step p { margin: 0; color: var(--fs-gray); }
@media (max-width: 900px) { .fsp-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .fsp-steps { grid-template-columns: 1fr; } }

/* Аккордеон (FAQ) */
.fsp-acc { margin-bottom: 48px; }
.fsp-acc_item {
  background: #fff;
  border: 1px solid var(--fs-line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.fsp-acc_q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  color: var(--fs-ink);
}
.fsp-acc_q::after {
  content: "+";
  font-size: 24px;
  font-weight: 400;
  color: var(--fs-red);
  transition: transform var(--fs-tr);
}
.fsp-acc_item.fsp-open .fsp-acc_q::after { transform: rotate(45deg); }
.fsp-acc_a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.fsp-acc_a > div { padding: 0 22px 20px; font-size: 14.5px; color: var(--fs-gray); }

/* Тёмный CTA-блок */
.fsp-cta {
  background: linear-gradient(120deg, var(--fs-ink) 0%, #3a2526 100%);
  color: #fff;
  border-radius: 18px;
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.fsp-cta h2 { font-size: 26px; margin: 0 0 8px; color: #fff; }
.fsp-cta p { margin: 0; color: rgba(255,255,255,.8); max-width: 560px; }
.fsp-cta_tel { font-size: 26px; font-weight: 800; color: #fff !important; text-decoration: none !important; display: block; margin-top: 10px; }
@media (max-width: 767px) { .fsp-cta { padding: 28px 22px; } }

/* Реквизиты / инфо-блоки */
.fsp-info {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  margin-bottom: 46px;
}
.fsp-info_box {
  background: var(--fs-bg);
  border-radius: var(--fs-radius);
  padding: 26px;
  font-size: 14.5px;
}
.fsp-info_box h3 { margin: 0 0 12px; font-size: 17px; }
.fsp-info_box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.fsp-info_box dt { color: var(--fs-gray); }
.fsp-info_box dd { margin: 0; }
@media (max-width: 767px) { .fsp-info { grid-template-columns: 1fr; } }

/* Таймлайн (О компании) */
.fsp-timeline { position: relative; margin: 0 0 48px; padding-left: 28px; }
.fsp-timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--fs-line);
}
.fsp-tl_item { position: relative; padding: 0 0 26px 22px; }
.fsp-tl_item::before {
  content: "";
  position: absolute;
  left: -28px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--fs-red);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--fs-red);
}
.fsp-tl_year { font-weight: 800; color: var(--fs-red); font-size: 18px; }
.fsp-tl_text { font-size: 14.5px; color: var(--fs-gray); }

/* Бренды */
.fsp-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 46px;
}
.fsp-brand {
  padding: 10px 20px;
  background: #fff;
  border: 1px solid var(--fs-line);
  border-radius: 30px;
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: var(--fs-shadow);
}

/* Плавное появление при скролле (если подключён js) */
.fs-js .fsp .fsp-reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fs-js .fsp .fsp-reveal.fsp-visible { opacity: 1; transform: none; }
