/* RDC Grade de Categorias — CSS estrutural base.
   Aparência (cores, fontes, bordas, espaçamentos) é controlada pelos
   campos de estilo do próprio widget no Elementor. Este arquivo cuida
   apenas da estrutura/layout para o widget funcionar em qualquer tema. */

.rdc-grade-wrapper {
	width: 100%;
	box-sizing: border-box;
}

.rdc-grade-wrapper * {
	box-sizing: border-box;
}

/* Cabeçalho ------------------------------------------------------ */

.rdc-grade-header {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}

.rdc-grade-header-text {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 12px;
}

.rdc-grade-title {
	margin: 0;
}

.rdc-grade-subtitle {
	margin: 0;
}

.rdc-grade-viewall {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
}

/* Grade de blocos -------------------------------------------------- */

.rdc-grade-blocks {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	width: 100%;
}

.rdc-grade-block {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.rdc-grade-block-title {
	margin: 0 0 14px 0;
}

.rdc-grade-block-posts {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* Card individual --------------------------------------------------- */

.rdc-grade-card {
	display: flex;
	align-items: flex-start;
	text-decoration: none;
}

.rdc-grade-card-thumb {
	flex-shrink: 0;
	overflow: hidden;
	display: block;
	position: relative;
	background-color: #e5e5e5;
}

.rdc-grade-card-thumb img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.rdc-grade-card-overlay {
	display: none;
}

/* Modo "Preencher o card": a imagem vira o fundo do card inteiro
   (ocupando 100% da largura E da altura), com um degradê escuro e o
   título/CTA sobrepostos por cima, ancorados na base do card. */
.rdc-grade-image-cover .rdc-grade-card {
	position: relative;
	display: block;
	overflow: hidden;
	height: 240px;
	min-height: 240px;
}

.rdc-grade-image-cover .rdc-grade-card-thumb {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	z-index: 1;
	border-radius: 0;
}

.rdc-grade-image-cover .rdc-grade-card-thumb img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

.rdc-grade-image-cover .rdc-grade-card-overlay {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 75%);
}

.rdc-grade-image-cover .rdc-grade-card-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	width: 100%;
	padding: 14px 16px;
}

.rdc-grade-image-cover .rdc-grade-card-title {
	color: #ffffff;
}

.rdc-grade-card-thumb.rdc-grade-no-image {
	background-image:
		linear-gradient(45deg, transparent 48%, currentColor 49%, currentColor 51%, transparent 52%),
		linear-gradient(-45deg, transparent 48%, currentColor 49%, currentColor 51%, transparent 52%);
	color: #cfcfcf;
}

.rdc-grade-card-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.rdc-grade-card-title {
	margin: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	text-overflow: ellipsis;
	color: #1a1a1a;
	font-size: 16px;
}

.rdc-grade-card-cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	width: fit-content;
}

.rdc-grade-card-cta .rdc-grade-cta-icon {
	display: inline-block;
	transition: transform 0.15s ease;
}

.rdc-grade-card:hover .rdc-grade-cta-icon {
	transform: translateX(3px);
}

.rdc-grade-empty {
	opacity: 0.6;
	font-size: 13px;
}

/* Responsivo padrão (sobrescrito pelos controles responsivos do Elementor quando definidos) */
@media (max-width: 767px) {
	.rdc-grade-blocks {
		grid-template-columns: 1fr;
	}
}
