/* Modern Elementor Addons — frontend styles */

/* ============================================================
   Filterable Posts Widget
   ============================================================ */

/* Filter Tabs
   ------------------------------------------------------------ */
.mea-filterable-posts .mea-filter-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
	justify-content: safe flex-start;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.mea-filterable-posts .mea-filter-tabs::-webkit-scrollbar {
	display: none;
}

.mea-filterable-posts .mea-filter-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 20px;
	border: none;
	border-radius: 50px;
	background-color: transparent;
	color: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.mea-filterable-posts .mea-filter-tab:hover {
	opacity: 0.85;
}

.mea-filterable-posts .mea-filter-tab.is-active {
	background-color: #2e7d32;
	color: #ffffff;
}

/* Posts Grid
   ------------------------------------------------------------ */
.mea-filterable-posts .mea-posts-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/* Post Card
   ------------------------------------------------------------ */
.mea-filterable-posts .mea-post-card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mea-filterable-posts .mea-post-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Thumbnail
   ------------------------------------------------------------ */
.mea-filterable-posts .mea-post-thumbnail {
	position: relative;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.mea-filterable-posts .mea-post-thumbnail a {
	display: block;
	width: 100%;
	height: 100%;
}

.mea-filterable-posts .mea-post-thumbnail img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.mea-filterable-posts .mea-post-card:hover .mea-post-thumbnail img {
	transform: scale(1.04);
}

.mea-filterable-posts .mea-post-category-label {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-block;
	padding: 4px 10px;
	background-color: #2e7d32;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 4px;
	pointer-events: none;
}

/* Post Body
   ------------------------------------------------------------ */
.mea-filterable-posts .mea-post-body {
	flex: 1;
	padding: 14px 16px 10px;
}

.mea-filterable-posts .mea-post-title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.mea-filterable-posts .mea-post-title a {
	color: inherit;
	text-decoration: none;
}

.mea-filterable-posts .mea-post-title a:hover {
	text-decoration: underline;
}

.mea-filterable-posts .mea-post-excerpt {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #555;
}

/* Post Footer
   ------------------------------------------------------------ */
.mea-filterable-posts .mea-post-footer {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px 14px;
	font-size: 12px;
	color: #888;
}

.mea-filterable-posts .mea-post-footer .sep {
	opacity: 0.5;
}

/* No posts message
   ------------------------------------------------------------ */
.mea-filterable-posts .mea-no-posts {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 0;
	color: #888;
}

/* Responsive
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
	.mea-filterable-posts .mea-posts-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.mea-filterable-posts .mea-posts-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.mea-filterable-posts .mea-posts-grid {
		grid-template-columns: 1fr;
	}

	.mea-filterable-posts .mea-filter-tabs {
		flex-wrap: nowrap;
	}
}
