/**
 * Module: Blog Listing Section
 * Loaded when `blog_listing_section` layout is present on the page.
 * NOTE: All Featured Article Section & Card styles live in `blog-featured.css`.
 */

:root {
	--indigo: #002B5C;
	--crimson: #ED1C24;
	--slate: #060606;
	--mist: #A5A4A4;
	--frost: #EDEDED;
	--white: #FFFFFF;
	--indigo-deep: #001A3A;
	--indigo-tint: #F2F5F9;
	--ink: #1C2230;
	--ink-soft: #4A5568;
	--line: #D9DCE1;
	--display: 'Gotham', 'Montserrat', system-ui, sans-serif;
	--body: 'Open Sans', system-ui, sans-serif;
	--max: 1180px;
	--gutter: clamp(20px, 4vw, 48px);
	--radius: 6px;
}

.blog-listing-section,
section.blog-listing-section {
	padding-top: 56px;
	padding-bottom: 0;
}

/* ==========================================================================
   Section Header (Heading + Browse all link)
   ========================================================================== */
.sec-head,
.blog-listing-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 28px;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--crimson);
	flex-wrap: wrap;
}

.sec-head h2,
.blog-listing-head h2 {
	font-family: var(--display);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	color: var(--indigo);
	line-height: 1.15;
	letter-spacing: -.02em;
	margin: 0;
}

.sec-head h2 .dot,
.blog-listing-head h2 .dot {
	color: var(--crimson);
}

.sec-head .link,
.blog-listing-head .link {
	font-family: var(--display);
	font-size: 13.5px;
	font-weight: 700;
	color: var(--indigo);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	transition: color .15s ease;
}

.sec-head .link svg,
.blog-listing-head .link svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	transition: transform .15s ease;
}

.sec-head .link:hover svg,
.blog-listing-head .link:hover svg {
	transform: translate(2px, -2px);
}

/* ==========================================================================
   Filter Bar (Sticky, Chips, Sort, Count)
   ========================================================================== */
.filterbar {
	position: sticky;
	top: 84px;
	z-index: 40;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
	margin-top: 40px;
}

.filterbar .wrap {
	display: flex;
	align-items: center;
	gap: 18px;
	height: 62px;
}

.filterbar .label {
	font-family: var(--display);
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--mist);
	font-weight: 700;
	white-space: nowrap;
}

.filterbar .chips {
	flex: 1;
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 2px 18px 2px 2px;
	gap: 6px;
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}

.filterbar .chips::-webkit-scrollbar {
	display: none;
}

.chip {
	font-family: var(--body);
	font-weight: 600;
	font-size: 13px;
	color: var(--indigo);
	background: #fff;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	padding: 8px 14px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, transform .15s ease, color .15s ease;
	text-align: left;
	line-height: 1.2;
}

.chip:hover {
	border-color: var(--indigo);
	background: var(--indigo-tint);
	transform: translateY(-1px);
}

.chip:active {
	transform: none;
}

.chip.active,
.chip[aria-pressed="true"] {
	background: var(--indigo);
	border-color: var(--indigo);
	color: #fff;
}

.filterbar .chip {
	white-space: nowrap;
	padding: 7px 14px;
	font-size: 12.5px;
	font-family: var(--body);
	font-weight: 600;
	color: var(--indigo);
	background: #fff;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
	transition: border-color .15s ease, background .15s ease, transform .15s ease, color .15s ease;
}

.filterbar .chip:hover {
	border-color: var(--indigo);
	background: var(--indigo-tint);
	color: var(--indigo);
	transform: translateY(-1px);
}

.filterbar .chip:active {
	transform: none;
}

.filterbar .chip.active,
.filterbar .chip[aria-pressed="true"] {
	background: var(--indigo);
	border-color: var(--indigo);
	color: #fff;
	font-weight: 700;
	transform: none;
}

.sort {
	display: flex;
	align-items: center;
	gap: 2px;
	background: var(--frost, #EDEDED);
	padding: 3px;
	border-radius: 999px;
	flex: none;
}

.sort button,
.sort .blog-sort-btn {
	font-family: var(--display, 'Gotham', system-ui, sans-serif);
	font-weight: 700;
	font-size: 12px;
	line-height: 1.2;
	letter-spacing: .04em;
	border: 0;
	background: transparent;
	color: var(--ink-soft, #4A5568);
	padding: 7px 14px;
	border-radius: 999px;
	cursor: pointer;
	white-space: nowrap;
	margin: 0;
	outline: none;
	box-shadow: none;
	transition: background .15s ease, color .15s ease;
}

.sort button:focus,
.sort .blog-sort-btn:focus {
	outline: none;
	box-shadow: none;
}

.sort button.active,
.sort button[aria-pressed="true"],
.sort .blog-sort-btn.active,
.sort .blog-sort-btn[aria-pressed="true"] {
	background: var(--indigo, #002B5C);
	color: #ffffff;
}

.count {
	font-size: 13px;
	color: var(--ink-soft);
	white-space: nowrap;
}

.count b {
	color: var(--indigo);
	font-family: var(--display);
	font-weight: 700;
}

/* ==========================================================================
   Listing Section & Grid Layout
   ========================================================================== */
.listing {
	padding-top: 44px;
	padding-bottom: 60px;
}

.listing .wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 56px;
	align-items: start;
}

.listing h2,
.listing .listing-heading h2 {
	font-family: var(--display);
	font-size: 22px;
	font-weight: 700;
	color: var(--indigo);
	margin: 0 0 22px;
}

.listing h2 .dot,
.listing .listing-heading h2 .dot {
	color: var(--crimson);
}

.grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 36px 32px;
}

.blog-results.is-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity .2s ease;
}

/* ==========================================================================
   Post Card (.post, .blog-card)
   ========================================================================== */
.post {
	display: flex;
	flex-direction: column;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1);
}

.post.in {
	opacity: 1;
	transform: none;
}

.post.hide {
	display: none;
}

.post .pic {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	aspect-ratio: 3 / 2;
	background: var(--indigo-tint);
	display: block;
}

.post .pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}

.post:hover .pic img {
	transform: scale(1.05);
}

.post .pic .go {
	position: absolute;
	right: 14px;
	bottom: 14px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--crimson);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 16px 16px;
	transform: translateY(8px);
	opacity: 0;
	transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
	pointer-events: none;
}

.post:hover .pic .go {
	transform: none;
	opacity: 1;
}

.post .pic .go svg {
	display: none;
}

.post .cat {
	display: inline-block;
	font-family: var(--display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--crimson);
	margin: 16px 0 8px;
}

.post h3 {
	font-family: var(--display);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 8px;
}

.post h3 a {
	color: var(--indigo);
	text-decoration: none;
	background-image: linear-gradient(var(--crimson), var(--crimson));
	background-repeat: no-repeat;
	background-size: 0 2px;
	background-position: 0 96%;
	transition: background-size .35s cubic-bezier(.2, .8, .2, 1), color .2s ease;
}

.post:hover h3 a {
	color: var(--indigo);
	background-size: 100% 2px;
}

.post p {
	font-size: 14.5px;
	color: var(--ink-soft);
	line-height: 1.5;
	margin: 0;
	flex: 1;
}

.post .meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 16px;
	font-size: 13px;
	color: var(--ink-soft);
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--line);
}

.post .meta .rt {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.post .meta .rt svg {
	width: 14px;
	height: 14px;
	stroke: var(--indigo);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
}

/* ==========================================================================
   Inline CTA Inside Grid
   ========================================================================== */
.inline-cta {
	grid-column: 1 / -1;
	background: var(--indigo);
	color: #fff;
	border-radius: 12px;
	padding: 30px 34px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 220px;
	gap: 26px;
	align-items: center;
	position: relative;
	overflow: hidden;
}

.inline-cta::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	pointer-events: none;
}

.inline-cta .eyebrow {
	font-family: var(--display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
	margin-bottom: 6px;
}

.inline-cta h3 {
	font-family: var(--display);
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 6px;
}

.inline-cta p {
	color: rgba(255, 255, 255, .9);
	font-size: 14.5px;
	line-height: 1.5;
	margin: 0;
	max-width: 520px;
}

.inline-cta .actions {
	display: grid;
	gap: 10px;
	position: relative;
	z-index: 2;
}

.inline-cta .actions .btn {
	width: 100%;
	justify-content: center;
	text-align: center;
	font-family: var(--display);
	font-weight: 700;
	font-size: 13.5px;
	padding: 12px 18px;
	border-radius: var(--radius);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
}

.inline-cta .btn-white {
	background: var(--crimson);
	color: #fff;
	border: 1.5px solid var(--crimson);
}

.inline-cta .btn-white:hover {
	background: #C9151C;
	border-color: #C9151C;
	color: #fff;
}

.inline-cta .btn-ghost {
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, .7);
	color: #fff;
}

.inline-cta .btn-ghost:hover {
	background: #fff;
	color: var(--indigo);
	border-color: #fff;
}

/* ==========================================================================
   Empty / No Posts State
   ========================================================================== */
.empty,
.no-posts {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 20px;
	border: 1px dashed var(--line);
	border-radius: 12px;
	color: var(--ink-soft);
	font-size: 14px;
	margin: 20px 0;
}

.empty a,
.no-posts a {
	color: var(--crimson);
	font-weight: 600;
	border-bottom: 1px solid currentColor;
	text-decoration: none;
}

/* ==========================================================================
   Pagination (.pager, .blog-pagination)
   ========================================================================== */
.pager {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 44px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	flex-wrap: wrap;
}

.pager a,
.pager span,
.pager button {
	font-family: var(--display);
	font-weight: 700;
	font-size: 13px;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--indigo);
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
	box-sizing: border-box;
}

.pager a:hover,
.pager button:hover {
	border-color: var(--indigo);
	background: var(--indigo-tint);
	color: var(--indigo);
}

.pager .cur,
.pager .cur.active,
.pager button.active {
	background: var(--crimson);
	border-color: var(--crimson);
	color: #fff;
	cursor: default;
}

.pager .gap {
	border: 0;
	color: var(--mist);
	background: transparent;
	min-width: auto;
	padding: 0 6px;
	cursor: default;
}

.pager .next {
	margin-left: auto;
	gap: 8px;
}

.pager .next svg {
	width: 14px;
	height: 14px;
}

/* ==========================================================================
   Sidebar & Popular Blogs (.side, .panel, .popular)
   ========================================================================== */
.side {
	display: grid;
	gap: 28px;
	align-self: start;
	align-content: start;
}

.panel {
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 22px 22px 20px;
	background: #fff;
}

.panel h3,
.popular-heading h3 {
	font-family: var(--display);
	font-size: 18px;
	font-weight: 700;
	color: var(--indigo);
	margin: 0 0 4px;
}

.panel h3 .dot,
.popular-heading h3 .dot {
	color: var(--crimson);
}

.panel .sub,
.popular-heading .sub {
	font-size: 13px;
	color: var(--ink-soft);
	margin-bottom: 14px;
}

.popular {
	list-style: none;
	counter-reset: p;
	margin: 0;
	padding: 0;
}

.popular li {
	display: grid;
	grid-template-columns: 22px 1fr 72px;
	gap: 12px;
	align-items: center;
	padding: 12px 0;
	border-top: 1px solid var(--line);
}

.popular li:first-child {
	border-top: 0;
	padding-top: 0;
}

.popular li::before {
	counter-increment: p;
	content: counter(p);
	font-family: var(--display);
	font-weight: 800;
	font-size: 18px;
	color: var(--crimson);
	line-height: 1;
}

.popular .t {
	font-family: var(--display);
	font-weight: 700;
	font-size: 14px;
	color: var(--indigo);
	line-height: 1.3;
	display: block;
	text-decoration: none;
	transition: color .15s ease;
}

.popular li:hover .t {
	text-decoration: underline;
	text-decoration-color: var(--crimson);
	text-underline-offset: 3px;
}

.popular .m {
	font-size: 12px;
	color: var(--ink-soft);
	margin-top: 3px;
}

.popular img,
.popular .popular-post-image img {
	width: 72px;
	height: 54px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

/* Optional Sidebar CTA / Dark Panel */
.panel.dark {
	background: var(--indigo);
	border-color: var(--indigo);
	color: #fff;
	box-shadow: 0 20px 40px rgba(0, 43, 92, .18);
}

.panel.dark .big {
	font-family: var(--display);
	font-weight: 800;
	font-size: 64px;
	line-height: .9;
	color: var(--crimson);
	letter-spacing: -.04em;
	margin-bottom: 8px;
}

.panel.dark h3 {
	color: #fff;
}

.panel.dark p {
	font-size: 14px;
	color: rgba(255, 255, 255, .82);
	margin-bottom: 16px;
}

.panel.dark .btn {
	width: 100%;
}

.pill {
	display: inline-block;
	font-family: var(--display);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .1em;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--indigo-tint);
	color: var(--indigo);
	margin-bottom: 12px;
}

/* ==========================================================================
   Consultation Section (.cta-band on-dark) & Lead Form (.lead-form)
   ========================================================================== */
.cta-band {
	background: var(--indigo);
	color: var(--white);
	position: relative;
	overflow: hidden;
}

.cta-band .wrap {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 56px;
	align-items: start;
	padding-top: 44px;
	padding-bottom: 44px;
}

.cta-band .copy {
	align-self: start;
}

.cta-band .eyebrow {
	font-family: var(--display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
	margin-bottom: 8px;
}

.cta-band h2 {
	color: var(--white);
	font-size: clamp(26px, 3vw, 36px);
	font-family: var(--display);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}

.cta-band p {
	color: rgba(255, 255, 255, .85);
	font-size: 16px;
	font-weight: 300;
	margin-top: 12px;
	max-width: 560px;
	line-height: 1.5;
}

.cta-band .actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 22px;
}

.cta-band .actions .btn-outline {
	border-color: rgba(255, 255, 255, .7);
	color: var(--white);
	background: transparent;
	padding: 12px 24px;
	font-family: var(--display);
	font-weight: 700;
	font-size: 14px;
	border-radius: var(--radius);
	border: 1.5px solid rgba(255, 255, 255, .7);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	transition: background .15s ease, color .15s ease;
}

.cta-band .actions .btn-outline:hover {
	background: var(--white);
	color: var(--indigo);
}

.cta-band .assure {
	list-style: none;
	display: grid;
	gap: 10px;
	margin-top: 22px;
	padding: 0;
	font-size: 14px;
	color: rgba(255, 255, 255, .9);
}

.cta-band .assure li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.cta-band .assure svg,
.cta-band .assure img {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 2px;
}

.cta-band .micro {
	font-size: 12px;
	color: rgba(255, 255, 255, .65);
	margin-top: 14px;
}

.lead-form {
	background: var(--white);
	border-radius: 12px;
	padding: 22px 22px 20px;
	color: var(--ink);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.lead-form h3 {
	font-family: var(--display);
	font-size: 16px;
	font-weight: 700;
	color: var(--indigo);
	margin-bottom: 4px;
}

.lead-form .sub {
	font-size: 12.5px;
	color: var(--ink-soft);
	margin-bottom: 14px;
}

.lead-form label {
	display: block;
	font-family: var(--display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin: 10px 0 4px;
}

.lead-form input,
.lead-form select,
.lead-form textarea {
	width: 100%;
	font: inherit;
	font-size: 14px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
	box-sizing: border-box;
}

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
	border-color: var(--indigo);
	outline: 2px solid rgba(0, 43, 92, .15);
}

.lead-form .btn,
.lead-form button[type="submit"],
.lead-form input[type="submit"] {
	width: 100%;
	margin-top: 14px;
	background: var(--crimson);
	color: #fff;
	border: 0;
	padding: 14px 22px;
	border-radius: var(--radius);
	font-family: var(--display);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background .15s ease;
}

.lead-form .btn:hover,
.lead-form button[type="submit"]:hover,
.lead-form input[type="submit"]:hover {
	background: #C9151C;
}

.lead-form .trust {
	font-size: 12px;
	color: var(--ink-soft);
	margin-top: 10px;
	text-align: center;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 980px) {
	.listing .wrap {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.side {
		grid-template-columns: 1fr;
	}

	.filterbar .count {
		display: none;
	}

	.cta-band .wrap {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}

@media (max-width: 768px) {
	.blog-listing-section,
	section.blog-listing-section {
		padding-top: 40px;
	}

	.sec-head,
	.blog-listing-head {
		margin-bottom: 20px;
	}
}

@media (max-width: 720px) {
	.grid {
		grid-template-columns: 1fr;
	}

	.inline-cta {
		grid-template-columns: 1fr;
		padding: 26px 24px;
	}

	.filterbar .label {
		display: none;
	}

	.filterbar .wrap {
		gap: 12px;
	}

	.sort button {
		padding: 6px 10px;
		font-size: 11.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.post {
		opacity: 1;
		transform: none;
	}

	.post .pic .go {
		opacity: 1;
		transform: none;
	}
}
