.eb-post-grid-wrapper {
	z-index: 1;

	.eb-loadmore-no-post {
		display: none;
	}

	a,
	a.ebpg-grid-post-link,
	.ebpg-posted-by a {
		text-decoration: none;
		transition: all 0.3s ease-in-out;
	}

	.ebpg-grid-post-holder {
		a.ebpg-post-link-wrapper {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			z-index: 99;
		}
	}

	.ebpg-entry-thumbnail {
		position: relative;
		line-height: 0;

		img {
			width: 100%;
			object-fit: cover;
		}

		&:after {
			content: "";
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			height: 100%;
			opacity: 0;
			visibility: hidden;
			transition: all 0.5s ease-in-out;
		}

		&:hover:after {
			visibility: visible;
			opacity: 1;
		}
	}

	.ebpg-entry-wrapper {
		display: flex;
		flex-direction: column;
	}

	.ebpg-entry-content {
		display: flex;
		flex-direction: column;
	}

	.ebpg-entry-meta {
		display: flex;
		align-items: center;

		.ebpg-entry-meta-items {
			display: flex;
			align-items: center;
			flex-wrap: wrap;
		}
	}

	.ebpg-author-avatar a {
		display: block;

		img {
			height: 50px;
			width: 50px;
			max-height: 50px;
			max-width: 50px;
			object-fit: cover;
		}
	}

	.ebpg-meta a {
		padding: 2px 5px;
		border-radius: 3px;
		margin-right: 5px;
		margin-bottom: 5px;
		display: inline-block;
		text-decoration: none;
	}

	.ebpg-meta.ebpg-dynamic-values {
		padding: 2px 5px;
		border-radius: 3px;
		margin-right: 5px;
		margin-bottom: 5px;
		display: inline-block;
		text-decoration: none;
	}

	.ebpg-read-time i {
		margin-right: 5px;
	}

	.ebpg-post-grid-column {
		overflow: hidden;
		z-index: 1;
	}

	.ebpg-readmore-btn {
		a {
			display: inline-flex;
			justify-content: center;
			align-items: center;
		}
	}

	&.style-4 {
		.ebpg-grid-post-holder {
			display: flex;
			gap: 10px;

			.ebpg-entry-media {
				width: 40%;
			}

			.ebpg-entry-wrapper {
				width: 60%;
				display: flex;
				flex-flow: column;

				.ebpg-entry-meta.ebpg-header-meta {
					order: 1;
				}

				.ebpg-entry-header {
					order: 2;
				}

				.ebpg-entry-content {
					order: 3;
				}

				.ebpg-entry-meta.ebpg-footer-meta {
					order: 4;
				}

				.ebpg-author-avatar a {
					line-height: 1;
					max-height: 25px;

					img {
						height: 25px;
						width: 25px;
						max-height: 100%;
						max-width: 100%;
					}
				}
			}
		}
	}

	&.style-5 {
		.ebpg-grid-post-holder {
			position: relative;

			.ebpg-entry-wrapper {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				display: flex;
				flex-flow: column;

				.ebpg-entry-meta {
					z-index: 999;
					line-height: 1;
				}
			}

			.ebpg-entry-thumbnail:after {
				visibility: visible;
				opacity: 1;
			}

			&:hover .ebpg-entry-thumbnail:after {
				visibility: visible;
				opacity: 1;
			}
		}
	}

	.ebpg-pagination {
		grid-column: 1/-1;

		button:disabled {
			opacity: 0.5;
			background-color: #e8e8e8;
			color: #333;

			&:hover {
				cursor: unset;
				background-color: #e8e8e8;
				color: #333;
			}
		}

		&.prev-next-btn {

			.ebpg-pagination-item,
			.ebpg-pagination-item-separator {
				display: none !important;
			}
		}

		.show {
			display: inline-block;
		}

		.hide {
			display: none;
		}

		.ebpg-pagination-item-separator {
			// background-color: transparent !important;
			border: none !important;
		}
	}


	// featured post
	&.has-featured-post {
		&.style-4 {
			display: flex;
			flex-direction: column;

			.ebpg-grid-post-holder .ebpg-entry-media,
			.ebpg-grid-post-holder .ebpg-entry-wrapper {
				width: 100% !important;
			}
		}

		.ebpg-featured-post-wrapper {
			.ebpg-grid-post-holder {
				position: relative;
			}

			.ebpg-entry-wrapper {
				position: absolute;
				top: auto;
				bottom: 0;
				left: 0;
				width: 100%;
				padding: 15px;
				line-height: 1.5;
				z-index: 1;
				box-sizing: border-box;
				display: flex;
				flex-direction: column;
				gap: 10px;

				.ebpg-grid-post-link {
					display: block;
				}
			}

			.ebpg-entry-thumbnail {
				margin: 0 !important;

				&:hover:after {
					visibility: visible;
					opacity: 1;
					background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.32) 39.66%, rgba(0, 0, 0, 0.8) 100%);
				}

				&:after {
					visibility: visible;
					opacity: 1;
					background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.32) 39.66%, rgba(0, 0, 0, 0.8) 100%);
				}

				img {
					// height: auto !important;
				}
			}

			.ebpg-entry-title {
				margin: 0;

				a {
					display: inline-block;
				}
			}

			.ebpg-grid-post-excerpt p {
				margin: 0;
			}

			.ebpg-entry-meta {
				margin: 0;

				.ebpg-author-avatar a {
					background: transparent;
					display: flex;

					img {
						width: 30px;
						height: 30px;
					}
				}

				.ebpg-posted-by a {
					background: transparent;
				}
			}

			// .featured-post-content-wrapper {
			// 	position: absolute;
			// 	top: auto;
			// 	bottom: 0;
			// 	left: 0;
			// 	width: 100%;
			// 	padding: 15px;
			// 	line-height: 1.5;
			// 	z-index: 1;
			// 	box-sizing: border-box;
			// 	display: flex;
			// 	flex-direction: column;
			// }
		}


	}
}

.eb-post-grid-category-filter {
	grid-column: 1 / -1;
	width: 100%;
	margin-bottom: 20px;

	.ebpg-category-filter-list {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		justify-content: center;

		li {
			width: auto;
			padding: 10px 20px;
			border-radius: 3px;
			transition: all 0.3s ease-in-out;

			&.active {
				background-color: #d18df1;
				color: #fff;
			}

			&:hover {
				cursor: pointer;
				background-color: #d18df1;
				color: #fff;
			}
		}
	}
}

// Spinner/Loader Styles
.ebpg-loading-spinner {
	&.ebpg-spinner-overlay {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: rgba(255, 255, 255, 0.8);
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 999;
		border-radius: inherit;
	}

	&.ebpg-spinner-inline {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 20px;
	}

	.ebpg-spinner-wrapper {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 10px;
	}

	.ebpg-spinner {
		width: 40px;
		height: 40px;
		border: 4px solid #f3f3f3;
		border-top: 4px solid #2673ff;
		border-radius: 50%;
		animation: ebpg-spin 1s linear infinite;
	}

	.ebpg-loading-text {
		font-size: 14px;
		color: #666;
		font-weight: 500;
	}
}

// Button spinner styles
.ebpg-pagination-button,
.ebpg-pagination-item,
.ebpg-pagination-item-previous,
.ebpg-pagination-item-next {
	&.ebpg-loading {
		position: relative;
		pointer-events: none;

		.ebpg-button-spinner {
			display: inline-flex;
			align-items: center;
			margin-right: 8px;

			.ebpg-button-spinner-icon {
				width: 16px;
				height: 16px;
				border: 2px solid transparent;
				border-top: 2px solid currentColor;
				border-radius: 50%;
				animation: ebpg-spin 1s linear infinite;
			}
		}
	}
}

// Keyframe animation for spinner
@keyframes ebpg-spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}