/**
 * Single Post Layout
 * Two-column split for singular Insights (post_type = post): Page Builder
 * content on the left, a sticky "Related Insights" panel on the right.
 * Case Studies and other post types are unaffected — see content-single.php.
 */

/* ===========================
   # Section shell
=========================== */

/*.single-post-layout {
	padding: 64px 0 80px;
}*/

.single-post-layout__main {
	min-width: 0;
}

/* ===========================
   # Sticky sidebar — desktop only (Bootstrap lg breakpoint)
=========================== */

@media (min-width: 992px) {
	.single-post-layout__sidebar-inner {
		position: sticky;
		/* Single posts always show the breadcrumbs bar (never the front page). */
		top: calc(var(--header-height, 70px) + var(--breadcrumbs-height, 51px) + 32px);
		margin-bottom: 50px;
	}
}

.single-post-layout__sidebar {
	margin-top: 40px;
}

@media (min-width: 992px) {
  .single-post-layout__sidebar {
    margin-top: 80px;
  }
}

/* ===========================
   # Related Insights panel
=========================== */

.related-insights__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
}

.related-insights__dot {
	display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--nec-orange);
  box-shadow: 0 0 0 5px rgba(235, 110, 0, 0.18);
  flex-shrink: 0;
}

.related-insights__header-text {
	font-family: var(--nec-font);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--nec-grey);
}

.related-insights__list {
	display: flex;
	flex-direction: column;
}

/* ===========================
   # Related item row
=========================== */

.related-insights__item {
	display: flex;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid rgba(56, 66, 73, 0.15);
	color: inherit;
	text-decoration: none;
}

.related-insights__item:focus-visible {
	outline: 2px solid var(--nec-orange);
	outline-offset: 2px;
}

.related-insights__item:first-child {
	padding-top: 0;
}

.related-insights__item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.related-insights__item-image {
	flex-shrink: 0;
	width: 90px;
	height: 90px;
	overflow: hidden;
}

.related-insights__item-img,
.related-insights__item-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.related-insights__item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.related-insights__item-title {
	margin: 0;
	font-family: var(--nec-font);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--nec-grey);
	transition: color 0.2s ease;
}

.related-insights__item:hover .related-insights__item-title,
.related-insights__item:focus-visible .related-insights__item-title {
	color: var(--nec-orange);
}

.related-insights__item-excerpt {
	margin: 0;
	color: var(--nec-grey);
	font-size: 0.875rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.related-insights__item-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--nec-grey);
	font-family: var(--nec-font);
	font-size: 0.875rem;
	font-weight: 500;
	align-self: flex-start;
}

.related-insights__item-cta-icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.related-insights__item:hover .related-insights__item-cta-icon,
.related-insights__item:focus-visible .related-insights__item-cta-icon {
	transform: translateX(4px);
}

.related-insights__item-cta-icon svg {
	width: 24px;
	height: 24px;
	color: var(--nec-orange);
}


/* ===========================
   # Overrides for Page Builder modules
	 (to ensure proper spacing in the two-column layout)
=========================== */
.single-post-layout__main {padding:50px 50px 50px 0px}

.single-post-layout__main .content-module,
.single-post-layout__main .cta-module--card,
.single-post-layout__main .gated-content-module,
.single-post-layout__main .image-module,
.single-post-layout__main .contact-form-module {padding:20px 0px}

.single-post-layout__main .content-quote-module {padding:50px 0px 20px}

.single-post-layout__main .image-module .container,
.single-post-layout__main .cta-module--card .container,
.single-post-layout__main .gated-content-module .container,
.single-post-layout__main .contact-form-module .container {padding:0px!important}



/* ===========================
   # Responsive — 767px
=========================== */

@media (max-width: 767px) {
	.single-post-layout {
		padding: 40px 0 56px;
	}

	.related-insights__item-image {
		width: 72px;
		height: 72px;
	}
}
