/* ─── AV Article (single post) — body rhythm and layout spacing ─── */
/* The article body is Elementor's Post Content widget (.av-spc-body), not a
   plugin widget, so these rules are enqueued for single posts only.
   Selectors are prefixed with .single-post to outrank the kit's
   `.elementor-kit-6 p { margin-block-end: 0 }` and the head style block that
   zeroes every heading's margin-top. */

.single-post .av-spc-body {
	--av-flow:       20px;
	--av-flow-block: 32px;
	--av-flow-h2:    48px;
	--av-flow-h3:    32px;
	--av-flow-h4:    28px;
}

/* Elementor's default column gap pads the post's own section 10px, which
   indents the text from the featured image and the related posts above/below. */
.single-post .av-spc-body .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
	padding: 0;
}

/* ── Text ───────────────────────────────────── */
.single-post .av-spc-body .elementor-widget-text-editor p {
	margin: 0 0 var(--av-flow);
}

.single-post .av-spc-body .elementor-widget-text-editor ul,
.single-post .av-spc-body .elementor-widget-text-editor ol {
	margin: 0 0 var(--av-flow);
}

.single-post .av-spc-body .elementor-widget-text-editor li > p {
	margin: 0;
}

/* ── Headings: space above groups the heading with what follows it ── */
.single-post .av-spc-body .elementor-widget-text-editor h2 {
	margin: var(--av-flow-h2) 0 16px;
}

.single-post .av-spc-body .elementor-widget-text-editor h3 {
	margin: var(--av-flow-h3) 0 12px;
}

.single-post .av-spc-body .elementor-widget-text-editor h4,
.single-post .av-spc-body .elementor-widget-text-editor h5,
.single-post .av-spc-body .elementor-widget-text-editor h6 {
	margin: var(--av-flow-h4) 0 10px;
}

.single-post .av-spc-body .elementor-widget-text-editor :is(h2, h3, h4, h5, h6) + :is(h3, h4, h5, h6) {
	margin-top: 0;
}

.single-post .av-spc-body .elementor-widget-text-editor > :first-child {
	margin-top: 0;
}

/* ── Blocks: images, figures, tables, quotes share one gap ── */
.single-post .av-spc-body .elementor-widget-text-editor img {
	display: block;
	max-width: 100%;
	height: auto;
}

.single-post .av-spc-body .elementor-widget-text-editor p:has(> img:only-child),
.single-post .av-spc-body .elementor-widget-text-editor figure,
.single-post .av-spc-body .elementor-widget-text-editor blockquote {
	margin: var(--av-flow-block) 0;
}

.single-post .av-spc-body .elementor-widget-text-editor figcaption {
	margin-top: 8px;
	font-size: 14px;
	color: var(--av-ink-3);
}

.single-post .av-spc-body .elementor-widget-text-editor table {
	width: 100%;
	margin: var(--av-flow-block) 0;
	border-collapse: collapse;
}

.single-post .av-spc-body .elementor-widget-text-editor figure > table {
	margin: 0;
}

.single-post .av-spc-body .elementor-widget-text-editor th,
.single-post .av-spc-body .elementor-widget-text-editor td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--av-line);
	text-align: left;
	vertical-align: top;
}

/* ── Hero: share the article row's left edge ── */
/* The hero widget centres its text in an 860px column, while the content row
   below is boxed at the site width, so the title sat 230px right of the body. */
.single-post .av-post-header .av-post-header-inner {
	max-width: var(--av-max);
	padding: 0;
}

.single-post .av-post-header h1 {
	max-width: 820px;
}

/* ── Phone ──────────────────────────────────── */
@media (max-width: 767px) {
	.single-post .av-spc-body {
		--av-flow-h2: 36px;
		--av-flow-h3: 28px;
		--av-flow-h4: 24px;
	}

	.single-post .av-spc-body .elementor-widget-text-editor table {
		display: block;
		overflow-x: auto;
	}

	/* The template sets 72px on the hero and the content row at every width,
	   which on a phone buries the title and the first paragraph. */
	.single-post .elementor-location-single .elementor-widget-av-post-hero .av-post-header.av-post-header {
		padding: 40px 20px 36px;
	}

	.single-post .elementor-location-single > .e-con.e-parent:has(.av-spc-body) {
		--padding-top: 40px;
		--padding-bottom: 48px;
	}
}
