/**
 * Single case study – hero + 2 columns (20% / 80%), right side in rows.
 */

.case-study-hero {
	background-color: lightgray;
	/* Overlay on hero image — 80% stops per design */
	background-image:
		linear-gradient(287deg, rgba(99, 179, 216, 0.8) 4.91%, rgba(8, 77, 4, 0.8) 44.21%, rgba(14, 38, 0, 0.8) 83.5%),
		var(--case-study-hero-image, none);
	background-position:
		0 0,
		center;
	background-size: cover, cover;
	background-repeat: no-repeat;
	position: relative;
	padding: 110px 0 155px;
	margin-bottom: 0;
}

.case-study-hero-inner {
	position: relative;
	z-index: 1;
	max-width: 1368px;
	width: 95%;
	margin: 0 auto;
	padding: 0 20px;
}

.case-study-breadcrumbs {
	margin-bottom: 1rem;
}

.case-study-breadcrumbs,
.case-study-breadcrumbs a,
.case-study-breadcrumbs p {
	color: #fff !important;
}

.case-study-hero-title {
	margin: 0;
	max-width: 954px;
	color: #fff;
}

.case-study-hero-content {
	margin-top: 1rem;
	color: #fff;
}

.case-study-hero-content.entry-content,
.case-study-hero-content.entry-content p,
.case-study-hero-content.entry-content a,
.case-study-hero-content.entry-content li {
	color: #fff;
}

.case-study-hero-content.entry-content a:hover {
	opacity: 0.9;
}

/* Main: 2 columns 20% / 80% */
.case-study-main {
	background: #fff;
	padding: 2rem 0 3rem;
}

.case-study-main-inner {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 27% 73%;
	gap: 48px;
	align-items: start;
}

/* Left column 20% */
.case-study-col-left {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: sticky;
	top: 4rem;
}

/* Right column 80% – rows */
.case-study-col-right {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

/* Boxes */
.case-study-box {
	border: 2px dashed #088c43;
	border-radius: 6px;
	padding: 1.25rem;
	background: #fff;
}

/* Let global typography handle heading styles */
.case-study-box-title {
	margin: 0 0 1rem 0;
}

h2.case-study-box-about {
	margin-top: 0 !important;
}

h3.case-study-box-live-help {
	margin-top: 0 !important;
}

h2.case-study-stat-label {
	margin-top: 0 !important;
}

.case-study-box-content {
	font-size: 0.9375rem;
	line-height: 1.6;
}

.case-study-box-content p:last-child {
	margin-bottom: 0;
}

/* CTAs */
.case-study-ctas {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.case-study-cta {
	display: inline-block;
	padding: 12px 20px;
	text-align: center;
	text-decoration: none;
	border-radius: 8px;
	transition: opacity 0.2s;
}

.case-study-cta:hover {
	opacity: 0.9;
}

.case-study-cta-primary {
	background: #45b449;
	color: #fff;
}

.case-study-cta-secondary {
	background: #1c86ff;
	color: #fff;
}

/* Row 1: Stats + CTA 50/50 */
.case-study-row-stats-trustpilot {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-start;
}

.case-study-row-stats-trustpilot .case-study-stat-box {
	flex: 0 0 calc(30% - 0.67rem);
}

.case-study-row-stats-trustpilot .case-study-trustpilot-placeholder {
	flex: 0 0 calc(40% - 0.67rem);
}

.case-study-stat-box {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	gap: 24px;
	border: 1px dashed #d1d1d1;
	border-radius: 6px;
	padding: 1rem;
	background: #fbfbfb;
}

/* Stats title: h2, no applied typography (global handles it) */
.case-study-stat-label {
	display: block;
	margin: 0 0 8px 0;
}

/* Stats value: green, Oswald SemiBold uppercase */
.case-study-stat-value {
	display: block;
	font-family: 'Oswald', sans-serif;
	font-weight: 600;
	font-size: 67.14px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
	color: #088c43;
}

/* Trustpilot widget placeholder (third column in stats row) */
.case-study-trustpilot-placeholder {
	min-height: 120px;
	padding: 0;
	margin-top: -10px;
}

/* Live help */
.case-study-live-help {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	border-radius: 8px;
	border: 2px dashed #d1d1d1;
	background: #fbfbfb;
}

.case-study-live-help .live-help-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.case-study-live-help .case-study-box-live-help {
	margin: 0;
}

.case-study-live-help .live-help-phone {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 600;
}

.case-study-live-help .phone-label {
	display: inline;
	color: #088c43;
	text-transform: uppercase;
	margin: 0;
}

.case-study-live-help .live-help-phone:hover .phone-number,
.case-study-live-help .live-help-phone:hover .phone-label {
	text-decoration: underline;
}

.case-study-live-help .live-help-icon img {
	width: 48px;
	height: 48px;
	display: block;
}

/* About: label above value, labels black uppercase */
.case-study-about-field {
	margin-bottom: 1rem;
}

.case-study-about-field:last-child {
	margin-bottom: 0;
}

.case-study-about-label {
	color: #000;
	text-transform: uppercase;
	margin-bottom: 0.35rem;
}

.case-study-about-value {
	color: #000;
	font-weight: 400;
}

.case-study-about-value .case-study-customer-name {
	cursor: help;
	display: block;
}

.case-study-about .case-study-customer-logo {
	display: block;
	max-width: 50%;
	height: auto;
	object-fit: contain;
	vertical-align: middle;
}

/* Solution: products list with SKUs */
.case-study-solution-products {
	margin: 0.5rem 0 0 0;
	padding-left: 1.25rem;
	list-style: disc;
}

.case-study-solution-products li {
	margin-bottom: 0.25rem;
}

.case-study-solution-products li a {
	color: #1c86ff;
	text-decoration: underline;
}

/* Additional Info – same as other categories (uses .section-content-wrapper from core) */
.case-study-additional-info-wrapper {
	width: 100%;
	margin-top: 0;
}

.case-study-additional-info-wrapper .case-study-additional-info-section {
	margin-bottom: 2rem;
}

.case-study-additional-info-wrapper .case-study-additional-info-section:last-child {
	margin-bottom: 0;
}

.case-study-additional-info-wrapper .section-content-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	width: 100%;
}

.case-study-additional-info-wrapper .section-content-wrapper.single-column {
	flex-direction: column;
}

.case-study-additional-info-wrapper .section-content-wrapper.single-column .resource-column {
	flex: 1 1 100%;
}

.case-study-additional-info-wrapper .section-content-wrapper.two-columns {
	flex-direction: row;
	flex-wrap: wrap;
}

.case-study-additional-info-wrapper .section-content-wrapper.two-columns .resource-column {
	flex: 1 1 calc(50% - 15px);
	min-width: 0;
}

@media (max-width: 768px) {
	.case-study-additional-info-wrapper .section-content-wrapper.two-columns .resource-column {
		flex: 1 1 100%;
	}
}

/* Lightbox */
#cs-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	box-sizing: border-box;
}

#cs-lightbox-img {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
}

#cs-lightbox-close {
	position: fixed;
	top: 1rem;
	right: 1rem;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #fff;
	font-size: 1.5rem;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	cursor: pointer;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

#cs-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.cs-lightbox-trigger {
	cursor: zoom-in;
	display: block;
}

/* Before & After section */
.case-study-before-after {
	display: flex;
	align-items: stretch;
	gap: 24px;
	width: 100%;
}

.case-study-before-after.single-image {
	max-width: 100%;
}

.case-study-before-after.single-image .case-study-before-after-item .cs-lightbox-trigger img {
	aspect-ratio: 16 / 9;
}

.case-study-before-after-item {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.case-study-before-after-label {
	margin: 0;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.9375rem;
	line-height: 1.4;
	min-height: calc(1em * 1.4);
	flex-shrink: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.case-study-before-after-item .cs-lightbox-trigger {
	flex: 1;
	min-height: 0;
	display: block;
}

.case-study-before-after-item .cs-lightbox-trigger img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 4px;
}

.case-study-before-after-placeholder {
	flex: 1;
	min-height: 200px;
	background: #f5f5f5;
	border-radius: 4px;
}

.case-study-before-after-caption {
	min-height: 1.5rem;
	font-size: 0.875rem;
	color: #666;
}

.case-study-before-after-caption p {
	margin: 0;
}

@media (max-width: 768px) {
	.case-study-before-after {
		flex-direction: column;
	}
}

/* Backstory & Challenge section */
.case-study-backstory-challenge {
	width: 100%;
}

.case-study-backstory-challenge .section-content-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 56px;
	width: 100%;
}

.case-study-backstory-challenge .section-content-wrapper.single-column {
	flex-direction: column;
}

.case-study-backstory-challenge .section-content-wrapper.single-column .resource-column {
	flex: 1 1 100%;
}

.case-study-backstory-challenge .section-content-wrapper.two-columns {
	flex-direction: row;
}

.case-study-backstory-challenge .section-content-wrapper.two-columns .resource-column {
	flex: 1 1 calc(50% - 28px);
	min-width: 0;
}

@media (max-width: 768px) {
	.case-study-backstory-challenge .section-content-wrapper.two-columns .resource-column {
		flex: 1 1 100%;
	}
}

/* Lighting Plan metrics list */
.case-study-plan-metrics h3 {
	margin: 0 0 0.75rem 0;
}

.case-study-plan-metrics ul {
	list-style: disc;
	padding-left: 1.25rem;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.case-study-plan-metrics ul li strong {
	display: block;
}

.case-study-plan-metrics ul li span {
	display: block;
}

.case-study-plan-metrics ul li a {
	color: #1c86ff;
	text-decoration: underline;
}

/* Lighting Plan section */
.case-study-plan {
	border: 2px dashed #d1d1d1;
	border-radius: 8px;
	background: #fbfbfb;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 2rem;
	gap: 1.25rem;
}

.case-study-plan h2 {
	color: #088c43;
	text-align: center;
	margin: 0;
}

.case-study-plan-content-image {
	width: 100%;
	min-height: 0;
	display: flex;
	align-items: center;
	gap: 3rem;
	padding: 0 2rem;
	box-sizing: border-box;
}

.case-study-plan-content-image > div:first-child {
	flex: 1;
	min-width: 0;
}

.case-study-plan-images {
	display: flex;
	flex-direction: row;
	gap: 12px;
	width: 100%;
}

.case-study-plan-images .cs-lightbox-trigger {
	flex: 1;
	min-width: 0;
	display: block;
}

.case-study-plan-images .cs-lightbox-trigger img {
	width: 100%;
	height: auto;
	object-fit: contain;
	display: block;
}

.case-study-plan-content-image > div:nth-child(2) {
	flex: 2;
	min-width: 0;
}

/* Responsive */
@media (max-width: 1024px) {
	.case-study-main-inner {
		grid-template-columns: 1fr;
	}

	.case-study-col-left {
		position: static;
	}

	/* Stats + Trustpilot: column, full width on mobile/tablet */
	.case-study-row-stats-trustpilot {
		flex-direction: column;
	}

	.case-study-row-stats-trustpilot .case-study-stat-box,
	.case-study-row-stats-trustpilot .case-study-trustpilot-placeholder {
		flex: 1 1 100%;
		width: 100%;
	}

	/* Inside each stat box: label and value in a row on mobile */
	.case-study-stat-box {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
	}
}

@media (max-width: 768px) {
	.case-study-hero {
		padding: 3rem 0 5rem;
		background-size: cover, cover;
		background-position:
			0 0,
			center;
	}

	.case-study-main-inner {
		gap: 1.5rem;
	}

	.case-study-plan-content-image {
		flex-direction: column-reverse;
		padding: 0;
	}

	.case-study-plan-content-image > div:first-child,
	.case-study-plan-content-image > div:nth-child(2) {
		flex: 1 1 100%;
		width: 100%;
	}
}
