/* ==========================================================================
   Блог konimarket.ru — стили ленты /blog/, архива рубрики и статьи.
   Подключается условно в functions.php (konigo_enqueue_assets) только на
   is_home() / is_category() / is_singular('post'), см. секцию 2.
   Цветовая схема соответствует основной теме (#0A1C3A / #D4AF37).
   ========================================================================== */

/* ---------- Хлебные крошки ---------- */
.blog-breadcrumb {
	background: #F9FAFB;
	border-bottom: 1px solid #E5E7EB;
	padding: .75rem 0;
	font-size: .82rem;
}
.blog-breadcrumb__trail a {
	color: #6B7280;
	text-decoration: none;
}
.blog-breadcrumb__trail a:hover { color: #D4AF37; }
.blog-breadcrumb__trail span.sep { margin: 0 .4rem; color: #C4C9D2; }
.blog-breadcrumb__trail span.current { color: #0A1C3A; font-weight: 600; }

/* ---------- Шапка секции (герой блога / архив рубрики) ---------- */
.blog-hero {
	background: linear-gradient(135deg, #0A1C3A 0%, #13294B 100%);
	padding: 2.5rem 0;
	color: #fff;
}
.blog-hero__title {
	font-size: 1.9rem;
	font-weight: 800;
	margin: 0 0 .5rem;
}
.blog-hero__subtitle {
	color: #C9D2E3;
	font-size: 1rem;
	max-width: 640px;
	margin: 0;
}
.blog-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	background: linear-gradient(135deg, #D4AF37, #B8922E);
	color: #0A1C3A;
	font-weight: 700;
	font-size: .78rem;
	padding: .3rem .75rem;
	border-radius: 999px;
	margin-bottom: .75rem;
}

/* ---------- Общий каркас: сайдбар + контент ---------- */
.blog-layout {
	display: flex;
	align-items: flex-start;
	gap: 2rem;
	padding: 2rem 0 3rem;
}
.blog-layout__main { flex: 1 1 auto; min-width: 0; }
.blog-layout__sidebar {
	flex: 0 0 280px;
	width: 280px;
}
@media (max-width: 1023px) {
	.blog-layout { flex-direction: column; }
	.blog-layout__sidebar { width: 100%; flex-basis: auto; order: 2; }
	.blog-layout__main { order: 1; width: 100%; }
}

.blog-sidebar__sticky { position: sticky; top: 96px; }

.blog-sidebar__block {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 1rem;
	padding: 1.25rem;
	margin-bottom: 1.25rem;
}
.blog-sidebar__title {
	font-size: .95rem;
	font-weight: 700;
	color: #0A1C3A;
	margin: 0 0 .9rem;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.blog-sidebar__title i { color: #D4AF37; }

.blog-cat-list { list-style: none; margin: 0; padding: 0; }
.blog-cat-list li { margin-bottom: .35rem; }
.blog-cat-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .5rem;
	padding: .55rem .7rem;
	border-radius: .6rem;
	color: #374151;
	text-decoration: none;
	font-size: .88rem;
	font-weight: 500;
	transition: background .15s, color .15s;
}
.blog-cat-list a:hover,
.blog-cat-list a.is-active {
	background: rgba(212,175,55,.12);
	color: #0A1C3A;
}
.blog-cat-list a .cat-ico { color: #D4AF37; width: 1.1rem; text-align: center; flex-shrink: 0; }
.blog-cat-list a .cat-count {
	color: #9CA3AF;
	font-size: .76rem;
	font-weight: 400;
}

.blog-tag-cloud { display: flex; flex-wrap: wrap; gap: .5rem; }
.blog-tag-cloud a {
	background: #F3F4F6;
	color: #4B5563;
	font-size: .78rem;
	padding: .35rem .7rem;
	border-radius: 999px;
	text-decoration: none;
	transition: background .15s, color .15s;
}
.blog-tag-cloud a:hover { background: #D4AF37; color: #0A1C3A; }

/* ---------- Мобильный аккордеон-фильтр рубрик ---------- */
.blog-mobile-filter { display: none; margin-bottom: 1.25rem; }
@media (max-width: 1023px) { .blog-mobile-filter { display: block; } }
@media (max-width: 1023px) { .blog-layout__sidebar .blog-sidebar__block--categories { display: none; } }

.blog-mobile-filter__wrap {
	background: #fff;
	border-radius: 1rem;
	box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
	overflow: hidden;
}
.blog-mobile-filter__header {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	background: none;
	border: 0;
	cursor: pointer;
	font-weight: 600;
	color: #0A1C3A;
	font-size: .92rem;
}
.blog-mobile-filter__header i.chevron { transition: transform .25s ease; color: #D4AF37; }
.blog-mobile-filter__header[aria-expanded="true"] i.chevron { transform: rotate(180deg); }
.blog-mobile-filter__body {
	max-height: 0;
	overflow: hidden;
	transition: max-height .35s ease;
	border-top: 0 solid #E5E7EB;
}
.blog-mobile-filter__body.is-open {
	max-height: 600px;
	overflow-y: auto;
	border-top-width: 1px;
}
.blog-mobile-filter__inner { padding: 1rem 1.25rem 1.25rem; }

/* ---------- Секция рубрики на ленте /blog/ ---------- */
.blog-section { margin-bottom: 2.5rem; }
.blog-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}
.blog-section__title {
	font-size: 1.2rem;
	font-weight: 700;
	color: #0A1C3A;
	display: flex;
	align-items: center;
	gap: .6rem;
}
.blog-section__title i {
	width: 2.1rem;
	height: 2.1rem;
	border-radius: .6rem;
	background: rgba(212,175,55,.12);
	color: #D4AF37;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: .95rem;
}
.blog-section__more {
	color: #B8922E;
	font-size: .85rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.blog-section__more:hover { color: #D4AF37; }

/* ---------- Сетка карточек ---------- */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}
@media (max-width: 1023px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 1rem;
	overflow: hidden;
	text-decoration: none;
	transition: transform .2s, box-shadow .2s;
	height: 100%;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 16px 24px -12px rgba(10,28,58,.18); }
.blog-card__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #EEF1F6 url('data:image/svg+xml;utf8,') center/cover;
	overflow: hidden;
}
.blog-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card__cat {
	position: absolute;
	top: .7rem;
	left: .7rem;
	background: rgba(10,28,58,.85);
	color: #D4AF37;
	font-size: .72rem;
	font-weight: 600;
	padding: .3rem .6rem;
	border-radius: 999px;
}
.blog-card__body { padding: 1.1rem 1.1rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.blog-card__title {
	font-size: 1.02rem;
	font-weight: 700;
	color: #0A1C3A;
	margin: 0 0 .5rem;
	line-height: 1.35;
}
.blog-card__excerpt { color: #6B7280; font-size: .86rem; line-height: 1.55; margin: 0 0 .9rem; flex: 1; }
.blog-card__meta {
	display: flex;
	align-items: center;
	gap: .9rem;
	font-size: .76rem;
	color: #9CA3AF;
	margin-top: auto;
}
.blog-card__meta i { color: #D4AF37; margin-right: .25rem; }

/* Компактная карточка-строка (используется в блоке «Похожие статьи» и т.п.) */
.blog-card--row { flex-direction: row; align-items: center; padding: .8rem; gap: .8rem; border-left: 3px solid transparent; }
.blog-card--row:hover { border-left-color: #D4AF37; background: #FEF9E6; transform: translateX(2px); box-shadow: none; }
.blog-card--row .blog-card__thumb { width: 84px; height: 64px; flex-shrink: 0; aspect-ratio: auto; border-radius: .6rem; }
.blog-card--row .blog-card__body { padding: 0; }
.blog-card--row .blog-card__title { font-size: .92rem; margin-bottom: .2rem; }

/* ---------- Пагинация ---------- */
.blog-pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; }
.blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	padding: 0 .6rem;
	border-radius: .6rem;
	border: 1px solid #E5E7EB;
	color: #374151;
	text-decoration: none;
	font-size: .88rem;
	font-weight: 600;
}
.blog-pagination .page-numbers:hover { border-color: #D4AF37; color: #0A1C3A; }
.blog-pagination .page-numbers.current { background: #0A1C3A; border-color: #0A1C3A; color: #fff; }

.blog-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: #6B7280;
}
.blog-empty i { font-size: 2.2rem; color: #D4AF37; margin-bottom: .75rem; display: block; }

/* ==========================================================================
   Статья (single.php)
   ========================================================================== */

.blog-article__header { padding: 2rem 0 1.5rem; }
.blog-article__cat {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	background: rgba(212,175,55,.12);
	color: #B8922E;
	font-weight: 700;
	font-size: .78rem;
	padding: .35rem .8rem;
	border-radius: 999px;
	margin-bottom: 1rem;
	text-decoration: none;
}
.blog-article__title {
	font-size: 2rem;
	line-height: 1.25;
	font-weight: 800;
	color: #0A1C3A;
	margin: 0 0 1rem;
}
.blog-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25rem;
	color: #6B7280;
	font-size: .86rem;
	border-top: 1px solid #E5E7EB;
	border-bottom: 1px solid #E5E7EB;
	padding: .9rem 0;
}
.blog-article__meta i { color: #D4AF37; margin-right: .35rem; }

.blog-article__thumb {
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: 1rem;
	margin: 1.5rem 0;
}

/* Тело статьи использует общую типографику .konigo-content темы,
   здесь только точечные добавки под редактор блога. */
.blog-article__body.konigo-content { font-size: 1.05rem; line-height: 1.8; }
.blog-article__body.konigo-content h2 { font-size: 1.4rem; margin-top: 2rem; color: #0A1C3A; }
.blog-article__body.konigo-content h3 { font-size: 1.15rem; margin-top: 1.5rem; color: #0A1C3A; }
.blog-article__body.konigo-content blockquote {
	border-left: 3px solid #D4AF37;
	background: #FEF9E6;
	padding: .9rem 1.25rem;
	color: #4B5563;
	border-radius: 0 .6rem .6rem 0;
}
.blog-article__body.konigo-content img { border-radius: .8rem; }

.blog-article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #E5E7EB;
}

.blog-related { margin-top: 3rem; }
.blog-related__title {
	font-size: 1.3rem;
	font-weight: 700;
	color: #0A1C3A;
	margin-bottom: 1.25rem;
}
