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

.article-content {
    padding: 40px 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* Принудительное ограничение ширины страницы */
.article-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

/* Используем тот же контейнер, что и на остальных страницах */
.article-content .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Принудительно ограничиваем ширину всей страницы */
body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

/* Принудительное ограничение ширины для всех элементов */
.article-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Специальные стили для таблиц */
.article-content table {
    max-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.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: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #f5f6f8;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ограничиваем ширину контента статьи */
.article-body {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Принудительное ограничение ширины для всех элементов в статье */
.article-main * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Специальные стили для таблиц в статье */
.article-main table {
    max-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dde3ff;
}

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

.article-category a {
    background: #7c5cd8;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.article-category a:hover {
    background: #5a2fc4;
}

.article-main h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a2750;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
    color: #5a6075;
    margin-bottom: 20px;
}

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

.article-excerpt {
    font-size: 1.1rem;
    color: #2c3247;
    line-height: 1.6;
    font-style: italic;
    background: #f5f6f8;
    padding: 20px;
    border-left: 4px solid #7c5cd8;
    border-radius: 0 8px 8px 0;
}

.article-image {
    margin: 30px 0;
    text-align: center;
}

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

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #0a0d14;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-body h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a2750;
    margin: 40px 0 20px;
    line-height: 1.3;
    position: relative;
    padding-bottom: 15px;
}

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

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #15203f;
    margin: 30px 0 15px;
}

.article-body h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3247;
    margin: 25px 0 15px;
}

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

.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;
    text-justify: inter-word;
}

.article-body blockquote {
    background: #f5f6f8;
    border-left: 4px solid #7c5cd8;
    margin: 30px 0;
    padding: 20px 30px;
    font-style: italic;
    color: #2c3247;
    border-radius: 0 8px 8px 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);
}

/* Принудительное ограничение всех таблиц - ПЕРЕОПРЕДЕЛЯЕМ TAILWIND */
.article-body table,
.article-body pre table,
.article-body .table-wrapper table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    margin: 25px 0 !important;
    background: white !important;
    border-radius: 8px !important;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    table-layout: fixed !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: table !important;
}

/* Контейнер для таблиц с горизонтальной прокруткой */
.article-body .table-wrapper {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    max-width: 100%;
}

.article-body .table-wrapper table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    margin: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    table-layout: auto;
}

/* ПЕРЕОПРЕДЕЛЯЕМ TAILWIND для ячеек таблиц */
.article-body th,
.article-body td,
.article-body pre th,
.article-body pre td,
.article-body table th,
.article-body table td {
    padding: 10px 8px !important;
    text-align: left !important;
    border-bottom: 1px solid #dde3ff !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    vertical-align: top !important;
    line-height: 1.5 !important;
    font-size: 0.9rem !important;
}

.article-body th {
    background: #f5f6f8;
    font-weight: 600;
    color: #2c3247;
}

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

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

.article-body a:hover {
    color: #5a2fc4;
    border-bottom-color: #5a2fc4;
}

.article-body strong {
    font-weight: 600;
    color: #1a2750;
}

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

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

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

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

/* Футер статьи */
.article-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #dde3ff;
    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: #dde3ff;
    color: #2c3247;
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #7c5cd8;
    color: white;
    text-decoration: none;
}

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

.article-share span {
    font-weight: 500;
    color: #5a6075;
}

.share-btn {
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    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: -webkit-sticky;
    position: sticky;
    top: 120px;
    align-self: start;
    z-index: 2;
    width: 100%;
}

.sidebar-widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #f5f6f8;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a2750;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #7c5cd8;
}

/* CTA виджет */
.cta-widget {
    background: linear-gradient(135deg, #7c5cd8 0%, #5a2fc4 100%);
    color: white;
    text-align: center;
}

.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: white;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.cta-phone:hover, .cta-email:hover {
    background: rgba(255,255,255,0.3);
    text-decoration: none;
    color: white;
}

/* Мобильный CTA блок */
.mobile-cta {
    background: linear-gradient(135deg, #7c5cd8 0%, #5a2fc4 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.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: #7c5cd8;
    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: #f5f6f8;
    border-color: #f5f6f8;
}

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

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

.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: #1a2750;
    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: #7c5cd8;
}

.related-content time {
    font-size: 0.8rem;
    color: #5a6075;
}

/* Адаптивность */
@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 .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    /* УЛУЧШЕННАЯ адаптивность таблиц на мобильных - СИЛЬНОЕ ПЕРЕОПРЕДЕЛЕНИЕ */
    .article-body table,
    .article-body pre table,
    .article-body .table-wrapper table,
    .article-body table.bg-bg-100 {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        font-size: 0.7rem !important;
        table-layout: fixed !important;
        display: table !important;
        overflow-x: visible !important;
        -webkit-overflow-scrolling: touch !important;
        border-spacing: 0 !important;
    }
    
    .article-body .table-wrapper {
        margin: 20px -15px;
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        max-width: 100vw;
    }
    
    .article-body .table-wrapper table {
        min-width: auto !important;
        display: table !important;
    }
    
    /* СИЛЬНОЕ ПЕРЕОПРЕДЕЛЕНИЕ Tailwind для мобильных */
    .article-body th,
    .article-body td,
    .article-body pre th,
    .article-body pre td,
    .article-body table th,
    .article-body table td,
    .article-body table.bg-bg-100 th,
    .article-body table.bg-bg-100 td {
        padding: 6px 4px !important;
        font-size: 0.7rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.4 !important;
        vertical-align: top !important;
        border-left: none !important;
        min-width: auto !important;
        max-width: none !important;
    }
    
    .article-body thead {
        display: table-header-group !important;
    }
    
    .article-body tbody {
        display: table-row-group !important;
    }
    
    .article-body tr {
        display: table-row !important;
    }
    
    .article-body th,
    .article-body td {
        display: table-cell !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 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: #f5f6f8;
        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 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: 480px) {
    /* Принудительные исправления для очень маленьких экранов */
    .article-body table {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        font-size: 0.65rem !important;
        table-layout: fixed !important;
        display: table !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .article-body .table-wrapper {
        margin: 15px -15px;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 0 5px;
    }
    
    .article-body .table-wrapper table {
        display: table !important;
        min-width: auto !important;
    }
    
    .article-body th,
    .article-body td {
        padding: 5px 4px !important;
        font-size: 0.65rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.3 !important;
        vertical-align: top !important;
    }
    
    /* Для больших таблиц - горизонтальная прокрутка */
    .article-body table[width],
    .article-body table.wide-table {
        display: block !important;
        overflow-x: scroll !important;
    }
    
    .article-body table[width] th,
    .article-body table[width] td,
    .article-body table.wide-table th,
    .article-body table.wide-table td {
        white-space: nowrap !important;
        min-width: 100px !important;
    }
}

@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-content .container {
        padding: 0 10px;
    }
    
    .article-body .table-wrapper {
        margin: 10px -10px;
        padding: 0 5px;
    }
    
    .article-body table {
        font-size: 0.65rem !important;
        min-width: auto !important;
    }
    
    .article-body th,
    .article-body td {
        padding: 5px 6px !important;
        font-size: 0.65rem !important;
        min-width: 60px !important;
    }
}

/* --- CUSTOM BLOCKS FOR PEREVOZKI PRICELIST & STATS --- */
.custom-container {
  margin-bottom: 40px;
  margin-top: 16px;
  max-width: 100%;
}

.custom-main-content {
  max-width: 900px;
  margin: 0 auto;
}

.custom-header {
  font-size: 2rem;
  font-weight: 700;
  color: #1a2750;
  margin-bottom: 26px;
  line-height: 1.23;
  letter-spacing: 0.02em;
  text-align: left;
}

.custom-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}
.custom-stat-item {
  background: linear-gradient(135deg, #7c5cd8 0%, #5a2fc4 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 20px 21px;
  box-shadow: 0 3px 18px rgba(102,126,234,0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.custom-stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  color: #fff;
}
.custom-stat-label {
  font-size: 1.02rem;
  opacity: 0.95;
  color: #fff;
  line-height: 1.3;
}

@media (max-width: 700px) {
  .custom-header { font-size: 1.35rem; }
  .custom-stats-grid { gap: 16px; }
  .custom-stat-item { padding: 18px 8px; }
}

/* -- PRICELIST TABLE BLOCKS -- */
.custom-comparison-block {
  margin: 30px 0 40px 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 14px rgba(102,126,234,0.08);
  overflow: hidden;
  padding: 0;
}
.custom-comparison-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.custom-comparison-header, .custom-comparison-row {
  display: grid;
  grid-template-columns: 3fr 2fr 2fr;
  align-items: stretch;
}
.custom-comparison-header {
  background: linear-gradient(135deg, #7c5cd8 0%, #5a2fc4 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1.10rem;
  letter-spacing: 0.01em;
  padding: 18px 0 18px 0;
}
.custom-comparison-row {
  border-bottom: 1px solid #f0f0fa;
  font-size: 1rem;
  background: #fff;
  transition: background 0.2s;
}
.custom-comparison-row:last-child { border-bottom: none; }
.custom-comparison-row.highlighted {
  background: #f4f6ff;
  font-weight: 700;
}
.comparison-col {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  word-break: break-word;
}
.custom-comparison-header .comparison-col {
  border-right: 1px solid rgba(255,255,255,0.15);
}
.custom-comparison-header .comparison-col:last-child {
  border-right: none;
}

@media (max-width:800px) {
  .custom-comparison-header, .custom-comparison-row {
    grid-template-columns: 2.1fr 1.6fr 1.6fr;
    font-size: 0.99rem;
  }
  .comparison-col { padding: 11px 9px; }
}
@media (max-width:480px) {
  .custom-comparison-header, .custom-comparison-row {
    grid-template-columns: 1fr 1fr 1fr;
    font-size: 0.87rem;
  }
  .comparison-col { padding: 8px 2vw; }
  .custom-header { font-size: 1.1rem; }
  .custom-stat-number { font-size: 1.1rem; }
}

/* --- CUSTOM HIGHLIGHT BOX (CTA блок с контактами) --- */
.custom-highlight-box {
  background: linear-gradient(135deg, #7c5cd8 0%, #5a2fc4 100%);
  color: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  margin: 36px 0;
  box-shadow: 0 8px 28px rgba(102,126,234,0.25);
  border: 2px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}
.custom-highlight-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}
.custom-highlight-box h3 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  line-height: 1.3;
  position: relative;
  z-index: 1;
}
.custom-highlight-box p {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 12px 0;
  position: relative;
  z-index: 1;
  opacity: 0.95;
}
.custom-highlight-box p strong {
  color: #fff;
  font-weight: 700;
  opacity: 1;
}
.custom-highlight-box p:last-child {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid rgba(255,255,255,0.2);
  font-size: 1.15rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .custom-highlight-box {
    padding: 24px 20px;
    margin: 28px 0;
  }
  .custom-highlight-box h3 {
    font-size: 1.35rem;
    margin-bottom: 16px;
  }
  .custom-highlight-box p {
    font-size: 0.98rem;
    margin: 10px 0;
  }
  .custom-highlight-box p:last-child {
    font-size: 1.05rem;
    margin-top: 16px;
    padding-top: 16px;
  }
}

/* --- RBE CASES GRID (Сетка кейсов клиентов) --- */
.rbe-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}
.rbe-case-item {
  background: #fff;
  border: 2px solid #dde3ff;
  border-radius: 14px;
  padding: 24px 22px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.rbe-case-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #7c5cd8 0%, #5a2fc4 100%);
}
.rbe-case-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102,126,234,0.15);
  border-color: #7c5cd8;
}
.rbe-case-item h4 {
  color: #1a2750;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  line-height: 1.3;
  padding-left: 12px;
  border-left: 3px solid #7c5cd8;
}
.rbe-case-item p {
  color: #2c3247;
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 10px 0;
  padding-left: 12px;
}
.rbe-case-item p strong {
  color: #1a2750;
  font-weight: 600;
}
/* Стили для параграфа с "Наша цена" - применяется если содержит strong с текстом "Наша цена" */
.rbe-case-item p:has(strong) {
  position: relative;
}
/* Выделяем параграфы с экономией - они обычно последние в кейсе */
.rbe-case-item p:last-of-type {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 14px;
  color: #2e7d32;
  font-weight: 700;
  font-size: 1.08rem;
  border-left: 4px solid #16a34a;
}
/* Если нужно выделить конкретный параграф, можно добавить класс .highlight-price */
.rbe-case-item p.highlight-price {
  color: #16a34a;
  font-weight: 600;
  font-size: 1.05rem;
}

@media (max-width: 768px) {
  .rbe-cases-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 24px 0;
  }
  .rbe-case-item {
    padding: 20px 18px;
  }
  .rbe-case-item h4 {
    font-size: 1.15rem;
    margin-bottom: 14px;
  }
  .rbe-case-item p {
    font-size: 0.95rem;
    margin: 8px 0;
  }
  .rbe-case-item p.highlight-price {
    font-size: 1rem;
  }
  .rbe-case-item p:last-of-type {
    font-size: 1rem;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .rbe-case-item {
    padding: 16px 14px;
    border-radius: 12px;
  }
  .rbe-case-item h4 {
    font-size: 1.05rem;
    padding-left: 10px;
  }
  .rbe-case-item p {
    font-size: 0.9rem;
    padding-left: 10px;
  }
}
/* ============================================
   BRAND OVERRIDE — перебиваем inline-стили
   старых цветов в контенте статей из БД.
   Применяется только внутри .article-content
   и .doc-content (контент-обёртки).
   2026-05-14 (миграция цветов)
============================================ */

/* Старый primary blue/violet (был #667eea / #5a67d8 / #007bff) → pur-600 */
.article-content [style*="#667eea"],
.doc-content [style*="#667eea"],
.article-content [style*="#5a67d8"],
.doc-content [style*="#5a67d8"],
.article-content [style*="#007bff"],
.doc-content [style*="#007bff"] {
    color: #7c5cd8 !important;
    border-color: #7c5cd8 !important;
}

/* Старый purple-stop (был #764ba2) → pur-700 */
.article-content [style*="#764ba2"],
.doc-content [style*="#764ba2"] {
    color: #5a2fc4 !important;
    border-color: #5a2fc4 !important;
}

/* Старые тёмно-синие/тёмно-серые (#2c3e50, #34495e) → navy-700 */
.article-content [style*="#2c3e50"],
.doc-content [style*="#2c3e50"],
.article-content [style*="#34495e"],
.doc-content [style*="#34495e"] {
    color: #1a2750 !important;
}

/* Серые тексты (#495057, #6c757d, #adb5bd) → ink-2/ink-3 */
.article-content [style*="#495057"],
.doc-content [style*="#495057"] {
    color: #2c3247 !important;
}
.article-content [style*="#6c757d"],
.doc-content [style*="#6c757d"],
.article-content [style*="#adb5bd"],
.doc-content [style*="#adb5bd"] {
    color: #5a6075 !important;
}

/* Зелёные (#27ae60, #28a745, #11998e) → ok */
.article-content [style*="#27ae60"],
.doc-content [style*="#27ae60"],
.article-content [style*="#28a745"],
.doc-content [style*="#28a745"],
.article-content [style*="#11998e"],
.doc-content [style*="#11998e"] {
    color: #16a34a !important;
    border-color: #16a34a !important;
}

/* Красные (#ff6b6b, #e74c3c) → err */
.article-content [style*="#ff6b6b"],
.doc-content [style*="#ff6b6b"],
.article-content [style*="#e74c3c"],
.doc-content [style*="#e74c3c"] {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* Светлые фоны (#f8f9fa, #f9f9f9, #f0f0f0) → bg */
.article-content [style*="background"][style*="#f8f9fa"],
.doc-content [style*="background"][style*="#f8f9fa"],
.article-content [style*="background"][style*="#f9f9f9"],
.doc-content [style*="background"][style*="#f9f9f9"],
.article-content [style*="background"][style*="#f0f0f0"],
.doc-content [style*="background"][style*="#f0f0f0"] {
    background: #f5f6f8 !important;
}

/* Границы (#e9ecef, #dee2e6, #e1e8ed) → line */
.article-content [style*="#e9ecef"],
.doc-content [style*="#e9ecef"],
.article-content [style*="#dee2e6"],
.doc-content [style*="#dee2e6"],
.article-content [style*="#e1e8ed"],
.doc-content [style*="#e1e8ed"] {
    border-color: rgba(20,28,55,.12) !important;
}

/* Бывший Bootstrap info-light (#e3f2fd) → pur-50 */
.article-content [style*="#e3f2fd"],
.doc-content [style*="#e3f2fd"] {
    background: #f4f1ff !important;
}
