/*
 * Блог: список статей, рубрики, автор, поиск (макеты Blog, BlogMobile) и статья (Article, ArticleMobile).
 * Подключается только на страницах блога (inc/assets.php). Значения — из макетов, цвета — токены main.css.
 */

.section--64 { margin-top: 64px; }

/* ---------- Шапка списка ---------- */
.hero--blog { padding-bottom: 48px; }
.blog-head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 28px 40px; margin-top: 24px;
}
.blog-head__text { flex: 1 1 520px; min-width: 0; }
.h1--blog { font-size: 56px; line-height: 1.1; letter-spacing: -1.5px; }
.blog-head .lead { margin-top: 16px; max-width: 560px; }
.blog-search { flex: 0 1 420px; min-width: 260px; }
.blog-search__field {
	display: flex; align-items: center; gap: 12px;
	height: 58px; padding: 0 20px;
	border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong);
	box-shadow: 0 10px 24px rgba(8, 60, 52, .08);
	color: var(--teal-ink);
}
.blog-search__field svg { flex: none; }
.blog-search__field input {
	flex: 1; min-width: 0; height: 100%;
	border: 0; outline: 0; background: transparent;
	font: 600 16px var(--font-sans); color: var(--ink);
}
.blog-search__field input::placeholder { color: var(--muted-soft); opacity: 1; }
.blog-search__field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18, 181, 166, .25); }

.blog-cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.blog-cat {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
	border-radius: var(--radius-pill); background: rgba(255, 255, 255, .9); border: 1px solid var(--border-strong);
	font-size: 15px; font-weight: 700; white-space: nowrap;
}
.blog-cat.is-active { background: var(--mint); border-color: var(--mint); color: var(--on-mint); font-weight: 800; }

/* ---------- Закреплённые статьи ---------- */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 20px; }
.featured-card {
	position: relative; overflow: hidden;
	display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
	min-height: 340px; padding: 36px; border-radius: 32px;
}
.featured-card > *:not(.pattern) { position: relative; }
.featured-card--dark { background: var(--dark); color: var(--on-dark); box-shadow: 0 20px 44px rgba(6, 32, 29, .28); }
.featured-card--mint { background: var(--mint); color: var(--on-mint); }
.featured-card--dark .pattern--mint { opacity: .14; }
.featured-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.featured-card__tag { padding: 6px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; }
.featured-card--dark .featured-card__tag { background: rgba(30, 214, 197, .18); color: var(--mint); }
.featured-card--mint .featured-card__tag { background: var(--surface); color: var(--teal-ink); }
.featured-card__meta { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.featured-card--dark .featured-card__meta { color: rgba(255, 255, 255, .7); }
.featured-card--mint .featured-card__meta, .featured-card--mint .featured-card__text { color: #0A3B3F; }
.featured-card__title { margin: 0 0 14px; font: 700 25px/1.28 var(--font-display); letter-spacing: -.5px; }
.featured-card__text { display: block; margin-bottom: 22px; font-size: 16px; line-height: 1.55; }
.featured-card--dark .featured-card__text { color: rgba(255, 255, 255, .85); }
.featured-card__more { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.featured-card--dark .featured-card__more { color: var(--mint); }

/* ---------- Сетка карточек ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 40px; }
.post-grid--flush { margin-top: 0; }
.post-grid--3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.post-card {
	display: flex; flex-direction: column; overflow: hidden;
	border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
.post-card__band { position: relative; display: block; height: 112px; overflow: hidden; }
.post-card__band--mint-light { background: var(--mint-light); }
.post-card__band--dark { background: var(--dark); }
.post-card__band--mint { background: var(--mint); }
.post-card__band--mint-light .pattern { opacity: .5; }
.post-card__band--dark .pattern { opacity: .35; }
.post-card__band--mint .pattern { opacity: .18; }
.post-card__body { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; flex: 1; padding: 22px; }
.post-tag {
	display: inline-block; padding: 5px 12px; border-radius: var(--radius-pill);
	background: var(--mint-light); color: var(--teal-ink); font-size: 12.5px; font-weight: 700;
}
.post-card__title { margin: 14px 0 0; font-size: 18px; line-height: 1.35; font-weight: 800; }
.post-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-card__meta { font-size: 13px; font-weight: 600; color: var(--muted-soft); }
.post-card__arrow {
	display: flex; align-items: center; justify-content: center; flex: none;
	width: 36px; height: 36px; border-radius: 50%; background: var(--mint-light); color: var(--teal-ink);
}
.post-card:hover { opacity: 1; box-shadow: var(--shadow-lift); }
.post-card:hover .post-card__title { color: var(--teal-ink); }

.blog-empty { font-size: 18px; color: var(--muted); }

/* ---------- Пагинация ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; }
.pager .page-numbers {
	display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border-radius: 14px;
	background: var(--surface); border: 1px solid var(--border);
	font-size: 16px; font-weight: 700;
}
.pager .page-numbers.current { background: var(--mint); border-color: var(--mint); color: var(--on-mint); font-weight: 800; }
.pager .page-numbers.dots { width: 36px; background: none; border: 0; color: var(--muted-soft); }
.pager .next, .pager .prev { color: var(--teal-ink); }
.pager .prev svg { transform: rotate(180deg); }

/* ---------- Инструкции и чек-листы ---------- */
.guides__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 36px; }
.guide-card {
	display: flex; flex-direction: column; justify-content: space-between; gap: 36px;
	min-height: 200px; padding: 28px; border-radius: 24px;
	background: var(--surface); box-shadow: 0 10px 30px rgba(4, 20, 26, .16);
}
.guide-card__n { font: 700 30px/1 var(--font-display); color: #08857A; }
.guide-card__title { margin: 0 0 14px; font-size: 19px; line-height: 1.35; font-weight: 800; color: var(--ink); }

/* ---------- Статья: шапка ---------- */
.hero--article { padding-bottom: 56px; }
.article-head { margin-top: 28px; }
.article-head .h1--article { max-width: 884px; }
.article-head__cat {
	display: inline-block; padding: 7px 16px; border-radius: var(--radius-pill);
	background: var(--surface); border: 1px solid var(--border-strong);
	color: var(--teal-ink); font-size: 13.5px; font-weight: 700;
}
.h1--article { margin-top: 22px; font-size: 44px; line-height: 1.15; letter-spacing: -1.2px; }
.article-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
	margin: 28px 0 0; padding: 0; list-style: none;
	font-size: 15px; font-weight: 600; color: var(--muted);
}
.article-meta li { display: flex; align-items: center; gap: 8px; }
.article-meta svg { flex: none; color: var(--teal-ink); }
.article-meta a { font-weight: 800; color: var(--ink); }

.article-cover {
	position: relative; overflow: hidden; height: 300px; margin-top: 40px;
	border-radius: var(--radius-hero); background: var(--dark);
}
.article-cover::before {
	content: ""; position: absolute; inset: 0;
	background: radial-gradient(50% 90% at 82% 50%, rgba(30, 214, 197, .45) 0, rgba(30, 214, 197, 0) 70%);
}
.article-cover .pattern--mint { opacity: .14; }
.article-cover .logo__mark { position: absolute; right: 72px; top: 70px; width: 190px; height: 160px; }
.article-cover--image { height: auto; aspect-ratio: 16 / 9; max-height: 520px; margin-left: 0; margin-right: 0; }
.article-cover--image::before { content: none; }
.article-cover--image img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Статья: колонки ---------- */
.article-layout { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.article { flex: 1 1 640px; min-width: 0; max-width: 780px; }
.article-aside { flex: 0 0 320px; min-width: 260px; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }

.toc { padding: 26px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.toc__title { font: 700 16px var(--font-display); letter-spacing: -.2px; margin-bottom: 16px; }
.toc__link { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 15px; line-height: 1.4; font-weight: 600; }
.toc__link + .toc__link { margin-top: 4px; }
.toc__link span, .toc-mobile a span { flex: none; color: var(--teal); font-weight: 800; }
.toc__link.is-active { background: var(--mint-light); color: var(--teal-ink); font-weight: 800; }
.toc__link:hover { opacity: 1; color: var(--teal-ink); }

.aside-cta { position: relative; overflow: hidden; padding: 26px; border-radius: var(--radius-card); background: var(--dark); color: var(--on-dark); }
.aside-cta > *:not(.pattern) { position: relative; }
.aside-cta .pattern--mint { opacity: .14; }
.aside-cta__title { font: 700 19px/1.3 var(--font-display); }
.aside-cta__text { margin: 12px 0 20px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .85); }
.aside-cta .btn { min-height: 50px; border-radius: 14px; font-size: 15.5px; box-shadow: none; }

.toc-mobile { display: none; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.toc-mobile summary {
	display: flex; align-items: center; justify-content: space-between; min-height: 28px;
	font: 700 15px var(--font-display); cursor: pointer; list-style: none;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile[open] summary svg { transform: rotate(180deg); }
.toc-mobile nav { display: flex; flex-direction: column; margin-top: 10px; }
.toc-mobile a { display: flex; gap: 12px; align-items: center; min-height: 44px; font-size: 15px; line-height: 1.35; font-weight: 600; }

/* ---------- Статья: текст (компонент Article) ---------- */
.entry { font-size: 17.5px; line-height: 1.7; color: var(--ink-soft); }
.entry > * { margin: 0 0 18px; }
.entry > p:first-child { margin-bottom: 28px; font-size: 20px; line-height: 1.6; font-weight: 600; color: var(--ink); }
.entry h2 { margin: 56px 0 18px; font: 700 28px/1.25 var(--font-display); letter-spacing: -.5px; color: var(--ink); scroll-margin-top: 24px; }
.entry > h2:first-child, .entry > p:first-child + h2 { margin-top: 48px; }
.entry h3 { margin: 28px 0 12px; font-size: 21px; line-height: 1.35; font-weight: 800; color: var(--ink); }
.entry h2 + h3 { margin-top: 0; }
.entry a { color: var(--teal-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.entry strong { font-weight: 800; color: var(--ink); }

.entry ul { display: flex; flex-direction: column; gap: 12px; padding: 0; list-style: none; }
.entry ul > li { position: relative; padding-left: 24px; line-height: 1.6; }
.entry ul > li::before {
	content: ""; position: absolute; left: 0; top: 10px;
	width: 10px; height: 10px; border-radius: 3px; background: var(--teal); transform: rotate(45deg);
}
/* Нумерованный список — шаги (карточки с номером, как «Пошаговая инструкция» в макете) */
.entry ol { display: flex; flex-direction: column; gap: 14px; padding: 0; list-style: none; counter-reset: step; }
.entry ol > li {
	position: relative; counter-increment: step;
	min-height: 88px; padding: 31px 24px 22px 88px; /* первая строка — по центру номера */
	border-radius: 24px; background: var(--surface); border: 1px solid var(--border);
	font-size: 16.5px; line-height: 1.6; color: var(--muted);
}
.entry ol > li::before {
	content: counter(step); position: absolute; left: 24px; top: 22px;
	display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
	border-radius: 14px; background: var(--mint); color: var(--on-mint);
	font: 700 17px var(--font-display);
}

.entry figure { margin: 36px 0; }
.entry .wp-block-image img { display: block; width: 100%; height: auto; border-radius: 24px; }
.entry figcaption { margin: 12px 4px 0; font-size: 14.5px; line-height: 1.5; color: var(--muted-soft); }

.entry blockquote {
	margin: 36px 0; padding: 26px 28px; border-radius: 24px;
	background: var(--mint-light); border: 2px solid var(--teal);
	font-size: 17px; line-height: 1.65; color: var(--ink);
}
.entry blockquote p { margin: 0; }
.entry blockquote p + p { margin-top: 10px; }
.entry blockquote cite { display: block; margin-top: 10px; font-size: 14.5px; font-style: normal; color: var(--muted-soft); }
.entry blockquote.is-style-note::before {
	content: "Важно"; display: block; margin-bottom: 10px;
	font-size: 13.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--teal-ink);
}
.entry blockquote + blockquote { margin-top: -18px; }
.entry p + blockquote { margin-top: 0; }

.entry .wp-block-table { overflow-x: auto; }
.entry table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; background: var(--surface); border-radius: 16px; overflow: hidden; }
.entry th, .entry td { padding: 12px 16px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.entry .wp-block-table thead { border: 0; } /* core-стиль блока таблицы: рамка 3px и тёмные линии */
.entry .wp-block-table th, .entry .wp-block-table td { border: 1px solid var(--border); }
.entry th { background: var(--mint-light); color: var(--ink); font-weight: 800; border-bottom: 1px solid var(--border); }

/* ---------- Автор и призыв в конце статьи ---------- */
.author-card { margin: 48px 0 24px; padding: 28px 32px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.author-card .label { font-size: 12.5px; }
.author-card__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 12px; }
.author-card__name { font: 700 22px var(--font-display); letter-spacing: -.3px; }
.author-card__position { margin-top: 6px; font-size: 15.5px; font-weight: 600; color: var(--muted); }

.article-cta { position: relative; overflow: hidden; padding: 36px; border-radius: 32px; background: var(--mint); color: var(--on-mint); }
.article-cta > *:not(.pattern) { position: relative; }
.article-cta__title { font: 700 24px/1.25 var(--font-display); letter-spacing: -.4px; }
.article-cta__text { margin: 14px 0 24px; max-width: 520px; font-size: 17px; line-height: 1.55; color: #0A3B3F; }
.article-cta .btn { min-height: 54px; padding: 0 28px; }

/* ---------- Планшет: содержание над текстом ---------- */
@media (max-width: 1023px) {
	.article-aside { display: none; }
	.toc-mobile { display: block; margin-bottom: 28px; }
	.article { max-width: none; }
}

/* ---------- Телефон (макеты BlogMobile, ArticleMobile) ---------- */
@media (max-width: 767px) {
	.section--64 { margin-top: 32px; }
	.hero--blog { padding-bottom: 28px; }
	.blog-head { display: block; margin-top: 18px; }
	.h1--blog { font-size: 36px; letter-spacing: -1px; }
	.blog-head .lead { margin-top: 12px; }
	.blog-search { min-width: 0; margin-top: 20px; }
	.blog-search__field { height: 54px; padding: 0 16px; gap: 10px; border-radius: 16px; box-shadow: none; }
	.blog-cats {
		flex-wrap: nowrap; gap: 8px; margin: 18px calc(-1 * var(--hero-pad-x)) 0; padding: 0 var(--hero-pad-x) 2px;
		overflow-x: auto; scrollbar-width: none;
	}
	.blog-cats::-webkit-scrollbar { display: none; }
	.blog-cat { flex: none; padding: 0 18px; font-size: 14.5px; }

	.featured-grid { display: flex; flex-direction: column; gap: 14px; }
	.featured-card { gap: 28px; min-height: 0; padding: 24px; border-radius: 26px; }
	.featured-card__top { flex-direction: column; align-items: flex-start; gap: 8px; }
	.featured-card__tag { padding: 5px 12px; font-size: 12.5px; }
	.featured-card__meta { font-size: 13px; }
	.featured-card__title { margin-bottom: 16px; font-size: 19px; line-height: 1.3; letter-spacing: -.3px; }
	.featured-card__text { display: none; }

	.section--96 { margin-top: 48px; }
	.post-grid, .post-grid--3 { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
	.post-grid--flush { margin-top: 0; }
	.post-card { border-radius: 24px; box-shadow: 0 8px 24px rgba(8, 60, 52, .08); }
	.post-card__band { height: 84px; }
	.post-card__body { gap: 16px; padding: 18px; }
	.post-card__title { margin-top: 12px; font-size: 17px; }
	.post-card__arrow { width: 34px; height: 34px; }

	.pager { margin-top: 28px; }
	.pager .page-numbers { width: 44px; height: 44px; }
	.pager .page-numbers.dots { width: 24px; }

	.guides.statement { padding: 28px 18px; border-radius: 28px; }
	.guides .h2 { font-size: 24px; letter-spacing: -.4px; }
	.guides__grid { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
	.guide-card { gap: 18px; min-height: 0; padding: 20px; border-radius: 20px; }
	.guide-card__n { font-size: 24px; }
	.guide-card__title { margin-bottom: 10px; font-size: 17px; }

	/* Статья */
	.hero--article { padding-bottom: 28px; }
	.hero--article .crumbs li:first-child, .hero--article .crumbs li:last-child { display: none; }
	.hero--article .crumbs li:nth-child(2)::before { content: none; }
	.article-head { margin-top: 18px; }
	.article-head__cat { padding: 6px 14px; font-size: 13px; }
	.h1--article { margin-top: 16px; font-size: 25px; line-height: 1.22; letter-spacing: -.6px; }
	.article-meta { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 20px; font-size: 14.5px; }
	.article-cover { height: 150px; margin-top: 20px; border-radius: 24px; }
	.article-cover::before { background: radial-gradient(60% 100% at 80% 50%, rgba(30, 214, 197, .45) 0, rgba(30, 214, 197, 0) 70%); }
	.article-cover .logo__mark { right: 24px; top: 24px; width: 90px; height: 76px; }
	.article-cover--image { height: auto; aspect-ratio: 4 / 3; }

	.section--56.container:has(.article-layout) { margin-top: 24px; }
	.toc-mobile { margin-bottom: 0; }
	.entry { font-size: 16.5px; }
	.entry > * { margin-bottom: 16px; }
	.entry > p:first-child { margin: 28px 0 8px; font-size: 18px; }
	.entry h2 { margin: 40px 0 14px; font-size: 21px; line-height: 1.28; letter-spacing: -.3px; }
	.entry > p:first-child + h2 { margin-top: 40px; }
	.entry h3 { margin: 24px 0 10px; font-size: 18px; }
	.entry h2 + h3 { margin-top: 0; }
	.entry figure { margin: 28px 0; }
	.entry .wp-block-image img { border-radius: 20px; }
	.entry figcaption { font-size: 13.5px; margin: 10px 2px 0; }
	.entry blockquote { padding: 20px; border-radius: 20px; font-size: 16px; }
	.entry blockquote + blockquote { margin-top: -16px; }
	.entry ol { gap: 12px; }
	.entry ol > li { min-height: 74px; padding: 25px 18px 18px 70px; border-radius: 20px; font-size: 15.5px; }
	.entry ol > li::before { left: 18px; top: 18px; width: 38px; height: 38px; border-radius: 12px; font-size: 15px; }
	.entry table { font-size: 14.5px; }
	.entry th, .entry td { padding: 10px 12px; }

	.author-card { margin: 32px 0 24px; padding: 20px; border-radius: 22px; }
	.author-card__row { gap: 14px; }
	.author-card__name { font-size: 19px; }
	.article-cta { padding: 26px 22px; border-radius: 26px; }
	.article-cta__title { font-size: 20px; letter-spacing: -.3px; }
	.article-cta__text { margin: 12px 0 20px; font-size: 15.5px; }
	.article-cta .btn { display: flex; width: 100%; }

	.section--120:has(.post-grid--3) { margin-top: 56px; }
}
