/**
 * Post List Page Styles
 * Styles for blog post list page
 *
 * @package Errand
 */

/* ==========================================================================
   Post List Layout
   ========================================================================== */

.post-list-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 2rem;
	align-items: start;
}

.post-list-main {
	min-width: 0;
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.post-list-page .page-header {
	margin-bottom: 3rem;
	padding-bottom: 2rem;
	border-bottom: 2px solid var(--post-border-color);
}

.post-list-page .page-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--post-text-primary);
	margin-bottom: 1rem;
	line-height: 1.2;
}

.post-list-page .page-description {
	font-size: 1.125rem;
	color: var(--post-text-secondary);
	line-height: 1.6;
	margin-top: 1rem;
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */

.posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin-bottom: 3rem;
}

.post-card {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	box-shadow: var(--post-shadow-sm);
	transition: var(--post-transition);
	overflow: hidden;
	border: 1px solid var(--post-border-color);
}

.post-card:hover {
	box-shadow: var(--post-shadow-md);
	transform: translateY(-2px);
	border-color: var(--post-border-hover);
}

.post-card-inner {
	display: flex;
	flex-direction: row;
	height: 100%;
}

/* Post Thumbnail */
.post-thumbnail {
	flex: 0 0 auto;
	max-width: 225px;
	min-height: 200px;
	overflow: hidden;
	background: var(--post-bg-tertiary);
}

.post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--post-transition);
}

.post-card:hover .post-thumbnail img {
	transform: scale(1.05);
}

.post-thumbnail a {
	display: block;
	width: 100%;
	height: 100%;
}

/* Post Content */
.post-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	min-width: 0;
}

.post-header {
	margin-bottom: 1rem;
}

.post-title {
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 0.75rem 0;
}

.post-title a {
	color: var(--post-text-primary) !important;
	text-decoration: none;
	transition: var(--post-transition-fast);
}

.post-title a:hover {
	color: var(--post-primary-color) !important;
}

/* Post Meta */
.post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	font-size: 0.875rem;
	color: var(--post-text-secondary);
	margin-bottom: 1rem;
}

.post-meta span,
.post-meta time {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.post-meta i {
	font-size: 0.75rem;
	opacity: 0.7;
}

.post-date,
.post-author,
.post-categories {
	color: var(--post-text-secondary);
}

/* Post Excerpt */
.post-excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--post-text-secondary);
	margin-bottom: 1rem;
	flex: 1;
}

.post-excerpt p {
	margin: 0;
}

/* Post Footer */
.post-footer {
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid var(--post-border-color);
}

.post-read-more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--post-primary-color) !important;
	text-decoration: none !important;
	font-weight: 500;
	font-size: 0.9375rem;
	transition: var(--post-transition-fast) !important;
}

.post-read-more:hover {
	color: var(--post-primary-hover) !important;
	gap: 0.75rem;
}

.post-read-more i {
	font-size: 0.75rem;
	transition: var(--post-transition-fast);
}

.post-read-more:hover i {
	transform: translateX(2px);
}

/* ==========================================================================
   No Posts Found
   ========================================================================== */

.no-posts-found {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 4rem 2rem;
	text-align: center;
	border: 1px solid var(--post-border-color);
}

.no-posts-content i {
	font-size: 4rem;
	color: var(--post-text-tertiary);
	margin-bottom: 1.5rem;
}

.no-posts-content h3 {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--post-text-primary);
	margin-bottom: 1rem;
}

.no-posts-content p {
	font-size: 1rem;
	color: var(--post-text-secondary);
	margin: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.post-pagination {
	margin-top: 3rem;
	margin-bottom: 2rem;
}

.pagination-list {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
	margin: 0;
}

.pagination-item {
	margin: 0;
}

.pagination-link {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--post-text-secondary) !important;
	text-decoration: none !important;
	border-radius: var(--post-border-radius);
	background: var(--post-bg-primary);
	border: 1px solid var(--post-border-color);
	transition: var(--post-transition-fast) !important;
}

.pagination-link:hover {
	color: var(--post-primary-color) !important;
	border-color: var(--post-primary-color);
	background: var(--post-bg-secondary);
}

.pagination-link-current {
	color: var(--post-primary-color) !important;
	background: var(--post-primary-color);
	color: white !important;
	border-color: var(--post-primary-color);
}

.pagination-link-prev,
.pagination-link-next {
	gap: 0.5rem;
}

.pagination-link-prev i,
.pagination-link-next i {
	font-size: 0.75rem;
}

.pagination-prev .pagination-link:hover,
.pagination-next .pagination-link:hover {
	transform: translateX(-2px);
}

.pagination-next .pagination-link:hover {
	transform: translateX(2px);
}

.pagination-ellipsis {
	padding: 0 0.5rem;
}

.pagination-ellipsis-text {
	color: var(--post-text-tertiary);
	font-size: 0.9375rem;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.post-list-sidebar {
	position: sticky;
	top: 2rem;
}

.sidebar-widget {
	background: var(--post-bg-primary);
	border-radius: var(--post-border-radius-lg);
	padding: 1.5rem;
	margin-bottom: 2rem;
	border: 1px solid var(--post-border-color);
	box-shadow: var(--post-shadow-sm);
}

.widget-title {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--post-text-primary);
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--post-border-color);
}

.recent-posts-list,
.categories-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.recent-posts-list li,
.categories-list li {
	margin-bottom: 0.75rem;
}

.recent-posts-list li:last-child,
.categories-list li:last-child {
	margin-bottom: 0;
}

.recent-posts-list a,
.categories-list a {
	color: var(--post-text-secondary) !important;
	text-decoration: none;
	font-size: 0.9375rem;
	line-height: 1.6;
	transition: var(--post-transition-fast);
	display: block;
}

.recent-posts-list a:hover,
.categories-list a:hover {
	color: var(--post-primary-color) !important;
	padding-left: 0.5rem;
}

.category-count {
	color: var(--post-text-tertiary);
	font-size: 0.875rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 968px) {
	.post-list-layout {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	
	.post-list-sidebar {
		position: static;
	}
	
	.posts-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

@media screen and (max-width: 640px) {
	
	.post-card-inner {
		flex-direction: column;
	}
	
	.post-thumbnail {
		flex: 0 0 auto;
		max-width: 100%;
		min-height: 240px;
	}
	.post-list-page .page-title {
		font-size: 2rem;
	}
	
	.post-list-page .page-description {
		font-size: 1rem;
	}
	
	.posts-grid {
		gap: 1rem;
	}
	
	.post-content {
		padding: 1.25rem;
	}
	
	.post-title {
		font-size: 1.125rem;
	}
	
	.post-meta {
		font-size: 0.8125rem;
		gap: 0.75rem;
	}
	
	.post-excerpt {
		font-size: 0.875rem;
	}
	
	.pagination-link {
		min-width: 2.25rem;
		height: 2.25rem;
		font-size: 0.875rem;
		padding: 0 0.5rem;
	}
	
	.sidebar-widget {
		padding: 1.25rem;
	}
}
