.cef-wrapper {
	--cef-border: #e5e7eb;
	--cef-text: #1f2937;
	--cef-muted: #6b7280;
	--cef-accent: #111827;
	width: 100%;
	box-sizing: border-box;
}

.cef-wrapper * {
	box-sizing: border-box;
}

/* Barra de filtros */
.cef-filters-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: #f5f6f8;
	border: 1px solid var(--cef-border);
	border-radius: 14px;
	padding: 18px 22px;
	margin-bottom: 28px;
}

.cef-filters-fields {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 22px;
}

.cef-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 140px;
}

.cef-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--cef-muted);
}

.cef-select {
	appearance: none;
	-webkit-appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.6' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E") no-repeat right 12px center;
	border: 1px solid var(--cef-border);
	border-radius: 8px;
	padding: 9px 34px 9px 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cef-text);
	min-width: 140px;
	cursor: pointer;
	transition: border-color .15s ease;
}

.cef-select:hover,
.cef-select:focus {
	border-color: #9ca3af;
	outline: none;
}

.cef-clear-btn {
	background: #fff;
	border: 1px solid var(--cef-border);
	border-radius: 8px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cef-text);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease;
}

.cef-clear-btn:hover {
	background: #eef0f2;
	border-color: #9ca3af;
}

.cef-counter {
	font-size: 14px;
	color: var(--cef-muted);
	white-space: nowrap;
}

.cef-counter .cef-shown,
.cef-counter .cef-total {
	font-weight: 700;
	color: var(--cef-text);
}

/* Grid de casos */
.cef-cases-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	position: relative;
	min-height: 60px;
	transition: opacity .2s ease;
}

.cef-cases-grid.cef-loading {
	opacity: .45;
	pointer-events: none;
}

.cef-loop-item {
	width: 100%;
	display: flex;
	height: 100%;
}

.cef-loop-item > div {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.cef-loop-item .elementor-widget-button {
	margin-top: auto;
}

.casos-de-exito .elementor-element {
    height: 100%;
}

/* Fallback (quando não há template Elementor disponível) */
.cef-fallback-card {
	display: block;
	border: 1px solid var(--cef-border);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: var(--cef-text);
}

.cef-fallback-thumb img {
	width: 100%;
	height: auto;
	display: block;
}

.cef-fallback-title {
	font-size: 16px;
	padding: 14px;
	margin: 0;
}

/* Botão "Ver más" */
.cef-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.cef-load-more-btn {
	background: var(--cef-accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 28px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s ease;
}

.cef-load-more-btn:hover {
	opacity: .85;
}

.cef-load-more-btn:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.cef-no-results {
	text-align: center;
	color: var(--cef-muted);
	padding: 40px 0;
}

/* Responsivo */
@media (max-width: 992px) {
	.cef-cases-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.cef-filters-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.cef-filters-fields {
		flex-direction: column;
		align-items: stretch;
	}

	.cef-field,
	.cef-select {
		min-width: 0;
		width: 100%;
	}

	.cef-cases-grid {
		grid-template-columns: 1fr;
	}

	.cef-counter {
		text-align: left;
	}
}