/* Post loop grids (Case Study Loop Grid and any other post type built on
   Loop_Grid_Base) — all classes namespaced csl-f313c49d-* */

.csl-f313c49d-wrapper {
	font-family: inherit;
	width: 100%;
	--csl-focus-ring: #1a1a1a;
}

/* ----------------------------------------------------------------- Filters */
.csl-f313c49d-filters {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 16px 24px;
	margin: 0;
}

/* Progressive enhancement: browsers that can style the dropdown list itself get
   a properly spaced, rounded menu. Everything else keeps the native one. */
@supports (appearance: base-select) {
	.csl-f313c49d-select {
		appearance: base-select;
	}
}

.csl-f313c49d-apply {
	min-height: 40px;
	padding: 9px 20px;
	border: 2px solid currentColor;
	border-radius: 999px;
	background: transparent;
	font-size: 14px;
	font-weight: 600;
	color: #1e293b;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.csl-f313c49d-apply:hover {
	background: #1e293b;
	color: #fff;
}
.csl-f313c49d-apply:focus {
	outline: none;
}
.csl-f313c49d-apply:focus-visible,
.csl-f313c49d-clear:focus-visible,
.csl-f313c49d-read-more:focus-visible {
	outline: 3px solid var(--csl-focus-ring);
	outline-offset: 3px;
	border-radius: 4px;
}
/* With "apply automatically" on, JS submits the form, so the button is only
   there for people without JS. */
.csl-f313c49d-wrapper.csl-has-js .csl-f313c49d-apply--auto {
	display: none;
}

.csl-f313c49d-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 0 0 auto;
	padding-bottom: 1px; /* lines the row up with the select underlines */
}
.csl-f313c49d-clear {
	display: inline-flex;
	align-items: center;
	min-height: 40px; /* matches the Apply button, so the two centre together */
	font-size: 14px;
	font-weight: 600;
	color: #475569;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.csl-f313c49d-clear:hover {
	color: #1e293b;
}

/* -------------------------------------------------------------------- Grid */
.csl-f313c49d-grid {
	display: grid;
	list-style: none;
	margin: 0;
	padding: 0;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}
.csl-f313c49d-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #f1f5f9;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.csl-f313c49d-card:hover,
.csl-f313c49d-card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.csl-f313c49d-card-img {
	position: relative;
	display: block;
	width: 100%;
	box-sizing: border-box;
	aspect-ratio: 16 / 9;
	background: #f8fafc;
	overflow: hidden;
}
.csl-f313c49d-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/**
 * A very light top-to-bottom wash over the posts grid's card images, so a pale
 * photo doesn't run straight into the white card beneath it.
 *
 * Scoped to the posts widget by its Elementor class: both loop grids share the
 * csl- classes, and the case study grid isn't asking for this. z-index 0 keeps
 * the wash above the image but under the category pill (2) and the hover
 * overlay (1), and pointer-events: none keeps it out of the way of the link.
 */
.elementor-widget-bwcs_posts_loop .csl-f313c49d-card-img::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.13));
}

.csl-f313c49d-no-img {
	display: block;
	width: 100%;
	height: 100%;
	background: #e2e8f0;
}

/* Hover overlay — same behaviour as the document cards widget */
.csl-f313c49d-img-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 40px;
	line-height: 1;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.csl-f313c49d-img-overlay i,
.csl-f313c49d-img-overlay svg {
	transform: scale(0.8);
	transition: transform 0.3s ease;
}
.csl-f313c49d-img-overlay svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}
.csl-f313c49d-card-img:hover .csl-f313c49d-img-overlay {
	opacity: 1;
}
.csl-f313c49d-card-img:hover .csl-f313c49d-img-overlay i,
.csl-f313c49d-card-img:hover .csl-f313c49d-img-overlay svg {
	transform: scale(1);
}

.csl-f313c49d-pill {
	position: absolute;
	top: 15px;
	right: 15px;
	z-index: 2;
	background: #0f172a;
	color: #fff;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ------------------------------------------------------------ Card content */
.csl-f313c49d-card-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}
.csl-f313c49d-title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	color: #1e293b;
}
.csl-f313c49d-meta {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #64748b;
	display: flex;
	align-items: center;
	gap: 8px;
}
.csl-f313c49d-meta-date {
	min-width: 0;
	flex: 1 1 auto;
}
.csl-f313c49d-meta-date time {
	min-width: 0;
}
.csl-f313c49d-meta .csl-f313c49d-icon {
	flex: none;
	color: #94a3b8;
	fill: currentColor;
}
/**
 * The excerpt is trimmed in PHP to the word count set in the panel and ends
 * with the truncation marker ([...]) when anything was cut. A word count can't
 * promise a line count, though — twenty long words wrap further than twenty
 * short ones, and the card narrows with the screen — so the line limit is held
 * here as well.
 *
 * The clamp below is a backstop, not the usual mechanism. loop-grids.js
 * shortens any excerpt that would overflow and moves the marker to the new
 * end, so in a browser with JavaScript the text stops before the clamp ever
 * engages and the marker stays visible. Without JavaScript the clamp still
 * holds the four lines, ending in the browser's own ellipsis.
 */
.csl-f313c49d-excerpt {
	--csl-excerpt-lines: 4; /* the Maximum Lines control overrides this */
	margin: 0 0 24px;
	font-size: 15px;
	color: #475569;
	line-height: 1.6;
	flex-grow: 1;
	min-height: 4.8em; /* three lines, so a one-line excerpt still has body */
	overflow-wrap: break-word;
	display: -webkit-box;
	-webkit-line-clamp: var(--csl-excerpt-lines);
	line-clamp: var(--csl-excerpt-lines);
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.csl-f313c49d-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid #f1f5f9;
}
.csl-f313c49d-read-more {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	white-space: nowrap; /* never split "Read More" across two lines */
	gap: 6px;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 600;
	color: #0369a1;
	text-decoration: none;
	transition: color 0.2s ease;
}
.csl-f313c49d-read-more:hover {
	color: #075985;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.csl-f313c49d-read-more-icon {
	display: inline-flex;
	align-items: center;
	font-size: 0.85em;
	line-height: 1;
	transition: transform 0.2s ease;
}
.csl-f313c49d-read-more-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}
.csl-f313c49d-read-more:hover .csl-f313c49d-read-more-icon {
	transform: translateX(3px);
}

/* Load more */
.csl-f313c49d-load-more-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 32px;
}
.csl-f313c49d-load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 32px;
	border: 2px solid currentColor;
	border-radius: 999px;
	background: transparent;
	font-size: 15px;
	font-weight: 600;
	color: #1e293b;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.csl-f313c49d-load-more:hover {
	background: #1e293b;
	color: #fff;
}
.csl-f313c49d-load-more:focus {
	outline: none;
}
.csl-f313c49d-load-more:focus-visible {
	outline: 3px solid var(--csl-focus-ring);
	outline-offset: 3px;
}
.csl-f313c49d-load-more[aria-busy="true"] {
	opacity: 0.7;
	cursor: progress;
}
.csl-f313c49d-title:focus {
	outline: none;
}
.csl-f313c49d-title:focus-visible {
	outline: 3px solid var(--csl-focus-ring);
	outline-offset: 3px;
}

/* Nothing matched the filters. Given room of its own it reads as a state
   rather than as a stray line crowding the dropdowns above it. */
.csl-f313c49d-empty {
	margin: 0;
	padding: 56px 24px 48px;
	text-align: center;
	color: #475569;
}

/* -------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
	.csl-f313c49d-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
@media (max-width: 767px) {
	.csl-f313c49d-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Header layout: single row when there's space, stacking as it narrows. */
@media (max-width: 860px) {
	.csl-f313c49d-header {
		flex-direction: column;
		align-items: stretch;
	}
	.csl-f313c49d-filters {
		justify-content: flex-start;
		flex: 0 0 auto;
	}
}
@media (max-width: 560px) {
	.csl-f313c49d-filters {
		flex-direction: column;
		align-items: stretch;
	}
	.csl-f313c49d-actions {
		flex-wrap: wrap;
		padding-bottom: 0;
	}
	.csl-f313c49d-apply {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.csl-f313c49d-card,
	.csl-f313c49d-img-overlay,
	.csl-f313c49d-img-overlay i,
	.csl-f313c49d-img-overlay svg,
	.csl-f313c49d-select,
	.csl-f313c49d-chevron,
	.csl-f313c49d-load-more,
	.csl-f313c49d-apply,
	.csl-f313c49d-read-more,
	.csl-f313c49d-read-more-icon {
		transition: none;
	}
	.csl-f313c49d-card:hover {
		transform: none;
	}
}
