/* Karim Home Widgets – article styles (generated from temp/blog-single.html + case-study-single.html, scoped to .khw-article) */

.khw-article.article {
	padding: 72px 0 110px;
}

/* Content + sticky sidebar */
.khw-article .article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 80px;
	align-items: start;
	max-width: 1600px;
	margin: 0 auto;
}

.khw-article .article-body--narrow {
	max-width: 980px;
	margin: 0 auto;
}

/* The sidebar runs the full article height; recent posts scroll away, the TOC + form stick */
.khw-article .sidebar {
	display: grid;
	gap: 24px;
	align-self: stretch;
	align-content: start;
}

.khw-article .side-sticky {
	position: sticky;
	top: 24px;
	display: grid;
	gap: 24px;
}

@media (min-width: 1101px) and (max-height: 900px) {
	.khw-article .side-sticky {
		display: contents;
	}

	.khw-article .side-form {
		order: 1;
	}

	.khw-article .side-toc {
		order: 2;
		position: sticky;
		top: 24px;
	}
}

.khw-article .side-toc {
	padding: 30px 32px 22px;
	border-radius: 8px;
	background: var(--card-bg);
}

.khw-article .side-toc[hidden],
.khw-article .toc-inline[hidden] {
	display: none;
}

.khw-article .side-toc .side-label {
	color: var(--navy-500);
}

.khw-article .toc-list {
	display: grid;
	gap: 2px;
	margin-top: 12px;
	list-style: none;
	counter-reset: toc;
}

.khw-article .toc-list a {
	display: flex;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--navy-600);
	counter-increment: toc;
	transition: background .2s, color .2s;
}

.khw-article .toc-list a::before {
	content: counter(toc, decimal-leading-zero);
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.55;
	color: var(--navy-300);
}

.khw-article .toc-list a:hover {
	color: var(--dark);
	background: rgba(255, 255, 255, .6);
}

.khw-article .toc-list a.is-active {
	color: var(--dark);
	background: var(--white);
	box-shadow: inset 3px 0 0 var(--gold);
}

.khw-article .toc-list a.is-active::before {
	color: var(--dark);
}

/* Inline copy for tablet/mobile, where the sidebar sits below the article */
.khw-article .toc-inline {
	display: none;
}

.khw-article .toc-inline-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var(--navy-500);
}

.khw-article .article-body .toc-inline .toc-list {
	display: grid;
	gap: 2px;
}

.khw-article .article-body .toc-inline li {
	padding-left: 0;
}

.khw-article .article-body .toc-inline li::before {
	content: none;
}

.khw-article .article-body .toc-inline .toc-list a {
	text-decoration: none;
	font-weight: 500;
	color: var(--navy-600);
}

.khw-article .article-body .toc-inline .toc-list a:hover {
	color: var(--dark);
}

.khw-article .article-body h2[id] {
	scroll-margin-top: 24px;
}

.khw-article .side-recent {
	padding: 36px 40px 28px;
	border-radius: 8px;
	background: var(--dark);
	color: var(--white);
}

.khw-article .side-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var(--gold);
}

.khw-article .side-recent ul {
	margin-top: 10px;
	list-style: none;
}

.khw-article .side-recent li + li {
	border-top: 1px solid rgba(255, 255, 255, .12);
}

.khw-article .side-recent a {
	display: flex;
	gap: 14px;
	padding: 16px 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	transition: color .2s;
}

.khw-article .side-recent a::before {
	content: "";
	flex-shrink: 0;
	width: 7px;
	height: 7px;
	margin-top: .5em;
	border-radius: 50%;
	background: var(--gold);
}

.khw-article .side-recent a:hover {
	color: var(--gold);
}

.khw-article .side-form {
	padding: 40px;
	border: 1px solid var(--navy-200);
	border-radius: 8px;
	background: var(--white);
}

.khw-article .side-form h2 {
	font-size: 24px;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.khw-article .side-form p {
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--navy-500);
}

.khw-article .side-form .fields {
	display: grid;
	gap: 14px;
	margin-top: 24px;
}

.khw-article .side-form input,
.khw-article .side-form textarea {
	width: 100%;
	height: 54px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 4px;
	background: var(--card-bg);
	box-shadow: none;
	font: inherit;
	font-size: 15px;
	line-height: normal;
	color: var(--dark);
	outline: none;
	transition: border-color .2s, background .2s, box-shadow .2s;
}

.khw-article .side-form textarea {
	height: 120px;
	padding: 16px 20px;
	resize: vertical;
}

.khw-article .side-form ::placeholder {
	color: var(--navy-500);
	opacity: 1;
}

.khw-article .side-form input:focus,
.khw-article .side-form textarea:focus {
	border-color: var(--dark);
	background: var(--white);
	box-shadow: 0 0 0 3px rgba(255, 215, 0, .55);
}

.khw-article .side-form .btn {
	margin-top: 24px;
}

.khw-article .side-form .btn-lime:hover {
	--btn-bg: var(--navy-800);
	color: var(--white);
}

.khw-article .side-form .btn-lime:hover .btn-label,
.khw-article .side-form .btn-lime:hover .btn-icon {
	color: var(--white);
}

.khw-article .side-form .btn[disabled] {
	opacity: .6;
	cursor: progress;
}

.khw-article .side-form .form-status {
	font-weight: 500;
	color: var(--navy-600);
}

.khw-article .side-form .form-status.is-error {
	color: #B42318;
}

.khw-article .side-form .form-status:empty {
	display: none;
}

/* Free guide box: the only sticky item; recent links and the TOC scroll away above it */
.khw-article .sidebar--ebook .side-sticky {
	display: grid;
}

.khw-article .sidebar--ebook .side-toc {
	position: static;
}

.khw-article .side-ebook {
	padding: 28px 32px 32px;
	border: 0;
	background: var(--dark);
	color: var(--white);
}

.khw-article .side-ebook-img {
	display: block;
	width: 82%;
	height: auto;
	margin: 0 auto 18px;
	filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .35));
}

.khw-article .side-ebook .side-label {
	margin-top: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--gold);
}

.khw-article .side-ebook h2 {
	margin-top: 10px;
	font-size: 23px;
	color: var(--white);
}

.khw-article .side-ebook h2::after {
	content: "";
	display: block;
	width: 64px;
	height: 3px;
	margin-top: 16px;
	background: var(--gold);
}

.khw-article .side-ebook p {
	margin-top: 14px;
	color: rgba(255, 255, 255, .72);
}

.khw-article .side-ebook .fields {
	margin-top: 22px;
	gap: 12px;
}

.khw-article .side-ebook input {
	height: 50px;
	background: var(--white);
}

.khw-article .side-ebook .btn {
	width: 100%;
	justify-content: center;
	margin-top: 18px;
}

.khw-article .side-ebook .btn-lime:hover {
	--btn-bg: var(--white);
	color: var(--dark);
}

.khw-article .side-ebook .btn-lime:hover .btn-label,
.khw-article .side-ebook .btn-lime:hover .btn-icon {
	color: var(--dark);
}

.khw-article .side-ebook .form-status {
	margin-top: 14px;
	color: var(--white);
}

.khw-article .side-ebook .form-status.is-error {
	color: #FDA29B;
}

.khw-article .side-ebook .form-download {
	color: var(--gold);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Short screens: let the guide scroll with the page rather than clip */
@media (max-height: 760px) {
	.khw-article .sidebar--ebook .side-sticky {
		position: static;
	}
}

@media (max-width: 1100px) {
	.khw-article .sidebar--ebook {
		grid-template-columns: 1fr;
		max-width: 560px;
	}
}

/* Body */
.khw-article .article-body {
	font-size: 18px;
	line-height: 1.75;
	color: var(--navy-500);
}

.khw-article .article-body > * + * {
	margin-top: 20px;
}

.khw-article .article-body h2 {
	margin-top: 64px;
	font-size: clamp(26px, 2vw, 36px);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--dark);
}

.khw-article .article-body > h2:first-child {
	margin-top: 0;
}

.khw-article .article-body h2 + * {
	margin-top: 18px;
}

.khw-article .article-body strong {
	font-weight: 600;
	color: var(--dark);
}

.khw-article .article-body a:not(.btn) {
	color: var(--dark);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.khw-article .article-lead {
	font-size: 21px;
	line-height: 1.65;
	color: var(--navy-600);
}

.khw-article .article-disclaimer {
	margin-top: 40px;
	padding: 18px 22px;
	border-left: 3px solid var(--gold);
	background: rgba(9, 23, 52, .04);
	border-radius: 0 6px 6px 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--navy-600);
}

.khw-article .article-disclaimer + * {
	margin-top: 32px;
}

.khw-article .article-gallery {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 40px;
	margin-bottom: 8px;
}

.khw-article .article-gallery img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10.5;
	object-fit: cover;
	border-radius: 6px;
}

.khw-article .article-body ul {
	display: grid;
	gap: 12px;
	list-style: none;
}

.khw-article .article-body li {
	position: relative;
	padding-left: 30px;
}

.khw-article .article-body li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: .62em;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--gold);
	box-shadow: 0 0 0 3px rgba(255, 215, 0, .25);
}

.khw-article .article-quote {
	margin-top: 48px !important;
	margin-bottom: 8px;
	padding: 44px 52px;
	border-left: 4px solid var(--gold);
	border-radius: 6px;
	background: var(--card-bg);
}

/* Quote mark (was an inline SVG in the static page) */
.khw-article .article-quote::before {
	content: "";
	display: block;
	width: 40px;
	height: 32px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 32'%3E%3Cpath fill='%230D1B2A' d='M0 32V19.2C0 8.4 5.6 1.9 16.8 0l1.6 4.4C12.6 6 9.7 9.4 9.6 14.4H16V32H0Zm22.4 0V19.2C22.4 8.4 28 1.9 39.2 0l1.6 4.4C35 6 32.1 9.4 32 14.4h6.4V32h-16Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.khw-article .article-quote blockquote {
	margin-top: 18px;
	padding: 0;
	font-size: clamp(19px, 1.4vw, 24px);
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: -0.015em;
	color: var(--dark);
}

.khw-article .article-quote figcaption {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	font-size: 16px;
	font-weight: 600;
	color: var(--dark);
}

.khw-article .article-quote figcaption small {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: var(--navy-500);
}

.khw-article .av {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--dark);
	color: var(--gold);
	font-size: 16px;
	font-weight: 600;
}

/* Key facts strip (case studies) */
.khw-article .case-facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border: 1px solid var(--navy-200);
	border-radius: 6px;
	list-style: none;
}

.khw-article .article-body .case-facts {
	gap: 0;
}

.khw-article .article-body .case-facts li {
	padding: 24px 26px;
}

.khw-article .article-body .case-facts li::before {
	content: none;
}

.khw-article .case-facts li + li {
	border-left: 1px solid var(--navy-200);
}

.khw-article .case-facts small {
	display: block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .4px;
	text-transform: uppercase;
	color: var(--navy-500);
}

.khw-article .case-facts b {
	display: block;
	margin-top: 6px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--dark);
}

.khw-article .article-body .case-facts + h2 {
	margin-top: 56px;
}

/* FAQ inside an article */
.khw-article .faq {
	display: grid;
	gap: 10px;
	margin-top: 24px !important;
}

.khw-article .faq details {
	border: 1px solid var(--navy-200);
	border-radius: 6px;
	background: var(--white);
	transition: border-color .25s;
}

.khw-article .faq details[open] {
	border-color: var(--dark);
}

.khw-article .faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 20px 24px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.01em;
	color: var(--dark);
	list-style: none;
	cursor: pointer;
}

.khw-article .faq summary::-webkit-details-marker {
	display: none;
}

.khw-article .faq summary::after {
	content: "";
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--card-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230D1B2A' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E") center / 13px no-repeat;
	transition: transform .3s, background-color .25s;
}

.khw-article .faq details[open] summary::after {
	transform: rotate(45deg);
	background-color: var(--gold);
}

.khw-article .faq .answer {
	padding: 0 24px 22px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--navy-500);
}

.khw-article .faq .answer p + p {
	margin-top: 10px;
}

/* Foot: tags, share, prev/next */
.khw-article .article-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px 32px;
	margin-top: 64px !important;
	padding-top: 28px;
	border-top: 1px solid var(--navy-200);
}

.khw-article .article-body .article-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
}

.khw-article .article-body .article-tags li {
	padding-left: 0;
}

.khw-article .article-body .article-tags li::before {
	content: none;
}

.khw-article .article-body .article-tags a {
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 16px;
	border: 1px solid var(--navy-200);
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	color: var(--dark);
	transition: border-color .25s;
}

.khw-article .article-body .article-tags a:hover {
	border-color: var(--dark);
}

.khw-article .share {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--dark);
}

.khw-article .share > span {
	margin-right: 6px;
}

.khw-article .article-body .share a,
.khw-article .share button {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: var(--card-bg);
	color: var(--dark);
	text-decoration: none;
	cursor: pointer;
	transition: background .25s;
}

.khw-article .article-body .share a:hover,
.khw-article .share button:hover,
.khw-article .share button.is-copied {
	background: var(--gold);
}

.khw-article .share svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.khw-article .share .stroke {
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.khw-article .post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 40px !important;
}

.khw-article .article-body .post-nav a {
	display: block;
	padding: 22px 26px;
	border: 1px solid var(--navy-200);
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
	transition: border-color .25s, box-shadow .3s;
}

.khw-article .article-body .post-nav a:hover {
	border-color: transparent;
	box-shadow: 0 20px 50px rgba(13, 27, 42, .08);
}

.khw-article .post-nav small {
	display: block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .3px;
	text-transform: uppercase;
	color: var(--navy-500);
}

.khw-article .post-nav b {
	display: block;
	margin-top: 8px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--dark);
}

.khw-article .post-nav .next {
	grid-column: 2;
	text-align: right;
}

@media (max-width: 1400px) {
	.khw-article .article-layout {
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: 56px;
	}

	.khw-article .side-recent {
		padding: 32px 30px 24px;
	}

	.khw-article .side-form {
		padding: 32px 30px;
	}
}

/* Sidebar drops below the article and stops sticking */
@media (max-width: 1100px) {
	.khw-article .article-layout {
		grid-template-columns: 1fr;
		gap: 64px;
	}

	.khw-article .sidebar {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}

	.khw-article .side-sticky {
		position: static;
	}

	.khw-article .side-toc {
		display: none !important;
	}

	.khw-article .toc-inline:not([hidden]) {
		display: block;
		margin-top: 32px;
		padding: 26px 28px 20px;
		border-radius: 8px;
		background: var(--card-bg);
	}
}

@media (max-width: 900px) {
	.khw-article .case-facts {
		grid-template-columns: 1fr 1fr;
	}

	.khw-article .case-facts li:nth-child(3) {
		border-left: 0;
	}

	.khw-article .case-facts li:nth-child(n+3) {
		border-top: 1px solid var(--navy-200);
	}
}

@media (max-width: 700px) {
	.khw-article.article {
		padding: 48px 0 72px;
	}

	.khw-article .article-layout {
		gap: 48px;
	}

	.khw-article .sidebar {
		grid-template-columns: 1fr;
	}

	.khw-article .side-recent,
	.khw-article .side-form {
		padding: 28px 22px;
	}

	.khw-article .article-body {
		font-size: 16px;
	}

	.khw-article .article-lead {
		font-size: 18px;
	}

	.khw-article .article-body h2 {
		margin-top: 48px;
	}

	.khw-article .article-gallery {
		grid-template-columns: 1fr;
	}

	.khw-article .article-quote {
		padding: 32px 24px;
	}

	.khw-article .post-nav {
		grid-template-columns: 1fr;
	}

	.khw-article .post-nav .next {
		grid-column: auto;
		text-align: left;
	}

	.khw-article .faq summary {
		padding: 18px;
		font-size: 16px;
	}

	.khw-article .faq .answer {
		padding: 0 18px 20px;
	}
}
