/* Blog Posts Grid — Styles */

.bpg-wrapper {
	--bpg-cols: 3;
	--bpg-gap: 28px;
	width: 100%;
}

/* Hard reset for every link inside this widget. Themes commonly set global
   `a { text-decoration: underline; }`, custom `a:hover` colors, or focus
   outlines — those were bleeding into our cards (underlines under the
   title/Read More, odd hover colors). Resetting everything here first,
   then re-applying only what we want, guarantees a consistent look
   regardless of the active theme. */
.bpg-wrapper a,
.bpg-wrapper a:hover,
.bpg-wrapper a:focus,
.bpg-wrapper a:active,
.bpg-wrapper a:visited {
	text-decoration: none !important;
	outline: none !important;
	box-shadow: none !important;
	border-bottom: none !important;
	-webkit-tap-highlight-color: transparent;
}

.bpg-empty-state {
	padding: 60px 20px;
	text-align: center;
	color: #9a9186;
	font-size: 14px;
	border: 1px dashed #444;
}

.bpg-grid {
	display: grid;
	grid-template-columns: repeat(var(--bpg-cols), 1fr);
	gap: var(--bpg-gap);
}

.bpg-card {
	position: relative;
	background-color: #1e2129;
	border: 1px solid #2e323d;
	border-radius: 10px;
	overflow: hidden;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
	display: flex;
	flex-direction: column;
}

.bpg-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 24px 48px -14px rgba(0, 0, 0, 0.4);
	z-index: 2;
}

.bpg-image-link {
	display: block;
}

/* Padded "frame" around the image so it never touches the card's edges and
   never gets harshly cropped flush against the corners. */
.bpg-image-frame {
	padding: 14px 14px 0 14px;
	box-sizing: border-box;
}

.bpg-image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16/10;
	overflow: hidden;
	background-color: #2a2e38;
	border-radius: 8px;
}

.bpg-image,
.bpg-image-placeholder {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
	margin: 0;
	border-radius: 0;
}

.bpg-card:hover .bpg-image {
	transform: scale(1.08);
}

.bpg-image-placeholder {
	background: repeating-linear-gradient(45deg, #2a2e38, #2a2e38 10px, #23262e 10px, #23262e 20px);
}

.bpg-badge {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 1;
	background-color: #f5b524;
	color: #1a1d24;
	font-size: 14px;
	font-weight: 700;
	padding: 10px 18px;
	border-radius: 6px;
	white-space: nowrap;
	line-height: 1;
}

.bpg-card-body {
	padding: 22px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.bpg-title-link {
	display: block;
}

.bpg-title {
	font-size: 20px;
	font-weight: 600;
	color: #ffffff !important;
	margin: 0 0 12px 0;
	line-height: 1.35;
	transition: color 0.3s ease;
}

.bpg-card:hover .bpg-title {
	color: #f5b524 !important;
}

.bpg-excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: #a9adb8;
	margin: 0 0 16px 0;
}

.bpg-divider {
	display: block;
	height: 1px;
	background-color: #34394a;
	margin: 8px 0 18px 0;
}

.bpg-footer-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 16px;
	margin-top: auto;
}

.bpg-comments {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	white-space: nowrap;
}

.bpg-comments svg {
	flex-shrink: 0;
}

.bpg-footer-sep {
	display: inline-block;
	width: 1px;
	height: 18px;
	background-color: #3a3f4d;
	flex-shrink: 0;
}

.bpg-read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #5bc0de !important;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	transition: color 0.3s ease;
	margin-left: auto;
}

.bpg-read-more:hover {
	color: #f5b524 !important;
}

.bpg-arrow {
	display: inline-block;
	transition: transform 0.3s ease;
}

.bpg-read-more:hover .bpg-arrow {
	transform: translateX(4px);
}

/* Entrance animation */
.bpg-wrapper[data-entrance="true"] .bpg-card {
	opacity: 0;
}

.bpg-wrapper[data-entrance="true"] .bpg-card.bpg-in-view {
	animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
	animation-fill-mode: forwards;
	animation-name: bpgFadeUp;
}

.bpg-wrapper[data-entrance-type="zoom-in"] .bpg-card.bpg-in-view {
	animation-name: bpgZoomIn;
}

.bpg-wrapper[data-entrance-type="fade"] .bpg-card.bpg-in-view {
	animation-name: bpgFade;
}

@keyframes bpgFadeUp {
	from { opacity: 0; transform: translateY(30px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes bpgZoomIn {
	from { opacity: 0; transform: scale(0.92); }
	to   { opacity: 1; transform: scale(1); }
}

@keyframes bpgFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Responsive */
@media (max-width: 991px) {
	.bpg-wrapper { --bpg-cols: 2; }
}

@media (max-width: 600px) {
	.bpg-wrapper { --bpg-cols: 1; }
	.bpg-footer-row { flex-wrap: wrap; }
	.bpg-read-more { margin-left: 0; }
}
