/* ==========================================================================
   Elementor Pro Lite — Posts Widget
   ========================================================================== */

.epl-posts {
	width: 100%;
	box-sizing: border-box;
}

.epl-posts *,
.epl-posts *::before,
.epl-posts *::after {
	box-sizing: border-box;
}

/* Grid — isolate from theme .post / article rules */
.epl-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.epl-posts__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-width: 100%;
	width: auto;
	margin: 0;
	padding: 0;
	float: none;
	position: relative;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.epl-posts--skin-classic .epl-posts__item {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

.epl-posts--skin-cards .epl-posts__item:hover {
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
	transform: translateY(-2px);
}

/* Horizontal image layout (left / right) */
.epl-posts__inner {
	display: flex;
	flex: 1;
	min-width: 0;
	width: 100%;
}

.epl-posts--img-left .epl-posts__inner {
	flex-direction: row;
}

.epl-posts--img-right .epl-posts__inner {
	flex-direction: row-reverse;
}

.epl-posts--img-left .epl-posts__thumb,
.epl-posts--img-right .epl-posts__thumb {
	flex: 0 0 40%;
	max-width: 40%;
	margin-bottom: 0;
}

.epl-posts--img-left .epl-posts__body,
.epl-posts--img-right .epl-posts__body {
	flex: 1;
	min-width: 0;
}

/* Featured image */
.epl-posts__thumb {
	display: block;
	position: relative;
	overflow: hidden;
	line-height: 0;
	margin-bottom: 0;
	text-decoration: none;
	flex-shrink: 0;
}

.epl-posts--img-top .epl-posts__thumb {
	margin-bottom: 0;
}

.epl-posts__thumb-inner {
	display: block;
	width: 100%;
	overflow: hidden;
	background: #f1f5f9;
}

/* Aspect ratios */
.epl-posts--ratio-1-1 .epl-posts__thumb-inner {
	aspect-ratio: 1 / 1;
}

.epl-posts--ratio-4-3 .epl-posts__thumb-inner {
	aspect-ratio: 4 / 3;
}

.epl-posts--ratio-16-9 .epl-posts__thumb-inner {
	aspect-ratio: 16 / 9;
}

.epl-posts--ratio-3-2 .epl-posts__thumb-inner {
	aspect-ratio: 3 / 2;
}

.epl-posts--ratio-1-1 .epl-posts__img,
.epl-posts--ratio-4-3 .epl-posts__img,
.epl-posts--ratio-16-9 .epl-posts__img,
.epl-posts--ratio-3-2 .epl-posts__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.epl-posts__img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.epl-posts__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 180px;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.epl-posts--ratio-16-9 .epl-posts__placeholder {
	min-height: 0;
}

/* Image hover */
.epl-posts--hover-zoom-in .epl-posts__thumb:hover .epl-posts__img {
	transform: scale(1.06);
}

/* Category badge */
.epl-posts__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-block;
	padding: 4px 10px;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fff;
	background: #2563eb;
	border-radius: 4px;
	pointer-events: none;
}

/* Body */
.epl-posts__body {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	flex: 1;
	padding: 1.25rem;
	min-width: 0;
}

.epl-posts--skin-classic .epl-posts__body {
	padding: 1rem 0 0;
}

/* Meta */
.epl-posts__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0 0 0.25rem;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #94a3b8;
}

.epl-posts__meta-item {
	display: inline;
}

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

.epl-posts__meta a:hover {
	color: #2563eb;
}

.epl-posts__meta-sep {
	opacity: 0.5;
	user-select: none;
}

/* Title */
.epl-posts__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
}

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

.epl-posts__title a:hover {
	text-decoration: none;
}

/* Excerpt */
.epl-posts__excerpt {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #64748b;
}

.epl-posts__excerpt p {
	margin: 0;
}

/* Read more */
.epl-posts__more {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	margin-top: auto;
	padding: 0;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: #2563eb;
	text-decoration: none;
	background: transparent;
	border: none;
	transition: color 0.2s ease, background 0.2s ease;
}

.epl-posts__more:hover {
	color: #1d4ed8;
	text-decoration: none;
}

.epl-posts--skin-cards .epl-posts__more {
	margin-top: 0.5rem;
}

/* Empty state */
.epl-posts__empty {
	margin: 0;
	padding: 1.25rem;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	font-size: 0.875rem;
	color: #64748b;
	text-align: center;
}

/* Pagination — fix vertical list bug from paginate_links type=list */
.epl-posts__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	margin-top: 2rem;
	padding: 0;
	width: 100%;
}

.epl-posts__pagination ul.page-numbers,
.epl-posts__pagination .page-numbers {
	list-style: none;
	margin: 0;
	padding: 0;
}

.epl-posts__pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: inherit;
	gap: 0.375rem;
	width: 100%;
}

.epl-posts__pagination ul.page-numbers li {
	display: inline-flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.epl-posts__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.625rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	color: #475569;
	text-decoration: none;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.epl-posts__pagination .page-numbers:hover {
	color: #2563eb;
	border-color: #2563eb;
	background: #eff6ff;
}

.epl-posts__pagination .page-numbers.current {
	color: #fff;
	background: #2563eb;
	border-color: #2563eb;
	cursor: default;
}

.epl-posts__pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: auto;
}

/* Load more */
.epl-posts__load-more-wrap {
	margin-top: 2rem;
	width: 100%;
	text-align: center;
}

.epl-posts__load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	padding: 0.75rem 1.75rem;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	color: #fff;
	background: #2563eb;
	border: 1px solid #2563eb;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.epl-posts__load-more:hover:not(:disabled) {
	background: #1d4ed8;
	border-color: #1d4ed8;
}

.epl-posts__load-more:disabled,
.epl-posts__load-more.is-loading {
	opacity: 0.65;
	cursor: wait;
}

/* Responsive — horizontal image stacks on mobile */
@media (max-width: 767px) {
	.epl-posts--img-left .epl-posts__inner,
	.epl-posts--img-right .epl-posts__inner {
		flex-direction: column;
	}

	.epl-posts--img-left .epl-posts__thumb,
	.epl-posts--img-right .epl-posts__thumb {
		flex: none;
		max-width: 100%;
		width: 100%;
	}
}
