/* RUOMI AI NEWSROOM — публичный раздел «Новости». Использует цвета темы (--primary-color). */
.news-page { --news-accent: var(--primary-color, #6d28d9); }

.news-hero { padding: 1.5rem 0 .5rem; }
.news-hero h1 { font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: .35rem; }
.news-hero p { color: #6b7280; margin-bottom: 0; }

.news-cats { display: flex; gap: .5rem; overflow-x: auto; padding: .75rem 0 1rem; scrollbar-width: thin; }
.news-cats a {
    white-space: nowrap; border: 1px solid rgba(0,0,0,.1); border-radius: 999px; padding: .35rem .85rem;
    font-size: .9rem; color: inherit; text-decoration: none; background: rgba(255,255,255,.6);
}
.news-cats a.active, .news-cats a:hover { background: var(--news-accent); border-color: var(--news-accent); color: #fff; }

.news-card {
    display: flex; flex-direction: column; height: 100%; border-radius: 16px; overflow: hidden;
    background: #fff; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 4px 18px rgba(17,24,39,.06);
    color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.news-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(17,24,39,.12); color: inherit; }
.news-card-img { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; background: #ede9fe; }
.news-card-placeholder {
    aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #fff;
    background: linear-gradient(135deg, var(--news-accent), #a78bfa);
}
.news-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.news-card-meta { font-size: .8rem; color: #6b7280; display: flex; gap: .6rem; flex-wrap: wrap; }
.news-card-cat { color: var(--news-accent); font-weight: 600; }
.news-card-title { font-size: 1.08rem; font-weight: 700; line-height: 1.3; margin: 0; }
.news-card-lead { font-size: .92rem; color: #4b5563; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card.featured .news-card-title { font-size: 1.45rem; }

.news-article { max-width: 760px; }
.news-article h1 { font-weight: 800; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.2; margin: .5rem 0 1rem; }
.news-article .news-lead { font-size: 1.15rem; color: #374151; font-weight: 500; line-height: 1.55; }
.news-article figure img { width: 100%; height: auto; border-radius: 16px; aspect-ratio: 16 / 9; object-fit: cover; }
.news-article figcaption { font-size: .78rem; color: #6b7280; margin-top: .35rem; }
.news-body { font-size: 1.06rem; line-height: 1.75; color: #1f2937; overflow-wrap: anywhere; }
.news-body h2 { font-size: 1.35rem; font-weight: 700; margin: 1.8rem 0 .7rem; }
.news-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1.4rem 0 .6rem; }
.news-body p { margin-bottom: 1.05rem; }
.news-body blockquote { border-left: 4px solid var(--news-accent); padding: .3rem 0 .3rem 1rem; color: #4b5563; }
.news-body a { color: var(--news-accent); }
.news-sources { background: #f9fafb; border-radius: 14px; padding: 1rem 1.2rem; font-size: .9rem; }
.news-sources li { margin-bottom: .3rem; overflow-wrap: anywhere; }
.news-ai-note { font-size: .82rem; color: #6b7280; border-top: 1px solid #e5e7eb; padding-top: .8rem; }
.news-tags a, .news-tags span {
    display: inline-block; font-size: .8rem; background: #f3f4f6; border-radius: 999px; padding: .2rem .7rem;
    margin: 0 .3rem .4rem 0; color: #374151; text-decoration: none;
}
.news-side { position: sticky; top: 90px; }
.news-side-item { display: block; padding: .65rem 0; border-bottom: 1px solid #f0f0f0; color: inherit; text-decoration: none; }
.news-side-item:hover { color: var(--news-accent); }
.news-side-item small { color: #6b7280; }
.news-tg-cta {
    display: flex; align-items: center; gap: .8rem; border-radius: 14px; padding: .9rem 1.1rem;
    background: linear-gradient(135deg, #229ED9, #1c7fb0); color: #fff; text-decoration: none;
}
.news-tg-cta:hover { color: #fff; filter: brightness(1.05); }

@media (prefers-color-scheme: dark) {
    html[data-theme="dark"] .news-card, html[data-theme="dark"] .news-sources { background: #1f2937; border-color: #374151; }
}
html[data-theme="dark"] .news-card { background: #1f2937; border-color: #374151; }
html[data-theme="dark"] .news-card-lead, html[data-theme="dark"] .news-article .news-lead,
html[data-theme="dark"] .news-body { color: #e5e7eb; }
html[data-theme="dark"] .news-sources { background: #111827; }
html[data-theme="dark"] .news-tags a, html[data-theme="dark"] .news-tags span { background: #374151; color: #e5e7eb; }
html[data-theme="dark"] .news-cats a { background: transparent; border-color: #4b5563; }

@media (max-width: 575.98px) {
    .news-card.featured .news-card-title { font-size: 1.2rem; }
    .news-body { font-size: 1rem; }
}
