/**
 * Case Study Detail – modern liquid glass theme
 * Use with Bootstrap 5 + brand-overrides. Add body class "case-study-detail-page" on detail pages.
 * Uses same Spline background as case-study listing (spline-viewer + transparent body/main).
 */

/* ----- Spline full-page background (same as case-study listing) ----- */
spline-viewer.case-study-spline-background,
spline-viewer.blog-spline-background {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100vh !important;
	min-height: 100vh !important;
	z-index: -1 !important;
	pointer-events: none !important;
}
spline-viewer.case-study-spline-background canvas,
spline-viewer.blog-spline-background canvas {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
}

/* ----- Page background – transparent so Spline shows through ----- */
body.case-study-detail-page,
body.blog-detail-page {
	background: transparent !important;
	min-height: 100vh;
}
body.case-study-detail-page .site-main,
body.blog-detail-page .site-main {
	position: relative;
	z-index: 1;
	background: transparent !important;
	padding-bottom: 3rem;
}

/* Blog detail: reuse same Spline + glass; section classes match .csd-* for consistency */
body.blog-detail-page .csd-hero .container,
body.blog-detail-page .csd-section .csd-section-inner,
body.blog-detail-page .csd-cta .container {
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
body.blog-detail-page .csd-section h2,
body.blog-detail-page .csd-section p,
body.blog-detail-page .csd-breadcrumb a { color: rgba(255, 255, 255, 0.9); }
body.blog-detail-page .csd-hero .csd-title,
body.blog-detail-page .csd-section h2 { color: #fff; }

/* ----- Liquid glass panel (reusable) ----- */
.csd-glass {
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.csd-glass:hover {
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* ----- Animations ----- */
@keyframes csd-fadeInUp {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes csd-fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
.csd-animate {
	animation: csd-fadeInUp 0.6s ease-out forwards;
}
.csd-animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.csd-animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.csd-animate-delay-3 { animation-delay: 0.35s; opacity: 0; }
.csd-animate-delay-4 { animation-delay: 0.5s; opacity: 0; }
.csd-animate-delay-5 { animation-delay: 0.65s; opacity: 0; }
.csd-animate-delay-6 { animation-delay: 0.8s; opacity: 0; }

/* ----- Breadcrumb ----- */
.csd-breadcrumb {
	padding: 1.25rem 0 0.5rem;
}
.csd-breadcrumb a {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	transition: color 0.2s ease;
}
.csd-breadcrumb a:hover {
	color: #fff;
}

/* ----- Hero – liquid glass, centered ----- */
.csd-hero {
	text-align: center;
	padding: 2rem 1.5rem 2.5rem;
	margin-bottom: 1.5rem;
}
.csd-hero .container {
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	padding: 2rem 1.5rem;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	animation: csd-fadeInUp 0.6s ease-out forwards;
}
.csd-hero .csd-category {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 0.5rem;
}
.csd-hero .csd-title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	margin: 0;
	color: #fff;
	letter-spacing: -0.02em;
}

/* ----- Video – small, centered, liquid glass ----- */
.csd-video-wrap {
	max-width: 640px;
	margin: 0 auto 2.5rem;
	border-radius: 16px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	animation: csd-fadeInUp 0.6s ease-out 0.15s forwards;
	opacity: 0;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.csd-video-wrap:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.csd-video-wrap video {
	width: 100%;
	display: block;
	vertical-align: middle;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
@media (min-width: 768px) {
	.csd-video-wrap {
		max-width: 680px;
	}
}

/* ----- Section container – glass cards ----- */
.csd-section {
	padding: 1.5rem 0;
}
.csd-section .csd-section-inner {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 1rem;
}
.csd-section-inner.csd-glass {
	padding: 2rem 1.5rem;
	margin-bottom: 1rem;
}
/* Stagger section animations */
.csd-section:nth-child(4) .csd-section-inner { animation: csd-fadeInUp 0.6s ease-out 0.25s forwards; opacity: 0; }
.csd-section:nth-child(5) .csd-section-inner { animation: csd-fadeInUp 0.6s ease-out 0.4s forwards; opacity: 0; }
.csd-section:nth-child(6) .csd-section-inner { animation: csd-fadeInUp 0.6s ease-out 0.55s forwards; opacity: 0; }
.csd-section:nth-child(7) .csd-section-inner { animation: csd-fadeInUp 0.6s ease-out 0.7s forwards; opacity: 0; }

/* Section headings & text – light theme on dark */
.csd-section h2 {
	font-size: 1.35rem;
	font-weight: 600;
	margin-bottom: 1.25rem;
	color: #fff;
	letter-spacing: -0.02em;
}
.csd-section h3 {
	font-size: 1rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
	color: rgba(255, 255, 255, 0.9);
}
.csd-section p {
	margin-bottom: 1rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.85);
}
.csd-section p:last-child {
	margin-bottom: 0;
}

/* Two-column: content + meta */
.csd-two-col {
	display: grid;
	grid-template-columns: 1fr 260px;
	gap: 2rem;
	align-items: start;
}
@media (max-width: 768px) {
	.csd-two-col {
		grid-template-columns: 1fr;
	}
}
.csd-meta-block {
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	padding: 1.25rem;
}
.csd-meta-item {
	margin-bottom: 1rem;
}
.csd-meta-item:last-child {
	margin-bottom: 0;
}
.csd-meta-item p {
	margin-bottom: 0;
	color: rgba(255, 255, 255, 0.9);
}

/* About section image */
.csd-section .img-fluid.rounded-3 {
	border-radius: 14px !important;
	border: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.csd-section .img-fluid.rounded-3:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* Icon list */
.csd-icon-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem 0;
}
.csd-icon-list li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
	transition: color 0.2s ease;
}
.csd-icon-list li:hover {
	color: rgba(255, 255, 255, 0.95);
}
.csd-icon-list li:last-child {
	margin-bottom: 0;
}
.csd-icon-list .csd-icon {
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	margin-top: 0.5rem;
	background: rgba(13, 110, 253, 0.9);
	border-radius: 50%;
	box-shadow: 0 0 12px rgba(13, 110, 253, 0.4);
}

/* CTA sections – liquid glass */
.csd-cta {
	padding: 2.5rem 1rem;
	text-align: center;
	margin-top: 1rem;
}
.csd-cta .container {
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	padding: 2rem 1.5rem;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.csd-cta .container:hover {
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.csd-cta h2 {
	color: #fff;
	margin-bottom: 0.75rem;
	font-size: 1.35rem;
	font-weight: 600;
}
.csd-cta p {
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 1.25rem;
}
.csd-cta .btn {
	padding: 0.6rem 1.5rem;
	font-weight: 500;
	border-radius: 10px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.csd-cta .btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(13, 110, 253, 0.35);
}
.csd-cta .btn-outline-primary {
	border-color: rgba(255, 255, 255, 0.4);
	color: rgba(255, 255, 255, 0.95);
}
.csd-cta .btn-outline-primary:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.5);
	color: #fff;
}

/* Wrap section content in glass (sections that use .csd-section-inner) */
body.case-study-detail-page .csd-section .csd-section-inner {
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 20px;
	padding: 2rem 1.5rem;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
body.case-study-detail-page .csd-section .csd-section-inner:hover {
	border-color: rgba(255, 255, 255, 0.16);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* ----- Technology Stack – homepage tools style (liquid glass + numbered tags) ----- */
.csd-section-tech .csd-tech-stack-wrap {
	max-width: 960px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 1rem;
}
.csd-tech-stack {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 2rem;
	align-items: start;
	padding: 2rem 1.75rem !important;
	border-radius: 20px;
}
.csd-tech-stack-single {
	grid-template-columns: 1fr;
}
@media (max-width: 768px) {
	.csd-tech-stack {
		grid-template-columns: 1fr;
	}
}
.csd-tech-platform-title {
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 1rem;
	letter-spacing: -0.02em;
}
.csd-tech-pills {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.csd-tech-pill {
	display: inline-block;
	padding: 0.5rem 0.85rem;
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	color: rgba(255, 255, 255, 0.95);
	font-size: 0.9rem;
	transition: border-color 0.2s ease, background 0.2s ease;
	text-decoration: none;
	cursor: pointer;
}
.csd-tech-pill:hover {
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}
.csd-tech-heading {
	font-size: 1.35rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 1.5rem;
	letter-spacing: -0.02em;
}
.csd-tech-main .csd-tech-group {
	margin-bottom: 1.75rem;
}
.csd-tech-main .csd-tech-group:last-child {
	margin-bottom: 0;
}
.csd-tech-group-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 0.75rem;
	letter-spacing: -0.02em;
}
.csd-tech-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}
.csd-tech-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.75rem;
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	color: rgba(255, 255, 255, 0.95);
	font-size: 0.9rem;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.csd-tech-tag:hover {
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.08);
}
.csd-tech-num {
	font-weight: 700;
	color: rgba(255, 255, 255, 0.85);
	font-variant-numeric: tabular-nums;
}
.csd-tech-name {
	font-weight: 500;
}
/* Fallback when no parsed groups: plain paragraph in glass */
.csd-section-tech .csd-section-inner.csd-tech-stack-wrap {
	padding: 2rem 1.5rem;
}
.csd-section-tech .csd-section-inner.csd-tech-stack-wrap h2 {
	margin-bottom: 1rem;
}
.csd-section-tech .csd-section-inner.csd-tech-stack-wrap p {
	margin-bottom: 0;
	color: rgba(255, 255, 255, 0.85);
}
