/* =========================================================
   Risuy Smelo — основной файл стилей
   Дизайн: строгий, чёрно-белый, стандартные синие ссылки.
   Акцент — только на фотографиях в статьях. Mobile-first.
   ========================================================= */

/* ---------- 1. Reset / base ---------- */

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	/* Страховка от горизонтальной прокрутки — если какой-то элемент
	   контента (например, старая подпись к картинке [caption] с жёстко
	   заданной шириной в пикселях) всё же вылезет за края экрана, страницу
	   не будет "расползаться" вбок и утаскивать весь остальной контент. */
	overflow-x: hidden;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: #1a1a1a;
	background: #ffffff;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

figure {
	margin: 0 0 1.5em;
}

figcaption {
	font-size: 0.85em;
	color: #595959;
	margin-top: 0.4em;
}

/* Стандартные синие ссылки — намеренно не переопределяем системный смысл цвета. */
a {
	color: #0645ad;
	text-decoration: underline;
	text-underline-offset: 2px;
}

a:visited {
	color: #551a8b;
}

a:hover,
a:focus {
	color: #043a7a;
}

a:focus-visible {
	outline: 2px solid #0645ad;
	outline-offset: 2px;
}

/* Ссылки внутри карточек и заголовков — без подчёркивания по умолчанию, чтобы не спорить с чёрным цветом заголовка. */
.th-card__title a,
.th-article__title,
.th-footer-menu a {
	text-decoration: none;
}

.th-card__title a:hover {
	text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
	color: #111111;
	font-weight: 700;
	line-height: 1.25;
	margin: 1.4em 0 0.6em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p {
	margin: 0 0 1.2em;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.th-skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: #111;
	color: #fff;
	padding: 10px 16px;
	z-index: 1000;
	text-decoration: none;
}

.th-skip-link:focus {
	top: 0;
	position: fixed;
}

/* ---------- 2. Layout helpers ---------- */

.th-container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
}

.th-main {
	padding-top: 24px;
	padding-bottom: 48px;
}

/* ---------- 4. Breadcrumbs ---------- */

.th-breadcrumbs {
	font-size: 0.85rem;
	color: #595959;
	margin: 16px 0;
}

.th-breadcrumbs a {
	color: #595959;
}

.th-breadcrumbs__current {
	color: #111111;
}

/* ---------- 5. Card grid (архивы, главная, похожие) ---------- */

.th-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin: 20px 0;
}

.th-card {
	border-bottom: 1px solid #eaeaea;
	padding-bottom: 20px;
}

.th-card__thumb {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f2f2f2;
	border-radius: 4px;
	margin-bottom: 12px;
}

.th-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.th-card__thumb-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: #f2f2f2;
}

.th-card__title {
	font-size: 1.15rem;
	margin: 0 0 6px;
}

.th-card__title a {
	color: #111111;
}

.th-card__excerpt {
	color: #3a3a3a;
	margin: 8px 0 0;
	font-size: 0.95rem;
}

/* ---------- 5.1 Квадратные карточки-анонсы (главная) ---------- */

.th-card-grid--square {
	grid-template-columns: repeat(2, 1fr);
	/* На мобильных — минимальный отступ 5px. На десктопе увеличивается
	   до 40px (тот же, что между сайдбаром и колонкой контента) — см.
	   переопределение в блоке @media (min-width: 960px) ниже. */
	gap: 5px;
}

.th-card--square {
	border-bottom: none;
	padding-bottom: 0;
}

.th-card__thumb--overlay {
	position: relative;
	aspect-ratio: 1 / 1;
}

/* Компактная почти-чёрная плашка только под текстом заголовка — без
   затемнения всей картинки (это и есть исходный смысл "плашки", про
   которую спрашивали изначально; полноэкранный градиент оказался
   слишком тёмным и убивал цвета самих работ).

   Высота плашки фиксированная — под 3 строки текста — и одинаковая
   у всех карточек, независимо от длины названия. Короткие названия
   прижимаются к верху плашки (это поведение по умолчанию для текста
   в блоке, ничего специально включать не нужно). Если название всё же
   длиннее 3 строк — лишнее аккуратно обрезается многоточием.

   На мобильных карточки узкие (2 колонки на маленьком экране), поэтому
   шрифт и высота плашки здесь меньше, чем на десктопе — иначе длинные
   названия не влезали и обрезались. Десктопные значения побольше заданы
   отдельно в @media (min-width: 960px) ниже. */
.th-card__title--overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 8px;
	height: 38px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	background: rgba(10, 10, 10, 0.88);
	color: #ffffff;
	font-size: 0.5rem;
	line-height: 1.3;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	z-index: 1;
}

.th-card__title--overlay a {
	color: #ffffff;
}

/* Опциональный бейдж категории поверх картинки (см. th_post_card_square()). */
.th-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	background: rgba(255, 255, 255, 0.9);
	color: #111111;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 4px 10px;
	border-radius: 999px;
}

.th-card__body--compact {
	padding-top: 10px;
}

/* ---------- 6. Post meta ---------- */

.th-post-meta {
	font-size: 0.85rem;
	color: #666666;
	margin: 4px 0 12px;
}

.th-post-meta__sep {
	margin: 0 6px;
}

.th-post-meta__category {
	color: #666666;
	text-decoration: underline;
}

.th-post-meta__views {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	vertical-align: middle;
}

.th-post-meta__icon {
	flex-shrink: 0;
}

/* ---------- 7. Article ---------- */

.th-article__header {
	margin-bottom: 16px;
}

.th-article__title {
	font-size: 1.8rem;
	margin: 0 0 8px;
}

.th-article__thumb {
	margin: 0 0 24px;
	border-radius: 4px;
	overflow: hidden;
}

/* Обычная страница (page.php) — та же логика, что и у статьи выше:
   без этого правила заголовок наследует общий большой верхний отступ
   у всех h1–h6 (1.4em), тогда как сразу под хлебными крошками он не нужен. */
.th-page__header {
	margin-bottom: 16px;
}

.th-page__title {
	font-size: 1.8rem;
	margin: 0 0 8px;
}

/* Заголовки страниц архива (/blog/, категории, поиск) — та же логика:
   без этого правила наследуют общий большой верхний отступ у всех h1–h6. */
.th-archive-header {
	margin-bottom: 24px;
}

.th-archive-header__title {
	font-size: 1.8rem;
	margin: 0 0 8px;
}

.th-article__content,
.th-page__content {
	max-width: 760px;
}

.th-article__content h2,
.th-article__content h3,
.th-page__content h2,
.th-page__content h3 {
	scroll-margin-top: 20px; /* небольшой зазор сверху при переходе по оглавлению */
}

.th-article__content img,
.th-page__content img {
	border-radius: 4px;
	margin: 1.2em 0;
}

/* Подписи к картинкам (шорткод [caption] классического редактора) —
   WordPress прописывает им ширину в пикселях прямо инлайн-стилем
   (style="width: 796px"), которая перебивает адаптивность img и ломает
   мобильную вёрстку (страницу "расползало" вбок). !important здесь
   оправдан — иначе инлайн-стиль от WordPress не переопределить. */
.th-article__content .wp-caption,
.th-page__content .wp-caption {
	max-width: 100% !important;
	width: auto !important;
	margin: 1.2em 0;
}

.th-article__content .wp-caption img,
.th-page__content .wp-caption img {
	max-width: 100%;
	height: auto;
	margin: 0;
	display: block;
}

.th-article__content .wp-caption-text,
.th-page__content .wp-caption-text {
	margin: 8px 0 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: #666666;
	text-align: center;
}

/* На случай пары картинок рядом (alignleft/alignright) — на мобильных
   всегда в один столбец на всю ширину, чтобы ничего не вылезало за края. */
@media (max-width: 599px) {
	.th-article__content .wp-caption.alignleft,
	.th-article__content .wp-caption.alignright,
	.th-page__content .wp-caption.alignleft,
	.th-page__content .wp-caption.alignright {
		float: none;
		margin-left: 0;
		margin-right: 0;
	}
}

.th-article__content blockquote,
.th-page__content blockquote {
	position: relative;
	margin: 1.6em 0;
	padding: 20px 24px 20px 60px;
	background: #f7f7f7;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	color: #333333;
}

.th-article__content blockquote::before,
.th-page__content blockquote::before {
	content: "\201C"; /* открывающая кавычка-ёлочка */
	position: absolute;
	left: 18px;
	top: 4px;
	font-size: 2.6rem;
	line-height: 1;
	font-weight: 700;
	color: #b3b3b3;
	font-style: normal;
}

.th-article__content blockquote p,
.th-page__content blockquote p {
	margin: 0 0 0.6em;
}

.th-article__content blockquote p:last-child,
.th-page__content blockquote p:last-child {
	margin-bottom: 0;
}

.th-article__content ul,
.th-article__content ol,
.th-page__content ul,
.th-page__content ol {
	padding-left: 1.3em;
}

.th-article__content table,
.th-page__content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.4em 0;
	font-size: 0.95rem;
}

.th-article__content table th,
.th-article__content table td,
.th-page__content table th,
.th-page__content table td {
	border: 1px solid #e2e2e2;
	padding: 8px 10px;
	text-align: left;
}

/* ---------- 7.1 Карта сайта (шорткод [risuy_sitemap]) ---------- */

.th-sitemap__section {
	margin: 0 0 2em;
}

.th-sitemap__heading {
	margin-bottom: 0.6em;
}

.th-sitemap__list--terms > li {
	margin-bottom: 1.2em;
}

.th-sitemap__list--nested {
	margin-top: 6px;
}

.th-article__tags {
	margin-top: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.th-tag {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid #d5d5d5;
	border-radius: 20px;
	font-size: 0.8rem;
	color: #333333;
	text-decoration: none;
}

/* ---------- 8. TOC (автоматическое содержание) ---------- */

.th-toc {
	background: #f7f7f7;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 18px 20px;
	margin: 0 0 28px;
	max-width: 760px;
}

.th-toc__title {
	margin: 0 0 10px;
	font-weight: 700;
	color: #111111;
	text-transform: uppercase;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
}

.th-toc__list {
	margin: 0;
	padding-left: 1.2em;
}

.th-toc__list > li {
	margin-bottom: 6px;
}

.th-toc__sublist {
	margin: 6px 0 6px 0.2em;
	padding-left: 1.1em;
	list-style-type: circle;
}

.th-toc a {
	text-decoration: none;
}

.th-toc a:hover {
	text-decoration: underline;
}

/* ---------- 9. Related posts ---------- */

.th-related {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid #eaeaea;
}

.th-related__title {
	margin-top: 0;
}

/* ---------- 10. Sidebar ---------- */

/* Единый сайдбар — используется на всех типах страниц сайта, но только
   на десктопе (слева, рядом с контентом). На мобильных полностью скрыт:
   там его роль играет отдельная компактная мобильная шапка (лого + телефон,
   см. .th-mobile-header ниже) — сам сайдбар с QR-кодом и подробными
   контактами на телефоне попросту не помещается и не нужен. Показывается
   он обратно только в блоке @media (min-width: 960px). */
.th-main--sidebar {
	display: block;
}

.th-sidebar--global {
	display: none;
}

.th-sidebar .widget {
	margin-bottom: 28px;
}

/* Сброс верхнего отступа у самого первого элемента в сайдбаре (виджет
   картинки/текста может по умолчанию иметь свой отступ сверху — из-за
   этого сайдбар визуально "съезжал" вниз относительно колонки записей). */
.th-sidebar .widget:first-child {
	margin-top: 0;
}

.th-sidebar .widget:first-child > *:first-child {
	margin-top: 0;
}

/* Что бы ни было первым элементом колонки контента (хлебные крошки,
   заголовок архива или сразу сетка карточек) — у него есть встроенный
   верхний отступ, из-за которого статьи проваливались ниже сайдбара.
   Убираем этот отступ только у самого первого элемента. */
.th-main__primary > *:first-child {
	margin-top: 0;
}

.widget-title {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 1px solid #e2e2e2;
	padding-bottom: 8px;
}

/* ---------- 10.1 Мобильная шапка (лого + текст + бургер-меню) ---------- */

/* Видна только на мобильных — см. display:none в @media (min-width: 960px). */
.th-mobile-header {
	border-bottom: 1px solid #e2e2e2;
	background: #ffffff;
	/* Прилипает к верху экрана при прокрутке. */
	position: sticky;
	top: 0;
	z-index: 500;
}

/* На странице статьи сверху уже есть тонкая полоска прогресса чтения
   (.th-reading-progress, 3px, z-index 600 — выше шапки), поэтому шапку
   сдвигаем на её высоту, чтобы не перекрывать друг друга. */
body.single-post .th-mobile-header {
	top: 3px;
}

/* Учитываем панель администратора WordPress при просмотре залогиненным
   администратором с телефона — у неё другая высота на мобильных (46px),
   чем на десктопе (32px), поэтому логика привязана к ширине экрана,
   а не просто к body.admin-bar. */
@media (max-width: 782px) {
	body.admin-bar .th-mobile-header {
		top: 46px;
	}

	body.admin-bar.single-post .th-mobile-header {
		top: 49px;
	}
}

@media (min-width: 783px) and (max-width: 959px) {
	body.admin-bar .th-mobile-header {
		top: 32px;
	}

	body.admin-bar.single-post .th-mobile-header {
		top: 35px;
	}
}

.th-mobile-header__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	/* Высота шапки увеличена примерно на треть (было 12px) — с телефоном
	   в одну строку читалось плохо, с текстом-подписью просторнее лучше. */
	padding-top: 16px;
	padding-bottom: 16px;
}

.th-mobile-header__logo {
	display: block;
	flex: 0 0 auto;
	min-width: 0;
}

.th-mobile-header__logo img {
	display: block;
	/* Было 44px — увеличено на ~30%. */
	max-height: 58px;
	width: auto;
}

.th-mobile-header__site-title {
	display: block;
	font-size: 1.1rem;
	font-weight: 800;
	color: #111111;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Текст между лого и бургером — заполняет пустое место, редактируется
   в Настройщике (Внешний вид → Настроить → Мобильная шапка). */
.th-mobile-header__tagline {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0 4px;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.3;
	color: #333333;
	text-align: center;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* Кнопка-бургер */
.th-header__menu-toggle {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	border-radius: 0;
	padding: 0;
	margin: 0;
	cursor: pointer;
	/* Сброс нативного вида кнопки — некоторые мобильные браузеры (например,
	   Samsung Internet) иначе рисуют свою серую "таблетку" поверх стилей. */
	-webkit-appearance: none;
	appearance: none;
}

.th-header__burger,
.th-header__burger::before,
.th-header__burger::after {
	display: block;
	width: 22px;
	height: 2px;
	background: #111111;
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.th-header__burger {
	position: relative;
}

.th-header__burger::before,
.th-header__burger::after {
	content: "";
	position: absolute;
	left: 0;
}

.th-header__burger::before {
	top: -7px;
}

.th-header__burger::after {
	top: 7px;
}

/* Превращаем бургер в крестик, когда меню открыто. */
.th-header__menu-toggle[aria-expanded="true"] .th-header__burger {
	background: transparent;
}

.th-header__menu-toggle[aria-expanded="true"] .th-header__burger::before {
	top: 0;
	transform: rotate(45deg);
}

.th-header__menu-toggle[aria-expanded="true"] .th-header__burger::after {
	top: 0;
	transform: rotate(-45deg);
}

/* Выпадающее мобильное меню — скрыто по умолчанию, JS (assets/js/main.js)
   добавляет класс is-open при клике на бургер. Пункты меню и их порядок
   настраиваются в Внешний вид → Меню → назначить локации "Главное меню". */
.th-header__nav {
	display: none;
	background: #ffffff;
	border-top: 1px solid #e2e2e2;
	max-height: 70vh;
	overflow-y: auto;
}

.th-header__nav.is-open {
	display: block;
}

.th-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}

.th-menu li {
	border-bottom: 1px solid #f0f0f0;
}

.th-menu a {
	display: block;
	padding: 14px 20px;
	color: #111111;
	font-weight: 600;
	text-decoration: none;
}

.th-menu ul {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	background: #fafafa;
}

.th-menu ul.is-open {
	display: block;
}

.th-menu ul a {
	padding-left: 36px;
	font-weight: 500;
}

/* ---------- 11. Comments ---------- */

.th-comments-area {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid #eaeaea;
}

.th-comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.th-comment-form input[type="text"],
.th-comment-form input[type="email"],
.th-comment-form input[type="url"],
.th-comment-form textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #d5d5d5;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.95rem;
	margin-bottom: 12px;
}

.th-comment-form button[type="submit"] {
	padding: 10px 20px;
	border: 1px solid #111;
	background: #111;
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
}

/* ---------- 12. Search form ---------- */

.th-search-form {
	display: flex;
	gap: 8px;
	max-width: 460px;
	margin: 16px 0;
}

.th-search-form input[type="search"] {
	flex: 1 1 auto;
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 4px;
}

.th-search-form button {
	padding: 10px 16px;
	border: 1px solid #111;
	background: #111;
	color: #fff;
	border-radius: 4px;
	cursor: pointer;
}

/* ---------- 13. Footer ---------- */

.th-footer {
	margin-top: 48px;
	border-top: 1px solid #e2e2e2;
	background: #fafafa;
}

.th-footer__widgets {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	padding-top: 32px;
	padding-bottom: 32px;
}

.th-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 16px;
	padding-bottom: 16px;
	border-top: 1px solid #e2e2e2;
	font-size: 0.85rem;
	color: #666666;
}

.th-footer-menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0;
	padding: 0;
}

.th-footer-menu a {
	color: #444444;
}

.th-footer__copy {
	margin: 0;
}

/* ---------- 13a. Back to top ---------- */

.th-back-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid #d5d5d5;
	background: #111111;
	color: #ffffff;
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	z-index: 500;
}

.th-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.th-back-to-top:hover,
.th-back-to-top:focus-visible {
	background: #333333;
}

@media (prefers-reduced-motion: reduce) {
	.th-back-to-top {
		transition: opacity 0.01ms, visibility 0.01ms;
	}
}

/* ---------- 13b. Reading progress ---------- */

.th-reading-progress {
	display: none;
}

body.single-post .th-reading-progress {
	display: block;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: transparent;
	z-index: 600;
}

.th-reading-progress__bar {
	height: 100%;
	width: 0%;
	background: #111111;
}

/* Сдвигаем полосу ниже админ-бара WordPress, чтобы её не перекрывало у залогиненных пользователей. */
body.admin-bar .th-reading-progress {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .th-reading-progress {
		top: 46px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.th-reading-progress__bar {
		transition: width 0.1s linear;
	}
}

/* ---------- 14. Tour search page ---------- */

.th-tour-search__widget {
	max-width: 100%;
}

/* ---------- 15. Responsive: планшеты и десктоп ---------- */

@media (min-width: 700px) {
	.th-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.th-footer__widgets {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 960px) {
	.th-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Единый layout: сайдбар слева, контент справа — на всех типах страниц. */
	.th-main--sidebar {
		display: grid;
		grid-template-columns: 196px minmax(0, 1fr);
		gap: 40px;
		align-items: start;
	}

	.th-sidebar--global {
		display: block;
		grid-column: 1;
		margin-top: 0;
		position: sticky;
		top: 24px;
	}

	body.admin-bar .th-sidebar--global {
		top: 56px;
	}

	.th-main--sidebar .th-main__primary {
		grid-column: 2;
		min-width: 0;
	}

	/* Мобильная шапка (лого + телефон) — только для мобильных, на десктопе
	   её роль полностью выполняет сайдбар. */
	.th-mobile-header {
		display: none;
	}

	/* Карточки-анонсы на главной всегда в 2 колонки, независимо от общей
	   сетки .th-card-grid (которая на десктопе уходит на 3 колонки).
	   Отступ на десктопе — 40px, как между сайдбаром и контентом. */
	.th-card-grid--square {
		grid-template-columns: repeat(2, 1fr);
		gap: 40px;
	}

	/* На десктопе карточки гораздо шире мобильных — тот же текст спокойно
	   влезает, поэтому шрифт и плашка здесь крупнее мобильных значений
	   (заданных по умолчанию выше, в разделе 5.1). */
	.th-card__title--overlay {
		padding: 14px;
		height: 75px;
		font-size: 1.05rem;
		-webkit-line-clamp: 2;
	}
}

@media (min-width: 1200px) {
	h1 { font-size: 2.3rem; }
}

/* ---------- 16. Печать ---------- */

@media print {
	#wpadminbar,
	.th-mobile-header,
	.th-footer,
	.th-sidebar,
	.th-back-to-top,
	.th-reading-progress,
	.th-breadcrumbs,
	.th-related,
	.th-comments-area,
	.th-article__tags,
	.th-post-meta__reading-time,
	.th-post-meta__views {
		display: none !important;
	}

	.th-main--sidebar {
		display: block !important;
	}

	.th-article__content,
	.th-page__content,
	.th-main__primary {
		max-width: 100% !important;
	}

	body {
		font-size: 12pt;
		color: #000;
		background: #fff;
	}

	a {
		color: #000;
	}

	/* Показываем полный адрес у внешних ссылок — на бумаге кликнуть нельзя. */
	.th-article__content a[href^="http"]:not([href*="risui-smelo-masterskaya.ru"])::after,
	.th-page__content a[href^="http"]:not([href*="risui-smelo-masterskaya.ru"])::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: #555;
	}

	.th-article__thumb img {
		max-height: 300px;
		width: auto;
	}
}
