/* Article Library Styles */

.article-library {
	width: 100%;
	margin: 20px 0;
}

/* === Filter Styles === */

.article-library-filters {
	background: #f8f8f8;
	padding: 20px;
	border-radius: 4px;
	margin-bottom: 30px;
}

.article-library-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.article-library-filter-group {
	flex: 1;
	min-width: 150px;
}

.article-library-search,
.article-library-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	appearance: none;
	background-color: #fff;
}

.article-library-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
	padding-right: 30px;
}

.article-library-search:focus,
.article-library-select:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.article-library-button {
	padding: 10px 20px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.2s ease;
	white-space: nowrap;
}

.article-library-button:hover {
	background: #005a87;
}

.article-library-button:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

/* === Grid Styles === */

.article-library-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	margin-bottom: 40px;
}

/* === Card Styles === */

.article-library-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.article-library-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.article-library-card-image {
	width: 100%;
	overflow: hidden;
	background: #f0f0f0;
	aspect-ratio: 4 / 3;
}

.article-library-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.article-library-card-image:hover img {
	transform: scale(1.05);
}

.article-library-card-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.article-library-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.article-library-card-title {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.article-library-card-title a {
	color: #0073aa;
	text-decoration: none;
	transition: color 0.2s ease;
}

.article-library-card-title a:hover {
	color: #005a87;
	text-decoration: underline;
}

.article-library-card-excerpt {
	color: #666;
	font-size: 14px;
	line-height: 1.6;
	margin-bottom: 12px;
	flex-grow: 1;
}

.article-library-card-excerpt p {
	margin: 0;
}

.article-library-card-date {
	font-size: 12px;
	color: #999;
	margin-bottom: 12px;
}

/* === Taxonomy Styles === */

.article-library-card-taxonomy {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid #eee;
}

.article-library-categories,
.article-library-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.article-library-category-tag,
.article-library-tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}

.article-library-category-tag {
	background: #e8f4f8;
	color: #0073aa;
}

.article-library-category-tag:hover {
	background: #d0e8f2;
	color: #005a87;
}

.article-library-tag {
	background: #fef5e7;
	color: #c89e00;
}

.article-library-tag:hover {
	background: #fde8c8;
	color: #a68100;
}

/* === No Posts Message === */

.article-library-no-posts {
	text-align: center;
	padding: 40px 20px;
	background: #f8f8f8;
	border-radius: 4px;
	color: #666;
}

.article-library-no-posts p {
	margin: 0;
	font-size: 16px;
}

/* === Pagination Styles === */

.article-library-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 30px;
	padding-top: 30px;
	border-top: 1px solid #eee;
}

.article-library-pagination-link,
.article-library-pagination-current {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-decoration: none;
	font-size: 13px;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.article-library-pagination-link {
	background: #fff;
	color: #0073aa;
	cursor: pointer;
}

.article-library-pagination-link:hover {
	background: #f0f6fb;
	border-color: #0073aa;
}

.article-library-pagination-link:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.article-library-pagination-current {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
	font-weight: 600;
}

.article-library-pagination-ellipsis {
	color: #999;
	padding: 8px 4px;
}

.article-library-pagination-prev,
.article-library-pagination-next {
	font-weight: 500;
	white-space: nowrap;
}

.article-library-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

/* === Responsive Styles === */

@media (max-width: 768px) {
	.article-library-filter-form {
		flex-direction: column;
	}

	.article-library-filter-group {
		width: 100%;
		min-width: unset;
	}

	.article-library-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 16px;
	}

	.article-library-card-body {
		padding: 16px;
	}

	.article-library-card-title {
		font-size: 16px;
		margin-bottom: 10px;
	}

	.article-library-card-excerpt {
		font-size: 13px;
		margin-bottom: 10px;
	}
}

@media (max-width: 480px) {
	.article-library {
		margin: 10px 0;
	}

	.article-library-filters {
		padding: 15px;
		margin-bottom: 20px;
	}

	.article-library-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.article-library-card-body {
		padding: 12px;
	}

	.article-library-card-title {
		font-size: 15px;
		margin-bottom: 8px;
	}

	.article-library-pagination {
		gap: 4px;
	}

	.article-library-pagination-link,
	.article-library-pagination-current {
		padding: 6px 10px;
		font-size: 12px;
	}
}
