/**
 * Branded editorial single-post layout.
 *
 * Applies to blog posts, case studies, white papers and news items rendered
 * through templates/single-post.php. Layout and typography only - article copy
 * is untouched.
 */

.ig-post {
	/* Brand tokens are scoped per section across this stylesheet set rather than
	   declared at :root, so declare them here too - otherwise shared components
	   like .ig-btn--gold resolve var(--ig-gold) to nothing inside this page. */
	--ig-navy: hsl(225 70% 17%);
	--ig-navy-light: hsl(225 50% 30%);
	--ig-gold: hsl(38 91% 55%);
	--ig-gold-light: hsl(38 91% 70%);
	--ig-teal: hsl(174 60% 42%);

	background: #fff;
	padding-bottom: 0;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================================================
   Hero
   ========================================================================= */
.ig-post__hero {
	background: linear-gradient(160deg, var(--ig-navy, #0d1c4d) 0%, #132a63 100%);
	color: #fff;
	padding: 3.5rem 0 5.5rem;
}

.ig-post__hero-inner {
	max-width: 56rem;
}

.ig-post__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.65);
	margin-bottom: 1.5rem;
}

.ig-post__crumbs a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
}

.ig-post__crumbs a:hover,
.ig-post__crumbs a:focus-visible {
	color: var(--ig-gold-light, #f5b041);
	text-decoration: underline;
}

.ig-post__crumbs-current {
	color: rgba(255, 255, 255, 0.55);
}

.ig-post__type {
	display: inline-block;
	margin-bottom: 1.25rem;
	padding: 0.35rem 0.9rem;
	border-radius: 9999px;
	background: rgba(245, 176, 65, 0.16);
	color: var(--ig-gold-light, #f5b041);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.ig-post__type:hover,
.ig-post__type:focus-visible {
	background: rgba(245, 176, 65, 0.28);
	color: var(--ig-gold-light, #f5b041);
}

.ig-post__title {
	font-size: clamp(2rem, 4.6vw, 3.25rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	margin: 0 0 1.25rem;
	color: #fff;
}

.ig-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.72);
}

.ig-post__meta-sep {
	opacity: 0.5;
}

/* =========================================================================
   Featured image - lifted over the hero edge
   ========================================================================= */
.ig-post__figure {
	max-width: 56rem;
	margin: -4rem auto 0;
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 18px 48px rgba(13, 28, 77, 0.22);
	background: #fff;
}

.ig-post__figure img {
	display: block;
	width: 100%;
	height: auto;
}

/* =========================================================================
   Article body
   ========================================================================= */
.ig-post__body {
	max-width: 44rem;
	margin: 3.5rem auto 0;
	color: #2c3550;
	font-size: 1.0625rem;
	line-height: 1.75;
}

.ig-post__body > *:first-child {
	margin-top: 0;
}

.ig-post__body p {
	margin: 0 0 1.5rem;
}

.ig-post__body h2,
.ig-post__body h3,
.ig-post__body h4 {
	color: var(--ig-navy, #0d1c4d);
	font-weight: 800;
	line-height: 1.25;
	margin: 2.75rem 0 1rem;
}

.ig-post__body h2 {
	font-size: 1.75rem;
	letter-spacing: -0.01em;
}

.ig-post__body h3 {
	font-size: 1.375rem;
}

.ig-post__body h4 {
	font-size: 1.125rem;
}

.ig-post__body a {
	color: #0f5f8a;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.ig-post__body a:hover,
.ig-post__body a:focus-visible {
	color: var(--ig-navy, #0d1c4d);
}

.ig-post__body ul,
.ig-post__body ol {
	margin: 0 0 1.5rem;
	padding-left: 1.4rem;
}

.ig-post__body li {
	margin-bottom: 0.6rem;
}

.ig-post__body li::marker {
	color: var(--ig-gold, #b38b3f);
}

.ig-post__body img {
	max-width: 100%;
	height: auto;
	border-radius: 0.75rem;
	margin: 2rem 0;
}

.ig-post__body figure {
	margin: 2rem 0;
}

.ig-post__body figcaption {
	font-size: 0.875rem;
	color: #6b7280;
	margin-top: 0.5rem;
	text-align: center;
}

.ig-post__body blockquote {
	margin: 2rem 0;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid var(--ig-gold, #b38b3f);
	background: #f7f8fb;
	border-radius: 0 0.5rem 0.5rem 0;
	color: var(--ig-navy, #0d1c4d);
	font-size: 1.125rem;
	font-style: italic;
}

.ig-post__body blockquote p:last-child {
	margin-bottom: 0;
}

.ig-post__body hr {
	border: 0;
	border-top: 1px solid #e3e7ef;
	margin: 2.5rem 0;
}

/* Wide content must scroll inside itself, never the page. */
.ig-post__body table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	margin: 2rem 0;
	font-size: 0.9375rem;
}

.ig-post__body th,
.ig-post__body td {
	border: 1px solid #e3e7ef;
	padding: 0.65rem 0.85rem;
	text-align: left;
}

.ig-post__body th {
	background: #f7f8fb;
	color: var(--ig-navy, #0d1c4d);
	font-weight: 700;
}

.ig-post__body pre {
	overflow-x: auto;
	background: #0f1830;
	color: #e6ebf7;
	padding: 1rem 1.25rem;
	border-radius: 0.6rem;
	margin: 2rem 0;
}

/* =========================================================================
   Topic tags
   ========================================================================= */
.ig-post__tags {
	max-width: 44rem;
	margin: 3rem auto 0;
	padding-top: 2rem;
	border-top: 1px solid #e3e7ef;
}

.ig-post__tags-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--ig-gold, #b38b3f);
	margin-bottom: 0.9rem;
}

.ig-post__tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ig-post__tag {
	display: inline-block;
	padding: 0.45rem 0.95rem;
	border: 1px solid #d8dde9;
	border-radius: 9999px;
	background: #fff;
	color: var(--ig-navy, #0d1c4d);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ig-post__tag:hover,
.ig-post__tag:focus-visible {
	background: var(--ig-navy, #0d1c4d);
	border-color: var(--ig-navy, #0d1c4d);
	color: #fff;
}

/* =========================================================================
   Previous / next
   ========================================================================= */
.ig-post__pager {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	max-width: 44rem;
	margin: 2.5rem auto 4rem;
}

@media (min-width: 720px) {
	.ig-post__pager {
		grid-template-columns: 1fr 1fr;
	}
}

.ig-post__pager-link {
	display: block;
	padding: 1rem 1.25rem;
	border: 1px solid #e3e7ef;
	border-radius: 0.75rem;
	text-decoration: none;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ig-post__pager-link:hover,
.ig-post__pager-link:focus-visible {
	border-color: var(--ig-gold, #b38b3f);
	box-shadow: 0 10px 24px rgba(13, 28, 77, 0.08);
	transform: translateY(-2px);
}

.ig-post__pager-link--next {
	text-align: right;
}

.ig-post__pager-dir {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--ig-gold, #b38b3f);
	margin-bottom: 0.35rem;
}

.ig-post__pager-title {
	display: block;
	color: var(--ig-navy, #0d1c4d);
	font-weight: 700;
	line-height: 1.4;
}

/* =========================================================================
   Related resources
   ========================================================================= */
.ig-post__related {
	background: #f7f8fb;
	padding: 4rem 0 4.5rem;
	border-top: 1px solid #e9edf4;
}

.ig-post__related-heading {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	color: var(--ig-navy, #0d1c4d);
	margin: 0.5rem 0 2rem;
}

.ig-post__related-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	list-style: none;
	margin: 0 0 2.5rem;
	padding: 0;
}

@media (min-width: 640px) {
	.ig-post__related-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ig-post__related-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.ig-post__related-card > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid #e3e7ef;
	border-radius: 0.9rem;
	overflow: hidden;
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ig-post__related-card > a:hover,
.ig-post__related-card > a:focus-visible {
	border-color: var(--ig-gold, #b38b3f);
	box-shadow: 0 16px 36px rgba(13, 28, 77, 0.12);
	transform: translateY(-3px);
}

.ig-post__related-media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef1f7;
}

.ig-post__related-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ig-post__related-copy {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.25rem 1.35rem 1.4rem;
}

.ig-post__related-type {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ig-gold, #b38b3f);
	margin-bottom: 0.5rem;
}

.ig-post__related-title {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--ig-navy, #0d1c4d);
	margin-bottom: 0.5rem;
}

.ig-post__related-desc {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #5b6478;
	margin-bottom: 1rem;
}

.ig-post__related-more {
	margin-top: auto;
	font-size: 0.875rem;
	font-weight: 700;
	color: #0f5f8a;
}

.ig-post__related-all {
	display: inline-block;
}

/* =========================================================================
   Small screens
   ========================================================================= */
@media (max-width: 719px) {
	.ig-post__hero {
		padding: 2.5rem 0 4.5rem;
	}

	.ig-post__figure {
		margin-top: -3rem;
		border-radius: 0.75rem;
	}

	.ig-post__body {
		margin-top: 2.5rem;
		font-size: 1rem;
	}
}
