/* ==========================================================================
   Блог: список статей, рубрики, карточки, статья, «Читайте также», призыв.
   Подключается из index.php и single.php (fresh_blog_enqueue).
   ========================================================================== */

/* ---------- Список ---------- */
.blog-list__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 40px;
	margin-bottom: 32px;
}
.blog-list__lead {
	max-width: 520px;
	font-size: 16px;
	color: var(--c-muted);
}
.blog-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.blog-cats__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 16px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--c-line);
	font-size: 14px;
	font-weight: 500;
	color: var(--c-ink);
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.blog-cats__item:hover {
	border-color: var(--c-accent);
}
.blog-cats__item.is-active {
	background: var(--g-accent);
	border-color: transparent;
	color: #04130e;
	font-weight: 600;
	box-shadow: 0 6px 18px rgba(0, 229, 189, 0.22);
}
.blog-cats__count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--c-bg-soft);
	font-size: 12px;
	font-weight: 600;
	color: var(--c-muted);
}
.blog-cats__item.is-active .blog-cats__count {
	background: rgba(4, 19, 14, 0.12);
	color: #04130e;
}
.blog-empty {
	display: grid;
	justify-items: start;
	gap: 12px;
	color: var(--c-muted);
}

/* ---------- Карточка ---------- */
.post-card {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.post-card:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-2px);
}
.post-card__img {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--c-mint-soft);
}
.post-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.post-card:hover .post-card__img img {
	transform: scale(1.04);
}
.post-card__noimg {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--c-accent-ink);
}
.post-card__noimg .icon {
	width: 48px;
	height: 48px;
	stroke-width: 1.3;
}
.post-card__cat {
	position: absolute;
	left: 14px;
	top: 14px;
	z-index: 2;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(1, 13, 10, 0.78);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: var(--c-accent);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}
.post-card__cat:hover {
	background: var(--c-dark);
	color: #fff;
}
.post-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 24px;
}
.post-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-size: 12.5px;
	color: var(--c-muted);
}
.post-card__dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}
.post-card__time {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.post-card__time .icon {
	width: 14px;
	height: 14px;
}
.post-card__title {
	font-size: 19px;
	line-height: 1.3;
}
.post-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.post-card__link:focus-visible {
	outline: none;
}
.post-card__link:focus-visible::after {
	outline: 2px solid var(--c-accent);
	outline-offset: -2px;
	border-radius: var(--radius);
}
.post-card__excerpt {
	flex: 1;
}
.post-card__more {
	margin-top: 4px;
}
.post-card:hover .post-card__more .icon {
	transform: translateX(3px);
}

/* ---------- Статья ---------- */
.post-single {
	padding-top: 48px;
}
.post-single__lead {
	font-size: 20px;
	line-height: 1.55;
	color: var(--c-ink);
	margin-bottom: 28px;
}
.post-single__cover {
	margin: 0 0 40px;
}
.post-single__cover img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
}
.post-single__cover figcaption {
	margin-top: 10px;
	font-size: 13px;
	color: var(--c-muted);
}
.post-single__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--c-line);
}

/* Типографика текста статьи */
.post-content {
	font-size: 17.5px;
	line-height: 1.75;
	color: #27322f;
}
.post-content > * + * {
	margin-top: 1.1em;
}
.post-content h2 {
	font-size: clamp(24px, 2.6vw, 30px);
	line-height: 1.2;
	margin-top: 1.9em;
	scroll-margin-top: calc(var(--header-h) + 20px);
}
.post-content h3 {
	font-size: clamp(19px, 2vw, 22px);
	line-height: 1.3;
	margin-top: 1.6em;
}
.post-content h2 + *,
.post-content h3 + * {
	margin-top: 0.6em;
}
.post-content strong {
	color: var(--c-ink);
	font-weight: 600;
}
.post-content a {
	color: var(--c-accent-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.post-content a:hover {
	text-decoration-thickness: 2px;
}
.post-content ul,
.post-content ol {
	padding-left: 0;
	list-style: none;
	display: grid;
	gap: 0.5em;
}
.post-content ul > li,
.post-content ol > li {
	position: relative;
	padding-left: 30px;
}
.post-content ul > li::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 0.72em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--c-accent-ink);
}
.post-content ol {
	counter-reset: li;
}
.post-content ol > li {
	counter-increment: li;
}
.post-content ol > li::before {
	content: counter(li);
	position: absolute;
	left: 0;
	top: 0.2em;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--c-accent-soft);
	color: #0a7a58;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}
.post-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 20px 24px;
	border-left: 4px solid var(--c-accent);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	background: var(--c-mint-soft);
	font-size: 18px;
	color: var(--c-ink);
}
.post-content blockquote p + p {
	margin-top: 0.6em;
}
.post-content figure img,
.post-content > p > img {
	border-radius: var(--radius-sm);
}
.post-content figcaption {
	margin-top: 8px;
	font-size: 13px;
	color: var(--c-muted);
	text-align: center;
}
.post-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 1.5;
}
.post-content th,
.post-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--c-line);
	text-align: left;
	vertical-align: top;
}
.post-content thead th {
	color: var(--c-ink);
	font-weight: 600;
	background: var(--c-bg-soft);
}
.post-content .wp-block-table {
	overflow-x: auto;
}
.post-content hr {
	border: 0;
	height: 1px;
	background: var(--c-line);
	margin: 2.2em 0;
}
.post-content code {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--c-bg-soft);
	font-size: 0.9em;
}

/* ---------- Читайте также ---------- */
.post-related + .post-cta-wrap {
	padding-top: 0;
}

/* ---------- Призыв ---------- */
.post-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px 48px;
	padding: 44px 48px;
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.post-cta__title {
	font-size: clamp(26px, 3vw, 36px);
	margin-bottom: 10px;
}
.post-cta__text p {
	max-width: 520px;
	font-size: 16px;
}
.post-cta__action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	flex: none;
}
.post-cta__action small {
	font-size: 13px;
	color: var(--c-accent);
}

@media (max-width: 860px) {
	.blog-list__head {
		flex-direction: column;
		align-items: flex-start;
	}
	.post-cta {
		flex-direction: column;
		align-items: flex-start;
		padding: 32px 28px;
	}
	.post-cta__action {
		align-items: flex-start;
	}
}
@media (max-width: 640px) {
	.blog-cats {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin: 0 calc(var(--gutter) * -1);
		padding: 2px var(--gutter) 8px;
		width: calc(100% + var(--gutter) * 2);
		scrollbar-width: none;
	}
	.blog-cats::-webkit-scrollbar {
		display: none;
	}
	.blog-cats__item {
		flex: none;
	}
	.post-single {
		padding-top: 32px;
	}
	.post-single__lead {
		font-size: 18px;
	}
	.post-single__cover {
		margin-bottom: 28px;
	}
	.post-content {
		font-size: 16.5px;
		line-height: 1.7;
	}
	.post-cta {
		padding: 28px 20px;
	}
	.post-cta .btn {
		width: 100%;
	}
	.post-cta__action {
		width: 100%;
		align-items: center;
	}
}
