/* Блог: список записей (home.php, category.php), запись (single.php), карточка (template-parts/post-card.php). */
.nl-blog {
	--b-ink: #172b4d;
	--b-text: #525f7f;
	--b-muted: #8898aa;
	--b-line: #e9ecef;
	--b-bg: #f6f9fc;
	--b-accent: #5e72e4;
	--b-accent2: #825ee4;
	background: var(--b-bg);
}

/* Шапка */
.nl-blog-hero {
	padding: clamp(3rem, 2rem + 5vw, 6rem) 0 clamp(2.5rem, 2rem + 3vw, 4rem);
	background:
		radial-gradient(560px 300px at 88% 0%, rgba(130, 94, 228, .3), transparent 70%),
		radial-gradient(480px 280px at 0% 100%, rgba(94, 114, 228, .22), transparent 70%),
		linear-gradient(180deg, #121d3a 0%, #0b1324 100%);
	color: #eef1f9;
}
.nl-blog-eyebrow {
	display: inline-flex; align-items: center; gap: .75rem; margin: 0 0 .75rem;
	color: #8b9bff; font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.nl-blog-eyebrow::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: currentColor; }
.nl-blog-title { max-width: 20ch; margin: 0 0 1rem; color: #fff; font-size: clamp(2rem, 1.3rem + 3.2vw, 3.5rem); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; }
.nl-blog-lead { max-width: 640px; margin: 0; color: #b9c3dd; font-size: 1.125rem; font-weight: 400; line-height: 1.65; }

/* Рубрики */
.nl-blog-cats ul { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.nl-blog-cats a {
	display: inline-block; padding: .4rem .95rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px;
	color: #d5dcf0; font-size: .875rem; font-weight: 600; text-decoration: none; transition: background .2s, border-color .2s, color .2s;
}
.nl-blog-cats a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nl-blog-cats a[aria-current="page"] { border-color: transparent; background: linear-gradient(135deg, var(--b-accent), var(--b-accent2)); color: #fff; }

/* Список */
.nl-blog-list { padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) 0; }
.nl-blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.nl-blog-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Блок «Последние новости» на главной */
.nl-home-news { padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0; }
.nl-home-news-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 2rem; }
.nl-home-news-title { margin: 0; color: var(--b-ink); font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.nl-home-news-all { color: var(--b-accent); font-size: 1rem; font-weight: 700; text-decoration: none; }
.nl-home-news-all:hover { color: var(--b-accent2); }
.nl-home-news .nl-post-card--featured { margin-bottom: 0; }

/* Карточка */
.nl-post-card {
	position: relative; display: flex; flex-direction: column; overflow: hidden;
	border: 1px solid var(--b-line); border-radius: 18px; background: #fff;
	box-shadow: 0 1px 3px rgba(50, 50, 93, .06);
	transition: transform .25s ease, box-shadow .25s ease;
}
.nl-post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(50, 50, 93, .12); }
.nl-post-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e9ecef; }
.nl-post-card-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.nl-post-card:hover .nl-post-card-img { transform: scale(1.04); }
.nl-post-card-ph {
	display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 1.25rem;
	background:
		radial-gradient(260px 160px at 85% 15%, rgba(130, 94, 228, .55), transparent 70%),
		linear-gradient(135deg, #172b4d, #2a3f86);
}
.nl-post-card-ph span { color: rgba(255, 255, 255, .85); font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nl-post-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.25rem 1.375rem 1.5rem; }
.nl-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .875rem; margin-bottom: .75rem; color: var(--b-muted); font-size: .8125rem; }
.nl-post-meta-info { white-space: nowrap; }
.nl-post-meta--hero > * + *::before { content: "·"; margin-right: .875rem; }
.nl-post-cat {
	position: relative; z-index: 2; padding: .2rem .6rem; border-radius: 999px;
	background: rgba(94, 114, 228, .1); color: var(--b-accent); font-weight: 700; text-decoration: none;
}
.nl-post-cat:hover { background: rgba(94, 114, 228, .18); color: var(--b-accent); }
.nl-post-card-title { margin: 0 0 .625rem; font-size: 1.1875rem; font-weight: 700; line-height: 1.35; }
.nl-post-card-title a { color: var(--b-ink); text-decoration: none; }
.nl-post-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.nl-post-card:hover .nl-post-card-title a { color: var(--b-accent); }
.nl-post-card-excerpt { margin: 0 0 1rem; color: var(--b-text); font-size: .9375rem; font-weight: 400; line-height: 1.6; }
.nl-post-card-more { margin-top: auto; color: var(--b-accent); font-size: .875rem; font-weight: 700; }

/* Крупная карточка */
.nl-post-card--featured { display: grid; grid-template-columns: 1.15fr 1fr; margin-bottom: 1.5rem; }
.nl-post-card--featured .nl-post-card-media { aspect-ratio: auto; min-height: 320px; }
.nl-post-card--featured .nl-post-card-body { justify-content: center; padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); }
.nl-post-card-title--lg { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); letter-spacing: -.015em; }

/* Пагинация */
.nl-blog-pagination { margin-top: 2.5rem; }

/* Пустой блог */
.nl-blog-empty { max-width: 640px; margin: 0 auto; padding: 2.5rem 2rem; border: 1px dashed #cfd6e2; border-radius: 18px; background: #fff; text-align: center; }
.nl-blog-empty-title { margin: 0 0 .5rem; color: var(--b-ink); font-size: 1.375rem; font-weight: 700; }
.nl-blog-empty p { color: var(--b-text); }
.nl-blog-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.25rem; }
.nl-blog-empty-actions .btn { margin: 0; }

/* Запись */
.nl-single-hero { padding-bottom: clamp(4.5rem, 3rem + 5vw, 7rem); }
.nl-single-head { max-width: 820px; margin: 0 auto; }
.nl-single-title { max-width: none; }
.nl-single-crumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; font-size: .875rem; }
.nl-single-crumbs a { color: #9fb0ff; font-weight: 600; text-decoration: none; }
.nl-single-crumbs a:hover { color: #fff; }
.nl-single-crumbs span { color: rgba(255, 255, 255, .35); }
.nl-post-meta--hero { margin: 0; color: #a5b0cc; font-size: .9375rem; }
.nl-post-meta--hero > * + *::before { color: rgba(255, 255, 255, .3); }
.nl-single-body { padding-bottom: clamp(2.5rem, 2rem + 3vw, 4rem); }
.nl-single-cover { max-width: 1000px; margin: calc(-1 * clamp(3rem, 2rem + 4vw, 5rem)) auto 2.5rem; overflow: hidden; border-radius: 20px; box-shadow: 0 24px 60px rgba(23, 43, 77, .25); }
.nl-single-cover-img { display: block; width: 100%; height: auto; }
.nl-single-content {
	max-width: 820px; margin: 0 auto; padding: clamp(1.5rem, 1rem + 3vw, 3rem);
	border: 1px solid var(--b-line); border-radius: 20px; background: #fff;
}
.nl-single-body .container > .nl-single-content:first-child { margin-top: calc(-1 * clamp(3rem, 2rem + 4vw, 5rem)); box-shadow: 0 24px 60px rgba(23, 43, 77, .12); }
.nl-single-content p, .nl-single-content li { color: var(--b-text); font-size: 1.0625rem; line-height: 1.75; }
.nl-single-content img { border-radius: 12px; }
.nl-single-content blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--b-accent); border-radius: 0 12px 12px 0; background: var(--b-bg); }
.nl-single-content a { color: var(--b-accent); text-decoration: underline; text-underline-offset: 2px; }

/* Поделиться */
.nl-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 820px; margin: 1.5rem auto 0; }
.nl-share-label { margin-right: .25rem; color: var(--b-muted); font-size: .875rem; font-weight: 600; }
.nl-share-btn {
	display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .95rem; border-radius: 10px;
	color: #fff; font-size: .875rem; font-weight: 600; text-decoration: none; transition: filter .2s, transform .2s;
}
.nl-share-btn:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.nl-share-btn--tg { background: #229ed9; }
.nl-share-btn--x { background: #111; }
.nl-share-btn--fb { background: #1877f2; }

/* Похожие */
.nl-related { padding-top: 0; }
.nl-related-title { margin: 0 0 1.5rem; color: var(--b-ink); font-size: 1.5rem; font-weight: 700; }

@media (max-width: 991.98px) {
	.nl-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nl-post-card--featured { grid-template-columns: 1fr; }
	.nl-post-card--featured .nl-post-card-media { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 575.98px) {
	.nl-blog-grid { grid-template-columns: 1fr; }
	.nl-blog-lead { font-size: 1rem; }
	.nl-single-content { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.nl-post-card, .nl-post-card-img, .nl-share-btn { transition: none; }
	.nl-post-card:hover, .nl-post-card:hover .nl-post-card-img { transform: none; }
}
