/* ═══════════════════════════════════════════
 * Goshen Posts Loop Grid
 * ═══════════════════════════════════════════ */

/* Section */
.goshen-posts-loop {
	box-sizing: border-box;
}

.goshen-posts-loop *,
.goshen-posts-loop *::before,
.goshen-posts-loop *::after {
	box-sizing: inherit;
}

/* Section Title — matches bento pattern */
.goshen-posts-loop-title {
	position: relative;
	padding-right: 18px;
	margin: 0 0 32px 0;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	color: #1a1a2e;
}

.goshen-posts-loop-title::before {
	content: '';
	position: absolute;
	right: 0;
	top: 2px;
	bottom: 2px;
	width: 4px;
	border-radius: 2px;
	background-color: #0099cc;
}

/* ─── Grid System ────────────────────────── */
.goshen-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 24px;
	row-gap: 24px;
}

.goshen-posts-grid--equal {
	align-items: stretch;
}

.goshen-posts-grid--equal .goshen-posts-card {
	display: flex;
	flex-direction: column;
}

.goshen-posts-grid--equal .goshen-posts-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.goshen-posts-grid--equal .goshen-posts-card__excerpt {
	flex: 1;
}

/* ─── Card ───────────────────────────────── */
.goshen-posts-card {
	border-radius: 14px;
	background-color: #ffffff;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.goshen-posts-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Focus within for keyboard navigation */
.goshen-posts-card:focus-within {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* ─── Card Image ─────────────────────────── */
.goshen-posts-card__image-link {
	display: block;
	text-decoration: none;
}

.goshen-posts-card__image-link:focus-visible {
	outline: 3px solid #0099cc;
	outline-offset: -3px;
	border-radius: 24px 24px 0 0;
}

.goshen-posts-card__image {
	position: relative;
	height: 200px;
	background-size: cover;
	background-position: center;
	background-color: #e8ecf1;
	overflow: hidden;
	transition: background-size 0.4s ease;
}

.goshen-posts-card:hover .goshen-posts-card__image {
	background-size: 110%;
}

/* Placeholder icon when no featured image */
.goshen-posts-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #b8c1cc;
}

/* ─── Card Body ──────────────────────────── */
.goshen-posts-card__body {
	padding: 20px 24px;
	text-align: right;
}

/* ─── Date ───────────────────────────────── */
.goshen-posts-card__date {
	display: block;
	font-size: 13px;
	color: #888888;
	margin-bottom: 8px;
	line-height: 1.4;
}

/* ─── Post Title ─────────────────────────── */
.goshen-posts-card__title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	color: #1a1a2e;
}

.goshen-posts-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.goshen-posts-card__title a:hover {
	color: #0099cc;
}

.goshen-posts-card__title a:focus-visible {
	outline: 2px solid #0099cc;
	outline-offset: 2px;
	border-radius: 4px;
}

/* ─── Excerpt ────────────────────────────── */
.goshen-posts-card__excerpt {
	margin: 0 0 16px;
	font-size: 14px;
	color: #666666;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ─── CTA — text link style with arrow ───── */
.goshen-posts-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	color: #0099cc;
	background: none;
	border: none;
	border-radius: 0;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s ease;
	margin-top: auto;
	/* Minimum touch target */
	min-height: 44px;
	line-height: 44px;
}

.goshen-posts-card__cta:hover {
	color: #007aa3;
}

.goshen-posts-card__cta:focus-visible {
	outline: 2px solid #0099cc;
	outline-offset: 2px;
	border-radius: 4px;
}

/* Chevron arrow inside CTA */
.goshen-posts-card__cta-arrow {
	display: inline-flex;
	align-items: center;
	font-size: 18px;
	line-height: 1;
	transform: scaleX(-1);
	transition: transform 0.2s ease;
}

.goshen-posts-card__cta:hover .goshen-posts-card__cta-arrow {
	transform: scaleX(-1) translateX(-3px);
}

/* ═══════════════════════════════════════════
 * Screen Reader Only
 * ═══════════════════════════════════════════ */
.goshen-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ═══════════════════════════════════════════
 * Reduced Motion
 * ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
	.goshen-posts-card,
	.goshen-posts-card__image,
	.goshen-posts-card__title a,
	.goshen-posts-card__cta,
	.goshen-posts-card__cta-arrow {
		transition: none !important;
	}

	.goshen-posts-card:hover {
		transform: none;
	}

	.goshen-posts-card:hover .goshen-posts-card__image {
		background-size: cover;
	}

	.goshen-posts-card__cta:hover .goshen-posts-card__cta-arrow {
		transform: none;
	}
}

/* ═══════════════════════════════════════════
 * Responsive
 * ═══════════════════════════════════════════ */

@media (max-width: 767px) {
	.goshen-posts-grid {
		grid-template-columns: 1fr !important;
	}

	.goshen-posts-card__image {
		height: 180px;
	}

	.goshen-posts-card__title {
		font-size: 16px;
	}

	.goshen-posts-card__body {
		padding: 16px 20px;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.goshen-posts-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}
