/* Стили для страницы статьи */

.article-content {
    padding: 40px 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* Показ/скрытие на разных устройствах */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Основная статья */
.article-main {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0, 74, 198, 0.06);
    border: 1px solid rgba(195, 198, 214, 0.35);
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: none;
}

.article-category {
    margin-bottom: 15px;
}

.article-category a {
    background: #8083ff;
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.3s ease;
}

.article-category a:hover {
    background: #6568e0;
}

.article-main h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #191c1d;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #737685;
    margin-bottom: 20px;
}

.article-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #434654;
    line-height: 1.6;
    font-style: italic;
    background: #f3f4f5;
    padding: 24px;
    border-left: 4px solid #8083ff;
    border-radius: 0 0.75rem 0.75rem 0;
}

.article-image {
    margin: 30px 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
    /* без жесткого обрезания по высоте — управляем размером через max-height на изображении */
}

.article-image img {
    max-width: 100%;
    width: 100%;
    height: auto !important; /* даём картинке сохранять пропорции */
    max-height: 380px;       /* на десктопе обложка заметная, но не слишком высокая */
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    object-fit: contain !important; /* показываем всю картинку внутри заданной высоты */
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .article-image img {
        max-height: 240px; /* на мобильных делаем пониже, чтобы не занимать экран */
    }
}

.article-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #434654;
}

.article-body h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: #191c1d;
    margin: 40px 0 20px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.article-body h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #191c1d;
    margin: 30px 0 15px;
}

.article-body h4 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #434654;
    margin: 25px 0 15px;
}

.article-body p {
	margin-bottom: 20px;
	line-height: 1.8;
	text-align: justify;
	text-justify: inter-word;
	hyphens: auto;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-body li {
	margin-bottom: 10px;
	line-height: 1.7;
	text-align: justify;
	hyphens: auto;
}

.article-body blockquote {
    background: #f3f4f5;
    border-left: 4px solid #8083ff;
    margin: 30px 0;
    padding: 24px 32px;
    font-style: italic;
    color: #434654;
    border-radius: 0 0.75rem 0.75rem 0;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.article-body th,
.article-body td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(195, 198, 214, 0.35);
    font-size: 0.9rem;
}

.article-body th {
    background: #061226;
    color: #d7e2ff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.article-body tr:hover {
    background: #eef2ff;
}

.article-body a {
    color: #8083ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-body a:hover {
    color: #6568e0;
    border-bottom-color: #6568e0;
}

.article-body strong {
    font-weight: 600;
    color: #191c1d;
}

.article-body em {
    font-style: italic;
    color: #495057;
}

.article-body code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-body pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: #495057;
}

/* Таблица, ошибочно обернутая редактором в <pre> */
.article-body pre:has(table) {
	background: transparent;
	padding: 0;
	border: 0;
	overflow: visible;
	white-space: normal;
}
.article-body pre:has(table) table {
	display: table;
	width: 100%;
	margin: 0; /* уже есть внешний отступ у таблиц */
}
.article-body pre:has(table) code {
	background: none;
	padding: 0;
}

/* ===================== */
/* Унификация rich-text  */
/* ===================== */

/* Сбрасываем странные отступы/шрифты от редакторов (Word/Docs) */
.article-body * {
	max-width: 100%;
	box-sizing: border-box;
}

/* Параграфы и межабзацные отступы */
.article-body p,
.article-body div {
	margin-top: 0;
	margin-bottom: 1.1em;
}

/* Подзаголовки внутри контента */
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
	margin-top: 2em;
	margin-bottom: 0.6em;
	font-weight: 700;
	line-height: 1.3;
}

/* Списки, включая вложенные, и списки из редакторов */
.article-body ul,
.article-body ol {
	margin: 0 0 1.1em 0;
	padding-left: 1.4em;
	list-style-position: outside;
}
.article-body li > ul,
.article-body li > ol {
	margin-top: 0.4em;
	margin-bottom: 0.4em;
}
.article-body ul { list-style-type: disc; }
.article-body ul ul { list-style-type: circle; }
.article-body ul ul ul { list-style-type: square; }
.article-body ol { list-style-type: decimal; }
.article-body ol ol { list-style-type: lower-alpha; }
.article-body ol ol ol { list-style-type: lower-roman; }

/* Таблицы: кросс-платформенное оформление и скролл на узких экранах */
.article-body table {
	display: block;
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-collapse: collapse;
	border-spacing: 0;
}
.article-body thead th {
	position: sticky;
	top: 0;
	background: #f8f9fa;
}
.article-body tbody tr:nth-child(even) {
	background: #fcfcfd;
}
.article-body caption {
	caption-side: bottom;
	text-align: left;
	font-size: 0.95rem;
	color: #6c757d;
	padding: 8px 0 0;
}

/* Картинки и медиа */
.article-body img,
.article-body svg,
.article-body video,
.article-body iframe,
.article-body embed {
	display: block;
	max-width: 100%;
	height: auto;
}
.article-body iframe {
	width: 100% !important;
	border: 0;
	aspect-ratio: 16/9;
}
.article-body figure { margin: 1.2em 0; }
.article-body figcaption {
	font-size: 0.95rem;
	color: #6c757d;
	text-align: center;
	margin-top: 8px;
}

/* Выравнивание из редакторов (float) */
.article-body img[style*="float: left"],
.article-body .alignleft { float: left; margin: 0.2em 1em 1em 0; }
.article-body img[style*="float: right"],
.article-body .alignright { float: right; margin: 0.2em 0 1em 1em; }
.article-body .aligncenter,
.article-body p > img:only-child {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Цитаты, разделители, акценты */
.article-body hr {
	border: 0;
	border-top: 1px solid #e9ecef;
	margin: 2rem 0;
}
.article-body mark { background: #fff3cd; padding: 0 3px; }
.article-body kbd {
	background: #212529;
	color: #fff;
	border-radius: 4px;
	padding: 2px 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}
.article-body sup { vertical-align: super; font-size: 0.8em; }
.article-body sub { vertical-align: sub; font-size: 0.8em; }

/* «Мусорные» классы Word/Google Docs */
.article-body .MsoNormal,
.article-body .MsoListParagraph,
.article-body table.MsoTableGrid {
	margin: 0 0 1.1em 0 !important;
	font: inherit !important;
	color: inherit !important;
}
.article-body table.MsoTableGrid th,
.article-body table.MsoTableGrid td {
	border: 1px solid #dee2e6 !important;
	padding: 10px 12px !important;
}

/* Улучшения читаемости в узкой колонке */
.article-body > *:first-child { margin-top: 0; }
.article-body > *:last-child { margin-bottom: 0; }

/* Футер статьи */
.article-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: none;
    background: #f3f4f5;
    border-radius: 0.75rem;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #ffffff;
    color: #434654;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(195, 198, 214, 0.35);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #8083ff;
    color: white;
    border-color: #8083ff;
    text-decoration: none;
}

/* Хештеги для категории 31 (доверенное ПО) */
.tag.tag-hashtag {
    background: #eef2ff;
    color: #1e3c72;
    border: 1px solid rgba(30, 60, 114, 0.18);
}

.tag.tag-hashtag:hover {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border-color: transparent;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-share span {
    font-weight: 500;
    color: #6c757d;
}

.share-btn {
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.share-btn.vk {
    background: #4c75a3;
    color: white;
}

.share-btn.telegram {
    background: #0088cc;
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
    color: white;
}

/* Боковая панель */
.article-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0, 74, 198, 0.06);
    border: 1px solid rgba(195, 198, 214, 0.35);
}

.sidebar-widget h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #191c1d;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: none;
    background: linear-gradient(90deg, #8083ff, #6568e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* CTA виджет */
.cta-widget {
    background: linear-gradient(135deg, #061226 0%, #0f2554 50%, #1e3a8a 100%);
    color: white;
    text-align: center;
    border: 1px solid rgba(180, 197, 255, 0.14);
    position: relative;
    overflow: hidden;
}

.cta-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8083ff, #b4b6ff);
}

.cta-widget h3 {
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.cta-widget p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.cta-phone, .cta-email {
    display: block;
    color: #d7e2ff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 12px 16px;
    background: rgba(180, 197, 255, 0.08);
    border: 1px solid rgba(180, 197, 255, 0.14);
    border-radius: 0.625rem;
    transition: all 0.3s ease;
}

.cta-phone:hover, .cta-email:hover {
    background: rgba(180, 197, 255, 0.15);
    border-color: rgba(180, 197, 255, 0.25);
    text-decoration: none;
    color: white;
}

/* Мобильный CTA блок */
.mobile-cta {
    background: linear-gradient(135deg, #061226 0%, #0f2554 50%, #1e3a8a 100%);
    color: white;
    padding: 24px;
    border-radius: 0.75rem;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(180, 197, 255, 0.14);
}

.mobile-cta-content h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.mobile-cta-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mobile-btn {
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.mobile-btn-phone {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.mobile-btn-form {
    background: white;
    color: #191c1d;
    border: 2px solid white;
}

.mobile-btn:hover, .mobile-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.mobile-btn-phone:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.mobile-btn-form:hover {
    background: #f8f9fa;
    border-color: #f8f9fa;
}

/* Похожие новости */
.related-news {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 8px;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    flex: 1;
}

.related-content h4 {
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.related-content h4 a {
    color: #191c1d;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-content h4 a:hover {
    color: #8083ff;
}

.related-content time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr 250px;
        gap: 30px;
    }
    
    .article-main {
        padding: 30px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    /* Переключение видимости блоков */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }

    .article-content {
        padding: 20px 0;
    }
    
    .article-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Sidebar становится горизонтальным на планшетах */
    .article-sidebar {
        order: 2;
        position: static;
        display: block;
    }
    
    .article-main {
        order: 1;
        padding: 25px 20px;
    }
    
    .article-main h1 {
        font-size: 1.9rem;
        line-height: 1.2;
    }
    
    .article-body {
        font-size: 1.05rem;
        line-height: 1.7;
    }

	/* Мобильные таблицы: более плотные отступы и скролл */
	.article-body th,
	.article-body td { padding: 10px 12px; }
	.article-body table { white-space: nowrap; }
    
    .article-body h2 {
        font-size: 1.6rem;
        margin: 30px 0 15px;
    }
    
    .article-body h3 {
        font-size: 1.4rem;
        margin: 25px 0 12px;
    }
    
    .article-excerpt {
        padding: 15px;
        font-size: 1.05rem;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .article-share {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .share-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    /* Похожие новости на планшетах */
    .related-news {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .related-item {
        border-bottom: none;
        background: #f8f9fa;
        padding: 15px;
        border-radius: 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .related-image {
        width: 100%;
        height: 120px;
    }
}

@media (max-width: 580px) {
    .article-content {
        padding: 15px 0;
    }
    
    .article-main {
        padding: 20px 15px;
        border-radius: 10px;
    }
    
    .article-main h1 {
        font-size: 1.6rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .article-body {
        font-size: 1rem;
        line-height: 1.6;
    }

	/* Ещё компактнее на очень узких экранах */
	.article-body th,
	.article-body td { padding: 8px 10px; }
	.article-body table { white-space: nowrap; }
    
    .article-body h2 {
        font-size: 1.4rem;
        margin: 25px 0 12px;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
        margin: 20px 0 10px;
    }
    
    .article-excerpt {
        padding: 12px;
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 0.85rem;
    }
    
    .sidebar-widget {
        padding: 15px;
        border-radius: 10px;
    }
    
    .sidebar-widget h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    /* Мобильные кнопки на очень маленьких экранах */
    .mobile-cta-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mobile-btn {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    /* Похожие новости на мобильных */
    .related-news {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .related-item {
        padding: 12px;
        gap: 8px;
    }
    
    .related-image {
        height: 100px;
    }
    
    .related-content h4 a {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
    
    .related-content time {
        font-size: 0.75rem;
    }
    
    /* Улучшения для кнопок шаринга на мобильных */
    .article-share span {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .share-btn {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 380px) {
    .article-main {
        padding: 15px 10px;
    }
    
    .article-main h1 {
        font-size: 1.4rem;
    }
    
    .article-body {
        font-size: 0.95rem;
    }
    
    .article-body h2 {
        font-size: 1.3rem;
    }
    
    .article-body h3 {
        font-size: 1.1rem;
    }
    
    .mobile-cta {
        padding: 15px;
        margin: 20px 0;
    }
    
    .mobile-cta-content h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .mobile-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

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

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

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

/* Блоки с кейсами - стилизация по структуре (две колонки) */
.article-body > div:has(> div:has(strong)),
.article-body > div:has(> div:has(h4)) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

/* Стили для кейсов - карточки */
.article-body > div > div {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Заголовки в кейсах */
.article-body strong:first-of-type,
.article-body h4:first-of-type {
    font-size: 1.3rem;
    font-weight: 700;
    color: #191c1d;
    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: #434654;
    margin: 15px 0 10px 0;
    display: block;
}

/* Подзаголовки секций */
.article-body h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #191c1d;
    margin: 25px 0 15px 0;
}

.article-body h4 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #191c1d;
    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:has(strong:contains("⚠️")),
.article-body > div:has(strong:contains("Важно")),
.article-body > div:has(strong:contains("❗")) {
    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:has(> div:has(strong)),
    .article-body > div:has(> div:has(h4)) {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-body > div[style*="background"],
    .article-body > div[style*="gradient"],
    .article-body > div[style*="linear-gradient"] {
        padding: 20px !important;
    }
}

/* ============================================
   ГЛОБАЛЬНЫЕ МОБИЛЬНЫЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ НОВОСТЕЙ
   ============================================ */

@media (max-width: 768px) {
    /* Предотвращаем горизонтальную прокрутку */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Адаптация таблиц - скролл вместо сжатия */
    .article-body table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 20px 0;
    }
    
    .article-body table thead,
    .article-body table tbody,
    .article-body table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .article-body table th,
    .article-body table td {
        padding: 10px 8px;
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Изображения всегда адаптивные */
    .article-body img,
    .article-image img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
        display: block;
        margin: 20px auto;
    }
    
    /* Блоки с inline-стилями адаптируются */
    .article-body > div[style],
    .article-body div[style] {
        max-width: 100% !important;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Списки адаптивные */
    .article-body ul,
    .article-body ol {
        padding-left: 20px;
        margin: 15px 0;
    }
    
    .article-body li {
        margin-bottom: 10px;
        line-height: 1.6;
    }
    
    /* Блоки с градиентами и фоном адаптивные */
    .article-body > div[style*="background"],
    .article-body > div[style*="gradient"],
    .article-body > div[style*="linear-gradient"],
    .article-body div[style*="background"],
    .article-body div[style*="gradient"],
    .article-body div[style*="linear-gradient"] {
        padding: 20px 15px !important;
        margin: 20px 0 !important;
        border-radius: 10px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    /* Заголовки адаптивные */
    .article-body h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin: 30px 0 15px 0;
        word-wrap: break-word;
    }
    
    .article-body h3 {
        font-size: 1.3rem !important;
        line-height: 1.3;
        margin: 25px 0 12px 0;
        word-wrap: break-word;
    }
    
    .article-body h4 {
        font-size: 1.1rem !important;
        line-height: 1.3;
        margin: 20px 0 10px 0;
        word-wrap: break-word;
    }
    
    /* Параграфы адаптивные */
    .article-body p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Blockquote адаптивный */
    .article-body blockquote {
        padding: 15px 20px;
        margin: 20px 0;
        font-size: 0.95rem;
    }
    
    /* Кейсы и блоки с контентом - одна колонка */
    .article-body > div {
        display: block !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .article-body > div > div {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 15px 0 !important;
        box-sizing: border-box;
    }
}

/* Стили для блока с оригинальной статьей */
.article-original-block {
    background: linear-gradient(135deg, #061226 0%, #0f2554 50%, #1e3a8a 100%);
    border-radius: 0.75rem;
    padding: 32px;
    margin: 40px 0;
    color: #d7e2ff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(180, 197, 255, 0.14);
}

.article-original-block h3 {
    color: #ffffff !important;
}

.article-original-block a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.article-original-block a:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .article-original-block {
        padding: 20px;
        margin: 30px 0;
        border-radius: 12px;
    }
    
    .article-original-block h3 {
        font-size: 1.3rem !important;
    }
}

@media (max-width: 480px) {
    /* Еще более компактные стили для очень маленьких экранов */
    .article-main {
        padding: 15px 12px !important;
    }
    
    .article-original-block {
        padding: 15px;
        margin: 25px 0;
    }
    
    .article-original-block h3 {
        font-size: 1.2rem !important;
    }
    
    .article-original-block p,
    .article-original-block a {
        font-size: 0.9rem;
    }
    
    .article-main h1 {
        font-size: 1.4rem !important;
        line-height: 1.2;
    }
    
    .article-body {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .article-body h2 {
        font-size: 1.3rem !important;
    }
    
    .article-body h3 {
        font-size: 1.15rem !important;
    }
    
    .article-body h4 {
        font-size: 1.05rem !important;
    }
    
    .article-body p {
        font-size: 0.95rem;
    }
    
    .article-body table th,
    .article-body table td {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
    
    .article-body > div[style*="background"],
    .article-body > div[style*="gradient"],
    .article-body > div[style*="linear-gradient"],
    .article-body div[style*="background"],
    .article-body div[style*="gradient"],
    .article-body div[style*="linear-gradient"] {
        padding: 15px 12px !important;
    }
    
    .article-excerpt {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}

/* Сетка для блока подходов в контенте статьи */
.custom-approaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.custom-approach-item {
    background: #f8f9ff;
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid #e0e7ff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-approach-item h3,
.custom-approach-item h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
}

.custom-approach-item p {
    margin: 0;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .custom-approaches-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 24px 0;
    }
}

/* =====================================================
   SOVEREIGN ARCHITECT — Article Block Components
   ===================================================== */

/* --- Original Article Block (aob-*) --- */
.aob-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.aob-icon {
    font-size: 32px;
    color: #b4b6ff;
    background: rgba(180, 197, 255, 0.12);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.aob-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.aob-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(215, 226, 255, 0.75);
}

.aob-link {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(180, 197, 255, 0.12);
    border: 1px solid rgba(180, 197, 255, 0.25);
    border-radius: 50px;
    color: #ffffff !important;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.aob-link:hover {
    background: rgba(180, 197, 255, 0.2);
    border-color: rgba(180, 197, 255, 0.4);
    color: #ffffff !important;
}

.aob-contacts {
    padding-top: 24px;
    border-top: 1px solid rgba(180, 197, 255, 0.14);
    margin-top: 24px;
}

.aob-contacts-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}

.aob-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aob-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aob-contact-item .material-symbols-outlined {
    font-size: 22px;
    color: #b4b6ff;
}

.aob-contact-item a {
    color: #d7e2ff !important;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.3s;
    border-bottom: none !important;
}

.aob-contact-item a:hover {
    color: #ffffff !important;
}

/* --- Sidebar CTA Button --- */
.sidebar-cta-btn {
    width: 100%;
    margin-top: 16px;
    background: #8083ff !important;
    border-color: #8083ff !important;
    border-radius: 50px !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 12px 24px;
    box-shadow: 0 0 20px rgba(128,131,255, 0.2);
    transition: all 0.3s ease;
}

.sidebar-cta-btn:hover {
    background: #6568e0 !important;
    border-color: #6568e0 !important;
    box-shadow: 0 0 30px rgba(128,131,255, 0.35);
}

/* --- Sidebar Tools Section --- */
.sidebar-tools {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(180, 197, 255, 0.14);
}

.sidebar-tools-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #d7e2ff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-tools-title .material-symbols-outlined {
    font-size: 20px;
    color: #b4b6ff;
}

.sidebar-tools-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(180, 197, 255, 0.08);
    border: 1px solid rgba(180, 197, 255, 0.12);
    border-radius: 0.625rem;
    text-decoration: none;
    color: #d7e2ff;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.sidebar-tool-link:hover {
    background: rgba(180, 197, 255, 0.15);
    border-color: rgba(180, 197, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    text-decoration: none;
}

.sidebar-tool-icon {
    font-size: 20px;
    color: #b4b6ff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(128,131,255, 0.2), rgba(30, 58, 138, 0.15));
    border-radius: 8px;
    flex-shrink: 0;
}

.sidebar-tool-arrow {
    margin-left: auto;
    font-size: 0.85rem;
    color: #b4b6ff;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.sidebar-tool-link:hover .sidebar-tool-arrow {
    opacity: 1;
}

/* --- News Internal Cards (nic-*) --- */
.news-internal-links {
    margin: 48px 0;
}

.news-internal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.news-internal-card {
    border-radius: 0.75rem;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.news-internal-card:hover {
    transform: translateY(-4px);
}

.news-internal-card h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-internal-card h3 .material-symbols-outlined {
    font-size: 24px;
}

.news-internal-card p {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.nic-dark {
    background: linear-gradient(135deg, #061226 0%, #0f2554 50%, #1e3a8a 100%);
    color: #d7e2ff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(180, 197, 255, 0.14);
}

.nic-dark h3 { color: #ffffff; }
.nic-dark h3 .material-symbols-outlined { color: #b4b6ff; }

.nic-dark:hover {
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.nic-light {
    background: #ffffff;
    color: #434654;
    border: 1px solid rgba(195, 198, 214, 0.35);
    box-shadow: 0 4px 24px rgba(0, 74, 198, 0.06);
}

.nic-light h3 { color: #191c1d; }
.nic-light h3 .material-symbols-outlined { color: #8083ff; }

.nic-light:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.nic-muted {
    background: #f3f4f5;
    color: #434654;
    border: 1px solid rgba(195, 198, 214, 0.35);
}

.nic-muted h3 { color: #191c1d; }
.nic-muted h3 .material-symbols-outlined { color: #16a34a; }

.nic-muted:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.nic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 50px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.nic-btn-cta {
    background: #8083ff;
    box-shadow: 0 0 20px rgba(128,131,255, 0.25);
}

.nic-btn-cta:hover {
    background: #6568e0;
    box-shadow: 0 0 30px rgba(128,131,255, 0.4);
    color: #ffffff;
}

.nic-btn-primary {
    background: #8083ff;
    box-shadow: 0 4px 16px rgba(128,131,255, 0.3);
}

.nic-btn-primary:hover {
    background: #6568e0;
    color: #ffffff;
}

.nic-btn-secondary {
    background: #16a34a;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

.nic-btn-secondary:hover {
    background: #15803d;
    color: #ffffff;
}

/* --- Services Block (SA-themed) --- */
.services-block {
    padding: 48px 0 56px;
    background: #f3f4f5;
}

.sa-section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-eyebrow {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8083ff;
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #191c1d;
    margin: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.service-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: #ffffff;
    border: 1px solid rgba(195, 198, 214, 0.35);
    border-radius: 0.75rem;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 24px rgba(0, 74, 198, 0.04);
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border-color: rgba(128,131,255, 0.2);
    text-decoration: none;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #002a78, #8083ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.service-icon .material-symbols-outlined {
    font-size: 24px;
    color: #ffffff;
}

.service-item strong {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #191c1d;
    margin-bottom: 4px;
}

.service-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #737685;
}

/* --- Mobile CTA icon fix --- */
.mobile-cta-content h3 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
}

@media (max-width: 768px) {
    .news-internal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .news-internal-card {
        min-height: auto;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .service-item {
        padding: 16px 12px;
    }
    .service-icon {
        width: 40px;
        height: 40px;
    }
    .service-icon .material-symbols-outlined {
        font-size: 20px;
    }
    .sidebar-tools {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .aob-header {
        flex-direction: column;
        text-align: center;
    }
    .aob-link {
        display: block;
        text-align: center;
    }
}
/* =====================================================
   BRANDBOOK v2.0 — Новые компоненты (апрель 2026)
   ===================================================== */

/* --- Material Symbols helper --- */
.ms {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* --- TOC link --- */
.art-toc-link {
    font-size: 13.5px;
    color: #334155;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: color .2s;
    padding: 7px 0 7px 20px;
}
.art-toc-link:hover,
.art-toc-link.active {
    color: #8083ff;
    font-weight: 600;
}
.art-toc-link--h3 {
    padding-left: 28px;
    font-size: 12.5px;
}

/* --- Article body grid responsive --- */
.art-body-grid {
    display: grid;
    grid-template-columns: 1fr 2.2fr 1fr;
    gap: 40px;
    align-items: start;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 40px 64px;
}
@media (max-width: 1200px) {
    .art-body-grid {
        grid-template-columns: 1fr 2fr !important;
        padding: 0 24px 48px !important;
    }
    .art-body-grid .art-toc-aside { display: none; }
}
@media (max-width: 768px) {
    .art-body-grid {
        grid-template-columns: 1fr !important;
        padding: 0 16px 32px !important;
    }
    .art-body-grid aside:last-child { position: static !important; }
    .mobile-only { display: block !important; }
}
