/**
 * Blog Archive Page Styles
 * Note: Header content is managed via Gutenberg blocks on the Blog page.
 * This file only contains styles for the sidebar, post list, and pagination.
 */

/* ===== SHARED CONTAINER ===== */
.blog-container {
	max-width: 1360px;
	margin: 0 auto;
	padding: 0 32px;
}

/* ===== BLOG PAGE HEADER (Gutenberg content) ===== */
.blog-header-wrapper {
	background-color: #fff;
}

.blog-header-content {
	display: flex;
	flex-direction: column;
}

/* Blog page title (only for blog/posts page) */
.blog-page-title {
	font-family: 'Urbanist', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #e2422a; /* Primary red */
	margin: 0 0 12px 0;
}

/* Gutenberg content area */
.page-content {
	margin-bottom: 48px;
}

/* Search block styles */
.wp-block-search__inside-wrapper {
	max-width: 100%;
	border: 1px solid #e5e5e5;
}

.wp-block-search__input {
	padding: 0 15px;
}

.wp-block-search__button {
	background: none;
	color: #000;
	margin: 0;
	border-left: 1px solid #e5e5e5;
}

/* ===== MAIN CONTENT AREA ===== */
.blog-archive-main {
	background-color: #fff;
	padding-bottom: 70px;
}

.blog-archive-content {
	display: flex;
	gap: 64px;
	align-items: flex-start;
}

/* ===== SIDEBAR ===== */
.blog-sidebar {
	width: 278px;
	flex-shrink: 0;
	position: sticky;
	top: 60px; /* Offset for sticky secondary nav */
}

.blog-sidebar__title {
	font-family: 'Urbanist', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.43;
	color: #36663b;
	margin: 0 0 20px 0;
}

.blog-sidebar__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.blog-sidebar__menu-item {
	margin: 0;
	padding: 0;
}

.blog-sidebar__menu-item a {
	display: block;
	font-family: 'Urbanist', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #667085;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-sidebar__menu-item a:hover {
	background-color: #f9fafb;
	color: #344054;
}

.blog-sidebar__menu-item a[aria-current="page"],
.blog-sidebar__menu-item--active a {
	background-color: #f9fafb;
	color: #344054;
}

/* ===== BLOG POSTS ===== */
.blog-posts {
	flex: 1;
	min-width: 0;
}

.blog-post-item {
	display: flex;
	gap: 80px;
	align-items: center;
	padding-bottom: 35px;
	margin-bottom: 20px;
	border-bottom: 1px solid #eaecf0;
}

.blog-post-item:last-of-type {
	border-bottom: none;
}

.blog-post-item__image {
	flex-shrink: 0;
	width: 240px;
	height: 240px;
	margin: 0;
	border-radius: 8px;
	overflow: hidden;
}

.blog-post-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.blog-post-item__content {
	flex: 1;
	min-width: 0;
}

.blog-post-item__title {
	font-family: 'Urbanist', sans-serif;
	font-size: 35px;
	font-weight: 600;
	line-height: 1.43;
	color: #000;
	margin: 0 0 20px 0;
}

.blog-post-item__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.blog-post-item__title a:hover {
	color: #36663b;
}

.blog-post-item__excerpt {
	font-family: 'Urbanist', sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: rgba(0, 0, 0, 0.8);
	margin: 0 0 20px 0;
}

.blog-post-item__excerpt p,
.blog-post-item__excerpt ul,
.blog-post-item__excerpt ol,
.blog-post-item__excerpt h1,
.blog-post-item__excerpt h2,
.blog-post-item__excerpt h3,
.blog-post-item__excerpt h4,
.blog-post-item__excerpt h5,
.blog-post-item__excerpt h6 {
	margin: 0;
}

.blog-post-item__meta {
	display: flex;
	align-items: center;
}

.blog-post-item__author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.blog-post-item__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
}

.blog-post-item__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.blog-post-item__author-info {
	display: flex;
	flex-direction: column;
}

.blog-post-item__author-name {
	font-family: 'Urbanist', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.43;
	color: #344054;
	margin: 0;
}

.blog-post-item__date {
	font-family: 'Urbanist', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.43;
	color: #475467;
}

/* ===== PAGINATION ===== */
.blog-pagination {
	max-width: 1360px;
	margin: 0 auto;
	padding: 0 32px;
	border-top: 1px solid #eaecf0;
	padding-top: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

/* Button wrappers for Previous/Next */
.blog-pagination__button-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	min-width: 0;
}

.blog-pagination__button-wrap--prev {
	justify-content: flex-start;
}

.blog-pagination__button-wrap--next {
	justify-content: flex-end;
}

/* Target the actual <a> tags generated by WordPress */
.blog-pagination__button-wrap--prev a,
.blog-pagination__button-wrap--next a {
	background-color: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: 'Urbanist', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.43;
	color: #344054;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.blog-pagination__button-wrap--prev a:hover,
.blog-pagination__button-wrap--next a:hover {
	background-color: #f9fafb;
	border-color: #98a2b3;
}

.blog-pagination__button-wrap--prev a svg,
.blog-pagination__button-wrap--next a svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.blog-pagination__numbers {
	display: flex;
	gap: 2px;
	align-items: center;
}

/* Style WordPress pagination links */
.blog-pagination__numbers .page-numbers {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Urbanist', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.43;
	color: #475467;
	text-decoration: none;
	border-radius: 8px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.blog-pagination__numbers a.page-numbers:hover {
	background-color: #f9fafb;
	color: #182230;
}

/* Current/active page */
.blog-pagination__numbers .page-numbers.current {
	background-color: #f9fafb;
	color: #182230;
	font-weight: 600;
}

/* Dots separator */
.blog-pagination__numbers .dots {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #475467;
}

/* ===== RESPONSIVE STYLES ===== */

/* Tablet */
@media (max-width: 991px) {
	.blog-container {
		padding: 0 24px;
	}

	.blog-archive-main {
		padding-bottom: 50px;
	}

	.blog-archive-content {
		flex-direction: column;
		gap: 40px;
	}

	.blog-sidebar {
		width: 100%;
		position: static;
	}

	.blog-post-item {
		gap: 40px;
	}

	.blog-post-item__title {
		font-size: 28px;
	}
}

/* Mobile */
@media (max-width: 576px) {
	.blog-container {
		padding: 0 20px;
	}

	.blog-archive-main {
		padding-bottom: 40px;
	}

	.blog-archive-content {
		gap: 32px;
	}

	.blog-post-item {
		flex-direction: column;
		gap: 20px;
		align-items: flex-start;
		padding-bottom: 20px;
	}

	.blog-post-item__image {
		width: 100%;
		height: 200px;
	}

	.blog-post-item__title {
		font-size: 24px;
		margin-bottom: 16px;
	}

	.blog-post-item__excerpt {
		font-size: 15px;
		margin-bottom: 16px;
	}

	.blog-pagination {
		flex-wrap: wrap;
	}

	.blog-pagination__button-wrap--prev a,
	.blog-pagination__button-wrap--next a {
		font-size: 13px;
		padding: 6px 10px;
	}

	.blog-pagination__numbers .page-numbers {
		width: 36px;
		height: 36px;
		font-size: 13px;
	}

	.blog-pagination__numbers .dots {
		width: 36px;
		height: 36px;
		font-size: 13px;
	}
}
