/* ============================================================
   News Card — стиль vc.ru
   ============================================================ */
/* ============================================================
   Шапка категории (H1 + описание)
   ============================================================ */
.category-header {
    margin: 0 0 24px;
    padding: 8px 0 0;
}
.category-header__title {
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    color: #1f2937;
    margin: 0 0 12px;
    font-family: 'PT Serif', Georgia, serif;
}
.category-header__description {
    font-size: 15px;
    line-height: 1.55;
    color: #4b5563;
}
.category-header__description p { margin: 0 0 10px; }
.category-header__description p:last-child { margin-bottom: 0; }
.category-header__description a {
    color: #365eba;
    border-bottom: 1px solid #abbeeb;
    text-decoration: none;
}

@media (max-width: 768px) {
    .category-header {
        margin: 0 -5px 16px;
        padding: 12px 18px 14px;
        background: #fff;
        border-radius: 8px;
    }
    .category-header__title { font-size: 22px; margin-bottom: 8px; }
    .category-header__description { font-size: 14px; line-height: 1.5; }
}

[data-theme="dark"] .category-header__title { color: #e8e8f0; }
[data-theme="dark"] .category-header__description { color: #b0b0c8; }
[data-theme="dark"] .category-header {
    background: transparent;
}
@media (max-width: 768px) {
    [data-theme="dark"] .category-header { background: #1a1a2e; }
}
.news-card {
    background: #fff;
    border-radius: 10px;
    padding: 22px 24px 12px;
    border: 1px solid #e5e9ef;
    margin-bottom: 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.news-card:hover {
    border-color: #d0d7e2;
    box-shadow: 0 2px 12px rgba(15, 26, 36, 0.04);
}

/* ===== Партнёрская плашка ===== */
.news-card__partner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f7;
}
.news-card__partner-label {
    font-size: 12px;
    color: #9ca3af;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-weight: 500;
}
.news-card__partner-cta {
    font-size: 12px;
    color: #365eba;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-decoration: none;
}
.news-card__partner-cta:hover { color: #2a4fa0; }

/* ===== Шапка: категория + банк ===== */
.news-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.news-card__meta {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.news-card__cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #eef3fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #365eba;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.15s;
}

.news-card__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f7f8fa;
    display: block;
    transition: opacity 0.15s;
}
.news-card__avatar:hover { opacity: 0.85; }
.news-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-card__cat-icon svg { width: 22px; height: 22px; }
.news-card__cat-icon:hover { background: #dde8ff; }

.news-card--partner .news-card__cat-icon {
    background: #fff7ef;
    color: #f76c16;
}
.news-card--partner .news-card__cat-icon:hover { background: #ffe8d4; }

.news-card__meta-text { min-width: 0; }
.news-card__cat-name {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.2;
    text-decoration: none;
    display: block;
}
.news-card__cat-name:hover { color: #365eba; }

.news-card__sub {
    font-size: 13px;
    color: #6b7280;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.news-card__author {
    color: #6b7280;
    text-decoration: none;
}
.news-card__author:hover { color: #365eba; }
.news-card__sep { color: #9ca3af; }
.news-card__date { color: #6b7280; }

/* ===== Лого банка справа ===== */
.news-card__bank {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 24px;
    text-decoration: none;
    color: #1a2845;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.news-card__bank:hover {
    border-color: #365eba;
    color: #1a2845;
    box-shadow: 0 2px 6px rgba(54, 94, 186, 0.08);
}
.news-card__bank-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: contain;
    background: #f7f8fa;
    padding: 3px;
    flex-shrink: 0;
}
.news-card__bank-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: #365eba;
    padding: 0;
}
.news-card__bank-name {
    white-space: nowrap;
    color: inherit;
}

/* ===== Заголовок (h2) ===== */
.news-card__title {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.25;
    color: #1f2937;
    margin: 0 0 12px;
    font-family: 'PT Serif', Georgia, serif;
}
.news-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}
.news-card__title a:hover { color: #365eba; }

/* ===== Extract ===== */
.news-card__extract {
    font-size: 15px;
    line-height: 1.5;
    color: #4b5563;
    margin: 0 0 16px;
}

/* ===== Иллюстрация ===== */
.news-card__cover {
    display: block;
    margin-bottom: 14px;
    border-radius: 8px;
    overflow: hidden;
    background: #f7f8fa;
}
.news-card__cover-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ===== Читать дальше ===== */
.news-card__read-more {
    display: inline-block;
    color: #365eba;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 4px;
    transition: color 0.15s;
}
.news-card__read-more:hover { color: #2a4fa0; }

/* ============================================================
   Планка действий (Instagram-style)
   ============================================================ */
.news-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f3f7;
    margin-top: 14px;
    padding-top: 6px;
}
.news-card__actions-group {
    display: flex;
    gap: 4px;
}

.news-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    padding: 8px 8px;
    cursor: pointer;
    color: #1f2937;
    line-height: 1;
    font-family: inherit;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: rgba(54, 94, 186, 0.1);
}
.news-action:hover:not(:disabled) {
    background: #f7f8fa;
    color: #365eba;
}
.news-action:active:not(:disabled) {
    transform: scale(0.96);
}

.news-action svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.news-action__count {
    font-size: 13px;
    font-weight: 500;
    color: inherit;
    min-width: 8px;
}

.news-action--disabled {
    color: #9ca3af;
    cursor: default;
}
.news-action--disabled:hover { background: none; color: #9ca3af; }

/* Активный лайк (heart) */
.news-action.js-reaction-heart svg path { fill: none; }
.news-action.js-reaction-heart.clicked { color: #ed4956; }
.news-action.js-reaction-heart.clicked svg path { fill: currentColor; }
.news-action.js-reaction-heart.is-animating svg { transform: scale(1.25); }

/* Активный дизлайк (thumbs-down) */
.news-action.js-reaction-dislike svg path { fill: none; }
.news-action.js-reaction-dislike.clicked { color: #1f2937; }
.news-action.js-reaction-dislike.clicked svg path { fill: currentColor; }
.news-action.js-reaction-dislike.is-animating svg { transform: scale(1.25); }

/* Курсор для рабочих кнопок */
.news-action.js-reaction-heart.clicked,
.news-action.js-reaction-dislike.clicked { cursor: default; }

/* ============================================================
   Mobile (≤768px)
   ============================================================ */
@media (max-width: 768px) {
    .news-card {
        padding: 16px 18px 10px;
        margin: 0 -5px 16px;
        border-radius: 8px;
    }
    .news-card__partner-row {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    .news-card__header {
        margin-bottom: 14px;
        gap: 10px;
    }
    .news-card__cat-icon,
    .news-card__avatar {
        width: 38px;
        height: 38px;
    }
    .news-card__cat-icon svg { width: 20px; height: 20px; }
    .news-card__cat-name { font-size: 14px; }
    .news-card__sub { font-size: 12px; }

    .news-card__bank-name { display: none; }
    .news-card__bank { padding: 3px; }

    .news-card__title {
        font-size: 18px;
        line-height: 1.3;
        margin: 0 0 10px;
    }
    .news-card__extract {
        font-size: 14px;
        line-height: 1.45;
        margin: 0 0 12px;
    }
    .news-card__cover { margin-bottom: 10px; }

    .news-action { padding: 6px 5px; }
    .news-action svg { width: 22px; height: 22px; }
    .news-action__count { font-size: 12px; }
}

/* ============================================================
   Dark mode
   ============================================================ */
[data-theme="dark"] .news-card {
    background: #1a1a2e;
    border-color: #2a2a3e;
}
[data-theme="dark"] .news-card:hover {
    border-color: #3a3a4e;
}
[data-theme="dark"] .news-card__partner-row {
    border-bottom-color: #2a2a3e;
}
[data-theme="dark"] .news-card__partner-label { color: #7070a0; }
[data-theme="dark"] .news-card__cat-icon {
    background: #2a2a3e;
    color: #7da3ff;
}
[data-theme="dark"] .news-card__avatar { background: #2a2a3e; }
[data-theme="dark"] .news-card__cat-name { color: #e8e8f0; }
[data-theme="dark"] .news-card__sub,
[data-theme="dark"] .news-card__author,
[data-theme="dark"] .news-card__date { color: #b0b0c8; }
[data-theme="dark"] .news-card__bank {
    background: #2a2a3e;
    border-color: #3a3a4e;
    color: #e8e8f0;
}
[data-theme="dark"] .news-card__bank-logo { background: #1a1a2e; }
[data-theme="dark"] .news-card__title { color: #e8e8f0; }
[data-theme="dark"] .news-card__extract { color: #b0b0c8; }
[data-theme="dark"] .news-card__actions { border-top-color: #2a2a3e; }
[data-theme="dark"] .news-action { color: #e8e8f0; }
[data-theme="dark"] .news-action:hover:not(:disabled) {
    background: #2a2a3e;
    color: #7da3ff;
}
[data-theme="dark"] .news-action--disabled,
[data-theme="dark"] .news-action--disabled:hover { color: #5a5a78; }

/* ============================================================
   SEO-блок описания категории (внизу под лентой)
   ============================================================ */
.category-seo-block {
    background: #f7f8fa;
    border-radius: 10px;
    padding: 24px 28px;
    margin: 24px 0 40px;
}
.category-seo-block__title {
    font-size: 18px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 12px;
    font-family: 'PT Serif', Georgia, serif;
}
.category-seo-block__description {
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}
.category-seo-block__description p { margin: 0 0 10px; }
.category-seo-block__description p:last-child { margin-bottom: 0; }
.category-seo-block__description a {
    color: #365eba;
    border-bottom: 1px solid #abbeeb;
    text-decoration: none;
}

@media (max-width: 768px) {
    .category-seo-block {
        padding: 18px 20px;
        margin: 16px -5px 30px;
        border-radius: 8px;
    }
    .category-seo-block__title { font-size: 16px; }
    .category-seo-block__description { font-size: 13px; }
}

[data-theme="dark"] .category-seo-block { background: #1a1a2e; }
[data-theme="dark"] .category-seo-block__title { color: #e8e8f0; }
[data-theme="dark"] .category-seo-block__description { color: #b0b0c8; }

/* ============================================================
   Похожие материалы (внутри col-lg-8)
   ============================================================ */
.news-related {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e9ef;
}
.news-related__title {
    font-size: 20px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 16px;
    font-family: 'PT Serif', Georgia, serif;
}
.news-related__placeholder {
    background: #f7f8fa;
    border: 1px dashed #d0d7e2;
    border-radius: 10px;
    padding: 28px 22px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .news-related { margin-top: 24px; padding-top: 20px; }
    .news-related__title { font-size: 17px; margin-bottom: 14px; }
    .news-related__placeholder { padding: 22px 16px; font-size: 13px; }
}

[data-theme="dark"] .news-related { border-top-color: #2a2a3e; }
[data-theme="dark"] .news-related__title { color: #e8e8f0; }
[data-theme="dark"] .news-related__placeholder {
    background: #1a1a2e;
    border-color: #2a2a3e;
    color: #b0b0c8;
}