/*
 * Blog listing — new design (template-blog-listing.php), from the Figma
 * "Blog" page. Builds on blog-post.css (the body also carries
 * edge-blog-post, so .blog-shell, .blog-btn, the Top Categories box and
 * the meta dots are shared with the blog post page) and on
 * reimagined-home.css for the header, contact section and footer.
 *
 * Everything here is scoped under body.edge-blog-listing.
 */

body.edge-blog-listing :is(.bl-hero, .bl-featured, .bl-topics) {
	font-family: var(--blog-font);
	color: var(--blog-ink);
}

body.edge-blog-listing :is(.bl-hero, .bl-featured, .bl-topics) :is(h1, h2, h3) {
	font-family: var(--blog-display);
	font-weight: 600;
	letter-spacing: 0;
}

/* Section titles with the orange accent bar. */
body.edge-blog-listing .bl-title {
	position: relative;
	margin: 0;
	padding-left: 18px;
	font-size: clamp(29px, 2.6vw, 38px);
	line-height: 1.25;
	color: var(--blog-ink);
}

body.edge-blog-listing .bl-title::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 6px;
	height: 28px;
	border-radius: 16.68px;
	background: var(--blog-orange);
	transform: translateY(-50%);
}

/* ---- Hero ----------------------------------------------------------- */

body.edge-blog-listing .bl-hero {
	position: relative;
	z-index: 0;
	overflow: hidden;
	background: #000c1d;
	color: #fff;
}

body.edge-blog-listing .bl-hero__photo {
	position: absolute;
	inset: 0 0 0 auto;
	z-index: -2;
	width: 70%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

body.edge-blog-listing .bl-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(270deg, rgba(0, 12, 29, 0.25) 0%, rgba(0, 12, 29, 0.85) 45%, #000c1d 73%);
}

body.edge-blog-listing .bl-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
	gap: 48px;
	align-items: center;
	padding: 72px 0;
}

body.edge-blog-listing .bl-eyebrow {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 500;
	color: var(--blog-orange);
}

body.edge-blog-listing .bl-hero h1 {
	margin: 0;
	font-size: clamp(40px, 4vw, 56px);
	line-height: 1.15;
	letter-spacing: -1px;
	color: rgba(255, 255, 255, 0.92);
}

body.edge-blog-listing .bl-hero__lede {
	margin: 16px 0 28px;
	max-width: 520px;
	font-size: 17px;
	line-height: 1.65;
	color: #e3e3e3;
}

/* Glass search panel. */
body.edge-blog-listing .bl-search {
	padding: 26px 28px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.13);
	-webkit-backdrop-filter: blur(11.5px);
	backdrop-filter: blur(11.5px);
}

body.edge-blog-listing .bl-search h2 {
	margin: 0 0 18px;
	font-size: 26px;
	line-height: 1.25;
	color: rgba(255, 255, 255, 0.92);
}

body.edge-blog-listing .bl-search__form {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 7px 7px 18px;
	border-radius: 12px;
	background: #f8f8f8;
}

body.edge-blog-listing .bl-search__form svg {
	flex: none;
}

body.edge-blog-listing .bl-search__form input[type='search'] {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 15px;
	color: var(--blog-ink);
	outline: none;
}

body.edge-blog-listing .bl-search__form input[type='search']::placeholder {
	color: #8b8b8b;
	opacity: 1;
}

body.edge-blog-listing .bl-search__form button {
	flex: none;
	height: 44px;
	padding: 0 24px;
	border: 0;
	border-radius: 10px;
	background: var(--blog-orange);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	color: #fff;
	cursor: pointer;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.edge-blog-listing .bl-search__form button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(255, 89, 0, 0.3);
}

body.edge-blog-listing .bl-search__form:focus-within {
	box-shadow: 0 0 0 2px var(--blog-orange);
}

body.edge-blog-listing .bl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

body.edge-blog-listing .bl-chips a,
body.edge-blog-listing .bl-pill {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 5px 12px;
	border: 1px solid #e0dede;
	border-radius: 30px;
	background: #fff;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 600;
	color: var(--blog-ink);
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

body.edge-blog-listing .bl-chips a:hover {
	border-color: var(--blog-orange);
	background: var(--blog-orange);
	color: #fff;
}

/* ---- Cards ------------------------------------------------------------ */

body.edge-blog-listing .bl-grid {
	display: grid;
	gap: 24px;
}

body.edge-blog-listing .bl-grid--featured {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 32px;
}

body.edge-blog-listing .bl-grid--four {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.edge-blog-listing .bl-card {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
	transition: transform 0.18s cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 0.18s ease, border-color 0.18s ease;
}

body.edge-blog-listing .bl-card--boxed {
	padding: 18px;
	border: 1px solid rgba(116, 131, 152, 0.2);
	border-radius: 16px;
	background: #fff;
}

body.edge-blog-listing .bl-card--boxed:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 89, 0, 0.45);
	box-shadow: 0 12px 28px rgba(12, 22, 39, 0.08);
}

body.edge-blog-listing .bl-card__thumb {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 16px;
	background: #dfe4ec;
}

body.edge-blog-listing .bl-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.42s ease;
}

body.edge-blog-listing .bl-card:hover .bl-card__thumb img {
	transform: scale(1.035);
}

body.edge-blog-listing .bl-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

/* Category pill with the orange dot. */
body.edge-blog-listing .bl-pill {
	gap: 8px;
	padding-left: 10px;
	font-size: 12px;
}

body.edge-blog-listing .bl-pill::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--blog-orange);
}

body.edge-blog-listing .bl-pill:hover {
	border-color: var(--blog-orange);
	color: var(--blog-orange);
}

body.edge-blog-listing .bl-card__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.35;
}

body.edge-blog-listing .bl-card__title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--blog-ink);
	transition: color 0.18s ease;
}

body.edge-blog-listing .bl-card:hover .bl-card__title a {
	color: var(--blog-orange);
}

body.edge-blog-listing .bl-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 6px;
	row-gap: 0;
	margin: -4px 0 0;
	font-size: 12px;
	line-height: 1.75;
	font-weight: 500;
	color: var(--blog-muted);
}

body.edge-blog-listing .bl-card__meta > * {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

/* The dot belongs to the item after it, so a wrapped line never ends on
   a dangling separator. */
body.edge-blog-listing .bl-card__meta > * + *::before {
	content: '';
	flex: none;
	width: 6px;
	height: 6px;
	border: 1px solid #909090;
	border-radius: 50%;
}

body.edge-blog-listing .bl-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--blog-muted);
}

/* ---- Featured + Top Categories ---------------------------------------- */

body.edge-blog-listing .bl-featured {
	padding: 80px 0;
	background: #fff;
}

body.edge-blog-listing .bl-featured__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	align-items: start;
}

body.edge-blog-listing .bl-featured__layout .blog-sidebar {
	margin-top: 82px;
}

/* ---- Practice tabs ------------------------------------------------------ */

body.edge-blog-listing .bl-topics {
	padding: 80px 0;
	background: rgba(185, 197, 215, 0.2);
}

body.edge-blog-listing .bl-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 40px;
}

body.edge-blog-listing .bl-tabs [role='tab'] {
	padding: 11px 22px;
	border: 1px solid var(--blog-orange);
	border-radius: 100px;
	background: #fff;
	font-family: var(--blog-font);
	font-size: 15px;
	line-height: 1.2;
	font-weight: 600;
	color: var(--blog-ink);
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

body.edge-blog-listing .bl-tabs [role='tab']:hover {
	transform: translateY(-2px);
}

body.edge-blog-listing .bl-tabs [role='tab'][aria-selected='true'] {
	background: var(--blog-orange);
	color: #fff;
}

body.edge-blog-listing .bl-tabs [role='tab']:focus-visible {
	outline: 2px solid var(--blog-ink);
	outline-offset: 2px;
}

body.edge-blog-listing .bl-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 32px;
}

body.edge-blog-listing .bl-view-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	font-size: 15px;
	font-weight: 600;
	color: var(--blog-orange);
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size 0.25s ease;
}

body.edge-blog-listing .bl-view-all:hover {
	background-size: 100% 1px;
}

/* ---- Responsive ------------------------------------------------------- */

@media (max-width: 1100px) {
	body.edge-blog-listing .bl-featured__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	body.edge-blog-listing .bl-featured__layout .blog-sidebar {
		margin-top: 0;
	}

	body.edge-blog-listing .bl-grid--four {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	body.edge-blog-listing .bl-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
		padding: 56px 0;
	}

	body.edge-blog-listing .bl-hero__photo {
		width: 100%;
		opacity: 0.45;
	}
}

@media (max-width: 700px) {
	body.edge-blog-listing .bl-featured,
	body.edge-blog-listing .bl-topics {
		padding: 50px 0;
	}

	body.edge-blog-listing .bl-hero h1 {
		font-size: 34px;
	}

	body.edge-blog-listing .bl-search {
		padding: 20px 16px;
	}

	body.edge-blog-listing .bl-search h2 {
		font-size: 21px;
	}

	body.edge-blog-listing .bl-search__form button {
		padding: 0 16px;
	}

	body.edge-blog-listing .bl-grid--featured,
	body.edge-blog-listing .bl-grid--four {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Tabs scroll sideways instead of stacking into a tall block. */
	body.edge-blog-listing .bl-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		margin-inline: -20px;
		padding: 2px 20px 6px;
		scrollbar-width: none;
	}

	body.edge-blog-listing .bl-tabs::-webkit-scrollbar {
		display: none;
	}

	body.edge-blog-listing .bl-tabs [role='tab'] {
		flex: none;
	}

	body.edge-blog-listing .bl-panel__head {
		margin-bottom: 24px;
	}
}

/* ---- Archive pages (blog-archive.php: search, category, tag, author) --- */

body.edge-blog-archive .bl-hero--archive .bl-hero__inner {
	padding: 56px 0;
}

body.edge-blog-archive .bl-hero--archive h1 {
	font-size: clamp(34px, 3.4vw, 48px);
	overflow-wrap: anywhere;
}

body.edge-blog-archive .bl-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 28px;
	font-size: 13px;
	color: #c4cbd7;
}

body.edge-blog-archive .bl-crumbs a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.edge-blog-archive .bl-crumbs a:hover {
	color: #fff;
}

body.edge-blog-archive .bl-chips a[aria-current] {
	border-color: var(--blog-orange);
	background: var(--blog-orange);
	color: #fff;
}

body.edge-blog-archive .bl-results {
	padding: 72px 0 80px;
	background: #fff;
	font-family: var(--blog-font);
	color: var(--blog-ink);
}

body.edge-blog-archive .bl-results :is(h2, h3) {
	font-family: var(--blog-display);
	font-weight: 600;
}

body.edge-blog-archive .bl-results__count {
	margin: 0;
	font-size: 14px;
	color: var(--blog-muted);
}

body.edge-blog-archive .bl-empty {
	padding: 48px 32px;
	border-radius: 16px;
	background: var(--blog-soft);
	text-align: center;
}

body.edge-blog-archive .bl-empty h3 {
	margin: 0 0 10px;
	font-size: 22px;
}

body.edge-blog-archive .bl-empty p {
	margin: 0 0 24px;
	color: var(--blog-muted);
}

body.edge-blog-archive .bl-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 48px 0 0;
	padding: 0;
	list-style: none;
}

body.edge-blog-archive .bl-pagination :is(a, span).page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid rgba(116, 131, 152, 0.3);
	border-radius: 100px;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
	color: var(--blog-ink);
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

body.edge-blog-archive .bl-pagination a.page-numbers:hover {
	border-color: var(--blog-orange);
	color: var(--blog-orange);
}

body.edge-blog-archive .bl-pagination .page-numbers.current {
	border-color: var(--blog-orange);
	background: var(--blog-orange);
	color: #fff;
}

body.edge-blog-archive .bl-pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
}

@media (max-width: 700px) {
	body.edge-blog-archive .bl-hero--archive .bl-hero__inner {
		padding: 40px 0;
	}

	body.edge-blog-archive .bl-results {
		padding: 48px 0 56px;
	}
}
