:root {
    --news-bg: #f5f6f8;
    --news-surface: #ffffff;
    --news-surface-hover: #fcfcfd;
    --news-text: #1f2328;
    --news-text-soft: #667085;
    --news-border: #e7eaf0;
    --news-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    --news-shadow-hover: 0 14px 36px rgba(16, 24, 40, 0.12);
    --news-radius: 18px;
    --news-transition: 0.2s ease;
    --news-container: 1200px;
    --news-accent: #ff7749;
}

.news-dzen {
    background: #ffffff;
    color: var(--news-text);
    padding: 12px;
}

.news-dzen *,
.news-dzen *::before,
.news-dzen *::after {
    box-sizing: border-box;
}

.news-dzen img {
    display: block;
    max-width: 100%;
    height: auto;
}

.news-dzen a,
.news-dzen a:hover,
.news-dzen a:focus,
.news-dzen a:active {
    color: inherit;
    text-decoration: none;
}

.news-dzen__topbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: var(--news-container);
    margin: 0 auto 14px;
}

.news-dzen__title {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
}

.news-dzen__layout {
    max-width: var(--news-container);
    margin: 0 auto;
    display: block;
}

.news-dzen__main {
    min-width: 0;
}

.news-card {
    background: var(--news-surface);
    border: 1px solid var(--news-border);
    border-radius: var(--news-radius);
    overflow: hidden;
    box-shadow: var(--news-shadow);
    transition:
        transform var(--news-transition),
        box-shadow var(--news-transition),
        background var(--news-transition);
    position: relative;
}

.news-card:hover {
    background: var(--news-surface-hover);
    box-shadow: var(--news-shadow-hover);
    transform: translateY(-2px);
}

.news-card__link,
.news-card__link:hover,
.news-card__link:focus,
.news-card__link:active {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    text-decoration: none;
    position: relative;
}

.news-card__link *,
.news-card__link:hover *,
.news-card__link:focus *,
.news-card__link:active * {
    text-decoration: none;
}

.news-card__media {
    position: relative;
    overflow: hidden;
    background: #eceff3;
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--news-transition);
}

.news-card:hover .news-card__media img {
    transform: scale(1.02);
}

.news-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--news-text-soft);
}

.news-card__meta,
.news-card__meta:hover,
.news-card__meta:focus,
.news-card__excerpt,
.news-card__excerpt:hover,
.news-card__excerpt:focus,
.news-card time,
.news-card time:hover,
.news-card time:focus,
.news-card span,
.news-card span:hover,
.news-card span:focus,
.news-card p,
.news-card p:hover,
.news-card p:focus {
    text-decoration: none;
}

.news-card__title {
    margin: 0;
    color: var(--news-text);
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: color var(--news-transition);
    text-decoration: none;
    position: relative;
}

.news-card:hover .news-card__title,
.news-card__link:hover .news-card__title,
.news-card__link:focus .news-card__title,
.news-card__link:focus-visible .news-card__title {
    color: var(--news-accent);
    text-decoration: none;
}

.news-card__excerpt {
    color: var(--news-text-soft);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.news-card--hero {
    margin-bottom: 14px;
    border-radius: 22px;
}

.news-card--hero .news-card__media {
    aspect-ratio: 16 / 10;
}

.news-card--hero .news-card__body {
    padding: 16px;
    gap: 10px;
}

.news-card--hero .news-card__title {
    font-size: 24px;
    line-height: 1.15;
}

.news-card--hero .news-card__excerpt {
    font-size: 15px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-dzen__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.news-dzen__grid .news-card .news-card__media {
    aspect-ratio: 16 / 10;
}

.news-dzen__grid .news-card .news-card__title {
    font-size: 18px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-dzen__grid .news-card .news-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-dzen__pager {
    margin-top: 16px;
    padding: 8px 0 4px;
}

.news-card__link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 12px;
}

/* =========================================================
   ANTI-GLOBAL-DECOR
   ========================================================= */

.news-dzen .line,
.news-dzen .section-title::before,
.news-dzen .section-title::after,
.news-dzen .banner-title::before,
.news-dzen .banner-title::after,
.news-dzen .news-dzen__title::before,
.news-dzen .news-dzen__title::after,
.news-dzen .news-card::before,
.news-dzen .news-card::after,
.news-dzen .news-card__link::before,
.news-dzen .news-card__link::after,
.news-dzen .news-card__body::before,
.news-dzen .news-card__body::after,
.news-dzen .news-card__title::before,
.news-dzen .news-card__title::after,
.news-dzen .news-card--hero::before,
.news-dzen .news-card--hero::after,
.news-dzen h1::before,
.news-dzen h1::after,
.news-dzen h2::before,
.news-dzen h2::after,
.news-dzen h3::before,
.news-dzen h3::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

.news-dzen .line {
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.news-dzen .news-dzen__title,
.news-dzen .news-card__title,
.news-dzen .news-card--hero .news-card__title,
.news-dzen .news-card--hero,
.news-dzen .news-card--hero .news-card__body,
.news-dzen .news-card--hero .news-card__link,
.news-dzen .news-card,
.news-dzen h1,
.news-dzen h2,
.news-dzen h3 {
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-inline-start: 0 !important;
    border-inline-end: 0 !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.news-dzen .news-dzen__title,
.news-dzen .news-card__title,
.news-dzen .news-card--hero,
.news-dzen .news-card--hero .news-card__body,
.news-dzen .news-card--hero .news-card__link {
    box-shadow: none !important;
    background: transparent !important;
}

.news-dzen .news-card__title + div,
.news-dzen .news-card__title + span,
.news-dzen .news-card__title + i,
.news-dzen .news-card__title + em,
.news-dzen .news-card__title + strong,
.news-dzen .news-dzen__title + div,
.news-dzen .news-dzen__title + span,
.news-dzen .news-dzen__title + i,
.news-dzen .news-dzen__title + em,
.news-dzen .news-dzen__title + strong {
    border: 0 !important;
    border-left: 0 !important;
    border-inline-start: 0 !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
}

.news-dzen .title-line,
.news-dzen .orange-line,
.news-dzen .separator,
.news-dzen .decor-line {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.news-dzen a *,
.news-dzen a:hover *,
.news-dzen a:focus *,
.news-dzen a:active * {
    text-decoration: none !important;
}

/* Возвращаем нормальный вид карточке после reset */
.news-dzen .news-card {
    background: var(--news-surface) !important;
    border: 1px solid var(--news-border) !important;
    box-shadow: var(--news-shadow) !important;
}

.news-dzen .news-card:hover {
    background: var(--news-surface-hover) !important;
    box-shadow: var(--news-shadow-hover) !important;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 359px) {
    .news-dzen {
        padding: 8px;
    }

    .news-card__body {
        padding: 12px;
    }

    .news-card--hero .news-card__title {
        font-size: 21px;
    }

    .news-dzen__grid .news-card .news-card__title {
        font-size: 17px;
    }
}

@media (min-width: 480px) {
    .news-dzen {
        padding: 14px;
    }

    .news-card--hero .news-card__title {
        font-size: 28px;
    }

    .news-card--hero .news-card__body {
        padding: 18px;
    }

    .news-card__body {
        padding: 16px;
    }

    .news-dzen__grid {
        gap: 14px;
    }
}

@media (min-width: 640px) {
    .news-dzen__title {
        font-size: 30px;
    }

    .news-card--hero .news-card__media {
        aspect-ratio: 16 / 8.8;
    }

    .news-dzen__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .news-dzen__grid .news-card .news-card__title {
        font-size: 19px;
    }
}

@media (min-width: 768px) {
    .news-dzen {
        padding: 18px;
    }

    .news-dzen__topbar {
        margin-bottom: 18px;
    }

    .news-dzen__title {
        font-size: 34px;
    }

    .news-card--hero .news-card__link {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        align-items: stretch;
    }

    .news-card--hero .news-card__media {
        aspect-ratio: auto;
        min-height: 100%;
    }

    .news-card--hero .news-card__body {
        justify-content: center;
        padding: 22px;
    }

    .news-card--hero .news-card__title {
        font-size: 32px;
    }

    .news-card--hero .news-card__excerpt {
        font-size: 16px;
    }

    .news-dzen__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 1280px) {
    .news-dzen__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .news-card__body {
        padding: 18px;
    }

    .news-dzen__grid .news-card .news-card__title {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-card,
    .news-card__media img,
    .news-card__title {
        transition: none;
    }

    .news-card:hover {
        transform: none;
    }

    .news-card:hover .news-card__media img {
        transform: none;
    }
}

/* =========================================================
   HERO RIGHT STRIPE KILLER
   Убирает вертикальную оранжевую полосу справа
   в текстовой части главной новости
   ========================================================= */

.news-dzen .news-card--hero .news-card__body,
.news-dzen .news-card--hero .news-card__title,
.news-dzen .news-card--hero .news-card__excerpt,
.news-dzen .news-card--hero .news-card__meta,
.news-dzen .news-card--hero .news-card__link {
    border-right: 0 !important;
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-inline-end: 0 !important;
    border-inline-start: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Псевдоэлементы именно внутри правой текстовой части hero */
.news-dzen .news-card--hero .news-card__body::before,
.news-dzen .news-card--hero .news-card__body::after,
.news-dzen .news-card--hero .news-card__title::before,
.news-dzen .news-card--hero .news-card__title::after,
.news-dzen .news-card--hero .news-card__excerpt::before,
.news-dzen .news-card--hero .news-card__excerpt::after,
.news-dzen .news-card--hero .news-card__meta::before,
.news-dzen .news-card--hero .news-card__meta::after,
.news-dzen .news-card--hero .news-card__link::before,
.news-dzen .news-card--hero .news-card__link::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

/* Если справа вставлен отдельный декоративный элемент */
.news-dzen .news-card--hero .news-card__body > .line,
.news-dzen .news-card--hero .news-card__body > .title-line,
.news-dzen .news-card--hero .news-card__body > .orange-line,
.news-dzen .news-card--hero .news-card__body > .separator,
.news-dzen .news-card--hero .news-card__body > [class*="line"],
.news-dzen .news-card--hero .news-card__body > [class*="decor"],
.news-dzen .news-card--hero .news-card__body > [class*="border"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* Возвращаем нормальный фон и тень карточке после reset */
.news-dzen .news-card--hero {
    background: var(--news-surface) !important;
    border: 1px solid var(--news-border) !important;
    box-shadow: var(--news-shadow) !important;
}

.news-dzen .news-card--hero:hover {
    background: var(--news-surface-hover) !important;
    box-shadow: var(--news-shadow-hover) !important;
}


/* =========================================================
   HERO TITLE ORANGE STRIPE FIX
   Точечное отключение полоски справа у h2 главной новости
   ========================================================= */

.news-dzen article.news-card.news-card--hero h2.news-card__title,
.news-dzen article.news-card.news-card--hero a.news-card__link:hover h2.news-card__title,
.news-dzen article.news-card.news-card--hero a.news-card__link:focus h2.news-card__title,
.news-dzen article.news-card.news-card--hero a.news-card__link:active h2.news-card__title {
    position: relative !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-inline-end: 0 !important;
    border-inline-start: 0 !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Убираем любые псевдоэлементы именно у hero h2 */
.news-dzen article.news-card.news-card--hero h2.news-card__title::before,
.news-dzen article.news-card.news-card--hero h2.news-card__title::after,
.news-dzen article.news-card.news-card--hero a.news-card__link:hover h2.news-card__title::before,
.news-dzen article.news-card.news-card--hero a.news-card__link:hover h2.news-card__title::after,
.news-dzen article.news-card.news-card--hero a.news-card__link:focus h2.news-card__title::before,
.news-dzen article.news-card.news-card--hero a.news-card__link:focus h2.news-card__title::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* Если полоса создаётся inset-тенью или градиентом только на hover */
.news-dzen article.news-card.news-card--hero a.news-card__link:hover h2.news-card__title,
.news-dzen article.news-card.news-card--hero:hover h2.news-card__title {
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Fallback: если после h2 вставлен декоративный соседний элемент */
.news-dzen article.news-card.news-card--hero h2.news-card__title + div,
.news-dzen article.news-card.news-card--hero h2.news-card__title + span,
.news-dzen article.news-card.news-card--hero h2.news-card__title + i,
.news-dzen article.news-card.news-card--hero h2.news-card__title + em,
.news-dzen article.news-card.news-card--hero h2.news-card__title + strong {
    display: none !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}
