/* Vendasta Cross-Site Posts — card grid, matched to vendasta.com/blog/ */

.vcsp-grid {
	display: grid;
	gap: 30px;
	grid-template-columns: repeat(var(--vcsp-cols, 3), minmax(0, 1fr));
	margin: 2em 0;
}

/* If something injects a wrapper between .vcsp-grid and the cards, flatten it
   so the grid still receives the cards as direct grid items. */
.vcsp-grid > div:not([class*="vcsp-"]) {
	display: contents;
}

/* Single-column grids shouldn't stretch edge-to-edge on desktop. */
.vcsp-grid[data-vcsp-cols="1"] {
	max-width: 520px;
}

.vcsp-card {
	display: block;
	background: transparent;
	text-decoration: none !important;
	color: inherit;
}

.vcsp-card:hover,
.vcsp-card:focus-visible {
	text-decoration: none !important;
	color: inherit;
}

.vcsp-card__image {
	position: relative;
	overflow: hidden;
	aspect-ratio: 768 / 417;
	background: #e4e7ec;
	margin-bottom: 15px;
}

.vcsp-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.vcsp-card:hover .vcsp-card__image img {
	transform: scale(1.04);
}

.vcsp-card__pill {
	position: absolute;
	top: 12px;
	right: 12px;
	background: #1976D2;
	color: #ffffff;
	font-family: "Open Sans", Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 6px 12px;
	border-radius: 999px;
	letter-spacing: 0.02em;
	text-transform: none;
	white-space: nowrap;
	z-index: 1;
}

.vcsp-card__body {
	padding: 0 15px;
}

.vcsp-card__title {
	font-family: Raleway, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 23px;
	font-weight: 700;
	color: #555555;
	margin: 0 0 10px 0;
	transition: color 0.2s ease;
	/* Clamp to 3 lines so card heights stay even in a row. */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.vcsp-card:hover .vcsp-card__title {
	color: #1976D2;
}

.vcsp-card__meta {
	font-family: Raleway, Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 24px;
	color: #9E9E9E;
	font-weight: 400;
}

/* Responsive: collapse 3/4-col grids to 2-col on tablets, 1-col on mobile. */
@media (max-width: 980px) {
	.vcsp-grid[data-vcsp-cols="3"],
	.vcsp-grid[data-vcsp-cols="4"] {
		--vcsp-cols: 2 !important;
	}
}

@media (max-width: 600px) {
	.vcsp-grid {
		--vcsp-cols: 1 !important;
		gap: 24px;
	}
	.vcsp-grid[data-vcsp-cols="1"] {
		max-width: none;
	}
}
