/**
 * Thủy Bích Vĩnh Long — Shared Blog Card Foundation
 *
 * Path:
 * wp-content/themes/flatsome-child/css/tb-blog-card.css
 *
 * Owner:
 * - Shared visual language for blog card-like components.
 * - Blog Hub cards: .tbv-card
 * - Blog Archive cards: .tb-archive-card
 * - Single Related cards: .tb-related-card
 *
 * Not owner:
 * - Blog Hub page layout.
 * - Blog Archive grid/header/sort/pagination.
 * - Single Blog TOC/sidebar/content.
 * - Product card / PLP / PDP.
 *
 * Phase 12M-FIX4:
 * - Remove the previous hotfix block that hid the title divider line.
 * - Keep Single Related Posts aligned with Blog Hub card tone.
 * - Do not force title/date hover color changes.
 */

:root {
	--tb-blog-card-bg: var(--tb-color-surface, #fff);
	--tb-blog-card-text: var(--tb-color-text, #1e2320);
	--tb-blog-card-title: #1d211d;
	--tb-blog-card-muted: var(--tb-color-muted, #5d655f);
	--tb-blog-card-muted-2: #6f7670;
	--tb-blog-card-time: #727972;
	--tb-blog-card-accent: var(--tb-color-brass, #a98a5e);
	--tb-blog-card-line: var(--tb-color-line-soft, rgba(196, 207, 197, .42));
	--tb-blog-card-line-strong: rgba(30, 35, 32, .14);
	--tb-blog-card-surface: #f3f4f2;
	--tb-blog-card-radius: 3px;
	--tb-blog-card-image-ratio: 16 / 9;
	--tb-blog-card-body-padding: 14px 18px 15px;
	--tb-blog-card-title-size: clamp(16px, .98vw, 18px);
	--tb-blog-card-title-line: 1.38;
	--tb-blog-card-excerpt-size: 13.2px;
	--tb-blog-card-excerpt-line: 1.58;
}

/* =========================================================
   01. Shared base
========================================================= */

.tb-blog-card,
.tbv-card,
.tb-archive-card,
.tb-related-card {
	min-width: 0;
	background: var(--tb-blog-card-bg);
	color: var(--tb-blog-card-text);
}

.tb-blog-card a,
.tbv-card a,
.tb-archive-card a,
.tb-related-card a {
	color: inherit;
	text-decoration: none;
}

.tb-blog-card__media,
.tbv-card__media,
.tb-archive-card__media,
.tb-related-card__media,
.tb-related-card__image-wrap,
.tb-related-card__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: var(--tb-blog-card-image-ratio);
	overflow: hidden;
	background: var(--tb-blog-card-surface);
}

.tb-blog-card__image,
.tbv-card__image,
.tb-archive-card__image,
.tb-related-card__image,
.tb-related-card__media img,
.tb-related-card__image-wrap img,
.tb-related-card__thumb img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.tb-blog-card__meta,
.tbv-card__meta,
.tb-archive-card__meta,
.tb-related-card__meta {
	font-size: 12px;
	line-height: 1.25;
	font-weight: 650;
}

.tb-blog-card__cat,
.tbv-card__cat,
.tb-archive-card__cat,
.tb-related-card__cat,
.tb-related-card__category {
	color: var(--tb-blog-card-accent);
}

.tb-blog-card__date,
.tbv-card__date,
.tb-archive-card__date,
.tb-related-card__date,
.tb-related-card__meta time {
	color: var(--tb-blog-card-muted-2);
	font-weight: 500;
}

.tb-blog-card__title,
.tbv-card__title,
.tb-archive-card__title,
.tb-related-card__title {
	color: var(--tb-blog-card-title);
	font-size: var(--tb-blog-card-title-size);
	line-height: var(--tb-blog-card-title-line);
	font-weight: 650;
	letter-spacing: -.012em;
}

.tb-blog-card__title::before,
.tbv-card__title::before,
.tb-archive-card__title::before,
.tb-related-card__title::before {
	content: "";
	display: block;
	width: 30px;
	height: 1px;
	margin: 0 0 10px;
	background: var(--tb-blog-card-line-strong);
}

.tb-blog-card__excerpt,
.tbv-card__excerpt,
.tb-archive-card__excerpt,
.tb-related-card__excerpt {
	color: var(--tb-blog-card-muted);
	font-size: var(--tb-blog-card-excerpt-size);
	line-height: var(--tb-blog-card-excerpt-line);
}

.tb-blog-card__time,
.tbv-card__time,
.tbv-time,
.tb-archive-card__time,
.tb-related-card__time,
.tb-related-card__reading-time {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--tb-blog-card-time);
	font-size: 12px;
	font-weight: 500;
}

.tb-blog-card__time svg,
.tbv-card__time svg,
.tbv-time svg,
.tb-archive-card__time svg,
.tb-related-card__time svg,
.tb-related-card__reading-time svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* =========================================================
   02. Blog Hub card aliases
========================================================= */

.tbv-card {
	height: 100%;
	overflow: hidden;
	background: rgba(255, 255, 255, .88);
	border: 1px solid var(--line-soft, var(--tb-blog-card-line));
	border-radius: var(--tb-blog-card-radius);
	box-shadow: none;
}

.tbv-card:hover {
	border-color: rgba(30, 35, 32, .075);
}

.tbv-card__link {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.tbv-img {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--tb-blog-card-surface);
}

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

.tbv-card:hover .tbv-img img,
.tbv-side-post:hover .tbv-img img {
	transform: scale(1.014);
}

.tbv-card__image {
	aspect-ratio: var(--tb-blog-card-image-ratio);
}

.tbv-img__fallback {
	height: 100%;
	min-height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #798179;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	background: linear-gradient(135deg, #f2f5ef, #e7ede6);
}

.tbv-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: var(--tb-blog-card-body-padding);
}

.tbv-card__meta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	margin: 0 0 10px;
	font-size: 10px;
	line-height: 1.2;
	font-weight: 700;
}

.tbv-card__cat {
	color: var(--brass, var(--tb-blog-card-accent));
	font-size: 12px;
	line-height: 1.25;
	font-weight: 650;
	letter-spacing: .015em;
	text-transform: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tbv-card__date {
	color: var(--tb-blog-card-muted-2);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0;
	white-space: nowrap;
}

.tbv-card__title {
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tbv-card__excerpt {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tbv-card__foot {
	margin-top: auto;
	padding-top: 11px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* =========================================================
   03. Single Related card aliases
   Mirrors Blog Hub card language using the correct related
   class names rendered by related-posts-single.php.
========================================================= */

.single-post .tb-related-card {
	height: 100%;
	overflow: hidden;
	background: rgba(255, 255, 255, .88);
	border: 1px solid var(--tb-blog-card-line);
	border-radius: var(--tb-blog-card-radius);
	box-shadow: none;
}

.single-post .tb-related-card:hover,
.single-post .tb-related-card:focus-within {
	border-color: rgba(30, 35, 32, .075);
	box-shadow: none;
}

.single-post .tb-related-card__link {
	height: 100%;
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.single-post .tb-related-card__media,
.single-post .tb-related-card__image-wrap,
.single-post .tb-related-card__thumb {
	position: relative;
	width: 100%;
	aspect-ratio: var(--tb-blog-card-image-ratio);
	overflow: hidden;
	background: var(--tb-blog-card-surface);
}

.single-post .tb-related-card__media img,
.single-post .tb-related-card__image,
.single-post .tb-related-card__image-wrap img,
.single-post .tb-related-card__thumb img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	transition: transform .55s ease;
}

.single-post .tb-related-card:hover .tb-related-card__media img,
.single-post .tb-related-card:hover .tb-related-card__image,
.single-post .tb-related-card:hover .tb-related-card__image-wrap img,
.single-post .tb-related-card:hover .tb-related-card__thumb img {
	transform: scale(1.014);
}

.single-post .tb-related-card__fallback {
	height: 100%;
	min-height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #798179;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	background: linear-gradient(135deg, #f2f5ef, #e7ede6);
}

.single-post .tb-related-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: var(--tb-blog-card-body-padding);
	color: var(--tb-blog-card-text);
}

.single-post .tb-related-card__meta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	margin: 0 0 10px;
	font-size: 10px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--tb-blog-card-muted-2);
}

.single-post .tb-related-card__cat,
.single-post .tb-related-card__category,
.single-post .tb-related-card__meta a,
.single-post .tb-related-card__meta > :first-child {
	color: var(--tb-blog-card-accent);
	font-size: 12px;
	line-height: 1.25;
	font-weight: 650;
	letter-spacing: .015em;
	text-transform: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.single-post .tb-related-card__date,
.single-post .tb-related-card__meta time,
.single-post .tb-related-card__meta > :last-child {
	color: var(--tb-blog-card-muted-2);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0;
	white-space: nowrap;
}

.single-post .tb-related-card__title {
	margin: 0 0 10px;
	color: var(--tb-blog-card-title);
	font-size: var(--tb-blog-card-title-size);
	line-height: var(--tb-blog-card-title-line);
	font-weight: 650;
	letter-spacing: -.012em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.single-post .tb-related-card__title::before {
	content: "";
	display: block;
	width: 30px;
	height: 1px;
	margin: 0 0 10px;
	background: var(--tb-blog-card-line-strong);
}

.single-post .tb-related-card__link:hover,
.single-post .tb-related-card__link:hover .tb-related-card__title,
.single-post .tb-related-card:hover .tb-related-card__title,
.single-post .tb-related-card__title a:hover {
	color: var(--tb-blog-card-title);
	text-decoration: none;
}

.single-post .tb-related-card__excerpt {
	margin: 0;
	color: var(--tb-blog-card-muted);
	font-size: var(--tb-blog-card-excerpt-size);
	line-height: var(--tb-blog-card-excerpt-line);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.single-post .tb-related-card__time,
.single-post .tb-related-card__reading-time {
	margin-top: auto;
	padding-top: 11px;
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
	color: var(--tb-blog-card-time);
	font-size: 12px;
	font-weight: 500;
}

.single-post .tb-related-card__time svg,
.single-post .tb-related-card__reading-time svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Related card is the only owner of text hover stability here. */
.single-post .tb-related-card:hover .tb-related-card__cat,
.single-post .tb-related-card:hover .tb-related-card__category,
.single-post .tb-related-card:hover .tb-related-card__date,
.single-post .tb-related-card:hover .tb-related-card__excerpt,
.single-post .tb-related-card:hover .tb-related-card__time,
.single-post .tb-related-card:hover .tb-related-card__reading-time {
	text-decoration: none;
}
