/* ===========================================================================
   MyUniDesk — BLOG LISTING (main Blog page)
   Layout: title + featured slider -> Discover Blogs by Categories
   (category list + 3-col grid + "View 6 More") -> Recommended Programs.
   Rule #1: cover images are NEVER cropped (width:100%, height:auto).
   Colours follow the site's --mud-primary / --mud-accent settings.
   =========================================================================== */

.mud-bh {
	--bh-primary: var(--mud-primary, #1450F5);
	--bh-accent: var(--mud-accent, #FF6A1A);
	--bh-ink: #111318;
	--bh-text: #2b2f3a;
	--bh-muted: #6b7280;
	--bh-line: #e6e9f0;
	--bh-bg: #f6f7fb;
	--bh-tint: #eaf1ff;
	--bh-radius: 10px;
	--bh-gap: 14px;

	box-sizing: border-box;
	width: 100%;
	font-family: var(--mud-font, 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif);
	font-size: 13px;
	line-height: 1.5;
	color: var(--bh-text);
	background: #fff;
	-webkit-text-size-adjust: 100%;
}
.mud-bh *, .mud-bh *::before, .mud-bh *::after { box-sizing: border-box; }
.mud-bh :where(h1, h2, h3, p, ul, ol) { margin: 0; padding: 0; }
.mud-bh :where(ul, ol) { list-style: none; }
.mud-bh :where(a) { color: inherit; text-decoration: none; }
.mud-bh :focus-visible { outline: 3px solid var(--bh-primary); outline-offset: 2px; border-radius: 6px; }
.mud-bh [hidden] { display: none !important; }

.mud-bh-in { width: 100%; max-width: 1300px; margin: 0 auto; padding: 0 14px; }

.mud-bh-sr {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------- Headings */
.mud-bh-h1 { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--bh-ink); margin-bottom: 14px; }
.mud-bh-h1 span, .mud-bh-h2 b { color: var(--bh-primary); font-weight: 700; }
.mud-bh-h2 { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--bh-ink); }

/* ------------------------------------------------- Image frame (no crop) */
.mud-bh-media { position: relative; display: block; background: var(--bh-bg); line-height: 0; overflow: hidden; }
.mud-bh-img { display: block; width: 100%; max-width: 100%; height: auto; }
.mud-bh-noimg {
	display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9;
	padding: 10px; text-align: center; line-height: 1.3;
	background: linear-gradient(135deg, #0b2a6b 0%, var(--bh-primary) 60%, #3f7dfb 100%);
	color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em;
}

/* ------------------------------------------------------------ Top slider */
.mud-bh-top { padding: 18px 0 16px; background: #fff; }
.mud-bh-slider { position: relative; }
.mud-bh-track { position: relative; }
.mud-bh-slide {
	display: none; flex-direction: column; gap: 14px; align-items: center;
	padding: 4px 0;
}
.mud-bh-slide.is-on { display: flex; animation: mud-bh-fade .35s ease; }
@keyframes mud-bh-fade { from { opacity: 0; } to { opacity: 1; } }
/* no-JS: only the first slide shows (others stay hidden) */
.mud-bh-slide:first-child { display: flex; }
.mud-bh-slider.is-js .mud-bh-slide:first-child:not(.is-on) { display: none; }

.mud-bh-slide .mud-bh-media { width: 100%; border-radius: 10px; }
.mud-bh-sbody { display: flex; flex-direction: column; width: 100%; min-width: 0; }

.mud-bh-smeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--bh-muted); }
.mud-bh-smeta i, .mud-bh-meta i { width: 1px; height: 11px; background: #cfd4df; display: inline-block; }
.mud-bh-chip { padding: 3px 8px; border-radius: 4px; background: var(--bh-tint); color: var(--bh-primary); font-weight: 600; }
.mud-bh-chip:hover { background: var(--bh-primary); color: #fff; }

.mud-bh-stitle { margin-top: 12px; font-size: 19px; font-weight: 700; line-height: 1.32; color: var(--bh-ink); overflow-wrap: anywhere; }
.mud-bh-stitle a:hover { color: var(--bh-primary); }
.mud-bh-sexcerpt {
	margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--bh-muted);
	display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mud-bh-sfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.mud-bh-sauthor { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mud-bh-sauthor img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--bh-line); }
.mud-bh-sauthor span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.mud-bh-sauthor b { font-size: 11.5px; font-weight: 600; color: var(--bh-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mud-bh-sauthor small { font-size: 9.5px; color: var(--bh-muted); }
.mud-bh-read { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; color: var(--bh-ink); white-space: nowrap; }
.mud-bh-read span[aria-hidden] { display: inline-block; margin-left: 2px; transition: transform .15s; }
.mud-bh-read:hover { color: var(--bh-primary); }
.mud-bh-read:hover span[aria-hidden] { transform: translateX(3px); }

.mud-bh-dots { display: flex; justify-content: center; gap: 5px; margin-top: 14px; }
.mud-bh-dot { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: #c9cfdb; cursor: pointer; transition: width .25s, background .25s; }
.mud-bh-dot.is-on { width: 20px; background: var(--bh-primary); }

/* ------------------------------------------------------------- Discover */
.mud-bh-discover { padding: 26px 0 30px; background: var(--bh-bg); }
.mud-bh-discover .mud-bh-h2 { margin-bottom: 16px; }
.mud-bh-dlayout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }

/* Category list: chips on phones, vertical list on desktop */
.mud-bh-cats {
	display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain;
	margin: 0 -14px; padding: 2px 14px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.mud-bh-cats::-webkit-scrollbar { display: none; }
.mud-bh-cats a {
	flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 7px 13px; border: 1px solid var(--bh-line); border-radius: 999px; background: #fff;
	font-size: 12px; font-weight: 500; color: var(--bh-text); white-space: nowrap;
	transition: border-color .15s, color .15s, background .15s;
}
.mud-bh-cats a svg { display: none; flex: 0 0 auto; color: #8a91a2; }
.mud-bh-cats a:hover { border-color: var(--bh-primary); color: var(--bh-primary); }
.mud-bh-cats a.is-active { background: var(--bh-primary); border-color: var(--bh-primary); color: #fff; }

.mud-bh-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--bh-gap); align-items: stretch; }
.mud-bh-card {
	position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%;
	background: #fff; border: 1px solid var(--bh-line); border-radius: 8px; overflow: hidden;
	transition: box-shadow .2s, border-color .2s, transform .2s;
}
.mud-bh-card:hover { box-shadow: 0 8px 22px rgba(17, 19, 24, .10); border-color: #cdd6ee; transform: translateY(-2px); }
.mud-bh-card.is-hidden, .mud-bh-card.mud-bh-extra { display: none; }
/* no JS: everything stays visible (good for SEO) */
.mud-bh-discover:not(.is-js) .mud-bh-card.mud-bh-extra { display: flex; }

.mud-bh-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; padding: 10px 11px 11px; }
.mud-bh-cat {
	position: relative; z-index: 2; align-self: flex-start; margin: 2px 0 4px;
	font-size: 9px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--bh-muted);
}
.mud-bh-cat:hover { color: var(--bh-primary); }
.mud-bh-title {
	font-size: 12.5px; font-weight: 700; line-height: 1.38; color: var(--bh-ink); overflow-wrap: anywhere;
	display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mud-bh-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.mud-bh-title a:hover { color: var(--bh-primary); }
.mud-bh-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px;
	margin-top: auto; padding-top: 8px; font-size: 9.5px; color: var(--bh-muted);
}
.mud-bh-meta b { font-weight: 600; color: var(--bh-text); }
.mud-bh-meta i { height: 9px; }

.mud-bh-empty { padding: 30px 0; text-align: center; color: var(--bh-muted); }
.mud-bh-more-wrap { display: flex; justify-content: center; margin-top: 20px; }
.mud-bh-more {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 7px 16px; border: 1px solid #cfd6e6; border-radius: 6px; background: #fff; color: var(--bh-primary);
	font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.mud-bh-more:hover { background: var(--bh-primary); border-color: var(--bh-primary); color: #fff; }
/* JS off: the button does nothing, so hide it */
.mud-bh-discover:not(.is-js) #mud-bh-more { display: none; }

/* -------------------------------------------------- Recommended programs */
.mud-bh-programs { padding: 26px 0 32px; background: #e9efff; }
.mud-bh-eyebrow { font-size: 10.5px; color: var(--bh-muted); margin-bottom: 2px; }
.mud-bh-programs .mud-bh-h2 { margin-bottom: 14px; }
.mud-bh-pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bh-gap); }
.mud-bh-prog {
	display: flex; flex-direction: column; min-width: 0; height: 100%;
	background: #fff; border: 1px solid var(--bh-line); border-radius: 8px; overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.mud-bh-prog:hover { box-shadow: 0 8px 22px rgba(17, 19, 24, .10); transform: translateY(-2px); }
.mud-bh-prog .mud-bh-body { padding: 9px 11px 11px; }
.mud-bh-plabel { font-size: 9.5px; color: var(--bh-muted); }
.mud-bh-ptitle { margin: 1px 0 6px; font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--bh-ink); }
.mud-bh-badge { align-self: flex-start; margin-bottom: 8px; padding: 2px 7px; border-radius: 4px; background: var(--bh-tint); color: var(--bh-primary); font-size: 9.5px; font-weight: 600; }
.mud-bh-pmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; font-size: 10px; color: var(--bh-muted); }
.mud-bh-pmeta span { display: inline-flex; align-items: center; gap: 4px; }
.mud-bh-pmeta svg { width: 11px; height: 11px; }
.mud-bh-pbtn {
	margin-top: auto; display: block; padding: 7px 12px; border-radius: 5px; text-align: center;
	background: var(--bh-primary); color: #fff !important; font-size: 11px; font-weight: 600; transition: filter .15s;
}
.mud-bh-pbtn:hover { filter: brightness(.92); }

/* ===========================================================================
   BREAKPOINTS (mobile-first)
   =========================================================================== */
@media (min-width: 600px) {
	.mud-bh-in { padding: 0 20px; }
	.mud-bh-cats { margin: 0 -20px; padding: 2px 20px 4px; }
	.mud-bh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mud-bh-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mud-bh-h1 { font-size: 20px; }
}

@media (min-width: 900px) {
	.mud-bh-top { padding: 22px 0 18px; }
	.mud-bh-slide { flex-direction: row; gap: 26px; align-items: center; }
	.mud-bh-slide .mud-bh-media { flex: 0 0 46%; max-width: 46%; }
	.mud-bh-stitle { font-size: 21px; margin-top: 14px; }
	.mud-bh-sexcerpt { font-size: 13px; }

	.mud-bh-dlayout { grid-template-columns: 190px minmax(0, 1fr); gap: 18px; }
	.mud-bh-cats {
		flex-direction: column; gap: 8px; overflow: visible; margin: 0; padding: 0;
		position: sticky; top: 16px;
	}
	.mud-bh-cats a { border-radius: 4px; padding: 9px 12px; font-size: 11.5px; }
	.mud-bh-cats a svg { display: block; }
	.mud-bh-cats a.is-active { background: #fff; border-color: var(--bh-primary); color: var(--bh-primary); font-weight: 600; }
	.mud-bh-cats a.is-active svg { color: var(--bh-primary); }
	.mud-bh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.mud-bh-pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1340px) {
	.mud-bh-in { padding: 0; }
}

@media (max-width: 380px) {
	.mud-bh-stitle { font-size: 17px; }
	.mud-bh-sfoot { flex-wrap: wrap; }
}

@media (hover: none) {
	.mud-bh-card:hover, .mud-bh-prog:hover { transform: none; box-shadow: none; border-color: var(--bh-line); }
}
@media (prefers-reduced-motion: reduce) {
	.mud-bh *, .mud-bh *::before, .mud-bh *::after { transition: none !important; animation: none !important; }
}
@media print {
	.mud-bh-cats, .mud-bh-more-wrap, .mud-bh-dots { display: none !important; }
	.mud-bh-discover:not(.is-js) .mud-bh-card.mud-bh-extra, .mud-bh-card.mud-bh-extra { display: flex !important; }
}
