/* ============================================================
   Pixi Theme Builder Kit — Blog Post Grid
   v1.1.0 | Grid, List layouts, Number Pagination, Video support
   ============================================================ */

/* ── Grid wrapper ──────────────────────────────────────────── */
.ebw-blog.ebw-grid {
	--ebw-gap: 24px;
}

/* ── Card base ─────────────────────────────────────────────── */
.ebw-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	transition: box-shadow .25s ease, transform .25s ease;
}
.ebw-card:hover {
	box-shadow: 0 8px 28px rgba(0,0,0,.10);
	transform: translateY(-3px);
}

/* ── Thumbnail (grid) ──────────────────────────────────────── */
.ebw-card__thumb {
	position: relative;
	overflow: hidden;
	transition: border-radius .25s ease;
}
.ebw-card__thumb img {
	width: 100%;
	height: 220px;
	display: block;
	object-fit: cover;
	transition: transform .35s ease, border-radius .25s ease;
}
.ebw-card:hover .ebw-card__thumb img {
	transform: scale(1.04);
}

/* ── Video play overlay ────────────────────────────────────── */
.ebw-card__thumb,
.ebw-list-item__thumb {
	position: relative;
}
.ebw-video-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: rgba(0,0,0,.65);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	pointer-events: none;
	transition: transform .2s ease, background .2s ease;
}
.ebw-card:hover .ebw-video-play {
	transform: scale(1.12);
	background: rgba(0,0,0,.80);
}

/* ── Category badge (on image) ─────────────────────────────── */
.ebw-card__cat-wrap {
	position: absolute;
	top: 12px;
	left: 12px;
}
.ebw-card__cat {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 4px;
	background-color: #4f46e5;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s ease;
}
.ebw-card__cat:hover {
	background-color: #4338ca;
	color: #fff;
}

/* ── Body ──────────────────────────────────────────────────── */
.ebw-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 20px;
}

/* ── Meta ──────────────────────────────────────────────────── */
.ebw-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
	font-size: 13px;
	color: #6b7280;
}
.ebw-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.ebw-card__meta a { color: inherit; text-decoration: none; }
.ebw-card__meta a:hover { color: #4f46e5; }
.ebw-card__meta i { font-size: 13px; }

/* ── Title ─────────────────────────────────────────────────── */
.ebw-card__title {
	margin: 0 0 10px;
	font-size: 18px;
	line-height: 1.4;
}
.ebw-card__title a { color: inherit; text-decoration: none; }
.ebw-card__title a:hover { color: #4f46e5; }

/* ── Excerpt ───────────────────────────────────────────────── */
.ebw-card__excerpt {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.65;
	color: #6b7280;
}

/* ── Button ────────────────────────────────────────────────── */
.ebw-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding: 9px 22px;
	border-radius: 6px;
	background-color: #4f46e5;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border: 2px solid #4f46e5;
	transition: all .25s ease;
	align-self: flex-start;
}
.ebw-card__btn:hover {
	background-color: #4338ca;
	border-color: #4338ca;
	color: #fff;
}
.ebw-card__btn-icon { display: inline-flex; align-items: center; }

/* ============================================================
   LIST LAYOUTS
   ============================================================ */

.ebw-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ── List item base ────────────────────────────────────────── */
.ebw-list-item {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	border-radius: 8px;
	transform: none; /* disable grid card lift */
}
.ebw-list-item:hover { transform: none; }
.ebw-list-item:hover .ebw-list-item__thumb img { transform: scale(1.04); }

/* List thumbnail */
.ebw-list-item__thumb {
	width: 180px;
	min-width: 180px;
	overflow: hidden;
	flex-shrink: 0;
	position: relative;
	transition: border-radius .25s ease;
}
.ebw-list-item__thumb img {
	width: 100%;
	height: 100%;
	min-height: 160px;
	object-fit: cover;
	display: block;
	transition: transform .35s ease, border-radius .25s ease;
}

/* Image on the right */
.ebw-list-item--reverse {
	flex-direction: row-reverse;
}

/* ── List variant: No Image ────────────────────────────────── */
.ebw-list--list-no-image .ebw-list-item {
	border-left: 4px solid #4f46e5;
	border-radius: 0 8px 8px 0;
}
.ebw-list--list-no-image .ebw-card__body {
	padding: 16px 20px;
}

/* ── List variant: Compact (numbered) ─────────────────────── */
.ebw-list--list-compact .ebw-list-item {
	align-items: center;
	border-radius: 8px;
}
.ebw-list-item__counter {
	font-size: 32px;
	font-weight: 800;
	color: #e5e7eb;
	line-height: 1;
	min-width: 56px;
	text-align: center;
	flex-shrink: 0;
	padding: 0 4px 0 16px;
	transition: color .2s ease;
}
.ebw-list-item:hover .ebw-list-item__counter { color: #4f46e5; }
.ebw-list--list-compact .ebw-card__body { padding: 14px 16px 14px 12px; }
.ebw-list--list-compact .ebw-card__excerpt { display: none; }
.ebw-list--list-compact .ebw-card__btn { display: none; }

/* Mobile: stack list items */
@media (max-width: 575px) {
	.ebw-list-item,
	.ebw-list-item--reverse {
		flex-direction: column;
	}
	.ebw-list-item__thumb {
		width: 100%;
		min-width: 0;
	}
	.ebw-list-item__thumb img {
		height: 200px;
	}
	.ebw-list-item__counter {
		min-width: 0;
		padding: 12px 16px 0;
	}
}

/* ============================================================
   NUMBER PAGINATION
   ============================================================ */

.ebw-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 36px;
}

.ebw-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #374151;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.ebw-page-btn:hover:not(.is-active) {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #111827;
}
.ebw-page-btn.is-active {
	background: #4f46e5;
	border-color: #4f46e5;
	color: #fff;
	cursor: default;
}
.ebw-page-prev,
.ebw-page-next {
	font-size: 16px;
	font-weight: 700;
}
.ebw-page-dots {
	padding: 0 4px;
	color: #9ca3af;
	font-size: 14px;
	align-self: center;
	user-select: none;
}
