/* Posts Gallery — front-end styles. Intentionally neutral so it adapts to the theme. */

.pg-gallery {
	margin: 2.5rem 0;
}

.pg-gallery .pg-heading {
	margin: 0 0 1.25rem;
	font-size: 1.5rem;
	line-height: 1.2;
}

/* ---------- shared card ---------- */
.pg-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 12px;
	background: #fff;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.pg-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
	border-color: rgba(0, 0, 0, .18);
}

.pg-thumb {
	display: block;
	overflow: hidden;
	background: rgba(0, 0, 0, .05);
}

.pg-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.pg-card:hover .pg-thumb img {
	transform: scale(1.04);
}

.pg-body {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1rem 1.1rem 1.2rem;
}

.pg-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .9rem;
	font-size: .78rem;
	letter-spacing: .02em;
	text-transform: uppercase;
	opacity: .8;
}

.pg-cat {
	font-weight: 600;
	text-decoration: none;
}

.pg-date {
	opacity: .85;
}

.pg-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

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

.pg-title a:hover {
	text-decoration: underline;
}

.pg-excerpt {
	margin: 0;
	font-size: .92rem;
	line-height: 1.6;
	opacity: .85;
}

/* ---------- grid ---------- */
.pg-grid .pg-items {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, 1fr);
}

.pg-grid.pg-cols-1 .pg-items { grid-template-columns: repeat(1, 1fr); }
.pg-grid.pg-cols-2 .pg-items { grid-template-columns: repeat(2, 1fr); }
.pg-grid.pg-cols-3 .pg-items { grid-template-columns: repeat(3, 1fr); }
.pg-grid.pg-cols-4 .pg-items { grid-template-columns: repeat(4, 1fr); }

.pg-grid .pg-thumb {
	aspect-ratio: 16 / 10;
}

/* ---------- list ---------- */
.pg-list .pg-items {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.pg-list .pg-card {
	flex-direction: row;
	align-items: stretch;
}

.pg-list .pg-thumb {
	flex: 0 0 34%;
	max-width: 320px;
	aspect-ratio: 4 / 3;
}

.pg-list .pg-body {
	flex: 1 1 auto;
	justify-content: center;
	padding: 1.1rem 1.3rem;
}

.pg-list .pg-title {
	font-size: 1.3rem;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
	.pg-grid.pg-cols-3 .pg-items,
	.pg-grid.pg-cols-4 .pg-items {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.pg-grid .pg-items {
		grid-template-columns: 1fr !important;
	}
	.pg-list .pg-card {
		flex-direction: column;
	}
	.pg-list .pg-thumb {
		flex-basis: auto;
		max-width: none;
		aspect-ratio: 16 / 10;
	}
}

/* editor placeholder */
.pg-empty {
	padding: 1rem 1.25rem;
	border: 1px dashed rgba(0, 0, 0, .25);
	border-radius: 8px;
	opacity: .8;
}
