/* ── Help article page ─────────────────────────────────────── */

.post-page {
	--post-accent: var(--main, #ff8c00);
	--post-accent-soft: rgba(255, 140, 0, 0.12);
	--post-radius: 16px;
	--post-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
	--post-gradient-dark: linear-gradient(135deg, #1a1d21 0%, #212529 55%, #2c2418 100%);
	min-height: calc(var(--vh, 1vh) * 100);
	display: flex;
	flex-direction: column;
	background: var(--light, #f2f2f2);
}

.post-page__inner {
	flex: 1 1 auto;
	width: 100%;
	max-width: 860px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 2.5rem;
}

.post-article {
	background: #fff;
	border-radius: var(--post-radius);
	border: 1px solid rgba(0, 0, 0, 0.07);
	box-shadow: var(--post-shadow);
	overflow: hidden;
}

.post-article__header {
	padding: 1.75rem 2rem 1.5rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.post-back {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--grey) !important;
	margin-bottom: 1.25rem;
	transition: color 0.2s ease;
}

.post-back:hover {
	color: var(--post-accent) !important;
}

.post-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.post-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.4;
}

.post-badge--category {
	background: var(--post-accent-soft);
	color: var(--post-accent);
}

.post-badge--marketplace {
	background: #f1f3f5;
	color: #495057;
}

.post-article__title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	font-weight: 700;
	line-height: 1.25;
	color: var(--dark);
	margin: 0;
}

.post-article__body {
	padding: 2rem;
	color: #343a40;
	--post-text-size: 20px;
	--post-text-lh: 1.5;
	--post-h2-size: 30px;
	--post-h3-size: 24px;
	font-size: var(--post-text-size);
	line-height: var(--post-text-lh);
}

/* Единый шрифт текста — перебивает inline-стили из редактора */
.post-article__body.post,
.post-article__body.post p,
.post-article__body.post li,
.post-article__body.post span,
.post-article__body.post div,
.post-article__body.post ul,
.post-article__body.post ol,
.post-article__body.post b,
.post-article__body.post strong,
.post-article__body.post em,
.post-article__body.post a,
.post-article__body.post blockquote,
.post-article__body.post blockquote *,
.post-article__body.post td,
.post-article__body.post th,
.post-article__body.post label,
.post-article__body.post p > *,
.post-article__body.post li > * {
	font-size: var(--post-text-size) !important;
	line-height: var(--post-text-lh) !important;
}

.post-article__body > *:first-child {
	margin-top: 0;
}

.post-article__body > *:last-child {
	margin-bottom: 0;
}

.post-article__body h1,
.post-article__body h2,
.post-article__body h3,
.post-article__body h4,
.post-article__body h5,
.post-article__body h6 {
	font-weight: 700 !important;
	color: var(--dark);
	margin-top: 2rem;
	margin-bottom: 0.75rem;
	line-height: 1.3 !important;
}

.post-article__body h2 {
	font-size: var(--post-h2-size) !important;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--post-accent-soft);
}

.post-article__body h3 {
	font-size: var(--post-h3-size) !important;
}

.post-article__body h4 {
	font-size: var(--post-text-size) !important;
}

.post-article__body h1,
.post-article__body h5,
.post-article__body h6 {
	font-size: var(--post-text-size) !important;
}

.post-article__body a {
	color: var(--post-accent);
	text-decoration: underline;
	text-decoration-color: rgba(255, 140, 0, 0.35);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease;
}

.post-article__body a:hover {
	text-decoration-color: var(--post-accent);
}

.post-article__body img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.5rem auto;
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.post-article__body iframe,
.post-article__body video {
	display: block;
	max-width: 100%;
	margin: 1.5rem auto;
	border-radius: 12px;
	border: none;
}

.post-article__body ul,
.post-article__body ol {
	padding-left: 1.5rem;
	margin: 1rem 0;
}

.post-article__body li {
	margin-bottom: 0.5rem;
}

.post-article__body li::marker {
	color: var(--post-accent);
}

.post-article__body blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 4px solid var(--post-accent);
	background: var(--post-accent-soft);
	border-radius: 0 12px 12px 0;
	color: #495057;
}

.post-article__body table {
	width: 100%;
	margin: 1.5rem 0;
	border-collapse: collapse;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.post-article__body th,
.post-article__body td {
	padding: 0.65rem 0.875rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	text-align: left;
}

.post-article__body th {
	background: var(--light);
	font-weight: 600;
	color: var(--dark);
}

.post-article__body pre,
.post-article__body code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
	font-size: 17px !important;
	line-height: 1.5 !important;
}

.post-article__body pre {
	background: #1a1d21;
	color: #e9ecef;
	padding: 1rem 1.25rem;
	border-radius: 12px;
	overflow-x: auto;
	margin: 1.5rem 0;
}

.post-article__body code {
	background: #f1f3f5;
	padding: 0.15em 0.4em;
	border-radius: 4px;
	color: #c7254e;
}

.post-article__body pre code {
	background: transparent;
	padding: 0;
	color: inherit;
}

.post-article__body hr {
	border: none;
	height: 1px;
	background: rgba(0, 0, 0, 0.08);
	margin: 2rem 0;
}

/* Not found */
.post-not-found {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.25rem;
}

.post-not-found__card {
	text-align: center;
	background: #fff;
	border-radius: var(--post-radius);
	border: 1px solid rgba(0, 0, 0, 0.07);
	box-shadow: var(--post-shadow);
	padding: 2.5rem 2rem;
	max-width: 420px;
}

.post-not-found__icon {
	font-size: 2.5rem;
	color: var(--grey);
	opacity: 0.5;
	margin-bottom: 1rem;
}

.post-not-found__title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--dark);
	margin-bottom: 0.5rem;
}

.post-not-found__text {
	color: var(--grey);
	font-size: 0.9375rem;
	margin-bottom: 1.5rem;
}

/* Footer */
.post-footer {
	background: var(--post-gradient-dark);
	padding: 1.25rem 2rem;
	margin-top: auto;
}

.post-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1140px;
	margin: 0 auto;
}

.post-footer__social {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.post-footer__social-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.75rem;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.75) !important;
	font-size: 0.875rem;
	transition: background 0.2s ease, color 0.2s ease;
}

.post-footer__social-link:hover {
	background: rgba(255, 140, 0, 0.15);
	color: var(--post-accent) !important;
}

.post-footer__social-link img {
	width: 20px;
	height: 20px;
	opacity: 0.85;
}

.post-footer__contact {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.55);
	margin: 0;
	text-align: right;
}

.post-footer__contact a,
.post-footer__contact .text-main {
	color: var(--post-accent) !important;
}

@media (max-width: 767px) {
	.post-page__inner {
		padding: 1rem 0.75rem 2rem;
	}

	.post-article__header {
		padding: 1.25rem 1.25rem 1rem;
	}

	.post-article__body {
		padding: 1.25rem;
		--post-text-size: 18px;
		--post-h2-size: 26px;
		--post-h3-size: 22px;
	}

	.post-article__body img,
	.post-article__body iframe {
		width: 100% !important;
		max-width: 100% !important;
	}

	.post-footer {
		padding: 1.25rem 1rem;
	}

	.post-footer__contact {
		text-align: center;
		width: 100%;
	}

	.post-footer__inner {
		justify-content: center;
	}
}
