/* Case Studies Block */

.bweb-case-studies {
	padding: 5rem 1.5rem;
}

.bweb-case-studies__intro {
	max-width: 640px;
	margin: 0 auto 1rem;
	text-align: center;
}

.bweb-case-studies__heading {
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: var(--bweb-color-text);
}

.bweb-case-studies__subtext {
	font-size: 1.125rem;
	color: var(--bweb-color-muted);
	margin: 0;
	line-height: 1.6;
}

.bweb-case-studies__header {
	text-align: center;
	margin-bottom: 2.5rem;
}

.bweb-case-studies__view-all {
	font-size: 0.9375rem;
	font-weight: var(--bweb-btn-font-weight);
	color: var(--bweb-color-primary);
	text-decoration: none;
}

.bweb-case-studies__view-all:hover {
	text-decoration: underline;
}

.bweb-case-studies__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
}

.bweb-case-studies__card {
	flex: 0 1 calc((100% - (var(--bweb-cs-cols, 3) - 1) * 1.5rem) / var(--bweb-cs-cols, 3));
	min-width: 220px;
	display: flex;
	flex-direction: column;
	position: relative; /* needed for the full-card link overlay */
}

.bweb-case-studies__image-wrap {
	display: block;
	overflow: hidden;
	border-radius: 0.75rem 0.75rem 0 0;
}

.bweb-case-studies__image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.bweb-case-studies__card:hover .bweb-case-studies__image {
	transform: scale(1.03);
}

.bweb-case-studies__card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.bweb-case-studies__industries {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-bottom: 0.75rem;
	position: relative;
	z-index: 2; /* sit above the ::after card overlay */
}

.bweb-case-studies__industry-tag {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--bweb-color-primary);
	background-color: var(--bweb-color-primary-light);
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
}

.bweb-case-studies__title {
	font-size: 1.125rem;
	font-weight: 700;
	margin: 0 0 0.625rem;
}

.bweb-case-studies__title a {
	color: var(--bweb-color-text);
	text-decoration: none;
}

/* Full-card link overlay — stretches the title anchor to cover the entire card.
   Industry tags sit above it via z-index so they remain readable by assistive tech. */
.bweb-case-studies__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.bweb-case-studies__card:hover .bweb-case-studies__title a {
	color: var(--bweb-color-primary);
}

.bweb-case-studies__excerpt {
	font-size: 0.9375rem;
	color: var(--bweb-color-muted);
	line-height: 1.6;
	margin: 0 0 1rem;
	flex: 1;
}


.bweb-case-studies__empty {
	text-align: center;
	color: var(--bweb-color-muted);
}

@media (max-width: 768px) {
	.bweb-case-studies__card {
		flex-basis: calc((100% - 1.5rem) / 2);
	}
}

@media (max-width: 480px) {
	.bweb-case-studies__card {
		flex-basis: 100%;
	}
}

/* ── Showcase layout ────────────────────────────────────────────── */

.bweb-cs-showcase {
	padding: 4rem 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
}

.bweb-cs-showcase__header {
	text-align: center;
	margin-bottom: 3rem;
}

.bweb-cs-showcase__tagline {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--bweb-color-muted);
	margin: 0 0 0.5rem;
}

.bweb-cs-showcase__heading {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 700;
	line-height: 1.15;
	color: var(--bweb-color-heading);
	margin: 0 0 1rem;
}

.bweb-cs-showcase__subtext {
	font-size: 1rem;
	color: var(--bweb-color-muted);
	margin: 0;
}

/* Grid */
.bweb-cs-showcase__grid {
	display: grid;
	grid-template-columns: repeat( var(--bweb-cs-cols, 3), 1fr );
	gap: 2rem;
}

/* Card */
.bweb-cs-showcase__card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease;
}

.bweb-cs-showcase__card:hover {
	transform: translateY(-3px);
}

.bweb-cs-showcase__image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 0.75rem;
	background: var(--bweb-color-border);
	margin-bottom: 1.25rem;
}

.bweb-cs-showcase__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.bweb-cs-showcase__card:hover .bweb-cs-showcase__image img {
	transform: scale(1.03);
}

.bweb-cs-showcase__image-placeholder {
	width: 100%;
	height: 100%;
	background: var(--bweb-color-border);
}

.bweb-cs-showcase__body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

.bweb-cs-showcase__title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--bweb-color-heading);
	margin: 0;
}

.bweb-cs-showcase__excerpt {
	font-size: 0.9375rem;
	color: var(--bweb-color-muted);
	line-height: 1.6;
	margin: 0;
}

.bweb-cs-showcase__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: 0.25rem;
}

.bweb-cs-showcase__tag {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border: 1px solid var(--bweb-btn-outline-border);
	border-radius: 0.25rem;
	font-size: 0.8125rem;
	color: var(--bweb-color-heading);
	white-space: nowrap;
}

.bweb-cs-showcase__link {
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--bweb-color-heading);
	margin-top: 0.25rem;
}

/* Footer */
.bweb-cs-showcase__footer {
	text-align: center;
	margin-top: 3rem;
}

.bweb-cs-showcase__view-all {
	display: inline-block;
	padding: var(--bweb-btn-padding-y) var(--bweb-btn-padding-x);
	border: 1px solid var(--bweb-btn-outline-border);
	border-radius: var(--bweb-btn-radius);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--bweb-btn-outline-color);
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.bweb-cs-showcase__view-all:hover {
	border-color: var(--bweb-color-muted);
	background: var(--bweb-color-surface);
}

.bweb-cs-showcase__empty {
	text-align: center;
	color: var(--bweb-color-muted);
	padding: 2rem;
}

@media ( max-width: 768px ) {
	.bweb-cs-showcase__grid {
		grid-template-columns: 1fr;
	}
}

@media ( max-width: 1024px ) and ( min-width: 769px ) {
	.bweb-cs-showcase__grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

/* ── Compound layout — one big feature + two stacked cards ───────── */

.bweb-cs-compound {
	padding: 6rem 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
}

.bweb-cs-compound__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
	margin-bottom: 3rem;
	flex-wrap: wrap;
}

.bweb-cs-compound__header-text {
	max-width: 640px;
}

.bweb-cs-compound__tagline {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bweb-color-primary);
	margin: 0 0 1rem;
}

.bweb-cs-compound__heading {
	font-size: clamp(2rem, 4.4vw, 3.25rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.02em;
	color: var(--bweb-color-heading);
	margin: 0 0 1rem;
}

.bweb-cs-compound__subtext {
	font-size: 1.0625rem;
	color: var(--bweb-color-muted);
	margin: 0;
}

.bweb-cs-compound__view-all {
	display: inline-block;
	padding: 0.9375rem 2rem;
	border: 1px solid var(--bweb-color-primary);
	color: var(--bweb-color-heading);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	flex-shrink: 0;
	transition: background 0.15s ease, color 0.15s ease;
}

.bweb-cs-compound__view-all:hover {
	background: var(--bweb-color-primary);
	color: var(--bweb-color-white);
}

.bweb-cs-compound__grid {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 1.5rem;
}

.bweb-cs-compound__feature {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 34rem;
	padding: 2.5rem;
	text-decoration: none;
	color: var(--bweb-color-white);
	background: var(--bweb-color-ink) repeating-linear-gradient(135deg, #0a3f3b 0 12px, #0d4a45 12px 24px);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.bweb-cs-compound__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.bweb-cs-compound__tag {
	padding: 0.3125rem 0.75rem;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.28);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bweb-cs-compound__feature-title {
	font-size: clamp(1.5rem, 2.6vw, 2.125rem);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 1rem;
	max-width: 520px;
}

.bweb-cs-compound__feature-excerpt {
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.78);
	line-height: 1.65;
	margin: 0 0 1rem;
	max-width: 520px;
}

.bweb-cs-compound__link {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--bweb-color-mint);
}

.bweb-cs-compound__side {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: 1.5rem;
}

.bweb-cs-compound__card {
	display: flex;
	gap: 1.5rem;
	padding: 1.75rem;
	background: var(--bweb-color-surface);
	border: 1px solid var(--bweb-color-border);
	text-decoration: none;
	color: inherit;
	align-items: center;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.bweb-cs-compound__card:hover {
	border-color: var(--bweb-color-primary);
	background: var(--bweb-color-white);
}

.bweb-cs-compound__card-image {
	flex: 0 0 34%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-image: repeating-linear-gradient(135deg, #e5e7eb 0 10px, #eef0f2 10px 20px);
}

.bweb-cs-compound__card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bweb-cs-compound__card-image-placeholder {
	width: 100%;
	height: 100%;
}

.bweb-cs-compound__card-body {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.bweb-cs-compound__card-tag {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bweb-color-primary);
}

.bweb-cs-compound__card-title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--bweb-color-heading);
	margin: 0;
}

.bweb-cs-compound__card-excerpt {
	font-size: 0.9375rem;
	color: var(--bweb-color-muted);
	line-height: 1.6;
	margin: 0;
}

.bweb-cs-compound__card-link {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--bweb-color-primary);
}

@media (max-width: 900px) {
	.bweb-cs-compound__grid {
		grid-template-columns: 1fr;
	}

	.bweb-cs-compound__feature {
		min-height: 22rem;
	}

	.bweb-cs-compound__card {
		flex-direction: column;
		align-items: flex-start;
	}

	.bweb-cs-compound__card-image {
		width: 100%;
		flex-basis: auto;
	}
}
