/**
 * Blog post "PDF style" — оформление статей по образцу 24-Hour-Fintech-Decision-Making.pdf.
 *
 * Подключается из inc/blog-post-pdf-style.php только на страницах записей (single post).
 * ОТКАТ: в inc/blog-post-pdf-style.php поставить VITAL_BLOG_POST_PDF_STYLE в false.
 * Все цвета — в переменных ниже; правка здесь применяется ко всем статьям сразу.
 */

:root {
	--bp-pdf-blue:   #1f4e9c; /* заголовок, подзаголовки, текст цитаты */
	--bp-pdf-orange: #f08a24; /* хлебные крошки (рубрика), левая полоса цитаты */
	--bp-pdf-cream:  #fbf6eb; /* фон цитаты */
	--bp-pdf-gray:   #6b6b6b; /* excerpt */
	--bp-pdf-cta-bg: #1f4d9c; /* фон CTA-блока (белый текст) */
}

/* ------------------------------------------------------------------
 * 1–2. Порядок блоков: изображение → хлебные крошки → заголовок → excerpt → текст
 * (крошки переносит внутрь контента assets/js/blog-post-pdf.js)
 * ------------------------------------------------------------------ */
.single-post .blog-post-content {
	display: flex;
	flex-direction: column;
}
.single-post .blog-post-content > * {
	min-width: 0;
}
.single-post .blog-post-content > .featured-image { order: -3; margin-bottom: 32px; }
.single-post .blog-post-content > .breadcrumbs    { order: -2; }
.single-post .blog-post-content > h1              { order: -1; }

/* Верхний блок с крошками скрываем после переноса (класс ставит JS) */
.single-post .post-head-area.bp-pdf-moved { display: none; }

/* Хлебные крошки под изображением — как строка рубрики в PDF */
.single-post .blog-post-content > .breadcrumbs {
	margin-bottom: 16px;
	font-size: 13px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bp-pdf-orange);
}
.single-post .blog-post-content > .breadcrumbs a,
.single-post .blog-post-content > .breadcrumbs .current {
	color: var(--bp-pdf-orange);
	text-decoration: none;
}
.single-post .blog-post-content > .breadcrumbs a:hover {
	color: var(--bp-pdf-blue);
}
.single-post .blog-post-content > .breadcrumbs .bp-pdf-sep {
	margin: 0 0.6em;
	font-weight: 400;
}

/* ------------------------------------------------------------------
 * 3. Цвет заголовка статьи и подзаголовков
 * ------------------------------------------------------------------ */
.single-post .blog-post-content > h1 {
	color: var(--bp-pdf-blue);
	margin-bottom: 16px;
}
.single-post .blog-post-content h2,
.single-post .blog-post-content h3 {
	color: var(--bp-pdf-blue);
}
.single-post .blog-post-content h2 {
	font-size: 28px;
	line-height: 1.25;
	margin-top: 8px;
	margin-bottom: 12px;
}
.single-post .blog-post-content h3 {
	font-size: 24px;
	line-height: 1.3;
	margin-bottom: 12px;
}

/* ------------------------------------------------------------------
 * 4. Excerpt — курсив, серый
 * ------------------------------------------------------------------ */
.single-post .blog-post-content > .excerpt {
	font-style: italic;
	color: var(--bp-pdf-gray);
}
.single-post .blog-post-content > .excerpt p {
	margin: 0;
}

/* ------------------------------------------------------------------
 * 5. Цитата (блок «Quote» / «Pullquote» в редакторе):
 *    кремовый фон, оранжевая полоса слева, синий жирный курсив
 * ------------------------------------------------------------------ */
.single-post .entry-content .blog-post-content .wp-block-quote,
.single-post .entry-content .blog-post-content .wp-block-pullquote {
	position: relative;
	margin: 8px 0 28px;
	padding: 24px 28px;
	max-width: none;
	background: var(--bp-pdf-cream);
	border: 0;
	border-left: 6px solid var(--bp-pdf-orange);
	border-radius: 0;
	text-align: left;
	font-size: 20px;
	line-height: 1.4;
}
.single-post .entry-content .blog-post-content .wp-block-quote::after,
.single-post .entry-content .blog-post-content .wp-block-quote::before {
	content: none;
	display: none;
}
.single-post .entry-content .blog-post-content .wp-block-quote > *,
.single-post .entry-content .blog-post-content .wp-block-pullquote blockquote,
.single-post .entry-content .blog-post-content .wp-block-pullquote blockquote > * {
	max-width: none;
	margin: 0;
	text-align: left;
}
.single-post .entry-content .blog-post-content .wp-block-quote p,
.single-post .entry-content .blog-post-content .wp-block-pullquote p {
	margin: 0;
	color: var(--bp-pdf-blue);
	font-size: 20px;
	line-height: 1.4;
	font-weight: 700;
	font-style: italic;
}
.single-post .entry-content .blog-post-content .wp-block-quote p + p,
.single-post .entry-content .blog-post-content .wp-block-pullquote p + p {
	margin-top: 12px;
}
.single-post .entry-content .blog-post-content .wp-block-quote cite,
.single-post .entry-content .blog-post-content .wp-block-pullquote cite {
	display: block;
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 400;
	font-style: normal;
	color: var(--bp-pdf-gray);
}

/* ------------------------------------------------------------------
 * 6. CTA-блок (синий фон, белый текст) — блок «Группа» со стилем
 *    «CTA box (PDF style)» или паттерн «CTA box» в редакторе
 * ------------------------------------------------------------------ */
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta {
	margin: 8px 0 28px;
	padding: 28px 32px;
	background: var(--bp-pdf-cta-bg);
	color: #fff;
	border-radius: 0;
}
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta > * {
	max-width: none;
}
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta h2,
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta h3,
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta h4 {
	margin: 0 0 10px;
	color: #fff;
	font-size: 22px;
	line-height: 1.3;
	font-weight: 700;
}
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta p {
	margin: 0;
	color: #fff;
	font-size: 17px;
	line-height: 1.5;
}
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta p + p {
	margin-top: 10px;
}
.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta a {
	color: #fff;
	text-decoration: underline;
}

@media (max-width: 767px) {
	.single-post .blog-post-content h2 { font-size: 24px; }
	.single-post .blog-post-content h3 { font-size: 20px; }
	.single-post .entry-content .blog-post-content .wp-block-quote,
	.single-post .entry-content .blog-post-content .wp-block-pullquote {
		padding: 18px 20px;
	}
	.single-post .entry-content .blog-post-content .wp-block-quote p,
	.single-post .entry-content .blog-post-content .wp-block-pullquote p {
		font-size: 18px;
	}
	.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta {
		padding: 20px 22px;
	}
	.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta h2,
	.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta h3,
	.single-post .entry-content .blog-post-content .wp-block-group.is-style-pdf-cta h4 {
		font-size: 20px;
	}
}

/* ------------------------------------------------------------------
 * 7. Изображения в контенте (wp-block-image) — на всю ширину колонки,
 *    переопределяет inline-ширину, которую Gutenberg вставляет в style=""
 * ------------------------------------------------------------------ */
.single-post .blog-post-content .wp-block-image,
.single-post .blog-post-content figure.wp-block-image {
	width: 100% !important;
	max-width: 100% !important;
}
.single-post .blog-post-content .wp-block-image img {
	width: 100% !important;
	max-width: 100% !important;
	height: auto;
}
