/* =============================================
   Post Grid — Frontend Styles
   ============================================= */

.pg-wrapper {
	--pg-radius: 12px;
	--pg-gap: 24px;
	--pg-border: #e5e7eb;
	--pg-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	--pg-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.14);
	--pg-title-color: #1a1a1a;
	--pg-text-color: #4b5563;
	--pg-feat-color: #374151;
	--pg-feat-icon: #2d7a2d;
	width: 100%;
	box-sizing: border-box;
}

/* Grid */
.pg-grid {
	display: grid;
	gap: var(--pg-gap);
	grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
	.pg-cols-2,
	.pg-cols-3,
	.pg-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.pg-cols-3 {
		grid-template-columns: repeat(3, 1fr);
	}
	.pg-cols-4 {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 768px) {
	.pg-cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Card */
.pg-card {
	background: #ffffff;
	border: 1px solid var(--pg-border);
	border-radius: var(--pg-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	box-shadow: var(--pg-shadow);
}

.pg-card:hover {
	box-shadow: var(--pg-shadow-hover);
	transform: translateY(-2px);
}

/* Image */
.pg-image-link {
	display: block;
	text-decoration: none;
}

.pg-image-wrap {
	width: 100%;
	overflow: hidden;
	background: #f3f4f6;
	height: 240px;
}

.pg-image-wrap img {
	width: 100%;
	height: 100%;
	display: block;
	transition: transform 0.3s ease;
}

.pg-card:hover .pg-image-wrap img {
	transform: scale(1.03);
}

.pg-no-image {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* Body */
.pg-body {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

/* Title */
.pg-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--pg-title-color);
	margin: 0 0 10px;
	line-height: 1.3;
}

.pg-title a {
	color: inherit;
	text-decoration: none;
}

.pg-title a:hover {
	color: var(--pg-feat-icon);
}

/* Excerpt */
.pg-excerpt {
	font-size: 0.95rem;
	color: var(--pg-text-color);
	line-height: 1.6;
	margin: 0 0 14px;
}

/* Features list */
.pg-features {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pg-features li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9rem;
	color: var(--pg-feat-color);
}

.pg-features li::before {
	content: '';
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-width: 22px;
	background-color: var(--pg-feat-icon);
	border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
	background-size: 14px;
	background-repeat: no-repeat;
	background-position: center;
}

/* Button */
.pg-btn {
	display: inline-block;
	margin-top: auto;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.1s ease;
	text-align: center;
	align-self: flex-start;
}

.pg-btn:hover {
	text-decoration: none;
}

.pg-btn:active {
	transform: scale(0.97);
}

/* Empty state */
.pg-no-posts {
	color: #6b7280;
	font-style: italic;
}
