/* Blog listing and article pages (blog-hub.php, blog-single.php). Loads after services.css. */

.dx-blog-cats {
	margin-top: 28px;
}

.dx-blog-cats .dx-chip {
	background: #fff;
}

.dx-blog-cats .dx-chip small {
	margin-left: 4px;
	color: var(--dd-muted);
	font-weight: 600;
}

.dx-blog-cats .dx-chip.is-active {
	border-color: var(--dd-blue);
	background: var(--dd-blue);
	color: #fff !important;
}

.dx-blog-cats .dx-chip.is-active small {
	color: rgba(255, 255, 255, .8);
}

.dx-blog-hero .dx-svc-hero__lead {
	margin-bottom: 0 !important;
}

/* Post cards */
.dx-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.dx-post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--dd-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(15, 31, 61, .05);
	transition: transform .2s ease, box-shadow .2s ease;
}

.dx-post:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 44px rgba(15, 31, 61, .1);
}

.dx-post__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	color: rgba(255, 255, 255, .92) !important;
	font-size: 54px;
	text-decoration: none !important;
}

.dx-post__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dx-tone-0 { background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.dx-tone-1 { background: linear-gradient(135deg, #312e81, #7c3aed); }
.dx-tone-2 { background: linear-gradient(135deg, #0f1f3d, #0e7490); }
.dx-tone-3 { background: linear-gradient(135deg, #1e1b4b, #4f46e5); }

.dx-post__media i {
	filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .25));
}

.dx-post__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 24px 24px;
}

.dx-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 10px;
	color: var(--dd-muted);
	font-size: 13px;
}

.dx-post__cat {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--dd-blue-tint);
	color: var(--dd-blue) !important;
	font-weight: 700;
	text-decoration: none !important;
}

.dx-post__title {
	margin: 0 0 10px !important;
	font-family: var(--dd-head) !important;
	font-size: 19px !important;
	font-weight: 800 !important;
	line-height: 1.3 !important;
	letter-spacing: -0.01em;
	text-transform: none !important;
}

.dx-post__title a {
	color: var(--dd-navy) !important;
	text-decoration: none !important;
}

.dx-post__title a:hover {
	color: var(--dd-blue) !important;
}

.dx-post__excerpt {
	flex: 1;
	margin: 0 0 16px !important;
	color: var(--dd-text) !important;
	font-size: 15px !important;
	line-height: 1.6 !important;
}

.dx-post__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--dd-blue) !important;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none !important;
}

/* Latest post spans the full width on page 1 */
.dx-post--featured {
	grid-column: 1 / -1;
	flex-direction: row;
}

.dx-post--featured .dx-post__media {
	flex: 0 0 46%;
	aspect-ratio: auto;
	min-height: 300px;
	font-size: 96px;
}

.dx-post--featured .dx-post__body {
	justify-content: center;
	padding: 36px 40px;
}

.dx-post--featured .dx-post__title {
	font-size: clamp(24px, 2.4vw, 32px) !important;
}

.dx-post--featured .dx-post__excerpt {
	flex: none;
	font-size: 16px !important;
}

/* Pagination */
.dx-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.dx-pager .page-numbers {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 44px;
	height: 44px;
	justify-content: center;
	padding: 0 14px;
	border: 1px solid var(--dd-line);
	border-radius: 12px;
	background: #fff;
	color: var(--dd-ink) !important;
	font-weight: 700;
	text-decoration: none !important;
}

.dx-pager .page-numbers.current {
	border-color: var(--dd-blue);
	background: var(--dd-blue);
	color: #fff !important;
}

.dx-pager a.page-numbers:hover {
	border-color: var(--dd-blue);
	color: var(--dd-blue) !important;
}

/* Article page */
.dx-article-hero__inner {
	max-width: 900px;
}

.dx-article__title {
	font-size: clamp(30px, 3.6vw, 46px) !important;
}

.dx-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin-top: 22px;
	color: var(--dd-muted);
	font-size: 14px;
}

.dx-article__meta .zmdi {
	margin-right: 4px;
	color: var(--dd-blue);
}

.dx-article__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 56px;
	align-items: start;
}

.dx-prose {
	max-width: 760px;
	color: #334155;
	font-size: 17px;
	line-height: 1.75;
}

.dx-prose > *:first-child {
	margin-top: 0 !important;
}

.dx-prose p,
.dx-prose li {
	color: #334155 !important;
	font-family: var(--dd-body) !important;
	font-size: 17px !important;
	line-height: 1.75 !important;
}

.dx-prose p {
	margin: 0 0 1.2em !important;
}

.dx-prose h2,
.dx-prose h3,
.dx-prose h4 {
	color: var(--dd-navy) !important;
	font-family: var(--dd-head) !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em;
	text-transform: none !important;
	text-align: left !important;
}

.dx-prose h2 {
	margin: 1.8em 0 .6em !important;
	font-size: 26px !important;
	line-height: 1.25 !important;
}

.dx-prose h3 {
	margin: 1.5em 0 .5em !important;
	font-size: 21px !important;
}

.dx-prose ul,
.dx-prose ol {
	margin: 0 0 1.3em !important;
	padding-left: 1.3em !important;
}

.dx-prose ul li {
	list-style: disc !important;
}

.dx-prose ol li {
	list-style: decimal !important;
}

.dx-prose li {
	margin: 0 0 .5em !important;
	padding: 0 !important;
}

.dx-prose li::before {
	display: none !important;
}

.dx-prose a {
	color: var(--dd-blue) !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.dx-prose strong {
	color: var(--dd-ink);
}

.dx-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
}

.dx-prose blockquote {
	margin: 1.5em 0 !important;
	padding: 18px 22px !important;
	border: 0 !important;
	border-left: 4px solid var(--dd-blue) !important;
	border-radius: 0 14px 14px 0;
	background: var(--dd-blue-tint);
}

.dx-prose table {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: collapse;
	font-size: 15px;
}

.dx-prose th,
.dx-prose td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--dd-line);
	text-align: left;
}

.dx-prose .dx-callout {
	margin: 1.6em 0 !important;
	padding: 18px 22px !important;
	border: 1px solid #fde68a;
	border-radius: 14px;
	background: #fffbeb;
}

.dx-prose .dx-callout p:last-child {
	margin-bottom: 0 !important;
}

.dx-article__help {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 40px;
	padding: 22px 24px;
	border-radius: 18px;
	background: var(--dd-soft);
	border: 1px solid var(--dd-line);
	font-size: 16px;
}

.dx-article__help strong {
	color: var(--dd-navy);
	font-family: var(--dd-head);
	font-size: 18px;
}

.dx-article__help a {
	color: var(--dd-blue) !important;
	font-weight: 700;
	text-decoration: none !important;
}

.dx-article__aside {
	position: sticky;
	top: 100px;
	display: grid;
	gap: 20px;
}

.dx-aside-card {
	padding: 24px;
	border: 1px solid var(--dd-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(15, 31, 61, .05);
}

.dx-aside-card p {
	margin: 0 0 14px !important;
	color: var(--dd-text) !important;
	font-size: 15px !important;
	line-height: 1.55 !important;
}

.dx-aside-card .dx-aside-card__title {
	margin-bottom: 10px !important;
	color: var(--dd-navy) !important;
	font-family: var(--dd-head);
	font-size: 18px !important;
	font-weight: 800;
}

.dx-aside-card--cta {
	border: 0;
	background: linear-gradient(135deg, #141a5a, #2b3fbf);
}

.dx-aside-card--cta p,
.dx-aside-card--cta .dx-aside-card__title {
	color: #fff !important;
}

.dx-aside-card--cta .dd-btn {
	width: 100% !important;
	background: #fff !important;
	color: var(--dd-navy) !important;
	box-shadow: none !important;
}

.dx-aside-card__phone {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
}

.dx-related {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.dx-related li {
	margin: 0 !important;
	padding: 12px 0 !important;
	border-top: 1px solid var(--dd-line);
}

.dx-related li:first-child {
	border-top: 0;
	padding-top: 0 !important;
}

.dx-related li::before {
	display: none !important;
}

.dx-related a {
	display: block;
	color: var(--dd-ink) !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none !important;
}

.dx-related a:hover {
	color: var(--dd-blue) !important;
}

.dx-related span {
	display: block;
	margin-top: 4px;
	color: var(--dd-muted);
	font-size: 13px;
}

@media (max-width: 1024px) {
	.dx-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dx-article__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.dx-article__aside {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.dx-post--featured {
		flex-direction: column;
	}

	.dx-post--featured .dx-post__media {
		flex: none;
		min-height: 0;
		aspect-ratio: 16 / 9;
		font-size: 64px;
	}

	.dx-post--featured .dx-post__body {
		padding: 22px 24px 24px;
	}
}

@media (max-width: 640px) {
	.dx-posts {
		grid-template-columns: minmax(0, 1fr);
	}

	.dx-article__aside {
		grid-template-columns: minmax(0, 1fr);
	}

	.dx-prose,
	.dx-prose p,
	.dx-prose li {
		font-size: 16px !important;
	}

	.dx-prose h2 {
		font-size: 22px !important;
	}
}
