/* Case Studies Grid — front-end styles */

.csg-wrapper {
	margin: 0 auto;
	padding: 30px 20px 50px;
}

/* Toolbar: filter buttons + search */
.csg-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 30px;
}

.csg-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.csg-filter-btn {
	background: #ffffff;
	border: 1px solid #1a4d4d;
	color: #1a4d4d;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.csg-filter-btn:hover {
	background: #e6efef;
}

.csg-filter-btn.is-active {
	background: #1a4d4d;
	color: #ffffff;
	border-color: #1a4d4d;
}

/* Industries dropdown */
.csg-industries-dropdown {
	position: relative;
	display: inline-block;
}

.csg-industries-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.csg-caret {
	font-size: 11px;
	transition: transform 0.2s ease;
}

.csg-industries-btn.is-open .csg-caret {
	transform: rotate(180deg);
}

.csg-dropdown-menu {
	list-style: none;
	margin: 6px 0 0;
	padding: 6px 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #ffffff;
	border: 1px solid #d0d5d5;
	border-radius: 3px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
	z-index: 20;
	display: none;
	max-height: 280px;
	overflow-y: auto;
}

.csg-dropdown-menu.is-open {
	display: block;
}

.csg-dropdown-item {
	padding: 9px 16px;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	white-space: nowrap;
}

.csg-dropdown-item:hover {
	background: #e6efef;
}

.csg-dropdown-item.is-active {
	background: #1a4d4d;
	color: #ffffff;
	font-weight: 600;
}

.csg-search {
	position: relative;
	flex: 1 1 260px;
	max-width: 340px;
}

.csg-search input {
	width: 100%;
	padding: 10px 40px 10px 14px;
	border: 1px solid #d0d5d5;
	border-radius: 2px;
	font-size: 14px;
	box-sizing: border-box;
}

.csg-search__icon {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	opacity: 0.5;
	pointer-events: none;
}

/* Grid */
.csg-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

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

@media (max-width: 600px) {
	.csg-grid {
		grid-template-columns: 1fr;
	}
}

/* Card */
.csg-card {
	background: #ffffff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 10px;
}

.csg-card__img-wrap {
	display: block;
	line-height: 0;
}

.csg-card__img-wrap {
	display: block;
	line-height: 0;
	width: 100%;
	height: 220px;
	overflow: hidden;
}

.csg-card__img,
.csg-card__img-wrap img {
	width: 100% !important;
	height: 220px !important;
	max-width: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
}

.csg-card__img--placeholder {
	width: 100%;
	height: 220px;
	background: #eef1f1;
}

.csg-card__body {
	padding: 0;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.csg-card__title {
	text-decoration: none;
	color: inherit;
}

.csg-card__title h3 {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.35;
	color: #1a1a1a;
	font-weight: 700;
}

.csg-card__tax {
	color: #1a4d4d;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.csg-card__excerpt {
	color: #444;
	font-size: 12px;
	line-height: 1.6;
	margin: 0 0 16px;
	flex-grow: 1;
}

.csg-card__readmore {
	color: #1a4d4d;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	align-self: flex-start;
}

.csg-card__readmore:hover {
	text-decoration: underline;
}

.csg-no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: #666;
	padding: 40px 0;
}

.csg-loading {
	text-align: center;
	padding: 20px 0;
	color: #1a4d4d;
	font-weight: 600;
}
