/* ═══════════════════════════════════════
   Onloi Blog Grid Widget
   Brand: #24135f (purple) · #79BE20 (green)
   ═══════════════════════════════════════ */

.obg-wrapper {
	--obg-accent: #24135f;
	--obg-green: #79BE20;
	--obg-radius: 12px;
	--obg-gap: 24px;
	font-family: inherit;
}

/* ── Filters ── */
.obg-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 32px;
	justify-content: center;
}

.obg-filter-btn {
	padding: 9px 22px;
	border: 2px solid #ddd;
	border-radius: 999px;
	background: transparent;
	color: #444;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all .25s ease;
	line-height: 1.4;
}
.obg-filter-btn:hover {
	border-color: var(--obg-accent);
	color: var(--obg-accent);
}
.obg-filter-btn.active {
	background: var(--obg-accent);
	border-color: var(--obg-accent);
	color: #fff;
}

/* ── Grid ── */
.obg-grid {
	display: grid;
	gap: var(--obg-gap);
}
.obg-col-2 { grid-template-columns: repeat(2, 1fr); }
.obg-col-3 { grid-template-columns: repeat(3, 1fr); }
.obg-col-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Card ── */
.obg-card {
	background: #fff;
	border-radius: var(--obg-radius);
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,.07);
	transition: transform .3s ease, box-shadow .3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.obg-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

/* ── Thumbnail ── */
.obg-thumb-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16/10;
}
.obg-thumb-link {
	display: block;
	width: 100%;
	height: 100%;
}
.obg-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.obg-card:hover .obg-thumb {
	transform: scale(1.05);
}

/* ── Category Badges ── */
.obg-cat-badges {
	position: absolute;
	bottom: 12px;
	left: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.obg-cat-badge {
	display: inline-block;
	padding: 4px 12px;
	background: var(--obg-green);
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
	border-radius: 999px;
	text-decoration: none;
	line-height: 1.4;
	transition: opacity .2s;
}
.obg-cat-badge:hover {
	opacity: .85;
	color: #fff;
}

/* ── Body ── */
.obg-body {
	padding: 20px 22px 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.obg-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.45;
	margin: 0 0 10px;
}
.obg-title a {
	color: #1a1a2e;
	text-decoration: none;
	transition: color .2s;
}
.obg-title a:hover {
	color: var(--obg-accent);
}

.obg-excerpt {
	color: #555;
	font-size: 14px;
	line-height: 1.7;
	margin: 0 0 16px;
	flex: 1;
}

/* ── Read More ── */
.obg-footer {
	margin-top: auto;
}
.obg-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--obg-accent);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: gap .25s ease;
}
.obg-btn:hover {
	gap: 10px;
	color: var(--obg-accent);
}
.obg-btn svg {
	flex-shrink: 0;
	transition: transform .25s ease;
}
.obg-btn:hover svg {
	transform: translateX(3px);
}

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

.obg-page-link,
a.obg-page-link,
span.obg-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 2px solid #ddd;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #444;
	text-decoration: none;
	transition: all .25s ease;
	background: #fff;
	line-height: 1;
}
a.obg-page-link:hover {
	border-color: var(--obg-accent);
	color: var(--obg-accent);
}
span.obg-page-link.current {
	background: var(--obg-accent);
	border-color: var(--obg-accent);
	color: #fff;
}
.obg-page-link.dots {
	border: none;
	background: none;
	cursor: default;
}
.obg-page-link.prev,
.obg-page-link.next {
	border: none;
	background: none;
	padding: 0 6px;
}
a.obg-page-link.prev:hover,
a.obg-page-link.next:hover {
	color: var(--obg-accent);
}

/* ── Item filter animation ── */
.obg-item {
	transition: opacity .3s ease, transform .3s ease;
}
.obg-item.obg-hidden {
	display: none;
}

/* ── Empty ── */
.obg-empty {
	text-align: center;
	color: #888;
	font-size: 15px;
	padding: 40px 20px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
	.obg-col-3,
	.obg-col-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.obg-col-2,
	.obg-col-3,
	.obg-col-4 {
		grid-template-columns: 1fr;
	}
	.obg-filters {
		gap: 8px;
	}
	.obg-filter-btn {
		padding: 7px 16px;
		font-size: 13px;
	}
	.obg-body {
		padding: 16px 18px 18px;
	}
	.obg-title {
		font-size: 15.5px;
	}
}
