/* ============================================
   СТИЛИ ДЛЯ КОНТЕНТА СТАТЕЙ - КЕЙСЫ, КОНТАКТЫ, СЕКЦИИ
   ============================================ */

/* Заголовки секций с подчеркиванием */
.article-body h2 {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #b07d2e 0%, #8a6914 100%);
    border-radius: 2px;
}

/* Приведение SEO-статей к единому "чистому" оформлению */
.article-body {
    font-size: 17px;
    line-height: 1.75;
    color: #2a2f36;
}

.article-body h2.custom-section-title,
.article-body h2 {
    margin: 40px 0 18px;
    font-size: 1.65rem;
    line-height: 1.3;
    color: #1f2937;
}

.article-body h3.custom-subsection,
.article-body h3 {
    margin: 28px 0 12px;
    font-size: 1.22rem;
    line-height: 1.4;
    color: #243b53 !important;
}

.article-body .custom-paragraph,
.article-body p {
    margin: 0 0 14px;
}

.article-body ul {
    margin: 10px 0 18px;
    padding-left: 22px;
}

.article-body ul li {
    margin-bottom: 10px;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0 26px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.97rem;
}

.article-body th {
    background: #f6efe3;
    color: #1f2937;
    text-align: left;
    padding: 12px 14px;
    font-weight: 700;
    border-bottom: 1px solid #e5e7eb;
}

.article-body td {
    padding: 11px 14px;
    border-bottom: 1px solid #eef0f3;
    color: #374151;
}

.article-body tr:nth-child(even) td {
    background: #fcfcfd;
}

.article-body tr:last-child td {
    border-bottom: none;
}

.article-body p > strong:first-child {
    color: #8a6914;
}

/* Блок "Профессиональная помощь" - исправление контраста
   РАНЬШЕ здесь были сложные правила с белым текстом, теперь мы их убрали,
   чтобы не ломать контраст. Оформление делаем минимальным: только рамка. */

.article-body > div[style*="background"],
.article-body > div[style*="gradient"],
.article-body > div[style*="linear-gradient"] {
    border-radius: 12px;
    padding: 25px 30px;
}

/* Блоки с кейсами - стилизация (две колонки) */
/* Если есть вложенные div с контентом кейсов */
.article-body > div > div {
    background: #f8f9fa;
    border-left: 4px solid #b07d2e;
    padding: 20px 25px;
    border-radius: 0 10px 10px 0;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Контейнер для нескольких кейсов рядом - применяется только если есть вложенные div */
.article-body > div:not([style*="background"]):not([style*="gradient"]):not([style*="linear-gradient"]) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* Заголовки в кейсах */
.article-body > div > div strong:first-child,
.article-body > div > div h4:first-child {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    display: block;
}

/* Подзаголовки в кейсах */
.article-body > div > div strong,
.article-body > div > div h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
    margin: 15px 0 10px 0;
    display: block;
}

/* Подзаголовки секций */
.article-body h3 {
    color: #34495e !important; /* тёмный читаемый цвет для подзаголовков */
}

.article-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 12px 0;
}

/* Улучшение читаемости списков в секциях */
.article-body ul li,
.article-body ol li {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #495057;
}

/* Выделение важных блоков - применяется через класс или стиль */
.article-body > div[style*="⚠️"],
.article-body > div[style*="Важно"],
.article-body > div[style*="❗"] {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px 25px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

/* Адаптивность для кейсов */
@media (max-width: 768px) {
    .article-body > div:not([style*="background"]):not([style*="gradient"]):not([style*="linear-gradient"]) {
        grid-template-columns: 1fr !important;
        gap: 20px;
        display: block !important;
    }
    
    .article-body > div > div {
        margin: 15px 0;
        padding: 15px 20px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Все блоки с inline стилями адаптируются */
    .article-body > div[style],
    .article-body div[style] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box;
        padding: 20px 15px !important;
        margin: 20px 0 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Заголовки в кейсах адаптивные */
    .article-body > div > div strong:first-child,
    .article-body > div > div h4:first-child {
        font-size: 1.2rem;
    }
    
    .article-body > div > div strong,
    .article-body > div > div h4 {
        font-size: 1rem;
    }
    
    /* Блоки контактов адаптивные */
    .article-body .custom-contacts-block,
    .article-body .custom-info-block {
        padding: 20px 15px !important;
        margin: 20px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .article-body .custom-contacts-block h3,
    .article-body .custom-contacts-block strong,
    .article-body .custom-info-block h3,
    .article-body .custom-info-block strong {
        font-size: 1.1rem;
    }
    
    .article-body .custom-contacts-block p,
    .article-body .custom-info-block p {
        font-size: 0.95rem;
        margin: 6px 0;
    }
}

@media (max-width: 480px) {
    .article-body > div > div {
        padding: 12px 15px;
    }
    
    .article-body > div > div strong:first-child,
    .article-body > div > div h4:first-child {
        font-size: 1.1rem;
    }
    
    .article-body > div > div strong,
    .article-body > div > div h4 {
        font-size: 0.95rem;
    }
    
    .article-body > div[style],
    .article-body div[style],
    .article-body .custom-contacts-block,
    .article-body .custom-info-block {
        padding: 15px 12px !important;
    }
}

/* ФИНАЛЬНОЕ ПРАВИЛО: делаем текст темным на светлых инфоблоках внутри статьи */
.article-body div[style*="background"],
.article-body div[style*="gradient"],
.article-body div[style*="linear-gradient"],
.article-body div[style*="#f8f9ff"],
.article-body div[style*="#e3f2fd"],
.article-body div[style*="#e7f3ff"] {
    color: #243b53 !important; /* темный читаемый текст */
}

.article-body div[style*="background"] *,
.article-body div[style*="gradient"] *,
.article-body div[style*="linear-gradient"] *,
.article-body div[style*="#f8f9ff"] *,
.article-body div[style*="#e3f2fd"] *,
.article-body div[style*="#e7f3ff"] * {
    color: #243b53 !important;
}

/* Точный фикс: блок контактов .custom-contacts-block в статьях */
.article-body .custom-contacts-block {
    background: #eaf4ff;
    border-radius: 16px;
    padding: 24px 28px;
    border-left: 4px solid #1e88e5;
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.12);
}

.article-body .custom-contacts-block h3,
.article-body .custom-contacts-block strong {
    color: #1b3a57 !important;
}

.article-body .custom-contacts-block p {
    color: #243b53 !important;
    margin: 8px 0;
}

/* .custom-info-block внутри статей: светлый фон jeksport, тёмный текст для контраста */
.article-body .custom-info-block {
    background: #f7f3ee !important;
    border-radius: 16px;
    padding: 22px 24px;
    border-left: 4px solid #b07d2e;
    box-shadow: 0 6px 18px rgba(176, 125, 46, 0.15);
}

.article-body .custom-info-block h3,
.article-body .custom-info-block strong {
    color: #1c1814 !important;
}

.article-body .custom-info-block p {
    color: #374151 !important;
    margin: 8px 0;
}

/* ================================
   Безопасный откат слишком общих правил
   ================================ */

/* Возвращаем обычный поток для обёрток первого уровня */
.article-body > div:not([style*="background"]):not([style*="gradient"]):not([style*="linear-gradient"]) {
    display: block;
    margin: 0 0 1.1em;
    gap: 0;
}

/* Внутренние div больше не оформляем как карточки по умолчанию */
.article-body > div > div {
    background: transparent;
    border-left: none;
    padding: 0;
    border-radius: 0;
    margin: 0 0 1.1em;
    box-shadow: none;
}

/* Блок «Главная страница категории» — только для статей категории 31 (доверенное ПО) */
.category-main-page-block {
    margin-bottom: 32px;
}

.category-main-page-block-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.08) 0%, rgba(42, 82, 152, 0.12) 100%);
    border: 1px solid rgba(30, 60, 114, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(30, 60, 114, 0.08);
}

.category-main-page-block-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    flex-shrink: 0;
}

.category-main-page-block-icon svg {
    width: 26px;
    height: 26px;
}

.category-main-page-block-text {
    flex: 1;
    min-width: 200px;
}

.category-main-page-block-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a6914;
    margin-bottom: 4px;
}

.category-main-page-block-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
}

.category-main-page-block-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 10px;
    white-space: nowrap;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.category-main-page-block-btn:hover {
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .category-main-page-block-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 16px 14px;
        gap: 12px;
    }
    .category-main-page-block-icon {
        margin: 0 auto;
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    .category-main-page-block-icon svg {
        width: 20px;
        height: 20px;
    }
    .category-main-page-block-label {
        font-size: 0.75rem;
    }
    .category-main-page-block-desc {
        font-size: 0.9rem;
        line-height: 1.45;
    }
    .category-main-page-block-btn {
        width: 100%;
        padding: 11px 18px;
    }
}

/* ============================================
   FIX: контраст текста на тёмных "custom" карточках
   (в некоторых статьях фон задаётся градиентом, а текст остаётся тёмным)
   ============================================ */
.article-body .custom-challenge-card {
    color: #ffffff !important;
}

.article-body .custom-challenge-card h1,
.article-body .custom-challenge-card h2,
.article-body .custom-challenge-card h3,
.article-body .custom-challenge-card h4,
.article-body .custom-challenge-card p,
.article-body .custom-challenge-card span,
.article-body .custom-challenge-card li {
    color: #ffffff !important;
}

.article-body .custom-challenge-card p {
    opacity: 0.92;
}

/* Глобальный фикс: "Кейс из практики" / custom-success-box
   В ряде статей в блок подмешивается светлый фон inline-стилями, поэтому
   принудительно держим контраст: тёмный фон + светлый текст. */
body.news-theme-new .article-body .custom-success-box {
    background: #f7f3ee !important;
    color: #1c1814 !important;
    border: 1px solid #ddd5c8;
    border-left: 4px solid #b07d2e;
    border-radius: 10px;
    box-shadow: none;
    padding: 24px 28px !important;
    margin: 30px 0 !important;
    text-align: left;
}

body.news-theme-new .article-body .custom-success-box h2,
body.news-theme-new .article-body .custom-success-box h3,
body.news-theme-new .article-body .custom-success-box h4,
body.news-theme-new .article-body .custom-success-box p,
body.news-theme-new .article-body .custom-success-box li,
body.news-theme-new .article-body .custom-success-box span,
body.news-theme-new .article-body .custom-success-box strong {
    color: #1c1814 !important;
}

body.news-theme-new .article-body .custom-success-box h3,
body.news-theme-new .article-body .custom-success-box h4 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
}

body.news-theme-new .article-body .custom-success-box p,
body.news-theme-new .article-body .custom-success-box li {
    margin: 0 0 10px 0;
    font-size: 0.93rem;
    line-height: 1.7;
    font-weight: 400;
}

body.news-theme-new .article-body .custom-success-box a {
    color: #8a6914 !important;
    text-decoration: underline;
}



+

/* Research v2: evidence-first analytical articles */
.research-article--evidence{color:#172033;line-height:1.72}.research-article--evidence .research-lead{margin:0 0 28px;padding:22px 24px;border-left:5px solid #0f9f78;background:linear-gradient(135deg,#f0fdf9,#f6f9ff);border-radius:14px}.research-article--evidence .research-lead p{margin:0;font-size:1.08em}.research-article--evidence .research-section,.research-article--evidence .research-methodology,.research-article--evidence .research-sources,.research-article--evidence .research-related{margin-top:38px}.research-article--evidence h2{margin:0 0 16px;color:#102033;line-height:1.25}.research-article--evidence p{margin:0 0 16px}.research-article--evidence table{width:100%;border-collapse:collapse;margin:20px 0;background:#fff}.research-article--evidence th,.research-article--evidence td{padding:12px 14px;border:1px solid #dbe4ef;text-align:left;vertical-align:top}.research-article--evidence th{background:#edf5f7;color:#102f38}.research-figure{margin:30px 0;padding:24px;border:1px solid #d8e3ec;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(15,35,55,.07);overflow:hidden}.research-figure figcaption{display:flex;flex-direction:column;gap:5px;margin-bottom:20px;color:#102033}.research-figure figcaption strong{font-size:1.14em}.research-figure figcaption span,.research-caption{color:#64748b;font-size:.84em;line-height:1.5}.research-bar-row{display:grid;grid-template-columns:minmax(140px,1.5fr) minmax(130px,3fr) auto;gap:12px;align-items:center;margin:13px 0}.research-bar-label{font-size:.9em}.research-bar-track{height:14px;background:#e8eef5;border-radius:999px;overflow:hidden}.research-bar-track span{display:block;height:100%;background:linear-gradient(90deg,#0f9f78,#2563eb);border-radius:inherit}.research-bar-row strong{font-variant-numeric:tabular-nums}.research-line svg{display:block;width:100%;height:auto}.research-line svg text{font:14px system-ui,sans-serif;fill:#64748b}.research-intent-grid{display:flex;flex-wrap:wrap;gap:10px}.research-intent{display:inline-flex;padding:9px 13px;border-radius:999px;background:#eaf8f4;color:#145a49;font-size:.88em}.research-intent--2{background:#edf3ff;color:#244f9e}.research-intent--3{background:#f7f0ff;color:#65419a}.research-intent--4{background:#fff5e8;color:#8a5317}.research-source-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.research-source-grid div{display:flex;flex-direction:column;gap:5px;padding:15px;border:1px solid #dce7ee;border-radius:12px;background:#f8fbfc}.research-source-grid span{color:#64748b;font-size:.85em}.research-editorial{margin:38px 0;padding:24px;border-radius:18px;background:#102f38;color:#f8fafc}.research-editorial h2{color:#fff}.research-editorial .research-caption{color:#b8d4d0}.research-sources ol{padding-left:22px}.research-sources li{margin:10px 0}.research-sources a{overflow-wrap:anywhere}.research-methodology{padding:22px 24px;border:1px solid #dbe5ee;border-radius:16px;background:#f8fafc}
@media(max-width:640px){.research-figure{padding:17px;margin:24px 0}.research-bar-row{grid-template-columns:1fr auto}.research-bar-track{grid-column:1/-1;grid-row:2}.research-source-grid{grid-template-columns:1fr}.research-article--evidence .research-lead,.research-methodology{padding:18px}}

