/* =====================================================
   Baijia Posts List Widget — Card Grid Layout
   ===================================================== */

/* ── Section wrapper ── */
.bjpl-section {
	width: 100%;
}

/* ── Grid container ── */
.bjpl-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr); /* overridden by Elementor responsive control */
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ── Card item ── */
.bjpl-item {
	display: flex;
	flex-direction: column;  /* image top, body below */
	background: #ffffff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.bjpl-item:hover {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

/* ── Thumbnail (full card width) ── */
.bjpl-img-wrap {
	width: 100%;
	overflow: hidden;
	flex-shrink: 0;
}

.bjpl-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.bjpl-item:hover .bjpl-img {
	transform: scale(1.04);
}

/* ── Body ── */
.bjpl-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	min-width: 0;
}

/* ── Category badge ── */
.bjpl-cat {
	display: inline-block;
	align-self: flex-start;
	background: #eeeeee;
	color: #555555;
	font-size: 11px;
	font-weight: 500;
	padding: 3px 8px;
	border-radius: 4px;
	line-height: 1.5;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bjpl-cat a {
	color: inherit;
	text-decoration: none;
}

/* ── Title ── */
.bjpl-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
}

.bjpl-title a {
	color: #111111;
	text-decoration: none;
	transition: color 0.2s ease;
}

.bjpl-title a:hover {
	color: #555555;
}

/* ── Excerpt ── */
.bjpl-excerpt {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: #666666;
}

/* ── Meta / Date ── */
.bjpl-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: #999999;
	margin-top: auto;
	padding-top: 8px;
}

.bjpl-date {
	font-size: 12px;
	color: #999999;
}

/* ══════════════════════════════════════════
   Pagination
   ══════════════════════════════════════════ */
.bjpl-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 40px;
}

.bjpl-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: inherit;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bjpl-pagination ul.page-numbers li {
	margin: 0;
	padding: 0;
}

.bjpl-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 6px;
	border: 1px solid #dddddd;
	border-radius: 6px;
	color: #333333;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	box-sizing: border-box;
}

.bjpl-pagination .page-numbers:hover:not(.current):not(.dots) {
	background-color: #f5f5f5;
	border-color: #aaaaaa;
}

.bjpl-pagination .page-numbers.current {
	background-color: #111111;
	border-color: #111111;
	color: #ffffff;
	cursor: default;
}

.bjpl-pagination .page-numbers.dots {
	border: none;
	background: none;
	cursor: default;
	letter-spacing: 1px;
}

/* ══════════════════════════════════════════
   Responsive — high-specificity to beat Elementor
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
	.elementor-widget-baijia-posts-list .bjpl-list,
	.bjpl-list {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 767px) {
	.elementor-widget-baijia-posts-list .bjpl-list,
	.bjpl-list {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}

	.bjpl-img {
		height: 180px !important;
	}

	.bjpl-title {
		font-size: 15px;
	}
}

@media (max-width: 480px) {
	.bjpl-img {
		height: 160px !important;
	}

	.bjpl-body {
		padding: 12px;
	}

	.bjpl-title {
		font-size: 14px;
	}
}
