/* Blog Post Grid for Elementor — Frontend Styles */

.bpge-widget * { box-sizing: border-box; }

/* ---------- Grid layout ---------- */
.bpge-grid {
	--bpge-columns: 3;
	--bpge-col-gap: 24px;
	--bpge-row-gap: 24px;
	display: grid;
	grid-template-columns: repeat(var(--bpge-columns), 1fr);
	column-gap: var(--bpge-col-gap);
	row-gap: var(--bpge-row-gap);
}

/* ---------- Card ---------- */
.bpge-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	height: 100%;
}

.bpge-card__image-wrap {
	position: relative;
	display: block;
	overflow: hidden;
	height: 220px;
	background: #eee;
}

.bpge-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease, filter 0.4s ease;
}

.bpge-card__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.bpge-card__category {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
	color: #6b6b6b;
}

.bpge-card__title {
	margin: 0 0 10px;
	font-size: 20px;
	line-height: 1.3;
}

.bpge-card__title a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
}

.bpge-card__meta {
	font-size: 13px;
	color: #888;
	margin-bottom: 10px;
}

.bpge-card__meta-sep { margin: 0 6px; }

.bpge-card__excerpt {
	font-size: 15px;
	line-height: 1.6;
	color: #555;
	margin-bottom: 14px;
	flex-grow: 1;
}

.bpge-card__readmore {
	display: inline-block;
	align-self: flex-start;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	background-color: #222;
	padding: 10px 20px;
	border-radius: 4px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.bpge-no-posts { grid-column: 1 / -1; text-align: center; opacity: 0.7; }

/* ---------- Image style variants ---------- */

/* Rounded corners */
.bpge-card--rounded .bpge-card__image-wrap { border-radius: 12px; }

/* Circle */
.bpge-card--circle .bpge-card__image-wrap {
	width: 140px;
	height: 140px !important;
	border-radius: 50%;
	margin: 0 auto 16px;
}

/* Hover zoom */
.bpge-card--hover-zoom .bpge-card__image-wrap { overflow: hidden; }
.bpge-card--hover-zoom:hover .bpge-card__image { transform: scale(1.08); }

/* Grayscale -> color on hover */
.bpge-card--grayscale .bpge-card__image { filter: grayscale(100%); }
.bpge-card--grayscale:hover .bpge-card__image { filter: grayscale(0%); }

/* Text overlay */
.bpge-card--overlay .bpge-card__image-wrap { height: 320px; }
.bpge-card--overlay .bpge-card__overlay-gradient {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 70%);
}
.bpge-card--overlay .bpge-card__overlay-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px;
	z-index: 2;
}
.bpge-card--overlay .bpge-card__overlay-content .bpge-card__category,
.bpge-card--overlay .bpge-card__overlay-content .bpge-card__title,
.bpge-card--overlay .bpge-card__overlay-content .bpge-card__title a {
	color: #fff;
}
.bpge-card--overlay .bpge-card__overlay-content .bpge-card__title { margin-bottom: 0; }

/* ---------- Carousel ---------- */
.bpge-carousel {
	position: relative;
}

.bpge-carousel-viewport {
	overflow: hidden;
	width: 100%;
}

.bpge-carousel-track {
	--bpge-col-gap: 24px;
	display: flex;
	will-change: transform;
	transition: transform 0.45s ease;
}

.bpge-carousel-track .bpge-card {
	flex: 0 0 calc((100% - (var(--bpge-slides, 3) - 1) * var(--bpge-col-gap)) / var(--bpge-slides, 3));
	margin-right: var(--bpge-col-gap);
}

.bpge-carousel-track .bpge-card:last-child { margin-right: 0; }

.bpge-arrow {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(0,0,0,0.6);
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	transition: background-color 0.2s ease;
}

.bpge-arrow--prev { left: -20px; }
.bpge-arrow--next { right: -20px; }
.bpge-arrow:hover { background: rgba(0,0,0,0.85); }

.bpge-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.bpge-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #ccc;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.bpge-dot.is-active { background: #222; transform: scale(1.2); }

/* ---------- Pagination ---------- */
.bpge-pagination-wrap {
	margin-top: 32px;
	text-align: center;
}

.bpge-pagination {
	display: inline-flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

.bpge-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	background: #f1f1f1;
	font-size: 14px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.bpge-page-link.is-active,
.bpge-page-link:hover {
	background-color: #222;
	color: #fff;
}

.bpge-load-more {
	display: inline-block;
	border: none;
	cursor: pointer;
	padding: 12px 30px;
	border-radius: 4px;
	background: #222;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	transition: opacity 0.2s ease;
}

.bpge-load-more[disabled] { opacity: 0.6; cursor: default; }

.bpge-infinite-loading,
.bpge-end-message {
	font-size: 14px;
	opacity: 0.7;
}

.bpge-infinite-sentinel { height: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.bpge-arrow--prev { left: 6px; }
	.bpge-arrow--next { right: 6px; }
}

@media (max-width: 767px) {
	.bpge-grid { --bpge-columns: 1; }
	.bpge-card--overlay .bpge-card__image-wrap { height: 260px; }
}
