/* ==========================================================
   Блог: страница списка статей, карточки, страница статьи
   ========================================================== */

/* Убираем жёлтую полосу-фон сверху на страницах блога */
body.adoweb-blog,
body.page-template-page-blog {
	background-image: none;
}

/* ---------- Страница «Блог» ---------- */
.blog-page {
	padding-bottom: 80px;
}

.blog-page__title {
	margin: 0 0 32px;
	font-size: 36px;
	line-height: 1.2;
	font-weight: 800;
	text-align: center;
	color: #222222;
}

/* ---------- Сетка карточек: на всю ширину контейнера (как меню) ---------- */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

/* ---------- Карточка ---------- */
.blog-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(34, 34, 34, 0.08);
	transition: transform .25s ease, box-shadow .25s ease;
}

.blog-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(34, 34, 34, 0.14);
}

.blog-card__link {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.blog-card__img {
	aspect-ratio: 2 / 1;
	background: #222222;
	overflow: hidden;
}

.blog-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.blog-card:hover .blog-card__img img {
	transform: scale(1.04);
}

.blog-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 24px;
	flex: 1;
}

.blog-card__date {
	font-size: 13px;
	color: #8D91B7;
}

.blog-card__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.35;
	font-weight: 800;
	color: #222222;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .2s ease;
}

.blog-card:hover .blog-card__title {
	color: #C9A100;
}

.blog-card__excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #6B6E85;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.blog-empty {
	text-align: center;
	color: #6B6E85;
}

/* ---------- Пагинация ---------- */
.blog-pagination {
	margin-top: 48px;
}

.blog-pagination ul {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.blog-pagination a,
.blog-pagination span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border-radius: 12px;
	background: #F7F7F7;
	color: #222222;
	font-weight: 700;
	transition: background .2s ease;
}

.blog-pagination a:hover,
.blog-pagination .current {
	background: #FAC902;
	color: #222222;
}

/* ---------- Статья: навигация «предыдущая / следующая» в одну строку ---------- */
.blog-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 48px 0 0;
}

.blog-nav__item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 22px 26px;
	border-radius: 16px;
	background: #F7F7F7;
	border: 1px solid transparent;
	color: #222222;
	transition: border-color .2s ease, background .2s ease;
}

.blog-nav__item--next {
	text-align: right;
}

.blog-nav__item--empty {
	background: none;
	padding: 0;
}

a.blog-nav__item:hover {
	border-color: #FAC902;
	background: #FFFFFF;
}

.blog-nav__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #8D91B7;
}

.blog-nav__arrow {
	color: #FAC902;
	font-size: 14px;
}

.blog-nav__title {
	font-size: 16px;
	line-height: 1.4;
	font-weight: 800;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Статья: «Другие статьи» ---------- */
.blog-related {
	margin-top: 64px;
	padding-bottom: 30px;
}

.blog-related__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}

.blog-related__title {
	margin: 0;
	font-size: 28px;
	font-weight: 800;
	color: #222222;
}

.blog-related__all {
	font-weight: 700;
	color: #222222;
	border-bottom: 2px solid #FAC902;
	white-space: nowrap;
}

.blog-related__all:hover {
	color: #C9A100;
}

/* Убираем английское «Posted in …» под текстом статьи */
.blog-single .entry-footer {
	display: none;
}

/* ---------- Адаптив ---------- */
@media (max-width: 991.98px) {
	.blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
	.blog-page__title {
		font-size: 30px;
		margin-bottom: 24px;
	}
}

@media (max-width: 767.98px) {
	.blog-nav {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	.blog-nav__item--next {
		text-align: left;
	}
	.blog-nav__item--empty {
		display: none;
	}
	.blog-related__title {
		font-size: 24px;
	}
}

@media (max-width: 575.98px) {
	.blog-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.blog-page__title {
		font-size: 26px;
	}
}

/* Режим проверки картинок (?cards_debug=1, только для админа) */
.blog-card__debug {
	position: relative;
	z-index: 3;
	font-size: 11px;
	line-height: 1.4;
	color: #b00020;
	word-break: break-all;
	background: #fff4f4;
	padding: 8px;
	border-radius: 8px;
}
.blog-card__debug ol {
	margin: 0;
	padding-left: 16px;
}

/* ==========================================================
   Страница статьи: собственная разметка .blog-article
   (селекторы с body — чтобы перебить старые сниппеты)
   ========================================================== */
body .blog-article {
	max-width: 860px;
	margin: 0 auto;
	padding: 0;
	float: none;
	width: auto;
	position: static;
	transform: none;
}

body .blog-article__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	font-size: 14px;
	color: #8D91B7;
}

body .blog-article__crumbs a {
	color: #8D91B7;
}

body .blog-article__crumbs a:hover {
	color: #222222;
}

body .blog-article__title {
	margin: 0 0 14px;
	padding: 0;
	font-size: 40px;
	line-height: 1.2;
	font-weight: 800;
	color: #222222;
	text-align: left;
}

body .blog-article__date {
	display: block;
	margin: 0 0 28px;
	font-size: 14px;
	color: #8D91B7;
}

body .blog-article__cover {
	margin: 0 0 32px;
	padding: 0;
	width: 100%;
	max-width: 100%;
	border-radius: 16px;
	overflow: hidden;
	background: #222222;
	position: static;
	left: auto;
	transform: none;
}

body .blog-article__cover img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	position: static;
}

body .blog-article__content {
	font-size: 17px;
	line-height: 1.7;
	color: #222222;
}

body .blog-article__content > *:first-child {
	margin-top: 0;
}

body .blog-article__content p,
body .blog-article__content ul,
body .blog-article__content ol {
	margin: 0 0 18px;
}

body .blog-article__content ul,
body .blog-article__content ol {
	padding-left: 24px;
}

body .blog-article__content ul {
	list-style: disc;
}

body .blog-article__content ol {
	list-style: decimal;
}

body .blog-article__content li {
	margin-bottom: 6px;
}

body .blog-article__content h2 {
	margin: 40px 0 16px;
	font-size: 28px;
	line-height: 1.25;
	font-weight: 800;
	text-align: left;
}

body .blog-article__content h3 {
	margin: 32px 0 12px;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 800;
}

body .blog-article__content a {
	color: #222222;
	text-decoration: underline;
	text-decoration-color: #FAC902;
	text-underline-offset: 3px;
}

body .blog-article__content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

body .blog-article__content figure {
	margin: 28px 0;
	max-width: 100%;
}

body .blog-article__content figcaption {
	margin-top: 8px;
	font-size: 14px;
	color: #8D91B7;
	text-align: center;
}

body .blog-article__content blockquote {
	margin: 28px 0;
	padding: 18px 24px;
	border-left: 4px solid #FAC902;
	background: #F7F7F7;
	border-radius: 0 12px 12px 0;
	font-style: normal;
}

body .blog-article__content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 24px;
	font-size: 15px;
}

body .blog-article__content th,
body .blog-article__content td {
	border: 1px solid #E7EAF2;
	padding: 10px 12px;
	text-align: left;
}

/* Навигация под статьёй — по ширине текста */
.blog-single .blog-nav {
	max-width: 860px;
	margin-left: auto;
	margin-right: auto;
}

@media (max-width: 767.98px) {
	body .blog-article__title {
		font-size: 28px;
	}
	body .blog-article__content {
		font-size: 16px;
	}
	body .blog-article__content h2 {
		font-size: 23px;
	}
	body .blog-article__cover {
		border-radius: 12px;
		margin-bottom: 24px;
	}
}

/* Сторонняя ленивая загрузка часто прячет картинки через opacity:0 — в карточках и статье показываем всегда */
.blog-card__img img,
.blog-article__cover img,
.blog-article__content img {
	opacity: 1 !important;
}
