/* =========================================================================
   Блог GRADE «Полезные статьи» — изолированные стили (blog.css)
   Точные значения из Figma 8:2 / 8:83. line-height ≈1.19, letter-spacing в px.
   В @font-face сайта нет веса 600 (есть Medium=500) — назначаем 600 на Medium.
   ========================================================================= */
@font-face {
  font-family: 'SF Pro Text';
  src: url("../fonts/SF_Pro_Text_Medium.woff") format("woff"),
       url("../fonts/SF_Pro_Text_Medium.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --blog-black: #000;
  --blog-white: #fff;
  --blog-accent: #313131;
  --blog-marker: #222;
  --blog-gray: #8e8e8e;         /* серый текст (стаж) */
  --blog-cta-bg: #1d1d1d;
  --blog-aside-bg: #efefef;
  --blog-font: 'SF Pro Text', Arial, sans-serif;
}

/* ======================= Раскладка статьи ======================= */
.blog-article__layout { display: flex; align-items: flex-start; gap: 40px; max-width: 1283px; margin: 0 auto; }
.blog-article__main { flex: 1 1 auto; min-width: 0; }
.blog-article .blog-aside { flex: 0 0 401px; max-width: 401px; }

/* ---------- Хлебные крошки (12/400) ---------- */
.blog-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--blog-font); font-size: 12px; font-weight: 400; letter-spacing: .48px; line-height: 1.19; margin-bottom: 24px; }
.blog-crumbs__item { color: var(--blog-black); text-decoration: none; opacity: .6; }
.blog-crumbs__item:hover { opacity: 1; }
.blog-crumbs__item:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .5; }
.blog-crumbs__item:last-child { opacity: 1; pointer-events: none; }

/* ---------- Карточка автора (имя в 2 строки, стаж серый) ---------- */
.blog-author { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; }
.blog-author__avatar { flex: 0 0 91px; width: 91px; height: 91px; overflow: hidden; }
.blog-author__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-author__info { display: flex; flex-direction: column; gap: 2px; }
.blog-author__name { font-family: var(--blog-font); font-weight: 400; font-size: 20px; line-height: 1.19; letter-spacing: .8px; text-transform: uppercase; color: var(--blog-black); }
.blog-author__role { font-family: var(--blog-font); font-weight: 400; font-size: 16px; line-height: 1.19; color: var(--blog-black); }
.blog-author__exp { font-family: var(--blog-font); font-weight: 400; font-size: 16px; line-height: 1.19; color: var(--blog-gray); }

/* ---------- H1 (40/400, ls 1.6) ---------- */
.blog-article__title { font-family: var(--blog-font); font-weight: 400; font-size: 40px; line-height: 1.19; letter-spacing: 1.6px; text-transform: uppercase; color: var(--blog-black); margin: 0 0 28px; }

/* ---------- Лид + буквица (36/400) ---------- */
.blog-article__lead { font-family: var(--blog-font); font-weight: 400; font-size: 16px; line-height: 1.19; color: var(--blog-black); margin-bottom: 28px; }
.blog-article__lead::first-letter { font-size: 36px; line-height: .9; font-weight: 400; letter-spacing: 1.44px; float: left; padding: 3px 12px 0 0; color: var(--blog-black); }

/* ---------- Тело статьи ---------- */
.blog-article__content { font-family: var(--blog-font); font-weight: 400; font-size: 16px; line-height: 1.19; color: var(--blog-black); }
.blog-article__content h2 { font-family: var(--blog-font); font-weight: 600; font-size: 24px; line-height: 1.19; letter-spacing: .96px; color: var(--blog-black); margin: 32px 0 13px; }
.blog-article__content h3 { font-family: var(--blog-font); font-weight: 400; font-size: 20px; line-height: 1.19; letter-spacing: .8px; color: var(--blog-black); margin: 28px 0 13px; }
.blog-article__content p { font-size: 16px; line-height: 1.5; margin: 0 0 16px; }
.blog-article__content ul { margin: 0 0 16px; padding-left: 0; list-style: none; }
.blog-article__content ul > li { position: relative; padding-left: 24px; margin-bottom: 10px; font-size: 16px; line-height: 1.4; }
.blog-article__content ul > li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 6px; height: 6px; background: var(--blog-marker); }
.blog-article__content ol { margin: 0 0 16px; padding-left: 22px; list-style: decimal outside; }
.blog-article__content ol > li { padding-left: 4px; margin-bottom: 10px; font-size: 16px; line-height: 1.4; }

/* ======================= Сайдбар ======================= */
.blog-aside { align-self: flex-start; position: sticky; top: 20px; }
.blog-aside__services { background: var(--blog-aside-bg); padding: 32px 24px; }
.blog-aside__title { font-family: var(--blog-font); font-weight: 400; font-size: 32px; line-height: 1.19; letter-spacing: 1.28px; text-transform: uppercase; color: var(--blog-black); margin: 0 0 20px; }
.blog-aside__list { list-style: none; margin: 0; padding: 0; }
.blog-aside__list li { margin-bottom: 15px; }
.blog-aside__list li:last-child { margin-bottom: 0; }
.blog-aside__list a { font-family: var(--blog-font); font-weight: 600; font-size: 16px; line-height: 1.19; color: var(--blog-black); text-decoration: underline; }
.blog-aside__list a:hover { opacity: .7; }

.blog-aside__consult { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--blog-accent); padding: 24px; text-decoration: none; }
.blog-aside__consult-text { min-width: 0; }
.blog-aside__consult-title { font-family: var(--blog-font); font-weight: 700; font-size: 20px; line-height: 1.19; color: var(--blog-white); }
.blog-aside__consult-sub { font-family: var(--blog-font); font-weight: 400; font-size: 14px; line-height: 1.19; color: var(--blog-white); margin-top: 6px; opacity: .9; }
.blog-aside__consult-icon { flex: 0 0 40px; width: 40px; height: 40px; background: var(--blog-white); color: var(--blog-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.blog-aside__consult:hover { background: #000; }

/* ======================= CTA-баннер ======================= */
.blog-cta { background: var(--blog-cta-bg); margin-top: 40px; padding: 40px; }
.blog-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.blog-cta__text { flex: 1 1 380px; }
.blog-cta__title { font-family: var(--blog-font); font-weight: 400; font-size: 40px; line-height: 1.19; letter-spacing: 1.6px; text-transform: uppercase; color: var(--blog-white); margin: 0 0 13px; }
.blog-cta__subtitle { font-family: var(--blog-font); font-weight: 700; font-size: 16px; line-height: 1.19; letter-spacing: .64px; color: var(--blog-white); margin-bottom: 8px; }
.blog-cta__lead { font-family: var(--blog-font); font-weight: 400; font-size: 14px; line-height: 1.3; letter-spacing: .56px; color: var(--blog-white); opacity: .85; max-width: 320px; margin: 0; }
.blog-cta__form { flex: 1 1 340px; max-width: 360px; display: flex; flex-direction: column; gap: 13px; }
.blog-cta__field { display: flex; flex-direction: column; gap: 6px; }
.blog-cta__label { font-family: var(--blog-font); font-weight: 400; font-size: 14px; line-height: 1.19; color: var(--blog-white); }
.blog-cta__form .form-control { width: 100%; height: 40px; padding: 0 14px; font-family: var(--blog-font); font-size: 14px; background: var(--blog-white); color: var(--blog-black); border: none; outline: none; border-radius: 0; }
.blog-cta__btn { height: 40px; min-width: 208px; align-self: flex-start; background: var(--blog-white); color: var(--blog-black); border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px; font-family: var(--blog-font); font-size: 14px; line-height: 1; }
.blog-cta__btn:hover { background: #ededed; }
.blog-cta__btn span { color: var(--blog-black); }
.blog-cta__btn-arrow { font-size: 18px; line-height: 1; color: var(--blog-black); }
.blog-cta__agree { display: flex; align-items: flex-start; gap: 8px; font-family: var(--blog-font); font-size: 12px; line-height: 1.35; color: var(--blog-white); opacity: .8; margin-top: 4px; }
.blog-cta__agree input { margin-top: 2px; }
.blog-cta__agree span { color: var(--blog-white); }
.blog-cta__agree a { color: var(--blog-white); text-decoration: underline; }

.blog-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.blog-page--article .photo-gallery-section { display: none; }

/* ======================= КАТАЛОГ (8:2) ======================= */
.blog-hero { margin-bottom: 32px; }
.blog-hero img { display: block; width: 100%; height: auto; }
.blog-catalog__title { font-family: var(--blog-font); font-weight: 600; font-size: 22px; line-height: 1.19; letter-spacing: .88px; text-transform: uppercase; color: var(--blog-black); margin: 0 0 24px; }

.blog-accordion { display: flex; align-items: flex-start; gap: 60px; }
.blog-accordion__cats { flex: 0 0 635px; max-width: 635px; display: flex; flex-direction: column; gap: 13px; }
.blog-accordion__lists { flex: 1 1 auto; min-width: 0; padding-top: 4px; }

.blog-cat { display: flex; align-items: stretch; width: 100%; height: 59px; padding: 0; background: #ececec; border: none; cursor: pointer; font-family: var(--blog-font); }
.blog-cat__name { flex: 1 1 auto; display: flex; align-items: center; padding: 0 24px; font-size: 20px; font-weight: 400; line-height: 1.19; letter-spacing: .8px; text-transform: uppercase; color: var(--blog-black); text-align: left; }
.blog-cat__arrow { flex: 0 0 30px; background: #d0d0d0; display: flex; align-items: center; justify-content: center; }
.blog-cat__arrow::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--blog-accent); border-top: 2px solid var(--blog-accent); transform: rotate(45deg); margin-left: -3px; }
.blog-cat.is-active .blog-cat__arrow { background: var(--blog-accent); }
.blog-cat.is-active .blog-cat__arrow::before { border-color: var(--blog-white); }

.blog-list { display: none; }
.blog-list.is-active { display: block; }
.blog-list__items { list-style: none; margin: 0; padding: 0; }
.blog-list__item { position: relative; padding-left: 26px; margin-bottom: 16px; }
/* остальные пункты — чёрный круг */
.blog-list__item::before { content: ""; position: absolute; left: 2px; top: .5em; width: 9px; height: 9px; border-radius: 50%; background: var(--blog-marker); }
/* первый пункт — стрелка-треугольник */
.blog-list__item:first-child::before { left: 0; top: .35em; width: 0; height: 0; border-radius: 0; background: transparent; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--blog-marker); }
.blog-list__link { font-family: var(--blog-font); font-size: 14px; font-weight: 400; line-height: 1.3; letter-spacing: .56px; text-transform: uppercase; color: var(--blog-black); text-decoration: none; }
.blog-list__link:hover { text-decoration: underline; }

/* Страница категории (Вариант A) */
.blog-category__title { font-family: var(--blog-font); font-weight: 600; font-size: 32px; line-height: 1.19; letter-spacing: .5px; text-transform: uppercase; color: var(--blog-black); margin: 0 0 20px; }
.blog-category__lead { font-family: var(--blog-font); font-size: 16px; line-height: 1.5; color: var(--blog-black); max-width: 842px; margin: 0 0 28px; }
.blog-category__list { list-style: none; margin: 0; padding: 0; max-width: 842px; }
.blog-category__list .blog-list__item { margin-bottom: 16px; }
.blog-category__list .blog-list__link { font-size: 18px; }

/* ======================= Адаптив ======================= */
@media (max-width: 1024px) {
  .blog-article__layout { flex-direction: column; gap: 32px; }
  .blog-article__main { width: 100%; }
  .blog-article .blog-aside { flex: 1 1 auto; max-width: 100%; width: 100%; position: static; }
}
@media (max-width: 900px) {
  .blog-accordion { flex-direction: column; gap: 24px; }
  .blog-accordion__cats { flex: 1 1 auto; max-width: 100%; }
}
@media (max-width: 768px) {
  .blog-article__title { font-size: 28px; }
  .blog-aside__title { font-size: 26px; }
  .blog-cta { padding: 28px 20px; }
  .blog-cta__title { font-size: 28px; }
  .blog-cta__inner { flex-direction: column; align-items: stretch; gap: 20px; }
  .blog-cta__text, .blog-cta__form { flex: 0 0 auto; max-width: 100%; }
  .blog-cta__lead { max-width: 100%; }
}
@media (max-width: 480px) {
  .blog-article__title { font-size: 24px; }
  .blog-author { gap: 12px; }
  .blog-author__avatar { flex-basis: 72px; width: 72px; height: 72px; }
}
