/**
 * Single Blog post (Figma "Blog Inside Page", node 319:551).
 * Hero 1440 × 500 (featured image, content bottom-left, padding 64 / 80).
 * Body: 1100px column, padding 80 top/bottom, 24px between blocks.
 * Headings #1B1464 + gold bar (#D4AF37, 48 × 4); text site font (Spoof) 16/1.65 #1E293B;
 * lists with gold dots.
 *
 * @package AIBM
 * @author  Sameer Ali N
 */

.aibm-post-page {
	--aibm-post-ink: #1E293B;
	--aibm-post-heading: #1B1464;
	--aibm-post-gold: #D4AF37;
	--aibm-post-link: #0F1396;
	--aibm-post-line: #E2E8F0;
	--aibm-post-text-font: var(--aibm-font-body);

	display: block;
	background: #fff;
}

/* Parent theme "article.post" spacing: no gap under the blog article. */
.aibm-post-page article.aibm-post.post {
	margin-bottom: 0;
}

.aibm-post-page *,
.aibm-post-page *::before,
.aibm-post-page *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------
   Hero
--------------------------------------------------------------- */
.aibm-post-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 500px;
	padding: 64px 0;
	overflow: hidden;
	background: #091424;
	color: #fff;
	isolation: isolate;
}

.aibm-post-hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.aibm-post-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(9, 20, 36, .05) 0%, rgba(9, 20, 36, .25) 45%, rgba(9, 20, 36, .78) 100%);
}

.aibm-post-hero__media img,
.aibm-post-hero .aibm-post-hero__img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

.aibm-post-hero__inner {
	width: 100%;
	max-width: calc(var(--aibm-container, 1340px) + var(--aibm-gutter, 40px) * 2);
	margin: 0 auto;
	padding: 0 var(--aibm-gutter, 40px);
}

.aibm-post-hero__meta-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 1000px;
}

/* Breadcrumb: Blog > Title */
.aibm-post-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--aibm-post-text-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.aibm-post-crumbs li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	margin: 0;
	padding: 0;
	color: #fff;
}

.aibm-post-crumbs li::before {
	content: none;
}

.aibm-post-crumbs li + li::before {
	content: ">";
	display: inline;
	color: rgba(255, 255, 255, .5);
	font-weight: 400;
}

.aibm-post-crumbs li[aria-current] {
	overflow: hidden;
	text-overflow: ellipsis;
}

.aibm-post-crumbs a,
.aibm-post-crumbs a:visited {
	color: rgba(255, 255, 255, .7);
	text-decoration: none;
	transition: color .2s ease;
}

.aibm-post-crumbs a:hover,
.aibm-post-crumbs a:focus-visible {
	color: #38BDF8;
}

.aibm-post-hero .aibm-post-hero__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: var(--aibm-font-body);
	font-size: 48px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-transform: none;
	text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
	overflow-wrap: anywhere;
}

.aibm-post-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
	color: rgba(255, 255, 255, .9);
	font-family: var(--aibm-post-text-font);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
}

.aibm-post-hero__dot {
	flex: 0 0 4px;
	width: 4px;
	height: 4px;
	border-radius: 2px;
	background: var(--aibm-post-gold);
}

/* ---------------------------------------------------------------
   Article body (the_content)
   Works with the posts as they are written in the Classic editor:
   - h2 (or h4 when the post has no h2/h3) = section heading with gold bar
   - h3 (or h5 when the post has no h2/h3) = sub heading
   - Word-pasted tables, inline black colours and &nbsp; lines are handled
     here / in inc/blog-single.php, so posts don't need editing.
--------------------------------------------------------------- */
.aibm-post-body {
	padding: 80px var(--aibm-gutter, 40px) 96px;
	background: #fff;
}

.aibm-post-page .aibm-post-content {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	color: var(--aibm-post-ink);
	font-family: var(--aibm-post-text-font);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;
	overflow-wrap: break-word;
}

.aibm-post-page .aibm-post-content > *,
.aibm-post-page .aibm-post-content .elementor-widget-text-editor > * {
	margin-top: 0;
	margin-bottom: 0;
}

.aibm-post-page .aibm-post-content > * + *,
.aibm-post-page .aibm-post-content .elementor-widget-container > * + * {
	margin-top: 24px;
}

.aibm-post-page .aibm-post-content p {
	color: var(--aibm-post-ink);
	font-family: var(--aibm-post-text-font);
	font-size: 16px;
	line-height: 1.7;
}

.aibm-post-page .aibm-post-content p:empty {
	display: none;
}

/* Intro (marked by inc/blog-single.php): lead line + "Updated … | reading time" */
.aibm-post-page .aibm-post-content p.aibm-post-lead {
	color: #475569;
	font-size: 19px;
	line-height: 1.6;
}

.aibm-post-page .aibm-post-content p.aibm-post-updated {
	margin-top: 12px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--aibm-post-line);
	color: #64748B;
	font-size: 14px;
	font-weight: 500;
}

.aibm-post-page .aibm-post-content p.aibm-post-updated em {
	font-style: normal;
}

/* "The short answer" box */
.aibm-post-page .aibm-post-content .aibm-post-callout {
	position: relative;
	margin-top: 32px;
	padding: 26px 30px 26px 34px;
	border: 1px solid #DBEAFE;
	border-radius: 18px;
	background: linear-gradient(135deg, #F0F7FF 0%, #F8FAFC 100%);
	color: var(--aibm-post-ink);
	overflow: hidden;
}

.aibm-post-page .aibm-post-content .aibm-post-callout::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 5px;
	background: linear-gradient(180deg, var(--aibm-post-heading), #38BDF8);
}

.aibm-post-page .aibm-post-content .aibm-post-callout > * + * {
	margin-top: 14px;
}

.aibm-post-page .aibm-post-content .aibm-post-callout p {
	margin-bottom: 0;
}

.aibm-post-page .aibm-post-content .aibm-post-callout .aibm-post-callout__title {
	display: block;
	margin: 0 0 10px;
	color: var(--aibm-post-heading);
	font-family: var(--aibm-font-body);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
}

.aibm-post-page .aibm-post-content .aibm-post-updated + .aibm-post-callout,
.aibm-post-page .aibm-post-content .aibm-post-lead + .aibm-post-callout {
	margin-top: 32px;
}

/* Headings */
.aibm-post-page .aibm-post-content h1,
.aibm-post-page .aibm-post-content h2,
.aibm-post-page .aibm-post-content h3,
.aibm-post-page .aibm-post-content h4,
.aibm-post-page .aibm-post-content h5,
.aibm-post-page .aibm-post-content h6 {
	margin: 48px 0 0;
	padding: 0;
	color: var(--aibm-post-heading);
	font-family: var(--aibm-font-body);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.005em;
	text-transform: none;
}

.aibm-post-page .aibm-post-content h1,
.aibm-post-page .aibm-post-content h2,
.aibm-post-page .aibm-post-content:not(:has(h2, h3)) h4 {
	font-size: 28px;
	line-height: 1.25;
}

.aibm-post-page .aibm-post-content h2::after,
.aibm-post-page .aibm-post-content:not(:has(h2, h3)) h4::after {
	content: "";
	display: block;
	width: 48px;
	height: 4px;
	margin-top: 12px;
	border-radius: 2px;
	background: var(--aibm-post-gold);
}

.aibm-post-page .aibm-post-content h3,
.aibm-post-page .aibm-post-content:not(:has(h2, h3)) h5 {
	margin-top: 36px;
	font-size: 21px;
}

.aibm-post-page .aibm-post-content h4 {
	font-size: 19px;
}

.aibm-post-page .aibm-post-content h5,
.aibm-post-page .aibm-post-content h6 {
	font-size: 17px;
}

.aibm-post-page .aibm-post-content > h1:first-child,
.aibm-post-page .aibm-post-content > h2:first-child,
.aibm-post-page .aibm-post-content > h3:first-child,
.aibm-post-page .aibm-post-content > h4:first-child {
	margin-top: 0;
}

.aibm-post-page .aibm-post-content h2 + *,
.aibm-post-page .aibm-post-content:not(:has(h2, h3)) h4 + * {
	margin-top: 28px;
}

.aibm-post-page .aibm-post-content h3 + *,
.aibm-post-page .aibm-post-content h4 + *,
.aibm-post-page .aibm-post-content h5 + *,
.aibm-post-page .aibm-post-content h6 + * {
	margin-top: 12px;
}

.aibm-post-page .aibm-post-content:not(:has(h2, h3)) h4 + h5 {
	margin-top: 28px;
}

/* Links (incl. links pasted with inline black colour) */
.aibm-post-page .aibm-post-content a,
.aibm-post-page .aibm-post-content a:visited {
	color: var(--aibm-post-link);
	font-weight: 500;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color .2s ease;
}

.aibm-post-page .aibm-post-content a:hover {
	color: #0284C7 !important;
}

.aibm-post-page .aibm-post-content h1 a,
.aibm-post-page .aibm-post-content h2 a,
.aibm-post-page .aibm-post-content h3 a,
.aibm-post-page .aibm-post-content h4 a,
.aibm-post-page .aibm-post-content h5 a,
.aibm-post-page .aibm-post-content h6 a,
.aibm-post-page .aibm-post-content h1 span[style],
.aibm-post-page .aibm-post-content h2 span[style],
.aibm-post-page .aibm-post-content h3 span[style],
.aibm-post-page .aibm-post-content h4 span[style],
.aibm-post-page .aibm-post-content h5 span[style],
.aibm-post-page .aibm-post-content h6 span[style] {
	color: inherit !important;
	font-weight: inherit;
	text-decoration-color: var(--aibm-post-gold);
	text-decoration-thickness: 2px;
}

.aibm-post-page .aibm-post-content [style*="color: #000000"],
.aibm-post-page .aibm-post-content [style*="color:#000000"],
.aibm-post-page .aibm-post-content [style*="color: rgb(0, 0, 0)"] {
	color: inherit !important;
}

.aibm-post-page .aibm-post-content p a[style*="color: #000000"],
.aibm-post-page .aibm-post-content li a[style*="color: #000000"],
.aibm-post-page .aibm-post-content td a[style*="color: #000000"] {
	color: var(--aibm-post-link) !important;
}

.aibm-post-page .aibm-post-content strong,
.aibm-post-page .aibm-post-content b {
	color: #0F172A;
	font-weight: 600;
}

/* Lists: gold dots / gold numbers */
.aibm-post-page .aibm-post-content ul,
.aibm-post-page .aibm-post-content ol {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0 0 0 16px;
	list-style: none;
}

.aibm-post-page .aibm-post-content li {
	position: relative;
	margin: 0;
	padding: 0 0 0 18px;
	color: var(--aibm-post-ink);
	font-family: var(--aibm-post-text-font);
	font-size: 16px;
	line-height: 1.6;
}

.aibm-post-page .aibm-post-content ul > li::before {
	content: "";
	position: absolute;
	top: .55em;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--aibm-post-gold);
}

.aibm-post-page .aibm-post-content ol {
	counter-reset: aibm-ol;
}

.aibm-post-page .aibm-post-content ol > li {
	padding-left: 32px;
	counter-increment: aibm-ol;
}

.aibm-post-page .aibm-post-content ol > li::before {
	content: counter(aibm-ol);
	position: absolute;
	top: 1px;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #FBF5E1;
	color: #8A6D12;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.aibm-post-page .aibm-post-content li > ul,
.aibm-post-page .aibm-post-content li > ol {
	margin-top: 12px;
}

/* Quote */
.aibm-post-page .aibm-post-content blockquote {
	margin: 32px 0 0;
	padding: 20px 24px;
	border: 0;
	border-left: 4px solid var(--aibm-post-gold);
	border-radius: 0 14px 14px 0;
	background: #F8FAFC;
	color: #0F172A;
	font-size: 17px;
	font-style: normal;
	line-height: 1.6;
}

.aibm-post-page .aibm-post-content blockquote p {
	font-size: inherit;
}

.aibm-post-page .aibm-post-content blockquote cite {
	display: block;
	margin-top: 10px;
	color: #64748B;
	font-size: 14px;
	font-style: normal;
}

/* Images, figures, video */
.aibm-post-page .aibm-post-content img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
}

.aibm-post-page .aibm-post-content figure {
	max-width: 100%;
	margin: 32px 0 0;
}

.aibm-post-page .aibm-post-content figcaption {
	margin-top: 10px;
	color: #64748B;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.aibm-post-page .aibm-post-content iframe,
.aibm-post-page .aibm-post-content video {
	max-width: 100%;
	border-radius: 16px;
}

/* Tables (wrapped in .aibm-post-table by inc/blog-single.php) */
.aibm-post-page .aibm-post-content .aibm-post-table {
	max-width: 100%;
	overflow-x: auto;
	border: 1px solid var(--aibm-post-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 14px 30px -24px rgba(15, 23, 42, .35);
	-webkit-overflow-scrolling: touch;
}

.aibm-post-page .aibm-post-content table {
	width: 100% !important;
	min-width: 560px;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 15px;
	line-height: 1.5;
}

.aibm-post-page .aibm-post-content table td,
.aibm-post-page .aibm-post-content table th {
	width: auto !important;
	padding: 14px 18px;
	border: 0;
	border-bottom: 1px solid var(--aibm-post-line);
	background: transparent;
	color: var(--aibm-post-ink);
	text-align: left;
	vertical-align: top;
}

.aibm-post-page .aibm-post-content table thead td,
.aibm-post-page .aibm-post-content table thead th,
.aibm-post-page .aibm-post-content table th {
	background: var(--aibm-post-heading);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
	vertical-align: middle;
}

.aibm-post-page .aibm-post-content table thead td strong,
.aibm-post-page .aibm-post-content table thead th strong {
	color: #fff;
	font-weight: 600;
}

.aibm-post-page .aibm-post-content table tbody tr:nth-child(even) td {
	background: #F8FAFC;
}

.aibm-post-page .aibm-post-content table tbody tr:hover td {
	background: #EEF4FF;
}

.aibm-post-page .aibm-post-content table tbody td:first-child {
	color: #0F172A;
	font-weight: 600;
}

.aibm-post-page .aibm-post-content table tbody tr:last-child td {
	border-bottom: 0;
}

.aibm-post-page .aibm-post-content hr {
	height: 1px;
	margin: 40px 0 0;
	border: 0;
	background: var(--aibm-post-line);
}

.aibm-post-pages {
	margin-top: 40px;
	font-weight: 600;
}

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 1099px) {
	.aibm-post-hero {
		min-height: 440px;
		padding: 56px 0;
	}

	.aibm-post-hero .aibm-post-hero__title {
		font-size: 40px;
	}

	.aibm-post-body {
		padding-top: 64px;
		padding-bottom: 80px;
	}
}

@media (max-width: 767px) {
	.aibm-post-hero {
		min-height: 380px;
		padding: 40px 0;
	}

	.aibm-post-hero__meta-group {
		gap: 12px;
	}

	.aibm-post-crumbs ol {
		font-size: 13px;
	}

	.aibm-post-crumbs li[aria-current] {
		max-width: 60vw;
		white-space: nowrap;
	}

	.aibm-post-hero .aibm-post-hero__title {
		font-size: 30px;
		line-height: 1.2;
	}

	.aibm-post-hero__meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		font-size: 13px;
	}

	.aibm-post-hero__dot {
		display: none;
	}

	.aibm-post-body {
		padding-top: 44px;
		padding-bottom: 64px;
	}

	.aibm-post-page .aibm-post-content p.aibm-post-lead {
		font-size: 17px;
	}

	.aibm-post-page .aibm-post-content .aibm-post-callout {
		padding: 22px 20px 22px 24px;
	}

	.aibm-post-page .aibm-post-content h1,
	.aibm-post-page .aibm-post-content h2,
	.aibm-post-page .aibm-post-content:not(:has(h2, h3)) h4 {
		margin-top: 40px;
		font-size: 23px;
	}

	.aibm-post-page .aibm-post-content h3,
	.aibm-post-page .aibm-post-content:not(:has(h2, h3)) h5 {
		margin-top: 32px;
		font-size: 19px;
	}

	.aibm-post-page .aibm-post-content ul,
	.aibm-post-page .aibm-post-content ol {
		padding-left: 4px;
	}

	.aibm-post-page .aibm-post-content table {
		font-size: 14px;
	}

	.aibm-post-page .aibm-post-content table td,
	.aibm-post-page .aibm-post-content table th {
		padding: 12px 14px;
	}
}
