/* ============================================================
   Posts Grid Block — Styles v1.5.7
   ============================================================ */

/* Block title — inherits theme heading styles, centered */
.pgb-block-title {
	margin-top: 0;
	margin-bottom: 1.25rem;
	text-align: center;
}

/* Grid layout */
.pgb-grid {
	display: grid;
	gap: 1.5rem;
	width: 100%;
}

.pgb-cols-1 { grid-template-columns: repeat(1, 1fr); }
.pgb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pgb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.pgb-cols-4 { grid-template-columns: repeat(4, 1fr); }
.pgb-cols-5 { grid-template-columns: repeat(5, 1fr); }
.pgb-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
	.pgb-cols-4,
	.pgb-cols-5,
	.pgb-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.pgb-cols-3,
	.pgb-cols-4,
	.pgb-cols-5,
	.pgb-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.pgb-grid { grid-template-columns: 1fr !important; }
}

/* Card */
.pgb-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pgb-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pgb-card__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Image container — no crop, all 4 corners rounded */
.pgb-card__image-wrap {
	width: 100%;
	overflow: hidden;
	background: #e2e8f0;
	border-radius: 8px;        /* all 4 corners */
	line-height: 0;            /* removes gap under inline img */
}

.pgb-card__image {
	width: 100%;
	height: auto;              /* natural height — no cropping */
	display: block;
	border-radius: 8px;        /* all 4 corners on the img itself */
	transition: transform 0.35s ease;
	object-fit: var(--pgb-img-fit, cover);
	object-position: center;
}

/* When override height is set, switch to absolute fill */
.pgb-card__image-wrap[style*="height"] {
	position: relative;
}
.pgb-card__image-wrap[style*="height"] .pgb-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.pgb-card:hover .pgb-card__image {
	transform: scale(1.05);
}

.pgb-card__image--placeholder {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
	border-radius: 8px;
}

/* Card body */
.pgb-card__body {
	padding: 0.75rem 1rem 0.6rem;
	text-align: center;
}

/* Categories */
.pgb-card__cats,
.pgb-card__cats.post-meta {
	font-family: 'Crimson Text', serif;
	font-size: 16px;
	font-weight: 500;
	color: #535353;
	padding-bottom: 10px;
	margin: 0 0 10px;
	line-height: 1.5;
	border-bottom: 1px solid #6b7a3e;
}

.pgb-card__cats a,
.pgb-card__cats.post-meta a {
	color: #535353;
	text-decoration: none;
}

.pgb-card__cats a:hover,
.pgb-card__cats.post-meta a:hover {
	text-decoration: underline;
}

/* Post title — uppercase, bold, centered, underline only on hover */
.pgb-card__title {
	font-family: 'Roboto', sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0.4rem 0 6px;
	color: inherit;
	text-transform: uppercase;
	text-align: center;
	letter-spacing: 0.65px;
	text-decoration: none;

	/* Two-line clamp */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pgb-card__link:hover .pgb-card__title {
	text-decoration: underline;
}

/* Date */
.pgb-card__date {
	font-size: 0.78rem;
	color: #718096;
	display: block;
	margin-top: 0.35rem;
}

/* View More separator HR */
.pgb-view-more__divider {
	border: none;
	border-top: 1px solid #6b7a3e;
	margin: 0 0 1rem;
}

/* View More footer — centered */
.pgb-view-more {
	padding-top: 0;
	font-size: 0.9rem;
	text-align: center;
}

.pgb-view-more__text {
	font-weight: 600;
	color: #1a202c;
}

.pgb-view-more__link {
	color: #2563eb;
	text-decoration: none;
	font-weight: 600;
}

.pgb-view-more__link:hover {
	text-decoration: underline;
}

/* No-posts message */
.pgb-no-posts {
	padding: 2rem;
	text-align: center;
	color: #718096;
}
