/**
 * Social Feed grid — a clean, responsive tile grid in the spirit of an
 * Instagram / Washington Post social layout. Square tiles, image-cover,
 * whole tile is the click target.
 */

.social-feed-heading {
	text-align: center;
	font-weight: 700;
	margin: 0 0 1.25rem;
}

.social-feed-grid {
	--sf-columns: 3;
	--sf-gap: 4px;
	display: grid;
	grid-template-columns: repeat(var(--sf-columns), 1fr);
	gap: var(--sf-gap);
	width: 100%;
	margin: 0 auto;
}

.social-feed-tile {
	position: relative;
	display: block;
	aspect-ratio: var(--sf-ratio, 4/5); /* portrait by default; set via shortcode */
	overflow: hidden;
	background: #f0f0f0;
	text-decoration: none;
	cursor: pointer;
}

.social-feed-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Subtle hover affordance so it reads as clickable. */
a.social-feed-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	transition: background 0.35s ease;
}

a.social-feed-tile:hover .social-feed-img {
	transform: scale(1.04);
}

a.social-feed-tile:hover::after {
	background: rgba(0, 0, 0, 0.12);
}

.social-feed-empty {
	text-align: center;
	color: #666;
	padding: 2rem 0;
}

/* Tablet: drop to 2 columns if the layout is tight. */
@media (max-width: 780px) {
	.social-feed-grid {
		--sf-columns: 3;
		--sf-gap: 3px;
	}
}

/* Phones: keep 3 across like the native IG grid, tighter gaps. */
@media (max-width: 480px) {
	.social-feed-grid {
		--sf-columns: 3;
		--sf-gap: 2px;
	}
}
