/**
 * Remote Feed — the section heading, the grid, and the built-in card.
 *
 * Everything below .irpp-remote-feed__card only ever applies when no library
 * template was picked: with a template, the card's appearance lives in the
 * template and nothing here can reach inside it.
 *
 * Column count, gap and image ratio are Elementor controls, which emit more
 * specific selectors and so override the fallbacks below.
 */

.irpp-remote-feed__heading {
	margin: 0 0 1.5rem;
	padding-top: 0.75rem;
	border-top: 3px solid #231F20;
	font-size: 1.25rem;
}

.irpp-remote-feed__grid {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 2rem;
	align-items: start;
}

.irpp-remote-feed__item {
	min-width: 0;
}

/*
 * --- Built-in card ---
 */

.irpp-remote-feed__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/*
 * The ratio is on the wrapper rather than the <img> so a card whose image fails
 * to load -- these are hotlinked from the other site, so that is a real
 * possibility -- keeps its height instead of collapsing and reflowing the row.
 */
.irpp-remote-feed__media {
	display: block;
	overflow: hidden;
	margin-bottom: 0.75rem;
	aspect-ratio: 3 / 2;
	background: #DFE3E7;
}

.irpp-remote-feed__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.irpp-remote-feed__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.irpp-remote-feed__title {
	display: block;
	color: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	text-wrap: pretty;
}

.irpp-remote-feed__title:hover,
.irpp-remote-feed__title:focus-visible {
	color: var(--e-global-color-secondary, #940027);
}

.irpp-remote-feed__byline {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.75rem;
	font-weight: 500;
	font-style: italic;
	line-height: 1.16;
	letter-spacing: 0.025em;
}

/* The author links the byline carries, which arrive as ready-made markup. */
.irpp-remote-feed__byline a {
	color: inherit;
	text-decoration: none;
}

.irpp-remote-feed__byline a:hover,
.irpp-remote-feed__byline a:focus-visible {
	text-decoration: underline;
}

.irpp-remote-feed__date {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.75rem;
	letter-spacing: 0.025em;
	opacity: 0.75;
}

.irpp-remote-feed__excerpt {
	margin: 0.6rem 0 0;
	font-size: 0.875rem;
	line-height: 1.45;
	text-wrap: pretty;
}

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