/**
 * Mauritius Finance — single post presentation.
 *
 * Loaded only on single posts (is_singular('post')). Restyles the Kadence
 * single-post layout into the same visual language as the site's built
 * sections (.mfifc, .mfte, .mftc): a full-bleed navy hero carrying the
 * featured image, a gold eyebrow and rule, then the article on a light
 * ground at a comfortable reading measure.
 *
 * Nothing here changes markup — it restyles what Kadence already outputs, so
 * deactivating the plugin returns the site to the stock layout.
 *
 * The full-bleed bands use `inset: 0 -100vmax` on a pseudo-element rather
 * than 100vw, because the theme's .site wrapper is `overflow: clip` — the
 * bands are clipped to the viewport and never create a horizontal scrollbar.
 */

.single-post {
	--mfp-navy:  #001030;
	--mfp-navy2: #0a1c44;
	--mfp-gold:  #f0b000;
	--mfp-ink:   #1d2534;
	--mfp-muted: #5a6478;
	--mfp-line:  #e6eaf1;
	--mfp-light: #f4f7fb;
}

/* Undo Kadence's boxed white card so the hero bands can run edge to edge. */
.single-post .site-main .content-wrap > article.single-entry {
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
}
.single-post .entry-content-wrap { padding: 0 !important; }
.single-post .content-container.site-container {
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.single-post .content-area {
	background: linear-gradient(180deg, #ffffff 0%, #f7fafd 100%);
}

/* ---------- Hero: featured image ---------- */

/* Kadence sizes the thumbnail with a padding-bottom ratio and an absolutely
   positioned inner. Both are neutralised so the image can size naturally. */
.single-post .post-thumbnail {
	position: relative;
	margin: 0 !important;
	padding: 60px 24px 0 !important;
	height: auto !important;
	overflow: visible !important;
}
.single-post .post-thumbnail::before {
	content: "";
	position: absolute;
	inset: 0 -100vmax;
	background: linear-gradient(180deg, #001030 0%, #061838 100%);
	z-index: 0;
}
.single-post .post-thumbnail-inner {
	position: relative !important;
	z-index: 1;
	inset: auto !important;
	height: auto !important;
	max-width: 940px;
	margin: 0 auto;
}
.single-post .post-thumbnail img {
	position: static !important;
	display: block;
	width: 100% !important;
	height: auto !important;
	max-height: 430px;
	object-fit: cover;
	object-position: center top;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

/* Portrait featured images — press clippings, posters, phone photography —
   are shown whole on white rather than cropped to a landscape band.
   The body class is set in PHP from the attachment's dimensions. */
.single-post.mfp-portrait-hero .post-thumbnail img {
	object-fit: contain;
	max-height: 540px;
	background: #fff;
}

/* ---------- Hero: title block ---------- */

.single-post .entry-header {
	position: relative;
	margin: 0 !important;
	padding: 34px 24px 60px !important;
	text-align: left !important;
}
.single-post .entry-header::before {
	content: "";
	position: absolute;
	inset: 0 -100vmax;
	background: linear-gradient(180deg, #061838 0%, #0a1c44 100%);
	z-index: 0;
}
.single-post .entry-header > * {
	position: relative;
	z-index: 1;
	max-width: 940px;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Kadence centres these when the title alignment is centred; the hero is
   left-aligned to match the rest of the site's sections. */
.single-post .entry-taxonomies {
	margin: 0 0 12px !important;
	text-align: left !important;
	justify-content: flex-start !important;
}
.single-post .entry-taxonomies .category-links a {
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	color: var(--mfp-gold) !important;
	font-size: .74rem !important;
	font-weight: 800 !important;
	letter-spacing: .22em !important;
	text-transform: uppercase !important;
}
.single-post .entry-taxonomies .category-links a:hover { color: #fff !important; }

.single-post h1.entry-title {
	margin: 0 !important;
	color: #fff !important;
	font-size: clamp(1.9rem, 3.2vw, 2.6rem) !important;
	font-weight: 800;
	line-height: 1.14 !important;
	letter-spacing: -.02em;
}
.single-post h1.entry-title::after {
	content: "";
	display: block;
	width: 96px;
	height: 3px;
	margin: 22px 0 18px;
	border-radius: 3px;
	background: var(--mfp-gold);
}

.single-post .entry-header .entry-meta {
	margin: 0 !important;
	color: #b9cbe4 !important;
	font-size: .86rem !important;
	text-align: left !important;
	justify-content: flex-start !important;
}
.single-post .entry-header .entry-meta * { color: #b9cbe4 !important; }

/* ---------- Article body ---------- */

.single-post .entry-content.single-content {
	max-width: 772px !important;
	margin: 0 auto !important;
	padding: 54px 24px 8px !important;
	font-size: 18px;
	line-height: 1.85;
	color: var(--mfp-ink);
}
.single-post .entry-content > p:first-of-type {
	font-size: 1.14em;
	line-height: 1.7;
	color: #2b3446;
}
.single-post .entry-content p { margin: 0 0 1.35em; }
.single-post .entry-content h2,
.single-post .entry-content h3 {
	margin: 2em 0 .6em;
	color: var(--mfp-navy);
	letter-spacing: -.01em;
}
.single-post .entry-content h2::after {
	content: "";
	display: block;
	width: 64px;
	height: 3px;
	margin-top: 14px;
	border-radius: 3px;
	background: var(--mfp-gold);
}
.single-post .entry-content a {
	color: var(--mfp-navy2);
	text-decoration: underline;
	text-decoration-color: var(--mfp-gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}
.single-post .entry-content a:hover { color: var(--mfp-gold); }
.single-post .entry-content blockquote {
	margin: 2em 0;
	padding: 18px 24px;
	border-left: 4px solid var(--mfp-gold);
	border-radius: 0 10px 10px 0;
	background: var(--mfp-light);
}
.single-post .entry-content ul,
.single-post .entry-content ol { margin: 0 0 1.35em 1.1em; }
.single-post .entry-content li { margin-bottom: .5em; }
.single-post .entry-content ul li::marker { color: var(--mfp-gold); }
.single-post .entry-content img {
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 16, 48, .12);
}
.single-post .entry-content hr {
	border: 0;
	height: 1px;
	background: var(--mfp-line);
	margin: 2.4em 0;
}

.single-post .kt-reading-time {
	display: inline-block;
	margin: 0 0 26px;
	padding: 6px 14px;
	border: 1px solid var(--mfp-line);
	border-radius: 999px;
	background: var(--mfp-light);
	color: var(--mfp-muted) !important;
	font-size: .74rem !important;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

/* ---------- Footer ---------- */

.single-post .entry-footer {
	max-width: 772px;
	margin: 0 auto;
	padding: 0 24px;
}
.mfp-foot {
	max-width: 772px;
	margin: 8px auto 72px;
	padding: 26px 24px 0;
	border-top: 3px solid var(--mfp-gold);
	display: flex;
	flex-wrap: wrap;
	gap: 14px 28px;
	align-items: center;
	justify-content: space-between;
}
.mfp-foot a {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--mfp-navy2);
}
.mfp-foot a:hover { color: var(--mfp-gold); }
.mfp-foot a .mfp-arw { transition: transform .18s ease; }
.mfp-foot a:hover .mfp-arw { transform: translateX(3px); }
.mfp-foot a.mfp-back:hover .mfp-arw { transform: translateX(-3px); }

/* Comments are closed on posts in PHP; this hides any residual markup
   another plugin may print. */
.single-post #comments,
.single-post .comments-area,
.single-post .entry-meta .comments-link { display: none !important; }

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
	.single-post .post-thumbnail { padding-top: 36px !important; }
	.single-post .post-thumbnail img { max-height: 280px; }
	.single-post.mfp-portrait-hero .post-thumbnail img { max-height: 380px; }
	.single-post .entry-header { padding: 28px 24px 44px !important; }
	.single-post .entry-content.single-content {
		padding-top: 40px !important;
		font-size: 17px;
	}
	.mfp-foot { margin-bottom: 52px; }
}

@media (prefers-reduced-motion: reduce) {
	.mfp-foot a .mfp-arw { transition: none; }
}
