/* ==========================================================================
   Case Study Builder — Frontend Styles
   Dark, agency-style case-study layout: hero, stats, alternating text/image
   sections, platform logos, testimonial, and CTA.
   ========================================================================== */

.csb-case-study {
	--csb-bg: #000000;
	--csb-bg-alt: #0a0a0a;
	--csb-text: #e7e8ec;
	--csb-text-muted: #aab0c0;
	--csb-heading: #ffffff;
	--csb-accent-blue: #FFC802;
	--csb-accent-blue-2: #ffd84d;
	--csb-accent-gold: #FFC802;
	--csb-border: rgba(255, 255, 255, 0.08);
	--csb-radius: 14px;
	--csb-max-width: 1600px;

	background: var(--csb-bg);
	color: var(--csb-text);
	font-family: 'inter', sans-serif;
	line-height: 1.7;
	overflow-x: hidden;
}

.csb-case-study * {
	box-sizing: border-box;
}

.csb-container {
	max-width: var(--csb-max-width);
	margin: 0 auto;
	padding: 0 50px;
}

.csb-section {
	padding: 64px 0;
}

.csb-heading {
	font-size: 42px;
	color: var(--csb-heading);
	font-weight: 700;
	font-family: 'inter', sans-serif;
	margin: 0 0 20px;
}

.csb-rich-text {
	color: #ffffff;
	font-size: 21px;
	font-family: 'inter', sans-serif;
}

.csb-rich-text p {
	margin: 0 0 16px;
}

.csb-rich-text p:last-child {
	margin-bottom: 0;
}

/* ---------------- Hero ---------------- */

.csb-hero {
	text-align: center;
	padding-top: 80px;
}

.csb-hero__text {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

.csb-hero__heading {
	font-family: 'inter', sans-serif;
	font-weight: 700;
	font-size: 60px;
	color: #FFC802;
	line-height: 66px;
	margin: 0 0 20px;
}

.csb-hero__subheading {
	color: #ffffff;
	font-size: 21px;
	font-weight: 400;
	max-width: 1100px;
	font-family: 'inter', sans-serif;
	margin: 0 auto;
}

.csb-hero__media {
	margin-top: 40px;
}

.csb-hero__image-wrap {
	position: relative;
	border-radius: var(--csb-radius);
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.csb-hero__image {
	display: block;
	width: 100%;
	height: auto;
}

.csb-hero__badge {
	position: absolute;
	left: 24px;
	bottom: 28px;
	background: linear-gradient(135deg, var(--csb-accent-blue), var(--csb-accent-blue-2));
	color: #17181c;
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.03em;
	padding: 10px 18px;
	border-radius: 6px;
	text-transform: uppercase;
}

.csb-hero__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: rgba(255, 200, 2, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease;
}

.csb-hero__play:hover {
	transform: translate(-50%, -50%) scale(1.08);
	background: var(--csb-accent-blue);
}

.csb-hero__play-icon {
	color: #17181c;
	font-size: 1.4rem;
	margin-left: 4px;
}

/* ---------------- Overview ---------------- */

.csb-overview__inner {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
}

.csb-overview .csb-heading {
	text-align: center;
}

.csb-overview .csb-rich-text {
	margin: 0 auto;
}

/* ========== Stats ========== */
.csb-stats {
	padding-top: 40px;
	padding-bottom: 40px;
	background: var(--csb-bg);
}

.csb-stats__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px 20px;
	text-align: center;
	max-width: var(--csb-max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.csb-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.csb-stat__number {
	font-size: 52px;
	font-weight: 600;
	line-height: 1.1;
	color: #FFC802;
	margin-bottom: 4px;
	letter-spacing: -0.02em;
}

.csb-stat__label {
	font-size: clamp(0.9rem, 1.1vw, 1.05rem);
	color: #ffffff;
	font-weight: 400;
	margin-bottom: 14px;
	min-height: 2.4em;
}

.csb-stat__bar {
	width: 60px;
	height: 4px;
	background: linear-gradient(90deg, var(--csb-accent-blue), var(--csb-accent-blue-2));
	border-radius: 4px;
	margin: 0 auto;
	transition: width 0.3s ease;
}

.csb-stat:hover .csb-stat__bar {
	width: 80px;
}

@media (max-width: 900px) {
	.csb-stats__grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}
}

@media (max-width: 600px) {
	.csb-stats__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
	.csb-stat__number {
		font-size: 2.4rem;
	}
}

@media (max-width: 400px) {
	.csb-stats__grid {
		grid-template-columns: 1fr;
	}
}

/* ---------------- Two-column sections (Challenge / Solution / Result) --- */

.csb-two-col__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: center;
}

.csb-two-col--reverse .csb-two-col__grid {
	direction: rtl;
}

.csb-two-col--reverse .csb-two-col__text,
.csb-two-col--reverse .csb-two-col__media {
	direction: ltr;
}

.csb-rounded-image,
.csb-mockup-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--csb-radius);
}

.csb-rounded-image {
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* ----- Challenge & Result: white bg, black text ----- */
.csb-challenge,
.csb-result {
	--csb-bg: #ffffff;
	--csb-text: #000000;
	--csb-heading: #000000;
	--csb-text-muted: #333333;
	--csb-border: rgba(0, 0, 0, 0.08);

	background: var(--csb-bg);
	color: var(--csb-text);
}

.csb-rich-text-white {
	color: #000000;
}

.csb-challenge .csb-expandable.is-clamped:not(.is-expanded) .csb-rich-text::after,
.csb-result .csb-expandable.is-clamped:not(.is-expanded) .csb-rich-text::after {
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
}

/* ---------------- Platforms ---------------- */

.csb-platforms {
	background: var(--csb-bg-alt);
	padding: 40px 0;
}

.csb-platforms__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 48px;
}

.csb-platform__logo {
	max-height: 32px;
	width: auto;
	filter: grayscale(0%);
	opacity: 0.95;
}

.csb-platform__name {
	color: var(--csb-text-muted);
	font-weight: 600;
}

/* ---------------- Testimonial ---------------- */

.csb-testimonial {
	text-align: center;
}

.csb-testimonial__quote {
	font-family: Georgia, 'Times New Roman', serif;
	font-style: italic;
	font-size: clamp(1.3rem, 2.6vw, 1.8rem);
	color: var(--csb-heading);
	max-width: 820px;
	margin: 0 auto;
	line-height: 1.5;
}

/* ---------------- CTA ---------------- */

.csb-cta {
	background: var(--csb-bg-alt);
	text-align: center;
}

.csb-cta__heading {
	font-family: 'inter', sans-serif;
	font-style: normal;
	font-weight: 700;
	color: var(--csb-heading);
	font-size: 42px;
	margin: 0 0 16px;
}

.csb-cta__text {
	color: #ffffff;
	font-size: 21px;
	max-width: 1100px;
	margin: 0 auto 28px;
}

.csb-cta__button {
	display: inline-block;
	background: linear-gradient(135deg, var(--csb-accent-blue), var(--csb-accent-blue-2));
	color: #17181c;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
	font-size: 0.85rem;
	padding: 16px 40px;
	border-radius: 6px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.csb-cta__button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(255, 200, 2, 0.35);
}

/* ---------------- Grid (all case studies) — light portfolio style -------- */

.csb-grid-light {
	--csbg-bg: #ffffff;
	--csbg-heading: #17181c;
	--csbg-text-muted: #6b7280;
	--csbg-link: #b3541e;
	--csbg-link-hover: #8a3f16;

	background: var(--csbg-bg);
	color: var(--csbg-text-muted);
	font-family: 'inter', sans-serif;
}

.csb-grid-light * {
	box-sizing: border-box;
}

.csb-archive-header__title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 800;
	color: var(--csbg-heading);
	margin: 0;
}

.csb-grid-empty {
	color: var(--csbg-text-muted);
	text-align: center;
	padding: 40px 0;
}

.csb-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 40px;
	row-gap: 56px;
}

.csb-grid--cols-1 { grid-template-columns: 1fr; }
.csb-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.csb-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.csb-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.csb-grid__card {
	--csb-card-accent: #f2a93b;

	display: block;
	text-decoration: none;
	color: inherit;
}

.csb-grid__image-wrap {
	position: relative;
	margin: 0 0 28px;
	padding: 10px;
	border: 4px solid var(--csb-card-accent);
	border-radius: 4px;
	background: #fff;
	transform: rotate(-3deg);
	box-shadow: 0 14px 30px rgba(17, 18, 20, 0.14);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	overflow: hidden;
}

.csb-grid__card:hover .csb-grid__image-wrap {
	transform: rotate(0deg);
	box-shadow: 0 18px 36px rgba(17, 18, 20, 0.2);
}

.csb-grid__image {
	display: block;
	width: 100%;
	height: 190px;
	object-fit: cover;
	border-radius: 2px;
}

.csb-grid__title {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--csbg-heading);
	line-height: 1.35;
	margin: 0 0 14px;
}

.csb-grid__excerpt {
	color: var(--csbg-text-muted);
	font-size: 0.98rem;
	line-height: 1.6;
	margin: 0 0 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.csb-grid__link {
	display: inline-block;
	color: var(--csbg-link);
	font-weight: 600;
	font-size: 0.98rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.csb-grid__card:hover .csb-grid__link {
	color: #FFC802;
}

/* ---------------- Expandable text (Read More) ---------------- */

.csb-expandable {
	position: relative;
}

.csb-expandable.is-clamped .csb-rich-text {
	max-height: 450px;
	overflow: hidden;
	position: relative;
}

.csb-expandable.is-clamped:not(.is-expanded) .csb-rich-text::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 90px;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--csb-bg));
	pointer-events: none;
}

.csb-expandable.is-expanded .csb-rich-text {
	max-height: none;
}

.csb-readmore-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	background: none;
	border: none;
	padding: 5px 10px;
	color: #FFC802 !important;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	text-underline-offset: 3px;
	cursor: pointer;
}

.csb-readmore-btn:hover {
	color: #FFC802;
}

.csb-read-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	background: none;
	border: 1px solid #FFC802 !important;
	padding: 8px 16px;
	color: #FFC802 !important;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none !important;
	text-underline-offset: 3px;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.2s ease, color 0.2s ease;
}

.csb-read-btn:hover {
	color: #000000 !important;
	background: #FFC802 !important;
}

/* ---------------- Gallery ---------------- */

.csb-gallery__heading {
	text-align: center;
}

.csb-gallery__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.csb-gallery__item {
	position: relative;
	display: block;
	border-radius: 10px;
	overflow: hidden;
	background: var(--csb-bg-alt);
	aspect-ratio: 4 / 3;
	border: 1px solid var(--csb-border);
	cursor: zoom-in;
}

.csb-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.csb-gallery__item:hover img {
	transform: scale(1.06);
}

.csb-gallery__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 10px 12px;
	font-size: 0.8rem;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

/* ---------------- Lightbox Triggers (section images) ---------------- */

.csb-lightbox-trigger {
	display: block;
	cursor: zoom-in;
	line-height: 0;
	border-radius: inherit;
	text-decoration: none;
	outline: none;
}

.csb-lightbox-trigger:focus-visible {
	outline: 2px solid #FFC802;
	outline-offset: 4px;
}

.csb-lightbox-trigger img {
	display: block;
	width: 100%;
	height: auto;
	transition: opacity 0.2s ease;
}

.csb-lightbox-trigger:hover img {
	opacity: 0.9;
}

/* ---------------- Lightbox ---------------- */

.csb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: csbLightboxFadeIn 0.25s ease;
}

@keyframes csbLightboxFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.csb-lightbox__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	cursor: pointer;
}

.csb-lightbox__content {
	position: relative;
	z-index: 1;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.csb-lightbox__image {
	max-width: 90vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	animation: csbLightboxZoom 0.25s ease;
}

.csb-lightbox__image.is-loading {
	min-width: 200px;
	min-height: 200px;
	background: rgba(255, 255, 255, 0.05);
	background-image: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.08) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	background-size: 200% 100%;
	animation: csbLightboxShimmer 1.2s infinite;
}

@keyframes csbLightboxShimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@keyframes csbLightboxZoom {
	from { transform: scale(0.95); }
	to   { transform: scale(1); }
}

.csb-lightbox__caption {
	margin-top: 16px;
	color: #fff;
	font-size: 16px;
	text-align: center;
	max-width: 80vw;
	line-height: 1.5;
}

.csb-lightbox__counter {
	margin-top: 8px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 14px;
	letter-spacing: 0.05em;
}

.csb-lightbox__close,
.csb-lightbox__prev,
.csb-lightbox__next {
	position: absolute;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	line-height: 1;
	padding: 0;
	transition: background 0.2s ease, transform 0.2s ease;
}

.csb-lightbox__close:hover,
.csb-lightbox__prev:hover,
.csb-lightbox__next:hover {
	background: rgba(255, 255, 255, 0.25);
}

.csb-lightbox__close {
	top: -60px;
	right: 0;
	font-size: 28px;
}

.csb-lightbox__prev {
	left: -70px;
	top: 50%;
	transform: translateY(-50%);
}

.csb-lightbox__prev:hover {
	transform: translateY(-50%) scale(1.1);
}

.csb-lightbox__next {
	right: -70px;
	top: 50%;
	transform: translateY(-50%);
}

.csb-lightbox__next:hover {
	transform: translateY(-50%) scale(1.1);
}

/* Lock scroll while lightbox is open */
body.csb-lightbox-open {
	overflow: hidden;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
	.csb-grid,
	.csb-grid--cols-2,
	.csb-grid--cols-3,
	.csb-grid--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.csb-two-col__grid,
	.csb-two-col--reverse .csb-two-col__grid {
		grid-template-columns: 1fr;
		direction: ltr;
	}

	.csb-two-col__media {
		order: -1;
	}

	.csb-gallery__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.csb-lightbox__prev,
	.csb-lightbox__next {
		top: 50%;
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
	.csb-lightbox__prev { left: 10px; }
	.csb-lightbox__next { right: 10px; }

	.csb-lightbox__close {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
		font-size: 24px;
	}

	.csb-lightbox__image {
		max-width: 95vw;
		max-height: 70vh;
	}
}

@media (max-width: 520px) {
	.csb-section {
		padding: 44px 0;
	}

	.csb-hero {
		padding-top: 56px;
	}

	.csb-grid,
	.csb-grid--cols-2,
	.csb-grid--cols-3,
	.csb-grid--cols-4 {
		grid-template-columns: 1fr;
	}

	.csb-gallery__grid {
		grid-template-columns: 1fr;
	}
}

/* End of file */