/* =========================================================================
   Trailblaze blog / News on Blocksy
   Polishes Blocksy's entry cards to match the site aesthetic.
   ========================================================================= */

/* Design tokens (--tb-green, --tb-ink, etc.) come from tb-site.css site-wide.
   blog.css must NOT redefine them — it loads on archives (incl. the shop) and
   would override the brand greens. Only blog-specific helpers below. */
:root {
	--tb-card-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05);
	--tb-radius: 14px;
}

/* Trim the empty space above and below the cards on archives. */
.blog #main > .ct-container,
.archive #main > .ct-container,
.blog #main .ct-container[data-vertical-spacing],
.archive #main .ct-container[data-vertical-spacing] {
	padding-top: 10px;
	padding-bottom: 20px;
}
/* Snug pagination to the cards. */
.blog .ct-pagination,
.archive .ct-pagination { margin-top: 24px; }

/* Cards take their natural height (no empty stretch when content is short). */
.entries[data-layout="grid"] {
	align-items: start;
}

/* Card container. Remove Blocksy's built-in boxed-card padding so the image
   goes edge-to-edge and there's no dead space at top/bottom; the text rows
   carry their own side padding. */
.entries article.entry-card,
.entries article.entry-card.card-content {
	border: 1px solid var(--tb-line);
	border-radius: var(--tb-radius);
	overflow: hidden;
	box-shadow: var(--tb-card-shadow);
	background: #fff;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	display: flex;
	flex-direction: column;
	padding: 0 !important;
}
.entries article.entry-card:hover {
	transform: translateY(-4px);
	border-color: var(--tb-green);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
}

/* Featured image on top, uniform crop. Soft background shows behind
   transparent logos so they don't sit on stark white. */
.entries article.entry-card .ct-media-container,
.entries article.entry-card .ct-media-container.boundless-image {
	order: -1;
	margin: 0 0 4px !important;
	align-self: stretch;          /* fill the full card width */
	width: auto !important;
	max-width: none !important;
	left: auto !important;
	right: auto !important;
	inset-inline: auto !important;
	overflow: hidden;
	display: block;
}
.entries article.entry-card .ct-media-container img {
	width: 100%;
	height: 200px;
	object-fit: contain;
	object-position: center;
	padding: 4px;
	box-sizing: border-box;
	display: block;
	transition: transform .3s ease;
	aspect-ratio: auto !important;
}
.entries article.entry-card:hover .ct-media-container img {
	transform: scale(1.05);
}

/* Inner padding for text */
.entries article.entry-card .entry-title,
.entries article.entry-card .entry-meta,
.entries article.entry-card .entry-excerpt {
	padding-left: 16px;
	padding-right: 16px;
}
.entries article.entry-card .entry-title {
	font-size: 1.18rem;
	line-height: 1.28;
	margin: 8px 0 6px;
}
.entries article.entry-card .entry-title a {
	color: var(--tb-ink);
	text-decoration: none;
	transition: color .15s ease;
}
.entries article.entry-card .entry-title a:hover { color: var(--tb-green-dark); }

.entries article.entry-card .entry-meta {
	color: var(--tb-muted);
	font-size: .82rem;
	margin: 0;               /* kill default <ul> margins that add stray gaps */
}
.entries article.entry-card .entry-meta a { color: var(--tb-muted); text-decoration: none; }
.entries article.entry-card .entry-meta a:hover { color: var(--tb-green-dark); }
/* Category row sits just under the image. */
.entries article.entry-card .entry-meta:first-of-type { margin-top: 12px; }
/* Date row is the card's bottom line — keep it snug. */
.entries article.entry-card .entry-meta:last-child { padding-bottom: 16px; margin-top: 12px; }

/* Author byline not needed on a company news section — show date only. */
.entries article.entry-card .meta-author,
.single-post .meta-author { display: none; }

.entries article.entry-card .entry-excerpt {
	color: #4b5563;
	line-height: 1.6;
	font-size: .95rem;
	padding-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Read more / pagination accents */
.entries .ct-media-container + * .more-link,
a.more-link { color: var(--tb-green-dark); font-weight: 700; text-decoration: none; }
.ct-pagination .page-numbers.current,
.page-numbers.current { background: var(--tb-green) !important; border-color: var(--tb-green) !important; color: #fff !important; }

/* Single post */
.single-post .entry-title { color: var(--tb-ink); }
.single-post .ct-featured-image img,
.single-post .entry-content img { border-radius: var(--tb-radius); }
