/*
 * Ventureheap Builder - blog widgets.
 */

.vhb-post-card {
	display: flex;
	flex-direction: column;
	background: var(--vhb-bg);
	border: 1px solid var(--vhb-border);
	border-radius: var(--vhb-radius);
	overflow: hidden;
	height: 100%;
	transition: transform var(--vhb-transition), box-shadow var(--vhb-transition);
}

.vhb-post-card:hover { transform: translateY(-3px); box-shadow: var(--vhb-shadow); }

.vhb-post-card__media { display: block; overflow: hidden; background: var(--vhb-alt); }
.vhb-post-card__media img {
	width: 100%;
	aspect-ratio: var(--vhb-ratio-1-1);
	object-fit: cover;
	object-position: center;
	transition: transform .4s ease;
}

/* The list layout keeps a landscape crop: a square thumbnail beside a block of
   text would tower over it. */
.vhb-posts--list .vhb-post-card__media img { aspect-ratio: var(--vhb-ratio-4-3); }
.vhb-post-card:hover .vhb-post-card__media img { transform: scale(1.04); }

.vhb-post-card__body { display: flex; flex-direction: column; gap: .5rem; padding: 22px; flex: 1; }

.vhb-post-card__terms { display: flex; flex-wrap: wrap; gap: 8px; }
.vhb-post-card__terms a {
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--vhb-primary);
	text-decoration: none;
}

.vhb-post-card__title { margin: 0; font-size: 1.15rem; line-height: 1.35; }
.vhb-post-card__title a { color: var(--vhb-secondary); text-decoration: none; }
.vhb-post-card__title a:hover { color: var(--vhb-primary); }

.vhb-post-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--vhb-muted); }
.vhb-post-card__excerpt { color: var(--vhb-muted); font-size: .95rem; }
.vhb-post-card__more { margin-top: auto; align-self: flex-start; font-weight: 600; font-size: .93rem; color: var(--vhb-primary); text-decoration: none; }
.vhb-post-card__more::after { content: " \2192"; }

/* List layout ------------------------------------------------------------- */
.vhb-posts--list .vhb-post-card { flex-direction: column; }

/* Category header --------------------------------------------------------- */
.vhb-category-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 1.25rem;
	padding-bottom: .7rem;
	border-bottom: 2px solid var(--vhb-border);
}

.vhb-category-head__title { margin: 0; font-size: 1.35rem; color: var(--vhb-secondary); }
.vhb-category-head__link { font-weight: 600; font-size: .9rem; color: var(--vhb-primary); text-decoration: none; }
.vhb-related-heading { margin-bottom: 1.25rem; }

/* Featured post ----------------------------------------------------------- */
.vhb-featured {
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: var(--vhb-radius);
	overflow: hidden;
	background: var(--vhb-alt);
}

.vhb-featured--overlay {
	background-size: cover;
	background-position: center;
	min-height: 380px;
	justify-content: flex-end;
	color: #fff;
}

.vhb-featured--overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(15, 23, 42, .88) 0%, rgba(15, 23, 42, .25) 55%, rgba(15, 23, 42, 0) 100%);
}

.vhb-featured--overlay .vhb-featured__body { position: relative; z-index: 2; padding: 36px; }
.vhb-featured--overlay .vhb-featured__title a,
.vhb-featured--overlay .vhb-featured__meta,
.vhb-featured--overlay .vhb-featured__excerpt { color: #fff; }
.vhb-featured--overlay .vhb-featured__cat { color: var(--vhb-accent); }

.vhb-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.vhb-featured__body { padding: 28px; display: flex; flex-direction: column; gap: .7rem; }
.vhb-featured__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: .86rem; color: var(--vhb-muted); }
.vhb-featured__cat { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--vhb-primary); text-decoration: none; }
.vhb-featured__title { margin: 0; }
.vhb-featured__title a { color: var(--vhb-secondary); text-decoration: none; }
.vhb-featured__excerpt { margin: 0; color: var(--vhb-muted); }
.vhb-featured__more { align-self: flex-start; margin-top: .4rem; }

/* Author box -------------------------------------------------------------- */
.vhb-author {
	display: flex;
	gap: 20px;
	padding: 24px;
	background: var(--vhb-alt);
	border-radius: var(--vhb-radius);
}

.vhb-author__avatar img { border-radius: 50%; }
.vhb-author__name { margin: 0 0 .35rem; font-size: 1.1rem; color: var(--vhb-secondary); }
.vhb-author__bio { margin: 0 0 .6rem; color: var(--vhb-muted); }
.vhb-author__link { font-weight: 600; color: var(--vhb-primary); text-decoration: none; }

/* Post meta --------------------------------------------------------------- */
.vhb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .88rem; color: var(--vhb-muted); }
.vhb-meta a { color: inherit; text-decoration: none; }
.vhb-meta a:hover { color: var(--vhb-primary); }
.vhb-meta__sep { color: var(--vhb-border); }

/* Breadcrumb -------------------------------------------------------------- */
.vhb-breadcrumb { font-size: .875rem; color: var(--vhb-muted); }
.vhb-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.vhb-breadcrumb li { display: flex; align-items: center; gap: 6px; }
.vhb-breadcrumb a { color: inherit; text-decoration: none; }
.vhb-breadcrumb a:hover { color: var(--vhb-primary); text-decoration: underline; }
.vhb-breadcrumb__sep { color: var(--vhb-border); }

@media (min-width: 782px) {
	.vhb-posts--list .vhb-post-card { flex-direction: row; }
	.vhb-posts--list .vhb-post-card__media { flex: 0 0 40%; }
	.vhb-posts--list .vhb-post-card__media img { height: 100%; aspect-ratio: auto; min-height: 220px; }

	.vhb-featured--split { flex-direction: row; align-items: stretch; }
	.vhb-featured--split .vhb-featured__media { flex: 0 0 50%; }
	.vhb-featured--split .vhb-featured__body { justify-content: center; padding: 40px; }
}

/* ------------------------------------------------------------ Mobile pass */
@media (max-width: 782px) {
	.vhb-post-card__body { padding: 16px; }
	.vhb-post-card__title { font-size: 1.05rem; }

	.vhb-featured--overlay { min-height: 320px; }
	.vhb-featured--overlay .vhb-featured__body,
	.vhb-featured__body { padding: 20px; }

	.vhb-author { flex-direction: column; text-align: center; align-items: center; padding: 20px; }
	.vhb-category-head { flex-direction: column; align-items: flex-start; gap: 6px; }
}
