/**
 * JP Financial Single Blog Post Stylesheet
 * Matched precisely to Figma Design Node 43:2296
 */

/* ==========================================================================
   Design Tokens & CSS Variables (Figma Specs)
   ========================================================================== */
:root {
	--jp-color-primary: #00352d;
	--jp-color-dark-bg: #001208;
	--jp-color-accent: #dafba2;
	--jp-color-bg-light: #f5f4f0;
	--jp-color-white: #ffffff;
	--jp-color-text-dark: #001c10;
	--jp-color-text-body: #333333;
	--jp-color-text-muted: #6b6b6b;
	--jp-color-text-subtle: #8e8e8e;
	--jp-color-border-light: #e8e8e8;

	--jp-font-heading: "TWK Everett", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--jp-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	--jp-radius-sm: 8px;
	--jp-radius-md: 12px;
	--jp-radius-lg: 24px;
	--jp-radius-xl: 40px;
	--jp-radius-pill: 999px;

	--jp-container-max: 1280px;
	--jp-content-max: 800px;
}

/* Keep the global footer surroundings aligned with the post page background. */
body.single-post,
body.single-post .elementor-location-footer {
	background-color: var(--jp-color-bg-light);
}

/* ==========================================================================
   Base Layout & Reset
   ========================================================================== */
.jp-single-post-wrapper {
	font-family: var(--jp-font-body);
	color: var(--jp-color-text-dark);
	background-color: var(--jp-color-bg-light);
	line-height: 1.6;
	margin: 0;
	padding: 0;
}

.jp-container {
	width: 100%;
	max-width: var(--jp-container-max);
	margin: 0 auto;
	padding: 0 40px;
	box-sizing: border-box;
}

/* ==========================================================================
   Section 1: Hero Section (Dark Theme #001208)
   ========================================================================== */
.jp-single-hero {
	background-color: var(--jp-color-dark-bg);
	color: #ffffff;
	min-height: 830px;
	box-sizing: border-box;
	padding: 140px 0 80px;
	position: sticky;
	top: 0;
	z-index: 1;
	overflow: hidden;
}

/* Once the white article panel has fully passed, let the hero leave with the document. */
.jp-single-hero.jp-hero-scroll-released {
	position: relative;
	top: auto;
	visibility: hidden;
	pointer-events: none;
}

.jp-hero-grid {
	display: grid;
	grid-template-columns: 1fr 562px;
	gap: 48px;
	align-items: start;
}

.jp-hero-content {
	max-width: 680px;
}

.jp-single-hero > .jp-container {
	max-width: 1440px;
	padding-left: 72px;
	padding-right: 80px;
}

/* Breadcrumb & Category Bar */
.jp-hero-top-bar {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
}

.jp-hero-back-link {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 1.68px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
	text-decoration: none;
	transition: color 0.2s ease;
}

.jp-hero-back-link:hover {
	color: #ffffff;
}

.jp-hero-divider-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.2);
}

.jp-hero-category-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 14px;
	background-color: var(--jp-color-accent);
	color: var(--jp-color-text-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.68px;
	text-transform: uppercase;
	border-radius: var(--jp-radius-pill);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.jp-hero-category-pill:hover {
	opacity: 0.9;
}

/* Title */
.jp-hero-title {
	font-family: var(--jp-font-heading);
	font-size: clamp(36px, 4.5vw, 56px);
	font-weight: 500;
	line-height: 1.04;
	letter-spacing: -2px;
	color: #ffffff;
	margin: 0 0 20px;
}

.jp-hero-title span {
	color: var(--jp-color-accent);
	font-style: italic;
}

/* Excerpt / Lead Text */
.jp-hero-excerpt {
	font-size: 17px;
	line-height: 31px;
	color: rgba(255, 255, 255, 0.72);
	margin-bottom: 36px;
}

/* Meta Bar */
.jp-hero-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.jp-hero-author {
	display: flex;
	align-items: center;
	gap: 14px;
	color: inherit;
	text-decoration: none;
}

.jp-hero-author:hover,
.jp-hero-author:focus-visible {
	color: inherit;
	text-decoration: none;
	opacity: 0.86;
}

.jp-hero-author-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
}

.jp-hero-author-info {
	display: flex;
	flex-direction: column;
}

.jp-hero-author-name {
	font-size: 14px;
	font-weight: 700;
	color: #ffffff;
}

.jp-hero-author-role {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}

.jp-hero-meta-divider {
	width: 1px;
	height: 32px;
	background-color: rgba(255, 255, 255, 0.15);
}

.jp-hero-meta-text {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.74);
}

/* Featured Media */
.jp-hero-media {
	width: 100%;
	max-width: 562px;
	height: 527px;
	border-radius: var(--jp-radius-md);
	overflow: hidden;
	box-shadow: 0px 16px 48px rgba(0, 0, 0, 0.2);
}

.jp-hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1);
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
	.jp-hero-media:hover img {
		transform: scale(1.045);
	}
}

@media (prefers-reduced-motion: reduce) {
	.jp-hero-media img {
		transition: none;
	}
}

/* ==========================================================================
   Section 2: Article Content (White Background #ffffff with rounded top)
   ========================================================================== */
.jp-single-content-wrapper {
	background-color: #ffffff;
	border-top-left-radius: var(--jp-radius-xl);
	border-top-right-radius: var(--jp-radius-xl);
	padding: 96px 0 104px;
	margin-top: -76px;
	position: relative;
	z-index: 2;
}

.jp-content-container {
	max-width: var(--jp-content-max);
	margin: 0 auto;
}

.jp-article-body {
	font-size: 18px;
	line-height: 1.8;
	color: var(--jp-color-text-dark);
}

.jp-article-body > * + * {
	margin-top: 1.5em;
}

/* Headings */
.jp-article-body h2 {
	font-family: var(--jp-font-heading);
	font-size: clamp(28px, 3.5vw, 36px);
	font-weight: 700;
	line-height: 41.4px;
	letter-spacing: -0.72px;
	color: var(--jp-color-text-dark);
	margin-top: 2em;
	margin-bottom: 0.6em;
}

.jp-article-body h3 {
	font-family: var(--jp-font-body);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.2px;
	color: var(--jp-color-text-dark);
	margin-top: 1.8em;
	margin-bottom: 0.5em;
}

.jp-article-body p {
	margin-bottom: 1.5em;
}

/* Figma article opening: the first character spans roughly three body lines. */
.jp-article-body > p:first-of-type::first-letter {
	float: left;
	margin: 5px 16px 0 0;
	font-family: var(--jp-font-body);
	font-size: 86px;
	font-weight: 400;
	line-height: 0.86;
	color: var(--jp-color-text-dark);
}

.jp-article-body strong {
	font-weight: 700;
	color: var(--jp-color-text-dark);
}

.jp-article-body a {
	color: var(--jp-color-primary);
	text-decoration: underline;
	text-underline-offset: 4px;
	font-weight: 600;
}

.jp-article-body a:hover {
	color: #000;
}

/* Blockquote (Figma design: #f5f5f5 background, #dafba2 border-left 4px, 24px italic text) */
.jp-article-body blockquote {
	margin: 2.5em 0;
	min-height: 161.19px;
	box-sizing: border-box;
	padding: 27px 62px 22px 40px;
	background-color: #f5f5f5;
	border-left: 4px solid var(--jp-color-accent);
	border-radius: var(--jp-radius-sm);
	font-style: italic;
	font-size: 24px;
	line-height: 33.6px;
	font-weight: 400;
	letter-spacing: 0;
	color: var(--jp-color-text-dark);
}

.jp-article-body blockquote p {
	margin: 0;
}

.jp-article-body blockquote cite {
	display: block;
	font-style: normal;
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	letter-spacing: 0.56px;
	color: var(--jp-color-text-muted);
	margin-top: 10px;
}

/* Lists */
.jp-article-body ul,
.jp-article-body ol {
	padding-left: 1.5em;
	margin-bottom: 1.8em;
}

.jp-article-body li {
	margin-bottom: 0.8em;
	line-height: 28.9px;
}

.jp-article-body ul li::marker {
	color: var(--jp-color-primary);
}

/* Images inside article */
.jp-article-body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--jp-radius-md);
	margin: 2em 0;
	display: block;
}

.jp-article-body video {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

.jp-article-body .wp-video {
	width: 100% !important;
	max-width: 100% !important;
}

@media (max-width: 767px) {
	.jp-article-body .alignwide {
		width: 100% !important;
		max-width: 100% !important;
		margin-right: 0 !important;
		margin-left: 0 !important;
	}
}

/* Social Share Bar */
.jp-share-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 64px;
	padding-top: 32px;
	border-top: 1px solid var(--jp-color-border-light);
}

.jp-share-label {
	font-size: 15px;
	font-weight: 700;
	color: var(--jp-color-text-dark);
}

.jp-share-buttons-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

.jp-share-icon-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background-color: var(--jp-color-bg-light);
	color: var(--jp-color-primary);
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;

	/* Explicit touch targets */
	min-height: 44px;
}

.jp-share-icon-btn:hover,
.jp-share-icon-btn:active,
.jp-share-icon-btn:focus,
.jp-share-icon-btn:focus-visible {
	background-color: var(--jp-color-primary);
	color: var(--jp-color-accent);
	transform: translateY(-2px);
	border: none;
	outline: none;
	box-shadow: none;
}

#jp-copy-link-btn:focus,
#jp-copy-link-btn:focus-visible {
	outline: 2px solid var(--jp-color-accent);
	outline-offset: 3px;
}

/* Prevent Elementor/browser button states from replacing the JP share styling. */
#jp-copy-link-btn:hover,
#jp-copy-link-btn:active,
#jp-copy-link-btn:focus {
	background-color: var(--jp-color-primary) !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--jp-color-accent) !important;
}

#jp-copy-link-btn:focus-visible {
	outline: 2px solid var(--jp-color-accent) !important;
	outline-offset: 3px;
}

.jp-share-icon-btn svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.jp-toast-msg {
	display: none;
	font-size: 13px;
	font-weight: 600;
	color: var(--jp-color-primary);
}

/* ==========================================================================
   Section 3: Author Box (Figma node 43:2298)
   ========================================================================== */
.jp-author-box-wrapper {
	margin-top: 64px;
}

.jp-author-box-card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 197.78px;
	box-sizing: border-box;
	padding: 20px 21px;
	background-color: var(--jp-color-bg-light);
	border: 1px solid #d4d4d4;
	border-radius: var(--jp-radius-md);
}

.jp-author-avatar-img {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.jp-author-box-content {
	flex-grow: 1;
}

.jp-author-box-kicker {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.68px;
	text-transform: uppercase;
	color: var(--jp-color-primary);
	margin-bottom: 6px;
}

.jp-author-box-name {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.48px;
	color: var(--jp-color-text-dark);
	margin: 0 0 4px;
}

.jp-author-box-name a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.jp-author-box-name a:hover,
.jp-author-box-name a:focus-visible {
	color: var(--jp-color-primary);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.jp-author-box-role {
	font-size: 14px;
	color: var(--jp-color-text-muted);
	margin-bottom: 12px;
}

.jp-author-box-bio {
	font-size: 14px;
	line-height: 22.4px;
	color: var(--jp-color-text-muted);
	margin: 0;
}

.jp-author-linkedin {
	position: absolute;
	right: 21px;
	top: 21px;
	display: inline-flex;
	width: 35px;
	height: 35px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	line-height: 0;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.jp-author-linkedin:hover,
.jp-author-linkedin:focus-visible {
	transform: translateY(-2px);
	opacity: 0.82;
}

.jp-author-linkedin img {
	display: block;
	width: 35px;
	height: 35px;
	margin: 0;
}

/* ==========================================================================
   Section 4: Related Articles Grid (Figma node 43:2305)
   ========================================================================== */
.jp-related-posts-section {
	background-color: var(--jp-color-bg-light);
	border-top: 1px solid var(--jp-color-border-light);
	padding: 99px 0 1px;
}

.jp-related-posts-section > .jp-container {
	width: calc(100% - 260px);
	max-width: none;
	box-sizing: border-box;
	padding-left: 0;
	padding-right: 0;
}

.jp-related-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 51px;
}

.jp-related-head-title {
	font-family: var(--jp-font-heading);
	font-size: clamp(36px, 4vw, 56px);
	font-weight: 700;
	line-height: 52px;
	letter-spacing: -1px;
	color: var(--jp-color-text-dark);
	margin: 0;
}

.jp-related-head-title .accent {
	color: var(--jp-color-accent);
	font-style: italic;
	background-color: rgba(0, 53, 45, 0.38);
	padding: 0 4px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.jp-related-view-all {
	font-size: 18px;
	font-weight: 600;
	color: var(--jp-color-primary);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.jp-related-view-all:hover {
	opacity: 0.75;
}

.jp-related-grid-3col {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

/* Post Card */
.jp-card-item {
	display: flex;
	flex-direction: column;
	background-color: transparent;
	text-decoration: none;
	color: inherit;
	min-width: 0;
	height: 465.78px;
	box-sizing: border-box;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.jp-card-item:hover,
.jp-card-item:focus-visible {
	transform: translateY(-4px);
}

.jp-card-media {
	width: 100%;
	aspect-ratio: 372 / 279;
	border-radius: var(--jp-radius-md);
	overflow: hidden;
	margin-bottom: 22px;
	background-color: #e0e0e0;
}

.jp-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.jp-card-item:hover .jp-card-media img {
	transform: scale(1.05);
}

.jp-card-meta-line {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.jp-card-category {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--jp-color-primary);
}

.jp-card-time {
	font-size: 12px;
	color: var(--jp-color-text-subtle);
}

.jp-card-title {
	font-family: var(--jp-font-body);
	font-size: 20px;
	font-weight: 700;
	line-height: 25px;
	letter-spacing: -0.3px;
	color: var(--jp-color-text-dark);
	margin: 0 0 12px;
	transition: color 0.2s ease;
}

.jp-card-item:hover .jp-card-title,
.jp-card-item:focus-visible .jp-card-title {
	color: var(--jp-color-primary);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.jp-card-item,
	.jp-card-media img,
	.jp-card-title {
		transition: none;
	}
}

.jp-card-excerpt {
	font-size: 14px;
	line-height: 22.4px;
	color: var(--jp-color-text-muted);
	margin-bottom: 16px;
}

.jp-card-author-date {
	font-size: 12px;
	color: var(--jp-color-text-subtle);
	margin-top: auto;
}

/* JP SINGLE POST EDITORIAL TYPOGRAPHY 20260902 */
body.single-post .jp-newsletter-heading {
	font-weight: 500;
}

@media (min-width: 1101px) {
	body.single-post .jp-hero-title {
		font-size: clamp(42px, 3.5vw, 50px);
	}

	body.single-post .jp-newsletter-info {
		max-width: 680px;
	}

	body.single-post .jp-newsletter-heading {
		font-size: clamp(46px, 3.65vw, 52px);
		line-height: 1.02;
		letter-spacing: -2px;
	}
}

@media (min-width: 1101px) and (max-width: 1399px) {
	body.single-post .jp-hero-grid {
		grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr);
		gap: 40px;
	}

	body.single-post .jp-hero-content {
		max-width: none;
	}

	body.single-post .jp-newsletter-card-inner {
		gap: 40px;
	}

	body.single-post .jp-newsletter-info {
		flex: 1 1 auto;
		min-width: 0;
		max-width: none;
	}

	body.single-post .jp-newsletter-form-wrap {
		flex: 0 0 440px;
		max-width: 440px;
	}
}

@media (min-width: 1101px) and (max-width: 1199px) {
	body.single-post .jp-newsletter-card-inner {
		align-items: flex-start;
		flex-direction: column;
	}

	body.single-post .jp-newsletter-form-wrap {
		flex: 0 1 auto;
		max-width: 520px;
	}
}
/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1100px) {
	.jp-container {
		padding-left: 32px;
		padding-right: 32px;
	}

	.jp-single-hero > .jp-container {
		padding-left: 32px;
		padding-right: 32px;
	}

	.jp-related-posts-section > .jp-container {
		width: 100%;
		padding-left: 32px;
		padding-right: 32px;
	}

	.jp-hero-grid {
		grid-template-columns: 1fr;
		gap: 48px;
	}

	.jp-hero-media {
		max-width: 100%;
		height: 380px;
	}

}

@media (max-width: 900px) {
	.jp-related-grid-3col {
		grid-template-columns: repeat(2, 1fr);
	}

}

@media (max-width: 640px) {
	.jp-container {
		padding-left: 20px;
		padding-right: 20px;
	}

	.jp-single-hero {
		min-height: 0;
		padding: 32px 0 72px;
	}

	.jp-single-hero > .jp-container {
		padding-left: 20px;
		padding-right: 20px;
	}

	.jp-hero-grid {
		gap: 36px;
	}

	.jp-hero-media {
		order: -1;
	}

	.jp-hero-title {
		font-size: clamp(36px, 10vw, 46px);
		line-height: 1.04;
		letter-spacing: -1.8px;
	}

	.jp-hero-excerpt {
		font-size: 16px;
		line-height: 25px;
	}

	.jp-hero-meta {
		gap: 14px;
		padding-top: 20px;
	}

	.jp-hero-meta-divider {
		height: 24px;
	}

	.jp-hero-meta-text {
		font-size: 12px;
	}

	.jp-hero-media {
		height: auto;
		aspect-ratio: 1 / 1;
		border-radius: var(--jp-radius-md);
	}

	.jp-single-content-wrapper {
		padding: 64px 0 72px;
		margin-top: -28px;
	}

	.jp-article-body {
		font-size: 16px;
		line-height: 1.7;
	}

	.jp-article-body > p:first-of-type::first-letter {
		margin-right: 12px;
		font-size: 64px;
		line-height: 0.88;
	}

	.jp-article-body h2 {
		font-size: 30px;
		line-height: 1.15;
		letter-spacing: -0.8px;
	}

	.jp-article-body blockquote {
		min-height: 0;
		padding: 24px 24px 22px 24px;
		font-size: 20px;
		line-height: 28px;
	}

	.jp-article-body blockquote cite {
		font-size: 12px;
		line-height: 16px;
		letter-spacing: 0.48px;
	}

	.jp-share-container {
		align-items: flex-start;
		flex-direction: column;
		margin-top: 48px;
		padding-top: 24px;
	}

	.jp-author-box-wrapper {
		margin-top: 48px;
	}

	.jp-author-box-card {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.jp-author-linkedin {
		position: absolute;
		top: 16px;
		right: 16px;
		margin-top: 0;
	}

	.jp-related-grid-3col {
		grid-template-columns: 1fr;
	}

	.jp-related-posts-section {
		padding: 72px 0 80px;
	}

	.jp-related-posts-section > .jp-container {
		max-width: 100%;
		padding-left: 12px;
		padding-right: 12px;
	}

	.jp-related-head {
		align-items: flex-start;
		flex-direction: column;
		gap: 18px;
		margin-bottom: 32px;
	}

	.jp-related-head-title {
		font-size: 40px;
		line-height: 1.05;
	}

	.jp-card-item {
		height: auto;
	}

	.jp-related-view-all {
		font-size: 16px;
	}

	.jp-card-media {
		aspect-ratio: 1.28 / 1;
	}

	.jp-card-title {
		font-size: 20px;
		line-height: 1.25;
	}

}

/* JP HERO STICKY FINAL QA 20260902 */
@media (min-width: 1101px) {
	body.single-post .jp-hero-title {
		font-family: "TWK Everett", "Inter", sans-serif !important;
		font-size: 56px !important;
		font-weight: 700 !important;
		letter-spacing: -2.52px !important;
		line-height: 73.44px !important;
		text-wrap: balance;
	}
}

/* JP HERO RESPONSIVE FINAL 20260902 */
body.single-post .jp-hero-title {
	font-weight: 700 !important;
}
