/* News Filter Widget Styles */
.hbc-news-filter-widget {
	width: 100%;
}

/* Filters */
.hbc-nf-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 30px;
}

.hbc-nf-dropdown {
	position: relative;
	min-width: 180px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	cursor: pointer;
}

.hbc-nf-dropdown-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	gap: 10px;
}

.hbc-nf-dropdown-selected {
	font-size: 14px;
	color: #333;
}

.hbc-nf-dropdown-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
	color: #666;
}

.hbc-nf-dropdown-arrow i,
.hbc-nf-dropdown-arrow svg {
	width: 12px;
	height: 12px;
}

.hbc-nf-dropdown.open .hbc-nf-dropdown-arrow {
	transform: rotate(-180deg);
}

.hbc-nf-dropdown-menu {
	position: absolute;
	top: calc(100% + 1px);
	left: -1px;
	right: -1px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 100;
	display: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hbc-nf-dropdown.open .hbc-nf-dropdown-menu {
	display: block;
}

.hbc-nf-dropdown-item {
	padding: 10px 16px;
	font-size: 14px;
	color: #333;
	transition: background-color 0.2s ease;
}

.hbc-nf-dropdown-item:hover {
	background-color: #f5f5f5;
}

.hbc-nf-dropdown-item.selected {
	background-color: #e8f4f8;
	font-weight: 500;
}

/* Search */
.hbc-nf-search {
	flex: 1;
	min-width: 200px;
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: 0 16px;
}

.hbc-nf-search input {
	flex: 1;
	border: none;
	outline: none;
	padding: 12px 0;
	font-size: 14px;
	background: transparent;
}

.hbc-nf-search input::placeholder {
	color: #999;
}

.hbc-nf-search-icon {
	color: #666;
	cursor: pointer;
}

/* Loading */
.hbc-nf-loading {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
}

.hbc-nf-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #f0f0f0;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: hbc-nf-spin 0.8s linear infinite;
}

@keyframes hbc-nf-spin {
	to { transform: rotate(360deg); }
}

/* Posts Grid */
.hbc-nf-posts {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

/* Card */
.hbc-nf-card {
	display: flex;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}

.hbc-nf-card-image {
	flex: 0 0 40%;
	max-width: 40%;
	overflow: hidden;
	border-radius: 8px;
}

.hbc-nf-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.hbc-nf-card-image:hover img {
	transform: scale(1.05);
}

.hbc-nf-card-content {
	flex: 0 0 60%;
	max-width: 60%;
	padding: 20px 30px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hbc-nf-card-date {
	font-size: 14px;
	color: #2563eb;
	margin-bottom: 12px;
}

.hbc-nf-card-title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	margin: 0 0 20px 0;
	color: #333;
}

.hbc-nf-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.hbc-nf-card-title a:hover {
	color: #2563eb;
}

.hbc-nf-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.hbc-nf-card-category {
	display: inline-block;
	padding: 4px 12px;
	background: #f0f0f0;
	border-radius: 4px;
	font-size: 12px;
	color: #666;
}

.hbc-nf-card-link {
	font-size: 14px;
	color: #2563eb;
	text-decoration: none;
	transition: color 0.3s ease;
}

.hbc-nf-card-link:hover {
	color: #1d4ed8;
}

/* No Posts */
.hbc-nf-no-posts {
	text-align: center;
	padding: 40px;
	color: #666;
	font-size: 16px;
}

/* Pagination */
.hbc-nf-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 40px;
}

.hbc-nf-page-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	transition: all 0.2s ease;
}

.hbc-nf-page-arrow:hover:not(:disabled) {
	color: #2563eb;
}

.hbc-nf-page-arrow:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.hbc-nf-page-arrow i,
.hbc-nf-page-arrow svg {
	width: 16px;
	height: 16px;
}

.hbc-nf-page-nums {
	display: flex;
	gap: 4px;
}

.hbc-nf-page-num {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	font-size: 14px;
	color: #666;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.hbc-nf-page-num:hover {
	background-color: #f5f5f5;
}

.hbc-nf-page-num.active {
	background-color: #e0e7ff;
	color: #2563eb;
	font-weight: 500;
}

/* Content Wrapper - Left/Right Layout */
.hbc-nf-content-wrapper {
	display: flex;
	gap: 30px;
}

.hbc-nf-main {
	flex: 1;
	min-width: 0;
}

.hbc-news-filter-widget.has-sidebar .hbc-nf-main {
	flex: 0 0 75%;
	max-width: 75%;
}

.hbc-news-filter-widget.has-sidebar .hbc-nf-sidebar {
	flex: 0 0 calc(25% - 30px);
	max-width: calc(25% - 30px);
}

/* Sidebar */
.hbc-nf-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.hbc-nf-sidebar-block {
	background: #fff;
	border-radius: 8px;
	padding: 20px;
}

.hbc-nf-sidebar-title {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin: 0 0 15px 0;
}

.hbc-nf-sidebar-items {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.hbc-nf-sidebar-item {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hbc-nf-sidebar-item-image {
	width: 100%;
	height: 160px;
	border-radius: 6px;
	overflow: hidden;
}

.hbc-nf-sidebar-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.hbc-nf-sidebar-item-image:hover img {
	transform: scale(1.05);
}

.hbc-nf-sidebar-item-content {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.hbc-nf-sidebar-item-title {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	margin: 0;
	color: #333;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hbc-nf-sidebar-item-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.hbc-nf-sidebar-item-title a:hover {
	color: #2563eb;
}

.hbc-nf-sidebar-item-btn {
	font-size: 13px;
	color: #2563eb;
	text-decoration: none;
	transition: color 0.3s ease;
}

.hbc-nf-sidebar-item-btn:hover {
	color: #1d4ed8;
}

.hbc-nf-sidebar-item-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.hbc-nf-sidebar-btn-icon {
	display: inline-flex;
	align-items: center;
}

.hbc-nf-sidebar-btn-icon svg {
	width: 14px;
	height: 14px;
}

.hbc-nf-sidebar-empty {
	text-align: center;
	color: #999;
	font-size: 14px;
	padding: 20px 0;
}

/* Responsive */
@media (max-width: 1024px) {
	.hbc-news-filter-widget.has-sidebar .hbc-nf-main {
		flex: 0 0 70%;
		max-width: 70%;
	}

	.hbc-news-filter-widget.has-sidebar .hbc-nf-sidebar {
		flex: 0 0 calc(30% - 30px);
		max-width: calc(30% - 30px);
	}
}

@media (max-width: 768px) {
	.hbc-nf-filters {
		flex-direction: column;
	}

	.hbc-nf-dropdown {
		width: 100%;
	}

	.hbc-nf-search {
		width: 100%;
	}

	.hbc-nf-card {
		flex-direction: column;
	}

	.hbc-nf-card-image {
		flex: none;
		max-width: 100%;
		height: 200px;
	}

	.hbc-nf-card-content {
		flex: none;
		max-width: 100%;
		padding: 20px;
	}

	.hbc-nf-content-wrapper {
		flex-direction: column;
	}

	.hbc-news-filter-widget.has-sidebar .hbc-nf-main,
	.hbc-news-filter-widget.has-sidebar .hbc-nf-sidebar {
		flex: none;
		max-width: 100%;
	}

	.hbc-nf-sidebar {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.hbc-nf-sidebar-block {
		flex: 1;
		min-width: 280px;
	}

	/* 手机端隐藏侧边栏 */
	.hbc-nf-sidebar.hide-on-mobile {
		display: none !important;
	}

	/* 手机端主内容全宽居中 */
	.hbc-news-filter-widget.has-sidebar .hbc-nf-main {
		flex: 0 0 100% !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	.hbc-nf-cards {
		justify-content: center;
	}

	.hbc-nf-card {
		width: 100%;
		max-width: 100%;
	}
}
