/* =============================================================
   Профессиональная вёрстка статей — single-post.css
   Область действия: только одиночные посты (.single)
   ============================================================= */


/* ── 1. ЗАГОЛОВОК СТАТЬИ (вне .entry-content) ─────────────── */

.single .entry-header {
	margin-bottom: 36px;
}

.single .entry-title {
	font-size: 34px;
	font-weight: 700;
	line-height: 1.28;
	color: #11172D;
	margin-bottom: 16px;
	text-align: left !important;
}

@media (max-width: 767.98px) {
	.single .entry-title {
		font-size: 26px;
		line-height: 1.32;
	}
}

/* Мета: дата, автор, категории */
.single .entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 13px;
	color: #8a8fa8;
	margin-bottom: 8px;
}

.single .entry-meta a {
	color: #005CA5 !important;
	font-weight: 500 !important;
	text-decoration: none !important;
}

.single .entry-meta a:hover {
	text-decoration: underline !important;
}

/* Миниатюра статьи */
.single .ast-single-post-thumbnail {
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 36px;
}

.single .ast-single-post-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}


/* ── 2. СБРОС ГЛОБАЛЬНЫХ СТИЛЕЙ ВНУТРИ КОНТЕНТА ───────────── */

/* Убираем центрирование заголовков (из wp-custom-css.css) */
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4,
.single .entry-content h5,
.single .entry-content h6 {
	text-align: left !important;
}

/* Убираем красные декоративные черты под заголовками */
.single .entry-content h2::after,
.single .entry-content h3::after,
.single .entry-content h4::after,
.single .entry-content h5::after,
.single .entry-content h6::after {
	content: none !important;
	border: none !important;
	display: none !important;
}

/* Сбрасываем жирность ссылок внутри текста */
.single .entry-content a {
	font-weight: 500 !important;
}


/* ── 3. БАЗОВАЯ ТИПОГРАФИКА ────────────────────────────────── */

.single .entry-content {
	font-size: 17px;
	line-height: 1.78;
	color: #2d2f3b;
	font-family: 'Manrope', sans-serif;
}

/* Первый абзац — лид */
.single .entry-content > p:first-of-type {
	font-size: 19px;
	line-height: 1.7;
	color: #11172D;
	font-weight: 500;
}

/* Отступы между абзацами */
.single .entry-content p {
	margin-top: 0;
	margin-bottom: 1.35em;
}


/* ── 4. ЗАГОЛОВКИ ВНУТРИ КОНТЕНТА ──────────────────────────── */

.single .entry-content h2 {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.3;
	color: #11172D;
	margin-top: 2.4em;
	margin-bottom: 0.75em;
	padding-left: 16px;
	border-left: 4px solid #005CA5;
}

.single .entry-content h3 {
	font-size: 21px;
	font-weight: 700;
	line-height: 1.35;
	color: #11172D;
	margin-top: 2em;
	margin-bottom: 0.65em;
	padding-bottom: 8px;
	border-bottom: 2px solid #e8ecf2;
}

.single .entry-content h4 {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	color: #11172D;
	margin-top: 1.6em;
	margin-bottom: 0.5em;
}

.single .entry-content h5,
.single .entry-content h6 {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	color: #5D6584;
	margin-top: 1.4em;
	margin-bottom: 0.4em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Заголовок сразу после другого заголовка — меньший отступ сверху */
.single .entry-content h2 + h3,
.single .entry-content h3 + h4 {
	margin-top: 1em;
}


/* ── 5. ССЫЛКИ ──────────────────────────────────────────────── */

.single .entry-content a {
	color: #005CA5;
	text-decoration: underline;
	text-decoration-color: rgba(0, 92, 165, 0.3);
	text-underline-offset: 3px;
	transition: color 0.2s, text-decoration-color 0.2s;
}

.single .entry-content a:hover {
	color: #003f7a;
	text-decoration-color: #003f7a;
}


/* ── 6. СПИСКИ ──────────────────────────────────────────────── */

.single .entry-content ul,
.single .entry-content ol {
	margin: 0 0 1.4em 0 !important;
	padding-left: 0 !important;
	list-style: none !important;
}

.single .entry-content ul li,
.single .entry-content ol li {
	position: relative;
	padding-left: 26px;
	margin-bottom: 0.5em;
	line-height: 1.7;
	list-style: none !important;
}

/* Маркер для ul */
.single .entry-content ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #005CA5;
	flex-shrink: 0;
}

/* Счётчик для ol */
.single .entry-content ol {
	counter-reset: article-ol;
}

.single .entry-content ol li {
	counter-increment: article-ol;
}

.single .entry-content ol li::before {
	content: counter(article-ol) '.';
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	font-size: 14px;
	color: #005CA5;
	line-height: 1.85;
}

/* Вложенные списки */
.single .entry-content ul ul,
.single .entry-content ol ol,
.single .entry-content ul ol,
.single .entry-content ol ul {
	margin-top: 0.4em !important;
	margin-bottom: 0.2em !important;
}

.single .entry-content ul ul li::before {
	width: 6px;
	height: 6px;
	background: transparent;
	border: 2px solid #005CA5;
}


/* ── 7. ЦИТАТА (BLOCKQUOTE) ─────────────────────────────────── */

.single .entry-content blockquote {
	margin: 2em 0;
	padding: 22px 26px;
	background: #f0f6fb;
	border-left: 4px solid #005CA5;
	border-radius: 0 10px 10px 0;
}

.single .entry-content blockquote p {
	font-size: 17px;
	line-height: 1.7;
	color: #11172D;
	font-style: italic;
	margin-bottom: 0;
}

.single .entry-content blockquote cite,
.single .entry-content blockquote footer {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	color: #5D6584;
	font-style: normal;
	font-weight: 600;
}


/* ── 8. ИЗОБРАЖЕНИЯ ─────────────────────────────────────────── */

.single .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.single .entry-content figure {
	margin: 1.8em 0;
}

.single .entry-content figcaption {
	text-align: center;
	font-size: 13px;
	color: #8a8fa8;
	margin-top: 8px;
	font-style: italic;
	line-height: 1.5;
}

/* Изображения с выравниванием */
.single .entry-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.single .entry-content .alignleft {
	float: left;
	margin-right: 24px;
	margin-bottom: 12px;
}

.single .entry-content .alignright {
	float: right;
	margin-left: 24px;
	margin-bottom: 12px;
}


/* ── 9. ТАБЛИЦЫ ─────────────────────────────────────────────── */

.single .entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.8em 0;
	font-size: 15px;
	color: #2d2f3b;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.single .entry-content thead th {
	background: #005CA5;
	color: #fff !important;
	text-align: left;
	padding: 12px 16px !important;
	font-weight: 600;
	font-size: 14px;
	border-bottom: none !important;
	white-space: nowrap;
}

.single .entry-content tbody tr:nth-child(even) td {
	background: #f5f8fc !important;
}

.single .entry-content tbody tr:nth-child(odd) td {
	background: #fff !important;
}

.single .entry-content tbody td {
	padding: 10px 16px !important;
	border-bottom: 1px solid #e8ecf2 !important;
	vertical-align: top;
	background: inherit;
}

.single .entry-content tbody tr:last-child td {
	border-bottom: none !important;
}

/* Таблицы на мобильном — горизонтальный скролл */
.single .entry-content .wp-block-table,
.single .entry-content .tablepress-table-description + table,
.single .entry-content > table {
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}


/* ── 10. КОД ────────────────────────────────────────────────── */

.single .entry-content code {
	font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
	font-size: 14px;
	background: #f0f3f8;
	color: #c0392b;
	padding: 2px 7px;
	border-radius: 4px;
}

.single .entry-content pre {
	background: #1e2233;
	color: #e8ecf2;
	padding: 20px 24px;
	border-radius: 8px;
	overflow-x: auto;
	font-size: 14px;
	line-height: 1.65;
	margin: 1.5em 0;
}

.single .entry-content pre code {
	background: none;
	color: inherit;
	padding: 0;
	font-size: inherit;
}


/* ── 11. ГОРИЗОНТАЛЬНАЯ ЧЕРТА ───────────────────────────────── */

.single .entry-content hr {
	border: none;
	border-top: 2px solid #e8ecf2;
	margin: 2.5em 0;
}


/* ── 12. ВИДЕО-ЭМБЕДЫ (YouTube, Vimeo и др.) ────────────────── */

/* Обёртка Gutenberg embed-блока */
.single .entry-content .wp-block-embed {
	margin: 2em 0;
}

/* Контейнер с соотношением сторон 16:9 */
.single .entry-content .wp-block-embed .wp-block-embed__wrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
	border-radius: 10px;
	background: #0a0a0a;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.single .entry-content .wp-block-embed .wp-block-embed__wrapper iframe,
.single .entry-content .wp-block-embed .wp-block-embed__wrapper video,
.single .entry-content .wp-block-embed .wp-block-embed__wrapper object,
.single .entry-content .wp-block-embed .wp-block-embed__wrapper embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 10px;
}

/* Классические YouTube-эмбеды вне Gutenberg (через oEmbed/ручную вставку) */
.single .entry-content iframe[src*="youtube.com"],
.single .entry-content iframe[src*="youtu.be"],
.single .entry-content iframe[src*="youtube-nocookie.com"],
.single .entry-content iframe[src*="vimeo.com"],
.single .entry-content iframe[src*="rutube.ru"],
.single .entry-content iframe[src*="vk.com/video"] {
	max-width: 100%;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: none;
	border-radius: 10px;
	display: block;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Подпись под видео */
.single .entry-content .wp-block-embed figcaption {
	text-align: center;
	font-size: 13px;
	color: #8a8fa8;
	margin-top: 10px;
	font-style: italic;
}

/* Gutenberg aspect-ratio класс — переопределяем вложенный padding */
.single .entry-content .wp-embed-aspect-16-9 .wp-block-embed__wrapper {
	padding-bottom: 56.25%;
}

.single .entry-content .wp-embed-aspect-4-3 .wp-block-embed__wrapper {
	padding-bottom: 75%;
}

.single .entry-content .wp-embed-aspect-21-9 .wp-block-embed__wrapper {
	padding-bottom: 42.85%;
}


/* ── 12b. GENESIS BLOCKS CTA-КНОПКИ ─────────────────────────── */

.single .entry-content .gb-block-button-interior {
	font-family: 'Manrope', sans-serif;
	font-weight: 700;
	font-size: 16px;
	padding: 14px 32px;
	border-radius: 8px;
	display: inline-block;
	transition: all 0.3s;
}

.single .entry-content .gb-button-link {
	text-decoration: none !important;
}


/* ── 12c. GUTENBERG БЛОКИ ────────────────────────────────────── */

/* Pullquote */
.single .entry-content .wp-block-pullquote {
	border-top: 4px solid #005CA5;
	border-bottom: 4px solid #005CA5;
	padding: 1.4em 2em;
	text-align: center;
	margin: 2em 0;
}

.single .entry-content .wp-block-pullquote blockquote p {
	font-size: 21px;
	font-style: italic;
	color: #11172D;
	font-weight: 600;
}

/* Info / Warning / Tip (классы плагинов) */
.single .entry-content .wp-block-info,
.single .entry-content .notice,
.single .entry-content .info-box {
	background: #f0f6fb;
	border-left: 4px solid #005CA5;
	border-radius: 0 8px 8px 0;
	padding: 16px 20px;
	margin: 1.5em 0;
	font-size: 15px;
}

/* Separator Block */
.single .entry-content .wp-block-separator {
	border: none;
	border-top: 2px solid #e8ecf2;
	margin: 2.5em auto;
	max-width: 240px;
}

/* Cover block */
.single .entry-content .wp-block-cover {
	border-radius: 10px;
	overflow: hidden;
}

/* Columns block */
.single .entry-content .wp-block-columns {
	gap: 24px;
}


/* ── 13. ЧИТАЕМОСТЬ: МАКСИМАЛЬНАЯ ШИРИНА НА ШИРОКИХ ЭКРАНАХ ── */

/* Если статья без сайдбара — ограничиваем ширину для удобочитаемости */
.ast-page-builder-template .single .entry-content,
.no-sidebar .single .entry-content {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}


/* ── 14. FOOTER СТАТЬИ ──────────────────────────────────────── */

.single .entry-footer {
	margin-top: 32px;
	padding-top: 20px;
	border-top: 2px solid #e8ecf2;
	font-size: 14px;
	color: #8a8fa8;
}

.single .entry-footer .cat-links a,
.single .entry-footer .tags-links a {
	color: #005CA5 !important;
	font-weight: 500 !important;
	text-decoration: none !important;
	background: #f0f6fb;
	padding: 3px 10px;
	border-radius: 20px;
	display: inline-block;
	margin: 2px 3px;
	font-size: 13px;
	transition: background 0.2s;
}

.single .entry-footer .cat-links a:hover,
.single .entry-footer .tags-links a:hover {
	background: #ddeaf8;
}


/* ── 15. АДАПТИВНОСТЬ ───────────────────────────────────────── */

/* Отступ от фиксированной шапки на планшете/мобильном */
@media (max-width: 991.98px) {
	.single .site-content {
		padding-top: 90px;
	}

	.single #primary {
		padding-left: 20px;
		padding-right: 20px;
	}
}

@media (max-width: 767.98px) {

	/* --- Общий контейнер --- */
	.single .entry-header {
		margin-bottom: 24px;
	}

	.single .entry-title {
		font-size: 24px;
		line-height: 1.3;
		-webkit-text-fill-color: #11172D !important;
	}

	/* --- Тело статьи --- */
	.single .entry-content {
		font-size: 16px;
		line-height: 1.78;
	}

	.single .entry-content > p:first-of-type {
		font-size: 17px;
		line-height: 1.65;
	}

	/* --- Заголовки --- */
	.single .entry-content h2 {
		font-size: 21px;
		margin-top: 2em;
		margin-bottom: 0.6em;
		padding-left: 12px;
		border-left-width: 3px;
	}

	.single .entry-content h3 {
		font-size: 18px;
		margin-top: 1.7em;
	}

	.single .entry-content h4 {
		font-size: 16px;
		font-weight: 700;
	}

	/* --- Цитата --- */
	.single .entry-content blockquote {
		padding: 16px 18px;
		margin: 1.5em 0;
	}

	.single .entry-content blockquote p {
		font-size: 15px;
	}

	/* --- Таблицы --- */
	.single .entry-content table {
		font-size: 13px;
	}

	.single .entry-content thead th,
	.single .entry-content tbody td {
		padding: 8px 10px !important;
	}

	/* --- Изображения: сброс float --- */
	.single .entry-content .alignleft,
	.single .entry-content .alignright {
		float: none;
		margin-left: 0;
		margin-right: 0;
	}

	.single .entry-content img {
		border-radius: 6px;
	}

	.single .entry-content figure {
		margin: 1.4em 0;
	}

	/* --- Видео-эмбеды --- */
	.single .entry-content .wp-block-embed {
		margin: 1.5em -20px;
	}

	.single .entry-content .wp-block-embed .wp-block-embed__wrapper {
		border-radius: 0;
	}

	.single .entry-content .wp-block-embed .wp-block-embed__wrapper iframe {
		border-radius: 0;
	}

	.single .entry-content iframe[src*="youtube.com"],
	.single .entry-content iframe[src*="youtu.be"],
	.single .entry-content iframe[src*="youtube-nocookie.com"],
	.single .entry-content iframe[src*="vimeo.com"],
	.single .entry-content iframe[src*="rutube.ru"],
	.single .entry-content iframe[src*="vk.com/video"] {
		border-radius: 0;
		margin-left: -20px;
		margin-right: -20px;
		width: calc(100% + 40px);
		max-width: calc(100% + 40px);
	}

	/* --- Списки --- */
	.single .entry-content ul li,
	.single .entry-content ol li {
		padding-left: 22px;
		font-size: 15px;
		line-height: 1.72;
	}

	/* --- Genesis Blocks кнопки --- */
	.single .entry-content .gb-block-button-interior {
		font-size: 15px;
		padding: 12px 24px;
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}

	/* --- Pullquote --- */
	.single .entry-content .wp-block-pullquote {
		padding: 1em 1.2em;
	}

	.single .entry-content .wp-block-pullquote blockquote p {
		font-size: 18px;
	}

	/* --- Код --- */
	.single .entry-content pre {
		padding: 16px;
		font-size: 13px;
		margin-left: -20px;
		margin-right: -20px;
		border-radius: 0;
	}

	/* --- Миниатюра --- */
	.single .ast-single-post-thumbnail {
		margin-bottom: 24px;
		border-radius: 8px;
	}

	/* --- Мета --- */
	.single .entry-meta {
		font-size: 12px;
		gap: 4px 14px;
	}

	/* --- Футер --- */
	.single .entry-footer {
		margin-top: 24px;
		padding-top: 16px;
	}
}

@media (max-width: 480px) {

	.single .entry-title {
		font-size: 22px;
		line-height: 1.28;
	}

	.single .entry-content h2 {
		font-size: 19px;
	}

	.single .entry-content h3 {
		font-size: 17px;
	}

	.single .entry-content {
		font-size: 15px;
		line-height: 1.76;
	}

	.single .entry-content > p:first-of-type {
		font-size: 16px;
	}
}


/* ── 16. БЛОК «ЧИТАЙТЕ ТАКЖЕ» ─────────────────────────────── */

.article-related {
	margin-top: 2.5em;
	padding: 28px 32px;
	background: #f8fafd;
	border-radius: 12px;
	border: 1px solid #e8ecf2;
}

.article-related__title {
	font-size: 20px;
	font-weight: 700;
	color: #11172D;
	margin-bottom: 16px;
	padding-left: 14px;
	border-left: 4px solid #005DAC;
}

.article-related__list {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.article-related__list li {
	padding: 0 !important;
	margin-bottom: 10px;
}

.article-related__list li::before {
	content: none !important;
}

.article-related__list li a {
	display: inline-block;
	font-size: 15px;
	font-weight: 600 !important;
	color: #005DAC;
	text-decoration: none;
	padding: 8px 16px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #e8ecf2;
	transition: all 0.2s;
}

.article-related__list li a:hover {
	background: #005DAC;
	color: #fff;
	border-color: #005DAC;
	text-decoration: none;
}

.article-related__list li:last-child {
	margin-bottom: 0;
}


/* ── 17. CTA-БЛОК УСЛУГ ───────────────────────────────────── */

.article-cta {
	margin-top: 2.5em;
	padding: 36px 32px;
	background: linear-gradient(135deg, #f0f6fb 0%, #e4eef8 100%);
	border-radius: 16px;
	border: 1px solid rgba(0, 93, 172, 0.12);
	text-align: center;
}

.article-cta__title {
	font-size: 22px;
	font-weight: 700;
	color: #11172D;
	margin-bottom: 8px;
	line-height: 1.35;
}

.article-cta__text {
	font-size: 15px;
	color: #5D6584;
	line-height: 1.6;
	margin-bottom: 24px;
}

.article-cta__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 24px;
}

.article-cta__card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	background: #fff;
	border-radius: 10px;
	border: 1px solid #e8ecf2;
	text-decoration: none !important;
	transition: all 0.3s;
}

.article-cta__card:hover {
	border-color: #005DAC;
	box-shadow: 0 4px 16px rgba(0, 93, 172, 0.12);
	transform: translateY(-2px);
	text-decoration: none !important;
}

.article-cta__icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #005DAC;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	border-radius: 8px;
}

.article-cta__name {
	font-size: 15px;
	font-weight: 600;
	color: #11172D;
	text-align: left;
}

.article-cta__card:hover .article-cta__name {
	color: #005DAC;
}

.article-cta__btn {
	display: inline-block;
	padding: 16px 40px;
	background: #005DAC;
	color: #fff !important;
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 700;
	border-radius: 10px;
	text-decoration: none !important;
	transition: all 0.3s;
}

.article-cta__btn:hover {
	background: #004a8a;
	box-shadow: 0 6px 20px rgba(0, 93, 172, 0.3);
	transform: translateY(-2px);
	color: #fff !important;
	text-decoration: none !important;
}

@media (max-width: 600px) {
	.article-cta {
		padding: 28px 20px;
	}

	.article-cta__grid {
		grid-template-columns: 1fr;
	}

	.article-cta__title {
		font-size: 20px;
	}

	.article-related {
		padding: 20px;
	}

	.article-related__list li a {
		font-size: 14px;
		padding: 7px 12px;
	}
}
