/**
 * B2BRICS: Грубая изоляция — body,p,div,li из темы перебивают блоки.
 * Правила для b2b-block-container И ty-wysiwyg-content (fallback, если override tpl не сработал).
 */
.b2b-block-container p,
.b2b-block-container div,
.b2b-block-container li,
.ty-wysiwyg-content .b2b-block p,
.ty-wysiwyg-content .b2b-block div,
.ty-wysiwyg-content .b2b-block li {
  font-family: inherit !important;
}

/* CJK fallback — когда осн. шрифт не имеет глифа (китайский и т.д.), браузер подхватит Noto Sans SC */
:root {
  --cjk-fallback: "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Lora — заголовки и serif-текст в B2B блоках (поддерживает кириллицу; CJK — через fallback) */
.b2b-marketplace-masthead,
.b2b-marketplace-masthead h1,
.b2b-marketplace-masthead h2,
.b2b-marketplace-masthead .subline,
.ty-wysiwyg-content .b2b-marketplace-masthead,
.ty-wysiwyg-content .b2b-marketplace-masthead h1,
.ty-wysiwyg-content .b2b-marketplace-masthead h2,
.ty-wysiwyg-content .b2b-marketplace-masthead .subline,
.b2b-hero h1,
.b2b-hero h2,
.b2b-hero .hero-magazine--fixed h1,
.b2b-hero .hero-magazine--fixed h2,
.ty-wysiwyg-content .b2b-hero h1,
.ty-wysiwyg-content .b2b-hero h2,
.ty-wysiwyg-content .b2b-hero .hero-magazine--fixed h1,
.ty-wysiwyg-content .b2b-hero .hero-magazine--fixed h2,
.b2b-mission-block .mission-lead,
.b2b-how-block .section-title,
.b2b-how-section .section-title,
.b2b-ai-agents .section-title,
.b2b-showrooms .section-title,
.b2b-after .section-title,
.b2b-faq .section-title,
.b2b-magazine .magazine-masthead h1,
.b2b-magazine .magazine-masthead h2,
.b2b-magazine .section-title {
  font-family: "Lora", var(--cjk-fallback), serif !important;
}

/* Hero и главные заголовки (h1/h2 для SEO) — Lora 600 */
.b2b-marketplace-masthead h1,
.b2b-marketplace-masthead h2,
.b2b-marketplace-masthead .subline,
.ty-wysiwyg-content .b2b-marketplace-masthead h1,
.ty-wysiwyg-content .b2b-marketplace-masthead h2,
.ty-wysiwyg-content .b2b-marketplace-masthead .subline,
.b2b-hero h1,
.b2b-hero h2,
.b2b-hero .hero-magazine--fixed h1,
.b2b-hero .hero-magazine--fixed h2,
.ty-wysiwyg-content .b2b-hero h1,
.ty-wysiwyg-content .b2b-hero h2,
.ty-wysiwyg-content .b2b-hero .hero-magazine--fixed h1,
.ty-wysiwyg-content .b2b-hero .hero-magazine--fixed h2,
.b2b-magazine .magazine-masthead h1,
.b2b-magazine .magazine-masthead h2 {
  font-weight: 600 !important;
}

/* section-title — Lora 700 */
.b2b-how-block .section-title,
.b2b-how-section .section-title,
.b2b-ai-agents .section-title,
.b2b-showrooms .section-title,
.b2b-after .section-title,
.b2b-faq .section-title,
.b2b-magazine .section-title {
  font-weight: 700 !important;
}

/* section-number — Gelasio 700, размер чуть меньше (01, 02, 03…) */
.b2b-how-block .section-number,
.b2b-how-section .section-number,
.b2b-ai-agents .section-number,
.b2b-showrooms .section-number,
.b2b-after .section-number,
.b2b-faq .section-number,
.b2b-magazine .section-number {
  font-family: "Gelasio", var(--cjk-fallback), serif !important;
  font-optical-sizing: auto;
  font-weight: 700 !important;
  font-size: 2.5rem !important;
  line-height: 1;
  color: rgba(15,17,21,.18);
}

/* mission-lead — serif 400 */
.b2b-mission-block .mission-lead {
  font-weight: 400 !important;
}

/* Секционные заголовки с номерами (01, 02, 03…) — единый стиль */
.b2b-has-section-number .section-header-pt {
  display: flex;
  flex-direction: row;
  align-items: baseline; /* ключевое: цифра и h2 в одну линию */
  gap: 32px;
}

.b2b-has-section-number .section-header-top,
.b2b-has-section-number .section-header-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.b2b-has-section-number .section-number {
  font-family: "Gelasio", var(--cjk-fallback), serif !important;
  font-optical-sizing: auto;
  font-weight: 700 !important;
  font-size: 2.5rem !important;
  line-height: 1;
  color: rgba(15,17,21,.18);
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .b2b-has-section-number .section-header-pt {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .b2b-has-section-number .section-number {
    font-size: 2rem !important;
  }

  .b2b-how-block .section-number,
  .b2b-how-section .section-number,
  .b2b-ai-agents .section-number,
  .b2b-showrooms .section-number,
  .b2b-after .section-number,
  .b2b-faq .section-number,
  .b2b-magazine .section-number {
    font-size: 2rem !important;
  }
}

/* body — CJK fallback: Inter/тема остаются первыми, китайский подхватит Noto Sans SC при необходимости */
body {
  font-family: "Inter", var(--cjk-fallback), -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

