/* ==========================================================
   Targetes d'article (template-parts/post-card.php): home i pàgina del blog
   ========================================================== */

/* Graella de targetes, dues per fila */
.posts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

/* Targeta: text a l'esquerra, foto a la dreta */
.post {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 340px;
	border: 1px solid var(--linia);
}

.post img,
.post__placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post__placeholder {
	background: linear-gradient(170deg, rgba(147, 99, 80, .35), rgba(101, 42, 31, .85)), var(--bronze);
}

.post__body {
	background: var(--blanc);
	display: flex;
	flex-direction: column;
	padding: 24px 20px;
}

.post__cat {
	font-size: .78rem;
	font-weight: 400;
	margin-bottom: 1rem;
	color: var(--terracota);
}

.post h3 {
	font-size: 1.45rem;
	line-height: 1.2;
}

.post h3 a {
	text-decoration: none;
}

/* Tota la targeta és clicable a través de l'enllaç del títol */
.post h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.post:hover h3 a {
	color: var(--bronze);
}

.post__more {
	margin-top: auto;
	padding-top: 24px;
	display: flex;
	justify-content: space-between;
	font-size: .85rem;
	font-weight: 400;
	text-decoration: none;
}

.post__more span {
	font-size: 1.4rem;
	line-height: .8;
	font-weight: 300;
	transition: transform .3s;
}

.post:hover .post__more span {
	transform: rotate(90deg);
	color: var(--terracota);
}

/* Una targeta per fila, amb la foto a dalt */
@media (max-width: 600px) {
	.posts,
	.post {
		grid-template-columns: 1fr;
	}

	.post img,
	.post__placeholder {
		height: 200px;
		order: -1;
	}

	.post__body {
		min-height: 220px;
	}
}
