/*
 * Insights post: hero + sticky CTA sidebar.
 * Figma: New Solve Website > "Insights sidebar - updated hero" (15892:34846), 1440 frame.
 */

/* Salient's body{overflow:hidden} makes body a scroll box, which stops the sidebar sticking.
   clip still hides sideways overflow without that; older browsers ignore it and keep hidden. */
body.single-post {
	overflow: clip;
}

/* Design sits on white with the hero tight under the header */
body.single-post .container-wrap {
	padding-top: 0;
	background-color: #fff;
}

/* ---------- Hero ---------- */
.solve-post-hero {
	display: flex;
	gap: 80px;
	margin-right: calc(50% - 50vw); /* image bleeds to the right edge of the window */
}
.solve-post-hero__text {
	flex: 0 1 756px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 30px;
	padding: 60px 0;
}
.solve-post-hero__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.solve-post-hero__cats a {
	border: 2px solid #00253a;
	border-radius: 4px;
	padding: 6px 10px;
	font: 500 18px/1 'Roboto Condensed', sans-serif;
	text-transform: uppercase;
	color: #00253a;
}
body.single-post .solve-post-hero h1.entry-title {
	margin: 0;
	padding: 0;
	max-width: none;
	font-family: 'Hanken Grotesk', sans-serif;
	font-weight: 900;
	font-size: 50px;
	line-height: 0.95;
	letter-spacing: 0;
	text-align: left;
	text-transform: uppercase;
	color: #00253a;
}
.solve-post-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	font: 400 16px/1.4 'Hanken Grotesk', sans-serif;
	color: #00253a;
}
.solve-post-hero__meta a {
	color: inherit;
}
.solve-post-hero__sep {
	width: 1px;
	height: 22px;
	background: #8c8c8c;
}
.solve-post-hero__media {
	flex: 1 0 36%; /* 519 of 1440 in the Figma; never squeezed by the title column */
	min-width: 0;
	height: 488px;
}
.solve-post-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Content + sidebar columns ---------- */
.row.solve-post-layout {
	display: flex;
	align-items: stretch;
	gap: 100px;
	padding-top: 60px;
}
.row.solve-post-layout:before,
.row.solve-post-layout:after {
	display: none;
}
body.single-post .row.solve-post-layout .post-area {
	flex: 0 1 758px;
	min-width: 0;
	max-width: 758px;
	width: auto;
	margin: 0;
	float: none;
	/* Old posts with full-width WPBakery rows would otherwise paint across the sidebar */
	overflow-x: clip;
	overflow-clip-margin: 20px;
}
/* Featured image now lives in the hero */
.solve-post-layout .post-featured-img {
	display: none;
}

.solve-post-sidebar {
	flex: 0 0 384px;
	padding: 150px 0;
}
.solve-post-sidebar__inner {
	display: flex;
	flex-direction: column;
	gap: 40px;
}
@media (min-width: 1000px) {
	.solve-post-sidebar__inner {
		position: sticky;
		/* ponytail: 760px ≈ sidebar height + 40px. On short screens the top goes negative so the
		   booking card and share links stay in view; update it if the cards change height. */
		top: min(40px, calc(100vh - 760px));
	}
}

/* ---------- Sidebar cards: "Insights Sidebar" global section (WPBakery) ----------
   Salient handles the card padding, background, radius, shadow and button.
   These only set the Figma type sizes and the newsletter field. */
body.single-post .solve-post-sidebar .nectar-global-section-wrap,
body.single-post .solve-post-sidebar .wpb_row,
body.single-post .solve-post-sidebar .wpb_content_element,
body.single-post .solve-post-sidebar .wpforms-container {
	margin-bottom: 0;
}
body.single-post .solve-sidebar-newsletter .vc_column-inner > .wpb_wrapper {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
body.single-post .solve-sidebar-call .vc_column-inner > .wpb_wrapper {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 15px;
}
body.single-post .solve-post-sidebar .solve-sidebar-newsletter h3 {
	margin: 0;
	padding: 0;
	font-size: 28px;
	line-height: 1;
}
body.single-post .solve-post-sidebar .solve-sidebar-small {
	padding: 0;
	font-size: 12px;
	line-height: 1.5;
}
body.single-post .solve-post-sidebar .solve-sidebar-small a {
	text-decoration: underline;
}
body.single-post .solve-post-sidebar .solve-sidebar-call h4 {
	margin: 0 0 15px;
	padding: 0;
	font-family: 'Hanken Grotesk', sans-serif;
	font-weight: 600;
	font-size: 21px;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
}
body.single-post .solve-post-sidebar .solve-sidebar-call p {
	padding: 0;
	font-size: 16px;
	line-height: 1.4;
}
body.single-post .solve-post-sidebar .nectar-button {
	margin: 0;
	padding: 12px 20px;
}

/* Author row ([solve_post_author]) */
body.single-post .solve-author {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}
body.single-post .solve-author__avatar {
	position: relative;
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 100px;
	overflow: hidden;
}
body.single-post .solve-author__avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
body.single-post .solve-author__avatar:after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
}
body.single-post .solve-author__who {
	display: flex;
	flex-direction: column;
	font-size: 10px;
	line-height: 1.4;
}
body.single-post .solve-author__who strong {
	font-weight: 600;
}

/* Newsletter field + button (WPForms) */
body.single-post .solve-sidebar-newsletter .wpforms-form .wpforms-field {
	padding: 0;
}
body.single-post .solve-sidebar-newsletter .wpforms-form input[type='email'] {
	width: 100%;
	max-width: none;
	height: 41px;
	padding: 12px;
	border: 2px solid #00253a;
	border-radius: 5px;
	background: #fff;
	font-size: 16px;
	line-height: 1.5;
	color: #00253a;
}
body.single-post .solve-sidebar-newsletter .wpforms-form input[type='email']::placeholder {
	color: #666;
	opacity: 1;
}
body.single-post .solve-sidebar-newsletter .wpforms-form .wpforms-submit-container {
	margin: 16px 0 0;
	padding: 0;
}
body[data-form-submit] .solve-sidebar-newsletter .wpforms-form button[type='submit'] {
	width: 100%;
	padding: 10px 18px !important; /* beats Salient's !important submit padding */
	border: 2px solid #d9315e;
	border-radius: 4px;
	background: #d9315e;
}
body.single-post .solve-post-sidebar .wpforms-form button[type='submit'],
body.single-post .solve-post-sidebar .nectar-button {
	font-family: 'Roboto Condensed', sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 1;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #fff;
}

/* ---------- Share ---------- */
.solve-share {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}
.solve-share__label {
	font: 500 18px/1 'Roboto Condensed', sans-serif;
	text-transform: uppercase;
	color: #00253a;
}
.solve-share ul {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.single-post .solve-share li {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}
.solve-share a {
	display: flex;
	padding: 6px; /* 8px in Figma includes the 2px border */
	border: 2px solid #00253a;
	border-radius: 100px;
	transition: background-color 0.2s;
}
.solve-share a:hover,
.solve-share a:focus-visible {
	background: rgba(0, 37, 58, 0.08);
}

/* ---------- Love / Share / Pin bar under the post ----------
   Salient gives each button different padding/margins and sits them on the text baseline,
   so they come out uneven (same on live). Same height, padding and centring for all. */
body.single-post .sharing-default-minimal .nectar-social-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}
body.single-post .sharing-default-minimal .nectar-social-inner > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 40px;
	margin: 0;
	padding: 0 20px;
	line-height: 1;
}
body.single-post .sharing-default-minimal .nectar-social-inner > a > * {
	position: static;
	margin: 0;
	padding: 0;
	line-height: 1;
	vertical-align: middle;
}
body.single-post .sharing-default-minimal .nectar-love .total_loves {
	margin-left: 4px;
	padding: 2px 8px;
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 999px) {
	.solve-post-hero {
		flex-direction: column;
		gap: 0;
		margin-right: 0;
	}
	.solve-post-hero__text {
		flex-basis: auto;
		padding: 40px 0 30px;
	}
	body.single-post .solve-post-hero h1.entry-title {
		font-size: 36px;
	}
	.solve-post-hero__meta {
		gap: 4px 16px;
	}
	.solve-post-hero__sep {
		display: none; /* would dangle at line ends once the meta wraps */
	}
	.solve-post-hero__media {
		height: auto;
		aspect-ratio: 519 / 488;
	}
	.row.solve-post-layout {
		flex-direction: column;
		gap: 40px;
		padding-top: 40px;
	}
	body.single-post .row.solve-post-layout .post-area {
		flex-basis: auto;
		max-width: none;
	}
	.solve-post-sidebar {
		flex-basis: auto;
		padding: 0 0 60px;
	}
}
