/* Раздел «Новости» trekto.ru (site-news, решение 3): список, страница
   новости, блок «Последние новости» на главной. Только переменные и классы
   site.css — светлая и тёмная темы приходят оттуда. */

.nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }

/* Карточки новостей: список /news/ и блок на главной */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.news-card {
	display: flex; flex-direction: column; min-width: 0;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; transition: border-color .15s, box-shadow .15s;
}
.news-card:hover { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); box-shadow: var(--shadow); }
.news-card__link { color: inherit; text-decoration: none; }
.news-card__link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.news-card__cover { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--bg-alt); }
.news-card__title { font: 600 19px/1.3 var(--font-head); margin: 16px 20px 0; overflow-wrap: anywhere; }
.news-card .news-meta { margin: 8px 20px 0; }
.news-card__text { color: var(--muted); font-size: 15.5px; margin: 8px 20px 20px; overflow-wrap: anywhere; }
@media (max-width: 960px) { .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .news-grid { grid-template-columns: 1fr; } }

.news-meta { color: var(--muted); font-size: 14px; }

/* Список /news/ */
.news-index { padding-top: 48px; }
.news-index h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
.news-index__lead { color: var(--muted); font-size: 18px; margin-top: 12px; max-width: 42em; }
.news-empty { margin-top: 32px; color: var(--muted); font-size: 17px; }
.news-empty a { color: var(--accent); }

/* Блок на главной */
.news-latest { background: var(--bg-alt); }
.news-latest h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
.news-latest__all { margin-top: 28px; }

/* Страница новости */
.news-article { padding: 32px 0 72px; }
.news-article__inner { max-width: 820px; }
.news-crumbs { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; overflow-wrap: anywhere; }
.news-crumbs a { color: var(--muted); }
.news-crumbs a:hover { color: var(--text); }
.news-crumbs [aria-current] { color: var(--text); }
.news-draft {
	margin-top: 16px; padding: 10px 14px; border-radius: 10px;
	background: color-mix(in srgb, var(--amber) 16%, var(--surface)); border: 1px solid var(--amber);
	font-weight: 600;
}
.news-article h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; line-height: 1.15; margin-top: 20px; overflow-wrap: anywhere; }
.news-article .news-meta { margin-top: 12px; }
.news-article__cover { display: block; width: 100%; height: auto; margin-top: 24px; border-radius: var(--radius); border: 1px solid var(--line); }

.news-body { margin-top: 28px; font-size: 17.5px; line-height: 1.65; overflow-wrap: anywhere; }
.news-body > * + * { margin-top: 1em; }
.news-body h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; margin-top: 1.6em; line-height: 1.25; }
.news-body h3 { font-size: 20px; font-weight: 600; margin-top: 1.4em; }
.news-body ul, .news-body ol { padding-left: 1.4em; }
.news-body li + li { margin-top: .4em; }
.news-body a { color: var(--accent); }
.news-body strong { font-weight: 600; }
.news-body blockquote { border-left: 3px solid var(--teal); padding: 4px 0 4px 16px; color: var(--muted); }
.news-body img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.news-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15.5px; }
.news-body th, .news-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

.news-cta {
	margin-top: 40px; padding: 24px; border-radius: var(--radius);
	background: var(--bg-alt); border: 1px solid var(--line);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.news-cta p { font: 600 18px/1.35 var(--font-head); }

.news-pager { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.news-pager a {
	display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
	color: var(--text); text-decoration: none; overflow-wrap: anywhere;
}
.news-pager a:hover { border-color: var(--muted); }
.news-pager span { display: block; color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.news-pager__next { grid-column: 2; text-align: right; }
@media (max-width: 600px) {
	.news-pager { grid-template-columns: 1fr; }
	.news-pager__next { grid-column: auto; text-align: left; }
	.news-body { font-size: 16.5px; }
}
