/* =============================================================================
   BD Media - homepage sections
   Namespaced .bdm-h*. Nothing here touches Kava, Elementor or JetBlog selectors.
   House style: red #BE1E51 accent, Barlow for type, hairline #E4E4E4, white ground.
   ============================================================================= */

.bdm-h-grid {
	display: grid;
	gap: 24px;
	margin: 0 0 18px;
}
.bdm-h-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bdm-h-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bdm-h-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- a card ----------
   Structure is deliberately flat: <article> > [<a media>] + <div body> > <a title> + meta + excerpt.
   The meta contains a chip <a>, so the card itself must never be an anchor - nested anchors are
   invalid and the parser would tear the card apart. */
.bdm-h-card { display: flex; flex-direction: column; }
.bdm-h-card__media {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	background: #f2f3f5;
	aspect-ratio: 16 / 9;
}
.bdm-h-card__media img,
.bdm-h-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .25s ease;
}
.bdm-h-card__media:hover .bdm-h-card__img { transform: scale(1.02); }

.bdm-h-card__body { padding-top: 12px; }

.bdm-h-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.32;
	letter-spacing: -0.005em;
	color: #101828;
	text-decoration: none;
	word-break: normal;
	overflow-wrap: break-word;
	hyphens: none;
}
.bdm-h-card__title:hover { color: #BE1E51; }

.bdm-h-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.4;
	color: #6b7280;
}
.bdm-h-card__meta time { color: #6b7280; }

.bdm-h-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: #5b6472;
	word-break: normal;
	overflow-wrap: break-word;
	hyphens: none;
}

/* ---------- "all N in <beat>" ---------- */
.bdm-h-more {
	display: inline-block;
	margin: 4px 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: #BE1E51;
	text-decoration: none;
}
.bdm-h-more:hover { text-decoration: underline; }

/* ============================ the numbers ================================ */
.bdm-h-signals {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: 32px;
	align-items: end;
	padding: 26px 28px 22px;
	border: 1px solid #E4E4E4;
	border-radius: 6px;
	background: #fff;
}
.bdm-h-signals__stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}
.bdm-h-stat { display: flex; flex-direction: column; gap: 2px; }
.bdm-h-stat__value {
	font-size: 34px;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: #101828;
	font-variant-numeric: tabular-nums;
}
.bdm-h-stat__label {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	color: #6b7280;
}
.bdm-h-signals__note {
	grid-column: 1 / -1;
	margin: 4px 0 0;
	font-size: 12px;
	color: #98a1ad;
}

/* ---------- the output chart ---------- */
.bdm-h-chart { margin: 0; }
.bdm-h-chart__cap {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #98a1ad;
}
.bdm-h-chart__svg { display: block; width: 100%; height: 84px; }
.bdm-h-chart__svg rect { fill: #BE1E51; opacity: .85; }
.bdm-h-chart__axis {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	font-size: 10px;
	color: #98a1ad;
}
.bdm-h-chart__axis span { flex: 0 0 auto; }

/* ============================ deep dives ================================= */
.bdm-h-deep { display: flex; flex-direction: column; }
.bdm-h-deep__time {
	margin-top: 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #BE1E51;
}

/* ============================ explore by beat ============================ */
.bdm-h-beats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bdm-h-beat { border-bottom: 1px solid #E4E4E4; }
.bdm-h-beat a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	text-decoration: none;
	color: #101828;
}
.bdm-h-beat a:hover { color: #BE1E51; }
.bdm-h-beat__dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
}
.bdm-h-beat__name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bdm-h-beat__count {
	flex: 0 0 auto;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: #98a1ad;
}

/* ============================ responsive ================================= */
@media (max-width: 1100px) {
	.bdm-h-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bdm-h-beats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bdm-h-signals { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 767px) {
	.bdm-h-grid--4,
	.bdm-h-grid--3,
	.bdm-h-grid--2 { grid-template-columns: 1fr; }
	.bdm-h-beats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bdm-h-signals__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bdm-h-stat__value { font-size: 28px; }
}
