/**
 * Single blog post ("Insights" article) -- page-scoped stylesheet.
 *
 * Loaded only on a single `post` view (single.php prints its own <link>,
 * same per-page-CSS convention as about.css / contact.css / insights.css).
 * Layout follows klouddata.com/six-month-sap-cloud-erp-mid-market-manufacturing/:
 * two-column hero, then Table of Contents / article / sticky sidebar,
 * share row + author box, and "More Insights" (which reuses the
 * .service-resources__card component from main.css). The closing
 * "Get in Touch" section reuses .insights-cta from insights.css.
 *
 * @package sap-migration-theme
 */

/* ==========================================================================
   Hero -- breadcrumb, category tag, title, author/date, featured image.
   The header stays transparent over it and turns white on scroll, same as
   the other image heroes.
   ========================================================================== */

.insights-single-hero {
	position: relative;
	overflow: hidden;
	/* Slide up under the floating header, same as the other page heroes. */
	margin-top: -96px;
	background:
		radial-gradient(circle at 15% 0%, rgba(1, 174, 240, 0.1) 0%, rgba(1, 174, 240, 0) 55%),
		radial-gradient(circle at 85% 10%, rgba(11, 77, 162, 0.08) 0%, rgba(11, 77, 162, 0) 55%),
		#fbfbfd;
}

.insights-single-hero.insights-single-hero--has-bg {
	background: #fff;
}

.insights-single-hero__bg-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	opacity: 0.85;
}

.insights-single-hero__inner {
	position: relative;
	max-width: var(--header-max-width);
	margin-inline: auto;
	padding: 184px var(--header-padding-x) 56px;
}

.insights-single-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 56px;
	align-items: center;
}

.insights-single-hero__breadcrumb {
	margin: 0 0 22px;
	font-size: 13px;
	line-height: 1.6;
	color: #64748b;
}

.insights-single-hero__breadcrumb a {
	color: #64748b;
	text-decoration: none;
	transition: color 0.2s ease;
}

.insights-single-hero__breadcrumb a:hover,
.insights-single-hero__breadcrumb a:focus-visible {
	color: #004195;
}

.insights-single-hero__breadcrumb-sep {
	margin: 0 8px;
}

.insights-single-hero__breadcrumb-current {
	color: #475569;
}

.insights-single-hero__tag {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background-color: #e2e8f0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
	color: #004195;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.insights-single-hero__tag:hover,
.insights-single-hero__tag:focus-visible {
	background-color: #004195;
	color: #fff;
}

.insights-single-hero__heading {
	margin: 24px 0;
	font-family: 'Geist', sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 1.2;
	letter-spacing: -0.5px;
	color: var(--color-heading);
}

/* Optional per-post "Hero Intro Text" under the title. */
.insights-single-hero__intro {
	margin: -8px 0 24px;
	font-size: 17px;
	line-height: 1.65;
	color: var(--color-body-text);
	font-weight: 500;
}

.insights-single-hero__meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

.insights-single-hero__meta-avatar {
	width: 52px;
	height: 52px;
	flex-shrink: 0;
	border-radius: 50%;
	object-fit: cover;
}

.insights-single-hero__meta-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.insights-single-hero__meta-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--color-heading);
	text-decoration: none;
	transition: color 0.2s ease;
}

.insights-single-hero__meta-name:hover,
.insights-single-hero__meta-name:focus-visible {
	color: #004195;
}

.insights-single-hero__meta-date {
	font-size: 13px;
	color: #64748b;
}

.insights-single-hero__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 20px;
	box-shadow: 0 20px 50px -20px rgba(10, 17, 40, 0.25);
}

.insights-single-hero__media--placeholder {
	background: linear-gradient(135deg, #004195 0%, #01aef0 100%);
}

.insights-single-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==========================================================================
   Body grid -- Table of Contents / article / sidebar.
   ========================================================================== */

.insights-single__divider {
	max-width: var(--header-max-width);
	margin-inline: auto;
	padding: 0 var(--header-padding-x);
}

.insights-single__divider hr {
	margin: 0;
	border: 0;
	border-top: 1px solid rgba(11, 18, 36, 0.1);
}

.insights-single__inner {
	max-width: var(--header-max-width);
    margin-inline: auto;
    padding-top: 48px;
    padding-bottom: 48px;
	padding-right: 10px;
	padding-left:10px;
}

.insights-single__grid {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) 280px;
	gap: 48px;
	align-items: start;
}

.insights-single__grid--no-toc {
	grid-template-columns: minmax(0, 1fr) 280px;
}

/* Share row + author box: same columns as the grid above, so they line
   up under the article. */
.insights-single__grid--trailer {
	padding-bottom: 8px;
}

/* -- Table of Contents -- */

.insights-single__toc {
	position: sticky;
	top: 104px;
}

.insights-single__toc-heading {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #64748b;
}

.insights-single__toc-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.insights-single__toc-list a {
	padding-left: 12px;
	border-left: 2px solid rgba(11, 18, 36, 0.1);
	font-size: 14px;
	line-height: 1.5;
	color: #64748b;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.insights-single__toc-list a:hover,
.insights-single__toc-list a:focus-visible {
	border-color: #004195;
	color: #004195;
}

/* -- "Summarize this post with" -- */

.insights-single__ai {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 28px;
	padding: 18px 20px;
	border: 1px solid rgba(11, 18, 36, 0.1);
	border-radius: 14px;
	background-color: #f8fafc;
}

.insights-single__ai-label {
	width: 100%;
	font-size: 14px;
	font-weight: 700;
	color: var(--color-heading);
}

.insights-single__ai-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.insights-single__ai-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 18px 8px 10px;
	border: 1px solid rgba(11, 18, 36, 0.12);
	border-radius: 999px;
	background-color: #fff;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--color-heading);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.insights-single__ai-btn:hover,
.insights-single__ai-btn:focus-visible {
	border-color: #004195;
	background-color: #004195;
	color: #fff;
}

.insights-single__ai-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	border-radius: 4px;
	background-color: #fff;
}

/* -- Article typography -- */

.insights-single__body {
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-body-text);
}

.insights-single__body > * {
	margin-top: 0;
	margin-bottom: 18px;
}

.insights-single__body > *:last-child {
	margin-bottom: 0;
}

.insights-single__body h2 {
	margin: 40px 0 16px;
	/* Leaves room under the sticky header when jumping from the TOC. */
	scroll-margin-top: 110px;
	font-family: 'Geist', sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--color-heading);
}

.insights-single__body > h2:first-child {
	margin-top: 0;
}

.insights-single__body h3 {
	margin: 32px 0 12px;
	font-family: 'Geist', sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--color-heading);
}

.insights-single__body h4 {
	margin: 28px 0 10px;
	font-size: 18px;
	font-weight: 700;
	color: var(--color-heading);
}

.insights-single__body a:not(.wp-block-button__link):not(.button):not(.insights-single__video-cta-btn) {
	color: #004195;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.insights-single__body strong {
	font-weight: 700;
	color: var(--color-heading);
}

.insights-single__body ul,
.insights-single__body ol {
	padding-left: 24px;
}

.insights-single__body li + li {
	margin-top: 8px;
}

.insights-single__body li::marker {
	color: #004195;
}

.insights-single__body img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.insights-single__body figure {
	margin-inline: 0;
}

.insights-single__body figcaption {
	margin-top: 10px;
	font-size: 13.5px;
	text-align: center;
	color: #64748b;
}

.insights-single__body blockquote {
	margin: 24px 0;
	padding: 16px 24px;
	border-left: 4px solid #004195;
	border-radius: 12px;
	background-color: rgba(0, 65, 149, 0.07);
	font-style: italic;
}

.insights-single__body blockquote p:last-child {
	margin-bottom: 0;
}

.insights-single__body code {
	padding: 2px 6px;
	border-radius: 4px;
	background-color: #f1f5f9;
	font-size: 0.9em;
	color: var(--color-heading);
}

.insights-single__body pre {
	overflow-x: auto;
	padding: 20px;
	border-radius: 12px;
	background-color: #0b1733;
	color: #fff;
}

.insights-single__body pre code {
	padding: 0;
	background: none;
	color: inherit;
}

.insights-single__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.insights-single__body th,
.insights-single__body td {
	padding: 10px 14px;
	border: 1px solid rgba(11, 18, 36, 0.1);
	text-align: left;
}

.insights-single__body th {
	background-color: #f8fafc;
	font-weight: 700;
	color: var(--color-heading);
}

.insights-single__body hr {
	margin: 40px 0;
	border: 0;
	border-top: 1px solid rgba(11, 18, 36, 0.1);
}

.insights-single__body .wp-block-button__link,
.insights-single__body .button {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 999px;
	background: linear-gradient(94.23deg, #004195 0%, #01aef0 100%);
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
}

.insights-single__body .wp-block-button__link:hover,
.insights-single__body .wp-block-button__link:focus-visible {
	opacity: 0.92;
}

/* -- Optional inline video -- */

.insights-single__video {
	overflow: hidden;
	border-radius: 16px;
	background-color: #0b1733;
}

.insights-single__video-player {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #0b1733;
}

.insights-single__video-cta {
	display: flex;
	justify-content: center;
}

.insights-single__video-cta-btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 999px;
	background: linear-gradient(94.23deg, #004195 0%, #01aef0 100%);
	font-family: 'Geist', sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
}

.insights-single__video-cta-btn:hover,
.insights-single__video-cta-btn:focus-visible {
	opacity: 0.92;
}

/* -- Sidebar -- */

.insights-single__sidebar {
	position: sticky;
	top: 104px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.insights-single__google {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 18px;
	border-radius: 14px;
	background-color: #0b1733;
	color: #fff;
	text-decoration: none;
}

.insights-single__google svg {
	flex-shrink: 0;
}

.insights-single__google span {
	flex: 1;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

.insights-single__google svg:last-child {
	opacity: 0.7;
	transition: opacity 0.2s ease;
}

.insights-single__google:hover svg:last-child,
.insights-single__google:focus-visible svg:last-child {
	opacity: 1;
}

.insights-single__widget {
	position: relative;
	overflow: hidden;
	padding: 24px;
	border: 1px solid rgba(11, 18, 36, 0.08);
	border-radius: 20px;
	background-color: #f8fafc;
	box-shadow: 0 12px 32px -22px rgba(11, 18, 36, 0.22);
}

.insights-single__widget::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #004195 0%, #01aef0 100%);
}

.insights-single__widget-title {
	margin: 0 0 16px;
	font-family: 'Geist', sans-serif;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--color-heading);
}

.insights-single__widget-text {
	margin: -8px 0 16px;
	font-size: 13px;
	line-height: 1.6;
	color: #64748b;
}

.insights-single__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.insights-single__label {
	display: block;
	margin-bottom: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--color-heading);
}

.insights-single__required {
	color: #e0453c;
}

.insights-single__input {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 14px;
	border: 1px solid rgba(11, 18, 36, 0.12);
	border-radius: 12px;
	background-color: #fff;
	font: inherit;
	font-size: 14px;
	color: var(--color-heading);
}

.insights-single__input:focus {
	outline: none;
	border-color: #004195;
}

.insights-single__input[aria-invalid='true'] {
	border-color: #e0453c;
}

.insights-single__error {
	display: block;
	margin-top: 4px;
	font-size: 11.5px;
	color: #e0453c;
}

.insights-single__error:empty {
	display: none;
}

.insights-single__error--server {
	padding: 8px 12px;
	border-radius: 10px;
	background-color: rgba(224, 69, 60, 0.08);
	font-size: 12px;
}

.insights-single__form .g-recaptcha {
	/* The v2 checkbox is 304px wide; scaled to fit the 280px sidebar. */
	transform: scale(0.77);
	transform-origin: 0 0;
	height: 60px;
}

.insights-single__submit {
	width: 100%;
	padding: 13px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(94.23deg, #004195 0%, #01aef0 100%);
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.insights-single__submit:hover,
.insights-single__submit:focus-visible {
	box-shadow: 0 8px 20px -8px rgba(0, 65, 149, 0.45);
}

.insights-single__submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.insights-single__success {
	margin: 0;
	padding: 8px 0;
	font-size: 14px;
	line-height: 1.6;
	text-align: center;
	color: var(--color-heading);
}

/* -- Share row -- */

.insights-single__share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 56px;
}

.insights-single__share-label {
	font-size: 14px;
	font-weight: 700;
	color: var(--color-heading);
}

.insights-single__share-icons {
	display: flex;
	gap: 10px;
}

.insights-single__share-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(11, 18, 36, 0.12);
	border-radius: 50%;
	color: #1f2937;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.insights-single__share-icon:hover,
.insights-single__share-icon:focus-visible {
	border-color: #004195;
	background-color: #f8fafc;
	color: #004195;
}

/* -- Author box -- */

.insights-single__author {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	margin-top: 24px;
	padding: 28px;
	border: 1px solid rgba(11, 18, 36, 0.1);
	border-radius: 20px;
	background-color: #f8fafc;
}

.insights-single__author-avatar {
	width: 88px;
	height: 88px;
	flex-shrink: 0;
	border-radius: 50%;
	object-fit: cover;
}

.insights-single__author-name-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.insights-single__author-name {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--color-heading);
}

.insights-single__author-name a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.insights-single__author-name a:hover,
.insights-single__author-name a:focus-visible {
	color: #004195;
}

.insights-single__author-socials {
	display: flex;
	gap: 6px;
}

.insights-single__author-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 1px solid rgba(11, 18, 36, 0.12);
	border-radius: 50%;
	background-color: #fff;
	color: #1f2937;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.insights-single__author-social svg {
	width: 13px;
	height: 13px;
}

.insights-single__author-social:hover,
.insights-single__author-social:focus-visible {
	border-color: #004195;
	color: #004195;
}

.insights-single__author-bio {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.65;
	color: #64748b;
}

/* -- Article FAQ (accordion: .service-faq__item from main.css) -- */

.insights-single__faq {
	margin-top: 48px;
}

.insights-single__faq-heading {
	margin: 0 0 12px;
	/* Leaves room under the sticky header when jumping from the TOC. */
	scroll-margin-top: 110px;
	font-family: 'Geist', sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--color-heading);
}

.insights-single__faq-subheading {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--color-body-text);
}

.insights-single__faq-heading + .service-faq__list {
	margin-top: 20px;
}

/* ==========================================================================
   More Insights (cards: .service-resources__card from main.css)
   ========================================================================== */

.insights-single-related__inner {
	max-width: var(--header-max-width);
	margin-inline: auto;
	padding: 64px var(--header-padding-x);
}

.insights-single-related__heading {
	margin: 0 0 32px;
	text-align: center;
	font-family: 'Geist', sans-serif;
	font-weight: 700;
	font-size: 30px;
	color: var(--color-heading);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.insights-single__grid,
	.insights-single__grid--no-toc {
		grid-template-columns: minmax(0, 1fr) 260px;
		gap: 36px;
	}

	.insights-single__toc,
	.insights-single__spacer {
		display: none;
	}
}

@media (max-width: 1024px) {
	.insights-single-hero__inner {
		padding: 150px var(--header-padding-x-tablet) 48px;
	}

	.insights-single-hero__heading {
		font-size: 30px;
		line-height: 1.25;
	}

	.insights-single__divider {
		padding: 0 var(--header-padding-x-tablet);
	}

	.insights-single__inner {
		padding: 40px var(--header-padding-x-tablet) 0;
	}

	.insights-single-related__inner {
		padding: 48px var(--header-padding-x-tablet);
	}
}

@media (max-width: 900px) {
	.insights-single-hero__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.insights-single-hero__media {
		aspect-ratio: 16 / 10;
	}
}

@media (max-width: 780px) {
	.insights-single__grid,
	.insights-single__grid--no-toc {
		grid-template-columns: minmax(0, 1fr);
	}

	.insights-single__sidebar {
		position: static;
	}
}

@media (max-width: 640px) {
	.insights-single-hero {
		margin-top: -88px;
	}

	.insights-single-hero__inner {
		padding: 128px var(--header-padding-x-mobile) 40px;
	}

	.insights-single-hero__breadcrumb {
		margin-bottom: 18px;
	}

	.insights-single-hero__heading {
		margin: 18px 0;
		font-size: 26px;
	}

	.insights-single__divider {
		padding: 0 var(--header-padding-x-mobile);
	}

	.insights-single__inner {
		padding: 32px var(--header-padding-x-mobile) 0;
	}

	.insights-single__body h2,
	.insights-single__faq-heading {
		font-size: 24px;
	}

	.insights-single__body h3 {
		font-size: 20px;
	}

	.insights-single-hero__intro {
		font-size: 16px;
	}

	.insights-single__author {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.insights-single__author-name-row {
		justify-content: center;
	}

	.insights-single-related__inner {
		padding: 40px var(--header-padding-x-mobile);
	}

	.insights-single-related__heading {
		font-size: 26px;
	}
}
