/**
 * Casa Terra Journal letters (Figma Journal "Lead story" and "Letters"): the newest letter with
 * its photo (792, 3:2, radius 16) beside the title on desktop, then the others two by two (588);
 * stacked on tablet (the letters stay two by two) and phone. The .ct-letter card is also used
 * by the "More letters" widget.
 */

.ct-postlist.ct-pad {
	padding-top: var(--ct-pad-t, 0px);
}

.ct-letter {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ct-letter__media {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--ct-radius);
	background: var(--ct-c-line);
}

.ct .ct-letter__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ct-letter__media:hover img {
	transform: scale(1.02);
}

.ct-letter__body {
	margin-top: 16px;
}

.ct-letter__title a {
	color: inherit;
	text-decoration: none;
}

.ct-letter__title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 6px;
}

.ct-letter__meta {
	margin-top: 16px;
	color: var(--ct-muted);
	text-transform: none;
}

/* The newest letter: photo 8 columns, title 4 columns. */
.ct-postlist__lead .ct-letter {
	display: grid;
	grid-template-columns: minmax(0, 792fr) minmax(0, 384fr);
	align-items: start;
	gap: 24px;
}

.ct-postlist__lead .ct-letter__media {
	border-radius: var(--ct-radius-panel);
}

.ct-postlist__lead .ct-letter__body {
	margin-top: 0;
}

.ct-postlist__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 56px 24px;
}

.ct-postlist__lead + .ct-postlist__grid {
	margin-top: 56px;
}

.ct-postlist__grid .ct-letter__media {
	border-radius: var(--ct-radius-panel);
}

.ct-postlist__empty {
	color: var(--ct-muted);
}

.ct-postlist .ct-pagination {
	margin-top: 56px;
}

@media (prefers-reduced-motion: reduce) {
	.ct-letter__media:hover img {
		transform: none;
	}
}

@media (max-width: 1024px) {
	.ct-postlist__lead .ct-letter {
		display: flex;
	}

	.ct-postlist__lead .ct-letter__body {
		margin-top: 16px;
	}

	.ct-postlist__lead .ct-letter__media,
	.ct-postlist__grid .ct-letter__media {
		border-radius: var(--ct-radius);
	}

	.ct-postlist__lead + .ct-postlist__grid {
		margin-top: 40px;
	}
}

@media (max-width: 767px) {
	.ct-postlist__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.ct-postlist__lead + .ct-postlist__grid {
		margin-top: 32px;
	}
}
