/* =============================================================================
   Anatech blog listing redesign
   Design system: "Anatech Blueprint". Layout pattern referenced from a modern
   editorial index: chip filter bar plus search, a white featured lead card,
   then transparent grid cards with a tinted category badge.
   Everything is scoped under .anatech-blog so no other template is affected.
   ============================================================================= */

.anatech-blog {
	--ab-card: #FFFFFF;
	--ab-ground: #F5F5F5;
	--ab-ink: #000000;
	--ab-accent: #1145BB;
	--ab-accent-hover: #ED4B00;
	--ab-accent-tint: rgba( 17, 69, 187, 0.08 );
	--ab-muted: #555555;
	--ab-border: #DBDBDB;
	--ab-dark: #202020;
	--ab-r-sm: 12px;
	--ab-r-md: 24px;
	--ab-r-pill: 56px;
	--ab-lg: 46px;
	--ab-xl: 64px;

	background: var( --ab-ground );
	padding: 0 0 var( --ab-xl ) 0;
}

.anatech-blog a:focus-visible,
.anatech-blog button:focus-visible,
.anatech-blog input:focus-visible {
	outline: 2px solid var( --ab-accent ) !important;
	outline-offset: 3px;
}

/* -----------------------------------------------------------------------------
   1. Page header
   -------------------------------------------------------------------------- */

.anatech-blog .ab-header {
	padding: var( --ab-lg ) 0 26px 0;
}

.anatech-blog .ab-header h1 {
	margin: 0;
	font-size: clamp( 1.75rem, 2.6vw, 2.5rem );
	line-height: 1.1;
	letter-spacing: -0.02em;
	font-weight: 500;
	color: var( --ab-ink );
}

.anatech-blog .ab-header .ab-intro {
	margin: 14px 0 0 0;
	max-width: 60ch;
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var( --ab-muted );
}

.anatech-blog .ab-header .ab-count {
	margin: 14px 0 0 0;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.2;
	color: var( --ab-muted );
}

/* -----------------------------------------------------------------------------
   2. Filter toolbar: category chips plus search
   -------------------------------------------------------------------------- */

.anatech-blog .ab-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 12px;
	background: var( --ab-card );
	border-radius: var( --ab-r-md );
	min-width: 0;
}

.anatech-blog .blog-category {
	position: relative;
	min-width: 0;
	flex: 1 1 auto;
}

/* Chips scroll in one row rather than wrapping to multiple lines; a fade on
   the right edge hints there is more to scroll. */
.anatech-blog .blog-category ul {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 4px;
	margin: 0;
	overflow-x: auto;
	overflow-y: hidden;
	padding-right: 28px;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.anatech-blog .blog-category ul::-webkit-scrollbar {
	display: none;
}

.anatech-blog .blog-category::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 34px;
	height: 100%;
	pointer-events: none;
	background: linear-gradient( to right, rgba( 255, 255, 255, 0 ), #FFFFFF );
}

.anatech-blog .blog-category ul li {
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
}

.anatech-blog .blog-category ul li::before {
	display: none;
}

.anatech-blog .blog-category ul li a,
.anatech-blog .blog-category ul li .ab-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border-radius: var( --ab-r-pill );
	font-size: 15px;
	line-height: 1;
	color: var( --ab-muted );
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.anatech-blog .blog-category ul li a:hover,
.anatech-blog .blog-category ul li a:focus {
	background: var( --ab-accent-tint );
	color: var( --ab-accent );
}

.anatech-blog .blog-category ul li .ab-chip.is-active {
	background: var( --ab-accent );
	color: #FFFFFF;
	font-weight: 500;
}

.anatech-blog .blog-category ul li a span,
.anatech-blog .blog-category ul li .ab-chip span {
	margin: 0;
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	opacity: 0.65;
}

/* Search */
.anatech-blog .ab-toolbar .search-blogs {
	flex: 0 0 260px;
	margin: 0;
	text-align: left;
	position: relative;
}

.anatech-blog .search-blogs .search-form-bar {
	max-width: none;
	margin: 0;
}

.anatech-blog .search-blogs input.field {
	width: 100%;
	height: 44px;
	padding: 0 44px 0 18px;
	border: 1px solid transparent;
	border-radius: var( --ab-r-pill );
	background: var( --ab-ground );
	font-size: 15px;
	color: var( --ab-ink );
	box-shadow: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.anatech-blog .search-blogs input.field::placeholder {
	color: var( --ab-muted );
	opacity: 1;
}

.anatech-blog .search-blogs input.field:focus {
	background: var( --ab-card );
	border-color: var( --ab-accent );
}

.anatech-blog .search-blogs button {
	position: absolute;
	top: 0;
	right: 4px;
	width: 40px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 0;
	color: var( --ab-muted );
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.anatech-blog .search-blogs button:hover,
.anatech-blog .search-blogs button:focus {
	color: var( --ab-accent );
}

/* -----------------------------------------------------------------------------
   3. Shared: category badge and reading time
   -------------------------------------------------------------------------- */

.anatech-blog .ab-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: var( --ab-r-pill );
	background: var( --ab-accent-tint );
	color: var( --ab-accent );
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1;
	white-space: nowrap;
}

.anatech-blog .ab-badge:hover,
.anatech-blog .ab-badge:focus {
	background: var( --ab-accent );
	color: #FFFFFF;
}

/* -----------------------------------------------------------------------------
   4. Featured lead post
   -------------------------------------------------------------------------- */

.anatech-blog .ab-featured {
	display: flex;
	align-items: center;
	gap: 34px;
	margin-top: 20px;
	padding: 26px;
	background: var( --ab-card );
	border-radius: var( --ab-r-md );
}

.anatech-blog .ab-featured-text {
	flex: 1 1 42%;
	min-width: 0;
}

.anatech-blog .ab-featured-media {
	flex: 1 1 55%;
	min-width: 0;
	border-radius: var( --ab-r-sm );
	overflow: hidden;
	aspect-ratio: 16 / 11;
	background: var( --ab-ground );
}

.anatech-blog .ab-featured-media a {
	display: block;
	height: 100%;
}

.anatech-blog .ab-featured-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.anatech-blog .ab-featured:hover .ab-featured-media img {
	transform: scale( 1.03 );
}

.anatech-blog .ab-featured h2 {
	margin: 0;
	font-size: clamp( 1.5rem, 2.3vw, 2.125rem );
	line-height: 1.15;
	letter-spacing: -0.02em;
	font-weight: 500;
}

.anatech-blog .ab-featured h2 a {
	color: var( --ab-ink );
}

.anatech-blog .ab-featured h2 a:hover,
.anatech-blog .ab-featured h2 a:focus {
	color: var( --ab-accent );
}

.anatech-blog .ab-featured .ab-excerpt {
	margin: 16px 0 0 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var( --ab-muted );
}

.anatech-blog .ab-featured-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 26px;
	padding: 10px 16px;
	background: var( --ab-ground );
	border-radius: var( --ab-r-pill );
}

.anatech-blog .ab-author {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.anatech-blog .ab-author-img {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	background: var( --ab-card );
}

.anatech-blog .ab-author-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.anatech-blog .ab-author-name {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: var( --ab-ink );
}

.anatech-blog .ab-author-date {
	margin: 3px 0 0 0;
	font-size: 13px;
	line-height: 1.2;
	color: var( --ab-muted );
}

.anatech-blog .ab-foot-right {
	display: flex;
	align-items: center;
	gap: 14px;
}

.anatech-blog .ab-readtime {
	font-size: 13px;
	line-height: 1.2;
	color: var( --ab-muted );
	white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   5. Post grid
   -------------------------------------------------------------------------- */

.anatech-blog .blog-list-section {
	padding: 40px 0 0 0;
}

.anatech-blog .blog-list-section .row {
	row-gap: 40px;
}

.anatech-blog .blog-block {
	display: flex;
	flex-direction: column;
	margin: 0;
	height: 100%;
}

.anatech-blog .blog-block .blog-img {
	margin-bottom: 16px;
	border-radius: var( --ab-r-sm );
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: var( --ab-card );
}

.anatech-blog .blog-block .blog-img a {
	display: block;
	height: 100%;
}

.anatech-blog .blog-block .blog-img img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.anatech-blog .blog-block:hover .blog-img img {
	transform: scale( 1.04 );
}

.anatech-blog .blog-block .ab-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.anatech-blog .blog-block .read-time {
	margin: 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.2;
	color: var( --ab-muted );
}

.anatech-blog .blog-block .read-time::before {
	display: none;
	content: none;
}

.anatech-blog .blog-block h2 {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.35;
	font-weight: 500;
}

.anatech-blog .blog-block h2 a {
	color: var( --ab-ink );
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.anatech-blog .blog-block h2 a:hover,
.anatech-blog .blog-block h2 a:focus,
.anatech-blog .blog-block:hover h2 a {
	color: var( --ab-accent );
}

.anatech-blog .blog-block .ab-excerpt {
	margin: 10px 0 0 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var( --ab-muted );
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.anatech-blog .blog-block .blogdate {
	margin: 14px 0 0 0;
	padding: 0;
	font-size: 13px;
	line-height: 1.2;
	color: var( --ab-muted );
}

.anatech-blog .blog-block .blogdate::before {
	display: none;
	content: none;
}

/* -----------------------------------------------------------------------------
   6. Pagination
   -------------------------------------------------------------------------- */

.anatech-blog .pagination-main {
	padding: var( --ab-lg ) 0 0 0;
}

.anatech-blog ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
}

.anatech-blog ul.page-numbers li {
	margin: 0;
	padding: 0;
}

.anatech-blog ul.page-numbers li::before {
	display: none;
}

/* paginate_links() puts .page-numbers on the <ul> as well as on each link, so
   the list itself has to be reset or it renders as one wide pill. */
.anatech-blog ul.page-numbers {
	background: transparent;
	border: 0;
	min-width: 0;
	height: auto;
	padding: 0;
}

.anatech-blog ul.page-numbers li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var( --ab-border );
	border-radius: var( --ab-r-pill );
	background: var( --ab-card );
	color: var( --ab-ink );
	font-size: 15px;
	line-height: 1;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.anatech-blog ul.page-numbers li a.page-numbers:hover,
.anatech-blog ul.page-numbers li a.page-numbers:focus {
	background: var( --ab-accent );
	border-color: var( --ab-accent );
	color: #FFFFFF;
}

.anatech-blog ul.page-numbers li .page-numbers.current {
	background: var( --ab-accent );
	border-color: var( --ab-accent );
	color: #FFFFFF;
	font-weight: 500;
}

.anatech-blog ul.page-numbers li .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: var( --ab-muted );
	min-width: 24px;
	padding: 0;
}

/* -----------------------------------------------------------------------------
   7. Responsive
   -------------------------------------------------------------------------- */

@media screen and (max-width: 1199px) {
	.anatech-blog .ab-featured {
		gap: 24px;
		padding: 20px;
	}

	.anatech-blog .ab-toolbar .search-blogs {
		flex: 0 0 220px;
	}
}

@media screen and (max-width: 991px) {
	.anatech-blog {
		--ab-xl: 46px;
	}

	.anatech-blog .ab-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		border-radius: var( --ab-r-md );
		padding: 12px;
	}

	.anatech-blog .ab-toolbar .search-blogs {
		flex: 1 1 auto;
	}

	.anatech-blog .ab-featured {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
	}

	.anatech-blog .ab-featured-media {
		order: -1;
		aspect-ratio: 16 / 9;
	}
}

@media screen and (max-width: 767px) {
	.anatech-blog .ab-header {
		padding-top: 30px;
	}

	.anatech-blog .blog-list-section {
		padding-top: 30px;
	}

	.anatech-blog .blog-list-section .row {
		row-gap: 32px;
	}

	.anatech-blog .ab-featured-foot {
		border-radius: var( --ab-r-md );
	}
}

/* -----------------------------------------------------------------------------
   8. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.anatech-blog .blog-block .blog-img img,
	.anatech-blog .ab-featured-media img,
	.anatech-blog .blog-category ul li a,
	.anatech-blog .page-numbers {
		transition: none !important;
	}

	.anatech-blog .blog-block:hover .blog-img img,
	.anatech-blog .ab-featured:hover .ab-featured-media img {
		transform: none;
	}
}
