/**
 * Free Widgets For Elementor — Post Grid.
 *
 * Structural defaults only. Colours, typography, border, radius, padding, gap
 * and column count are driven by the Style/Layout controls (Elementor
 * `selectors`), which override these. CSS grid handles the responsive columns.
 */

.fwfe-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.fwfe-post-grid__card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	overflow: hidden;
}

/* ---- Image ---- */
.fwfe-post-grid__image {
	display: block;
	line-height: 0;
}

.fwfe-post-grid__image img,
.fwfe-post-grid__image-img {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
}

/* ---- Body ---- */
.fwfe-post-grid__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
}

.fwfe-post-grid__meta {
	font-size: 13px;
	opacity: 0.75;
}

.fwfe-post-grid__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.fwfe-post-grid__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.fwfe-post-grid__excerpt {
	font-size: 15px;
	line-height: 1.6;
	opacity: 0.85;
}

.fwfe-post-grid__read-more {
	align-self: flex-start;
	margin-top: 4px;
	color: #6366f1;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.15s ease;
}

.fwfe-post-grid__read-more:hover,
.fwfe-post-grid__read-more:focus {
	color: #4f46e5;
}

.fwfe-post-grid__empty {
	margin: 0;
	padding: 16px;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	color: #6b7280;
	text-align: center;
}

/* ---- Responsive: collapse columns on smaller screens ---- */
@media ( max-width: 1024px ) {
	.fwfe-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

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

/* ---- Reduced motion ---- */
@media ( prefers-reduced-motion: reduce ) {
	.fwfe-post-grid__title a,
	.fwfe-post-grid__read-more {
		transition: none;
	}
}
