/*
Theme Name:   Astra Child — Блог
Theme URI:    
Description:  Дочерняя тема Astra: полная русификация, удалены все внешние ссылки, подключена Яндекс.Метрика.
Author:       
Template:     astra
Version:      1.0.0
Text Domain:  astra-child
*/

/* ── Типографика под русский текст ───────────────────────────── */
body,
.entry-content {
	font-size: 17px;
	line-height: 1.75;
}

.entry-content p {
	margin-bottom: 1.4em;
}

.entry-content h2 {
	margin-top: 1.8em;
	margin-bottom: 0.7em;
	font-size: 1.5em;
	line-height: 1.3;
}

.entry-content h3 {
	margin-top: 1.5em;
	margin-bottom: 0.6em;
	font-size: 1.22em;
	line-height: 1.35;
}

.entry-content ul,
.entry-content ol {
	margin-bottom: 1.4em;
	padding-left: 1.5em;
}

.entry-content li {
	margin-bottom: 0.5em;
}

/* Читаемая ширина колонки — 65–75 символов */
.ast-separate-container .ast-article-single,
.ast-narrow-container .ast-article-single {
	max-width: 48rem;
	margin-left: auto;
	margin-right: auto;
}

/* ── Таблицы (сметы, расходы материалов) ─────────────────────── */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.6em;
	font-size: 0.95em;
}

.entry-content table th,
.entry-content table td {
	border: 1px solid #e2e5e9;
	padding: 0.6em 0.8em;
	text-align: left;
}

.entry-content table th {
	background: #f5f7f9;
	font-weight: 600;
}

/* Горизонтальный скролл для широких таблиц на телефоне */
.entry-content .table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1.6em;
}

.entry-content .table-scroll table {
	margin-bottom: 0;
}

/* ── Врезки: совет / предупреждение ──────────────────────────── */
.callout {
	border-left: 4px solid #2d7ff9;
	background: #f4f8ff;
	padding: 1em 1.2em;
	margin: 1.6em 0;
	border-radius: 0 4px 4px 0;
}

.callout--warning {
	border-left-color: #e8a33d;
	background: #fff8ec;
}

.callout p:last-child {
	margin-bottom: 0;
}

/* ── Блоки кода и ASCII-схемы ────────────────────────────────── */
.entry-content .code-block {
	background: #f5f7f9;
	border: 1px solid #e2e5e9;
	border-radius: 4px;
	padding: 1em 1.2em;
	margin: 1.6em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.entry-content .code-block code {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.88em;
	line-height: 1.6;
	white-space: pre;
	background: none;
	padding: 0;
	color: #1f2937;
}

/* ── Блок «Читайте также» ─────────────────────────────────────── */
.entry-content .related-posts {
	margin: 2.5em 0 1em;
	padding: 1.4em 1.6em;
	background: #f5f7f9;
	border-left: 4px solid #2d7ff9;
	border-radius: 0 4px 4px 0;
}

.entry-content .related-posts__title {
	margin: 0 0 0.7em;
	font-size: 1.1em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #4b5563;
}

.entry-content .related-posts ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.entry-content .related-posts li {
	margin-bottom: 0.5em;
	padding-left: 1.1em;
	position: relative;
	line-height: 1.5;
}

.entry-content .related-posts li:last-child {
	margin-bottom: 0;
}

.entry-content .related-posts li::before {
	content: "→";
	position: absolute;
	left: 0;
	color: #2d7ff9;
}

.entry-content .related-posts a {
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.entry-content .related-posts a:hover {
	border-bottom-color: currentColor;
}

/* ── Внутренние ссылки в тексте ──────────────────────────────── */
.entry-content p > a[href^="/"] {
	text-decoration: none;
	border-bottom: 1px solid rgba(45, 127, 249, 0.4);
}

.entry-content p > a[href^="/"]:hover {
	border-bottom-color: currentColor;
}

@media (max-width: 768px) {
	.entry-content .related-posts {
		padding: 1.1em 1.2em;
		margin: 2em 0 1em;
	}
}

/* ── Подписи к картинкам ─────────────────────────────────────── */
.wp-caption-text,
.wp-element-caption {
	font-size: 0.87em;
	color: #6b7280;
	text-align: center;
	margin-top: 0.5em;
}

/* ── Подвал без внешних ссылок ───────────────────────────────── */
.site-footer .site-info {
	font-size: 0.9em;
}

/* ── Мобильные ───────────────────────────────────────────────── */
@media (max-width: 768px) {
	body,
	.entry-content {
		font-size: 16px;
	}

	.entry-content h2 {
		font-size: 1.35em;
	}
}
