/*
The Puigberts – targetes del blog
Graella d'articles (index.php i archive.php) a l'estil dels diaris de
notícies: imatge 16:9, categoria i data, títol, resum i «Llegir més».
Només es carrega a blog, arxius i cerca (inc/enqueue.php).
*/

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

.tp-post-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--tp-white);
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius);
	overflow: hidden;
	transition: box-shadow var(--tp-transition), transform var(--tp-transition);
}

.tp-post-card:hover,
.tp-post-card:focus-within {
	box-shadow: var(--tp-shadow);
	transform: translateY(-4px);
}

.tp-post-card-media {
	display: block;
}

.tp-post-card-media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: var(--tp-gray);
}

.tp-post-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 22px 22px;
}

.tp-post-card-meta {
	margin: 0;
	color: var(--tp-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.tp-post-card-cat {
	color: var(--tp-accent);
}

.tp-post-card-title {
	margin: 10px 0 12px;
	font-size: 1.25rem;
	line-height: 1.3;
	letter-spacing: 0;
}

.tp-post-card-title a {
	color: inherit;
	text-decoration: none;
}

.tp-post-card-title a:hover {
	color: var(--tp-accent);
}

.tp-post-card-excerpt {
	flex: 1;
	margin: 0;
	color: var(--tp-muted);
	font-size: 0.9rem;
	line-height: 1.7;
}

.tp-post-card-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	margin-top: 18px;
	border-bottom: 1px solid currentColor;
	color: var(--tp-black);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
}

.tp-post-card-more:hover {
	color: var(--tp-accent);
}

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

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