/* Blog category: plain post cards instead of the affiliate-program
   directory table. Reuses directory.css's shared layout rules (hiding
   #main, the flex/order stacking under astra_content_top) — this file
   only styles the grid itself. */

.ah-blog-grid {
	max-width: none;
	margin: 0 -6%;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}

body.ah-ssr-directory .ah-blog-grid {
	order: 2;
}

@media (max-width: 900px) {
	.ah-blog-grid {
		margin-left: 0;
		margin-right: 0;
	}
}

.ah-blog-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none !important;
	color: inherit;
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.ah-blog-card:hover {
	box-shadow: 0 10px 26px rgba(36,7,77,0.10);
	transform: translateY(-2px);
	border-color: #d9d9ec;
	color: inherit;
}

.ah-blog-card-image {
	aspect-ratio: 16 / 9;
	background: var(--ast-global-color-0, #2B0057);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.ah-blog-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ah-blog-card-mark {
	color: #fff;
	opacity: 0.85;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 40px;
	font-weight: 700;
}

.ah-blog-card-body {
	padding: 20px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ah-blog-card-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: #1b1a3d;
}

.ah-blog-card-excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: #6b6a8c;
}

.ah-blog-empty {
	padding: 40px 20px;
	text-align: center;
	color: #6b7280;
}

/* Pagination: a plain sibling of .ah-blog-grid inside the same flex
   container astra_content_top writes into (see directory.css), so it
   needs its own `order` to land after the grid rather than before the
   hero/#primary (order 1). */
body.ah-ssr-directory .ah-blog-pagination {
	order: 3;
}

.ah-blog-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 36px 0 8px;
}

.ah-blog-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 8px;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #1b1a3d;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.ah-blog-pagination a.page-numbers:hover {
	box-shadow: 0 6px 18px rgba(36,7,77,0.10);
	transform: translateY(-1px);
	border-color: #d9d9ec;
}

.ah-blog-pagination .page-numbers.current {
	background: var(--ast-global-color-0, #2B0057);
	border-color: var(--ast-global-color-0, #2B0057);
	color: #fff;
}

.ah-blog-pagination .page-numbers.dots {
	border: none;
	background: transparent;
	color: #6b6a8c;
}
