/*
================================================================================
HOME ARTICLE FILTER
================================================================================
*/

.home-filter {
	background: #eef2f5;
	padding: 1rem 0;
}

.home-filter-wrapper {
	max-width: var(--wp--custom--ast-content-width-size, 1200px);
	margin: 0 auto;
	padding: 0 2rem;
}

.home-filter-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.home-filter-header h2 {
	margin: 0;
	font-weight: 600;
	font-size: 1.2rem;
	color: #2C3140;
	flex-shrink: 0;
}

.home-filter-toggles {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.home-filter-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.8rem;
	border: none;
	border-radius: 0.5rem;
	background: #e0e0e0;
	color: #2C3140;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s ease;
	min-width: 2rem;
	height: 2rem;
}

.home-filter-toggle.active {
	background: #2C3140;
	color: white;
}

.home-filter-toggle:not(.active):hover {
	background: #d0d0d0;
}

.home-filter-toggle-text {
	flex: 1;
}

.home-filter-toggle-close {
	display: none;
	width: 16px;
	height: 16px;
	line-height: 1;
	font-size: 18px;
	font-weight: bold;
	opacity: 0.7;
	transition: opacity 0.2s ease;
	cursor: pointer;
}

.home-filter-toggle.active .home-filter-toggle-close {
	display: block;
}

/* Hide close button when showing "All Articles" (default state) */
.home-filter-toggle.is-default .home-filter-toggle-close {
	display: none;
}

.home-filter-toggle-close:hover {
	opacity: 1;
}

.home-filter-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.home-filter-level {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.home-filter-category {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid #00AF47;
	border-radius: 1rem;
	background: #16CF61;
	color: white;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s ease;
	line-height: 1.4;
}

.home-filter-category:hover {
	background: #00AF47;
}

.home-filter-category.active {
	background: #007a33;
	border-color: #006b2a;
}

.home-filter-category:focus {
	outline: none;
}

.home-filter-category:focus:not(.active) {
	background: #00AF47;
}

.home-filter-category-text {
	flex: 1;
}

.home-filter-category-close {
	display: none;
	width: 16px;
	height: 16px;
	line-height: 1;
	font-size: 18px;
	font-weight: bold;
	opacity: 0.8;
	transition: opacity 0.2s ease;
}

.home-filter-category.active .home-filter-category-close {
	display: block;
}

.home-filter-category-close:hover {
	opacity: 1;
}

.home-filter-loading {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 4rem 2rem;
}

.home-filter-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #e0e0e0;
	border-top-color: #2C3140;
	border-radius: 50%;
	animation: home-filter-spin 0.8s linear infinite;
}

@keyframes home-filter-spin {
	to {
		transform: rotate(360deg);
	}
}

.home-filter-no-results,
.home-filter-error {
	padding: 2rem;
	text-align: center;
	color: #666;
}

.home-filter-results {
	margin-top: 2rem;
}

