/* Блог: листинг /stati/ и страница статьи.
   Опирается на классы service_* из service-page.css (хлебные крошки, hero, финальный CTA) —
   этот файл подключается вместе с ним и добавляет только то, что специфично для статей.
   Как и там, правила самодостаточны: базовые стили темы завязаны на разметку главной
   и на других шаблонах не срабатывают. */

/* ---------- Панель: поиск + рубрики ---------- */

.blog_toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: 34px;
	padding-bottom: 26px;
	border-bottom: 1px solid rgba(34, 34, 34, .1);
}

.blog_search { position: relative; flex: 0 1 320px; min-width: 240px; }
.blog_search input[type="text"] {
	width: 100%;
	height: 46px;
	padding: 0 46px 0 18px;
	border: 1px solid rgba(34, 34, 34, .16);
	border-radius: 10px;
	background: #fff;
	font-size: 15px;
	color: #222;
	transition: border-color .25s;
}
.blog_search input[type="text"]::placeholder { color: rgba(34, 34, 34, .42); }
.blog_search input[type="text"]:focus { outline: none; border-color: #c9ae98; }
.blog_search_btn {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: rgba(34, 34, 34, .55);
	cursor: pointer;
	transition: background .25s, color .25s;
}
.blog_search_btn:hover { background: #f5f0eb; color: #b28864; }

.blog_cats { display: flex; flex-wrap: wrap; gap: 8px; }
.blog_cat {
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 16px;
	border: 1px solid rgba(34, 34, 34, .14);
	border-radius: 100px;
	font-size: 14px;
	color: #222;
	text-decoration: none;
	transition: border-color .25s, background .25s, color .25s;
}
.blog_cat:hover { border-color: #c9ae98; background: #f5f0eb; }
.blog_cat.is-active { background: #222; border-color: #222; color: #fff; }

/* ---------- Список статей ---------- */

.blog_list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px 22px;
	margin-bottom: 50px;
}

.blog_card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(34, 34, 34, .12);
	border-radius: 16px;
	overflow: hidden;
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.blog_card:hover { border-color: #c9ae98; box-shadow: 0 14px 34px rgba(34, 34, 34, .1); transform: translateY(-2px); }

.blog_card_img {
	position: relative;
	display: block;
	height: 200px;
	overflow: hidden;
	background: #f5f0eb;
	text-decoration: none;
}
.blog_card_img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.blog_card:hover .blog_card_img img { transform: scale(1.05); }
.blog_card_img_empty {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f5f0eb 0%, #e8ddd1 100%);
}

/* Кнопка «Подробнее» поверх картинки — появляется на наведении, как в референсе. */
.blog_card_btn {
	position: absolute;
	left: 18px;
	bottom: 18px;
	padding: 10px 18px;
	background: #fff;
	color: #222;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .25s, transform .25s, background .25s, color .25s;
	pointer-events: none;
}
.blog_card:hover .blog_card_btn { opacity: 1; transform: translateY(0); }
.blog_card:hover .blog_card_btn:hover { background: #c9ae98; color: #fff; }

.blog_card_body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 26px; }
.blog_card_date { font-size: 13px; color: rgba(34, 34, 34, .5); margin-bottom: 10px; }
.blog_card_title {
	display: block;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.32;
	color: #222;
	text-decoration: none;
	margin-bottom: 10px;
	transition: color .25s;
}
.blog_card_title:hover { color: #b28864; }
.blog_card_body p { font-size: 14.5px; line-height: 1.55; color: rgba(34, 34, 34, .68); margin: 0; }

/* ---------- Пагинация ---------- */

.blog_pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 60px; }
.blog_pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid rgba(34, 34, 34, .14);
	border-radius: 10px;
	color: #222;
	font-size: 15px;
	text-decoration: none;
	transition: border-color .25s, background .25s, color .25s;
}
.blog_pagination .page-numbers:hover { border-color: #c9ae98; background: #f5f0eb; }
.blog_pagination .page-numbers.current { background: #222; border-color: #222; color: #fff; }
.blog_pagination .page-numbers.dots { border-color: transparent; }

/* ---------- Пустой список ---------- */

.blog_empty { background: #f5f0eb; border-radius: 20px; padding: 46px 40px; text-align: center; margin-bottom: 60px; }
.blog_empty p { font-size: 16px; color: rgba(34, 34, 34, .75); max-width: 480px; margin: 0 auto 22px; }
.blog_empty .btn_c { display: flex; justify-content: center; }
.blog_empty .btn_m { max-width: none !important; width: auto !important; padding: 18px 30px !important; }

/* ---------- Страница статьи ---------- */

/* Текст статьи прижат влево, а не по центру колонки — так он выравнивается
   с хлебными крошками и заголовком, как на остальных страницах сайта. */
.blog_article { max-width: 760px; margin: 0 0 60px; }
.blog_article_head { margin-bottom: 26px; }
.blog_article_date { font-size: 14px; color: rgba(34, 34, 34, .5); margin-bottom: 12px; }
.blog_single .service_h1 { font-size: 40px !important; }

.blog_article_img { border-radius: 20px; overflow: hidden; margin-bottom: 34px; }
.blog_article_img img { width: 100%; height: auto; display: block; }

/* Текст статьи. Контент приходит из редактора WordPress, поэтому стилизуем теги, а не классы. */
.blog_content { font-size: 17px; line-height: 1.72; color: rgba(34, 34, 34, .88); }
.blog_content > * + * { margin-top: 22px; }
.blog_content p { margin: 0; max-width: none; }
.blog_content h2 { font-size: 28px; font-weight: 600; line-height: 1.25; color: #222; margin-top: 42px; }
.blog_content h3 { font-size: 21px; font-weight: 600; line-height: 1.3; color: #222; margin-top: 32px; }
.blog_content ul, .blog_content ol { padding-left: 22px; margin-left: 0; }
.blog_content ul li { list-style: disc; }
.blog_content ol li { list-style: decimal; }
.blog_content li { margin-bottom: 9px; padding-left: 4px; }
.blog_content li::marker { color: #b28864; }
.blog_content a { color: #b28864; text-decoration: underline; }
.blog_content a:hover { color: #222; }
.blog_content strong { font-weight: 600; color: #222; }
.blog_content img { max-width: 100%; height: auto; border-radius: 14px; display: block; }
.blog_content blockquote {
	border-left: 3px solid #c9ae98;
	background: #f5f0eb;
	border-radius: 0 12px 12px 0;
	padding: 20px 24px;
	font-size: 16px;
}
.blog_content blockquote p { margin: 0; }
/* Отступ сверху: без него таблица прилипает к абзацу, который её вводит. */
.blog_content table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 28px 0 12px; }
.blog_content th, .blog_content td { border: 1px solid rgba(34, 34, 34, .12); padding: 11px 14px; text-align: left; }
.blog_content th { background: #f5f0eb; font-weight: 600; }

.blog_article_cta { margin-bottom: 60px; }
.blog_related { margin-bottom: 20px; }
.blog_related .m_title { margin-bottom: 26px; }
.blog_related .m_title .h2 { font-size: 36px !important; }

@media (max-width: 900px) {
	.blog_list { grid-template-columns: 1fr; gap: 20px; }
	.blog_card_img { height: 220px; }
	/* На тач-устройствах наведения нет — показываем кнопку сразу. */
	.blog_card_btn { opacity: 1; transform: none; }
	.blog_single .service_h1 { font-size: 30px !important; }
	.blog_content { font-size: 16px; }
	.blog_content h2 { font-size: 24px; }
	.blog_content h3 { font-size: 19px; }
	.blog_empty { padding: 34px 24px; }
	.blog_toolbar { flex-direction: column; align-items: stretch; }
	.blog_search { flex: none; width: 100%; }
	.blog_cats { gap: 7px; }
	.blog_cat { height: 34px; padding: 0 13px; font-size: 13.5px; }
}

/* Таблицы в статьях. Обёртка нужна для мобильных: таблица с четырьмя колонками
   шире экрана, и без собственного скролла она растягивала бы всю страницу. */
.blog_table_wrap { overflow-x: auto; margin: 28px 0 12px; -webkit-overflow-scrolling: touch; }
/* Отступ уже задан обёрткой — у вложенной таблицы он был бы двойным. */
.blog_table_wrap table { min-width: 520px; margin: 0; }
.blog_content .blog_table_note {
	font-size: 14px;
	line-height: 1.55;
	color: rgba(34, 34, 34, .6);
	margin: 0 0 32px;
}
.blog_levels { margin-bottom: 32px; }

/* Результаты поиска: страницы услуг компактным списком, статьи — привычной сеткой ниже. */
.search_pages_list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 44px; }
.search_page_card {
	display: block;
	background: #f5f0eb;
	border-radius: 16px;
	padding: 22px 26px;
	text-decoration: none;
	color: #222;
	transition: background .2s ease;
}
.search_page_card:hover { background: #ece3da; }
.search_page_card_head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.search_page_card_title { font-size: 19px; font-weight: 600; color: #222; }
.search_page_card_price { font-size: 15px; font-weight: 600; color: #b28864; white-space: nowrap; }
.search_page_card_desc { margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: rgba(34, 34, 34, .65); }
@media (max-width: 600px) {
	.search_page_card_head { flex-direction: column; gap: 6px; }
}

.search_section_title {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: rgba(34, 34, 34, .5);
	font-weight: 600;
	margin-bottom: 18px;
}
.search_empty_btns { display: flex !important; flex-wrap: wrap; justify-content: flex-start !important; gap: 16px; margin-top: 0 !important; }
.search_empty_btns .btn_c { width: auto !important; }
.search_empty_btns .btn_m { max-width: none !important; width: auto !important; padding: 18px 30px !important; }
.blog_empty .btn_more { background: transparent !important; border: 1px solid #222 !important; color: #222 !important; }
.blog_empty .btn_more:hover { background: #c9ae98 !important; border-color: #c9ae98 !important; color: #fff !important; }

/* Оглавление статьи. Ставится после вводного абзаца, поэтому визуально это врезка,
   а не шапка: иначе статья начинается со списка и читается как справочник. */
.blog_toc {
	background: #f5f0eb;
	border-radius: 16px;
	padding: 24px 28px;
	margin: 28px 0 32px;
}
.blog_toc_title {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 600;
	color: #c9ae98;
	margin-bottom: 14px;
}
/* list-style с !important: правило для списков в style.min.css задано селектором
   с большей специфичностью и возвращает родные номера <ol> — вместе с нашим
   счётчиком получалось «1. 1.». Номер рисуем только через counter в ::before. */
.blog_toc_list { list-style: none !important; counter-reset: toc; margin: 0; padding: 0; }
.blog_toc_list li { counter-increment: toc; position: relative; padding-left: 30px; margin-bottom: 10px; list-style: none !important; }
.blog_toc_list li::marker { content: none; }
.blog_toc_list li:last-child { margin-bottom: 0; }
.blog_toc_list li::before {
	content: counter( toc ) ".";
	position: absolute;
	left: 0;
	top: 0;
	color: #c9ae98;
	font-weight: 600;
	font-size: 15px;
}
.blog_toc_list a {
	color: #222;
	text-decoration: none;
	border-bottom: 1px solid rgba(201, 174, 152, .6);
	font-size: 16px;
	line-height: 1.5;
}
.blog_toc_list a:hover { color: #c9ae98; border-bottom-color: #c9ae98; }
@media (max-width: 700px) {
	.blog_toc { padding: 20px 22px; }
	.blog_toc_list a { font-size: 15px; }
}

/* Якорь не должен уезжать под фиксированную шапку при переходе из оглавления. */
.blog_content h2[id] { scroll-margin-top: 110px; }

.blog_faq { margin-top: 50px; }
