/* ==========================================================================
   Case Study Template — Modern SaaS Design
   Colors: White / #111827 (ink) / #2563eb (primary) / #0ea5e9 (accent)
   No Bootstrap. Pure CSS. Mobile-first responsive.
   ========================================================================== */

:root {
	--csx-white: #ffffff;
	--csx-ink: #111827;
	--csx-ink-soft: #4b5563;
	--csx-ink-faint: #6b7280;
	--csx-primary: #2563eb;
	--csx-primary-dark: #1d4ed8;
	--csx-accent: #0ea5e9;
	--csx-border: #e5e7eb;
	--csx-bg-soft: #f9fafb;
	--csx-radius-sm: 10px;
	--csx-radius-md: 16px;
	--csx-radius-lg: 24px;
	--csx-shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06), 0 1px 3px rgba(17, 24, 39, 0.08);
	--csx-shadow-md: 0 4px 12px rgba(17, 24, 39, 0.08), 0 2px 4px rgba(17, 24, 39, 0.06);
	--csx-shadow-lg: 0 20px 40px rgba(17, 24, 39, 0.12);
	--csx-max-width: 1440px;
	--csx-gap: 32px;
}

.csx-case-study {
	color: var(--csx-ink);
	font-family: inherit;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.csx-case-study * {
	box-sizing: border-box;
}
.csx-case-study {
    margin: 0 auto;
}
.csx-container {
	max-width: var(--csx-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---------------- Reading progress bar ---------------- */
.csx-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: transparent;
	z-index: 9999;
	pointer-events: none;
}

.csx-reading-progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--csx-primary), var(--csx-accent));
	transition: width 0.1s linear;
}

/* ---------------- Breadcrumb ---------------- */
.csx-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	margin: 0 0 28px;
	padding-top: 24px;
}

.csx-breadcrumb a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	transition: color 0.15s ease;
}

.csx-breadcrumb a:hover {
	color: var(--csx-white);
}

.csx-breadcrumb .csx-sep {
	color: rgba(255, 255, 255, 0.3);
}

.csx-breadcrumb .csx-current {
	color: var(--csx-white);
	font-weight: 500;
	max-width: 320px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------------- Hero ---------------- */
.csx-hero {
	padding: 40px 0 64px;
	/*background: linear-gradient(120deg, var(--csx-ink) 0%, #1e3a8a 55%, var(--csx-primary) 100%);*/
	border-radius: 0 0 var(--csx-radius-lg) var(--csx-radius-lg);
}

.csx-hero-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--csx-gap);
	align-items: center;
}

.csx-badge {
    display: inline-flex;
    align-items: center;
    background: rgb(179 179 179 / 65%);
    color: #000000;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    text-decoration: none;
    margin-bottom: 18px;
    transition: background 0.15s ease;
}


.csx-badge:hover {
	background: rgba(255, 255, 255, 0.24);
}

.csx-hero-title {
    font-size: clamp(32px, 4.2vw, 52px);
    line-height: 1.12;
    font-weight: 800;
    color: #000000;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}

.csx-hero-excerpt {
	font-size: 17px;
	color: rgba(255, 255, 255, 0.82);
	margin: 0 0 26px;
	max-width: 46ch;
}

.csx-hero-meta {
	margin-bottom: 22px;
}

.csx-author {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
}

.csx-avatar {
	border-radius: 50%;
	width: 44px;
	height: 44px;
	object-fit: cover;
	box-shadow: var(--csx-shadow-sm);
	border: 2px solid rgba(255, 255, 255, 0.5);
}

.csx-author-info {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}

   .csx-author-name {
    font-weight: 700;
    color: #000000;
    font-size: 14.5px;
}

.csx-meta-line {
    font-size: 13px;
    color: rgb(52 52 52 / 68%);
    display: flex;
    gap: 6px;
    align-items: center;
}

.csx-hero .csx-share-btn {
    background: rgb(73 124 191 / 12%);
    color: #4e7cbe;
    border: 1px solid rgba(255, 255, 255, 0.28);
}
button.csx-share-btn.csx-copy-link {
    display: none;
}

.csx-hero .csx-share-btn:hover {
	background: var(--csx-white);
	color: var(--csx-primary);
	border-color: var(--csx-white);
}

/* Share buttons (default / sidebar) */
.csx-share {
	display: flex;
	align-items: center;
	gap: 10px;
}

.csx-share-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--csx-bg-soft);
	color: var(--csx-ink-soft);
	border: 1px solid var(--csx-border);
	text-decoration: none;
	cursor: pointer;
	transition: all 0.18s ease;
}

.csx-share-btn:hover {
	background: var(--csx-primary);
	color: var(--csx-white);
	border-color: var(--csx-primary);
	transform: translateY(-2px);
}

.csx-copy-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: var(--csx-ink);
	color: var(--csx-white);
	font-size: 11px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.csx-copy-link.is-copied .csx-copy-tooltip {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.csx-hero-image-wrap {
	border-radius: var(--csx-radius-lg);
	overflow: hidden;
	box-shadow: var(--csx-shadow-lg);
	aspect-ratio: 4 / 3;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.csx-hero-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.csx-hero-image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--csx-accent), rgba(255, 255, 255, 0.3));
	opacity: 0.35;
}

/* ---------------- Content + Sidebar Grid ---------------- */
.csx-content-section {
	padding: 8px 0 64px;
}

.csx-content-grid {
	display: grid;
	grid-template-columns: 70% 30%;
	gap: var(--csx-gap);
	align-items: start;
}

/* ---------------- Article ---------------- */
.csx-article {
	min-width: 0;
}

.csx-article-body {
	font-size: 17px;
	color: #1f2937;
}

.csx-article-body h2 {
	font-size: 28px;
	font-weight: 800;
	margin: 44px 0 18px;
	color: var(--csx-ink);
	scroll-margin-top: 100px;
}

.csx-article-body h3 {
	font-size: 21px;
	font-weight: 700;
	margin: 34px 0 14px;
	color: var(--csx-ink);
	scroll-margin-top: 100px;
}

.csx-article-body p {
	margin: 0 0 20px;
}

.csx-article-body ul,
.csx-article-body ol {
	margin: 0 0 20px;
	padding-left: 24px;
}

.csx-article-body li {
	margin-bottom: 8px;
}

.csx-article-body a {
	color: var(--csx-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.csx-article-body blockquote {
	margin: 28px 0;
	padding: 24px 28px;
	background: var(--csx-bg-soft);
	border-left: 4px solid var(--csx-primary);
	border-radius: var(--csx-radius-sm);
	font-style: italic;
	color: var(--csx-ink-soft);
}

.csx-article-body figure {
	margin: 28px 0;
}

.csx-article-body img,
.csx-article-body iframe,
.csx-article-body video {
	border-radius: var(--csx-radius-md);
	box-shadow: var(--csx-shadow-md);
	width: 100%;
}

.csx-article-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: 15px;
	border-radius: var(--csx-radius-sm);
	overflow: hidden;
	box-shadow: var(--csx-shadow-sm);
}

.csx-article-body th,
.csx-article-body td {
	padding: 12px 16px;
	border: 1px solid var(--csx-border);
	text-align: left;
}

.csx-article-body th {
	background: var(--csx-bg-soft);
	font-weight: 700;
}

.csx-page-links {
	margin-top: 28px;
	font-weight: 600;
}

.csx-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid var(--csx-border);
}

.csx-tag {
	background: var(--csx-bg-soft);
	color: var(--csx-ink-soft);
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--csx-border);
	font-size: 13px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.csx-tag:hover {
	background: var(--csx-primary);
	color: var(--csx-white);
	border-color: var(--csx-primary);
}

/* ---------------- Summary Callout Box (Pink border) ---------------- */
.csx-summary-box {
	border: 2px solid #d946ef;
	border-radius: 14px;
	background: var(--csx-white);
	padding: 22px 26px;
	margin: 24px 0 28px;
	position: relative;
}

.csx-summary-box-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.csx-summary-box-title {
	color: var(--csx-primary);
	font-weight: 700;
	font-size: 15.5px;
	text-decoration: none;
	line-height: 1.4;
}

.csx-summary-box-title:hover {
	text-decoration: underline;
}

.csx-summary-box-toggle {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1px solid var(--csx-border);
	background: var(--csx-bg-soft);
	color: var(--csx-ink);
	font-size: 16px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
}

.csx-summary-box-toggle:hover {
	background: #eeeeee;
}

.csx-summary-box-body {
	margin-top: 14px;
	overflow: hidden;
	transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.2s ease;
}

.csx-summary-box-body.is-collapsed {
	max-height: 0 !important;
	opacity: 0;
	margin-top: 0;
}

.csx-summary-box-body p {
	font-size: 15px;
	color: #1f2937;
	line-height: 1.65;
	margin: 0 0 14px;
}

.csx-summary-box-body p:last-child {
	margin-bottom: 0;
}

/* ---------------- Sidebar ---------------- */
.csx-sidebar {
	min-width: 0;
}

.csx-sidebar-inner {
	position: sticky;
	top: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.csx-card {
	background: var(--csx-white);
	border: 1px solid var(--csx-border);
	border-radius: var(--csx-radius-md);
	padding: 24px;
	box-shadow: var(--csx-shadow-sm);
}

.csx-card-title {
	font-size: 15px;
	font-weight: 800;
	margin: 0 0 16px;
	color: var(--csx-ink);
}

/* Table of contents */
.csx-toc {
	max-height: 320px;
	overflow-y: auto;
}

.csx-toc-empty {
	font-size: 13px;
	color: var(--csx-ink-faint);
	margin: 0;
}

.csx-toc ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.csx-toc li {
	margin: 0;
}

.csx-toc a {
	display: block;
	padding: 7px 0 7px 14px;
	border-left: 2px solid var(--csx-border);
	font-size: 13.5px;
	color: var(--csx-ink-soft);
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.csx-toc a:hover,
.csx-toc a.is-active {
	color: var(--csx-primary);
	border-left-color: var(--csx-primary);
}

.csx-toc .csx-toc-h3 a {
	padding-left: 26px;
	font-size: 13px;
}

/* CTA + Newsletter cards */
.csx-cta-card {
	background: linear-gradient(155deg, rgba(37, 99, 235, 0.06), rgba(14, 165, 233, 0.08));
	border-color: rgba(37, 99, 235, 0.16);
}

.csx-cta-card p,
.csx-newsletter-card p {
	font-size: 13.5px;
	color: var(--csx-ink-soft);
	margin: 0 0 16px;
}

.csx-newsletter-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.csx-input {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--csx-border);
	border-radius: var(--csx-radius-sm);
	font-size: 14px;
	background: var(--csx-bg-soft);
}

.csx-input:focus {
	outline: none;
	border-color: var(--csx-primary);
	background: var(--csx-white);
}

/* ---------------- Buttons ---------------- */
.csx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    padding: 12px 24px;
    border-radius: var(--csx-radius-sm);
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.csx-btn-block {
	width: 100%;
}

.csx-btn-lg {
	padding: 16px 32px;
	font-size: 16px;
}

.csx-btn-primary {
    background: #f25a28 !important;
    color: var(--csx-white) !important;
    /* border-color: var(--csx-primary) !important; */
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
    font-family: 'Poppins';
}
.csx-card.csx-newsletter-card {
    display: none;
}


.csx-btn-primary:hover {
	background: var(--csx-primary-dark) !important;
	color: var(--csx-white) !important;
	border-color: var(--csx-primary-dark) !important;
	transform: translateY(-1px);
}

.csx-btn-secondary {
	background: var(--csx-ink) !important;
	color: var(--csx-white) !important;
	border-color: var(--csx-ink) !important;
}

.csx-btn-secondary:hover {
	background: #1f2937 !important;
	color: var(--csx-white) !important;
	border-color: #1f2937 !important;
	transform: translateY(-1px);
}

.csx-btn-outline-light {
	background: transparent !important;
	color: var(--csx-white) !important;
	border-color: rgba(255, 255, 255, 0.5) !important;
}

.csx-btn-outline-light:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	color: var(--csx-white) !important;
	border-color: var(--csx-white) !important;
}

.csx-footer-cta .csx-btn-primary {
	background: var(--csx-white) !important;
	color: var(--csx-primary) !important;
	border-color: var(--csx-white) !important;
	box-shadow: var(--csx-shadow-lg);
}

.csx-footer-cta .csx-btn-primary:hover {
	background: var(--csx-ink) !important;
	color: var(--csx-white) !important;
	border-color: var(--csx-ink) !important;
}

/* ---------------- CTA Section (dark) ---------------- */
.csx-cta-section {
    background: linear-gradient(120deg, var(--csx-ink), #1e3a8a 60%, var(--csx-primary));
    padding: 64px 0;
    margin: 0 0 64px;
    border-radius: 20px;
}

.csx-cta-inner {
	text-align: center;
	max-width: 720px;
}

.csx-cta-section .csx-cta-heading,
.csx-cta-heading {
 color: var(--csx-white) !important;
    font-size: 50px;
    font-weight: 800;
    margin: 0 0 16px;

}

.csx-cta-section .csx-cta-text,
.csx-cta-text {
	color: rgba(255, 255, 255, 0.78) !important;
	font-size: 16.5px;
	margin: 0 0 28px;
}

.csx-cta-buttons {
	display: flex;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}

/* ---------------- Related Posts ---------------- */
.csx-related-section {
	padding: 8px 0 64px;
}

.csx-section-title {
	font-size: 28px;
	font-weight: 800;
	text-align: center;
	margin: 0 0 36px;
	color: var(--csx-ink);
}

.csx-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--csx-gap);
}

.csx-related-card {
	background: var(--csx-white);
	border: 1px solid var(--csx-border);
	border-radius: var(--csx-radius-md);
	overflow: hidden;
	box-shadow: var(--csx-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}

.csx-related-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--csx-shadow-md);
}

.csx-related-thumb-link {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--csx-bg-soft);
}

.csx-related-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.csx-related-card:hover .csx-related-thumb {
	transform: scale(1.04);
}

.csx-related-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--csx-primary), var(--csx-accent));
	opacity: 0.15;
}

.csx-related-body {
	padding: 20px 22px 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.csx-related-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 10px;
}

.csx-related-title a {
	color: var(--csx-ink);
	text-decoration: none;
}

.csx-related-title a:hover {
	color: var(--csx-primary);
}

.csx-related-excerpt {
	font-size: 14px;
	color: var(--csx-ink-soft);
	margin: 0 0 16px;
	flex: 1;
}

.csx-read-more {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--csx-primary);
	text-decoration: none;
}

.csx-read-more:hover {
	text-decoration: underline;
}

/* ---------------- Footer CTA (gradient) ---------------- */
.csx-footer-cta {
    background: linear-gradient(120deg, var(--csx-primary), var(--csx-accent));
    padding: 72px 0;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 55px;
}

.csx-footer-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.25), transparent 45%),
		radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.18), transparent 45%);
	pointer-events: none;
}

.csx-footer-cta-inner {
	position: relative;
	text-align: center;
	max-width: 680px;
}

.csx-footer-cta .csx-footer-cta-heading,
.csx-footer-cta-heading {
	color: var(--csx-white) !important;
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 800;
	margin: 0 0 16px;
}

.csx-footer-cta .csx-footer-cta-text,
.csx-footer-cta-text {
	color: rgba(255, 255, 255, 0.9) !important;
	font-size: 17px;
	margin: 0 0 28px;
}

/* (footer CTA button rule moved up near other button overrides — kept in one place) */

/* ---------------- Glass effect utility (used on sticky sidebar when scrolled, via JS class) ---------------- */
.csx-sidebar-inner.is-glass .csx-card {
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
	.csx-content-grid {
		grid-template-columns: 1fr;
	}

	.csx-sidebar-inner {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.csx-sidebar-inner .csx-card {
		flex: 1 1 260px;
	}

	.csx-related-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile */
@media (max-width: 782px) {
	.csx-hero {
		border-radius: 0 0 var(--csx-radius-md) var(--csx-radius-md);
		padding: 28px 0 44px;
	}

	.csx-hero-grid {
		grid-template-columns: 1fr;
	}

	.csx-hero-media {
		order: -1;
	}

	.csx-hero-title {
		font-size: 30px;
	}

	.csx-content-section {
		padding: 8px 0 48px;
	}

	.csx-sidebar-inner {
		flex-direction: column;
	}

	.csx-cta-buttons {
		flex-direction: column;
	}

	.csx-cta-buttons .csx-btn {
		width: 100%;
	}

	.csx-related-grid {
		grid-template-columns: 1fr;
	}

	.csx-section-title {
		font-size: 24px;
	}

	.csx-footer-cta {
		padding: 56px 0;
	}

	.csx-summary-box {
		padding: 18px 18px;
	}
}

@media (max-width: 480px) {
	.csx-container {
		padding: 0 16px;
	}

	.csx-card {
		padding: 18px;
	}

	.csx-summary-box {
		padding: 16px 16px;
	}
}