/**
 * Trending Posts Shortcode
 * Path: themes/top-10-vina/shortcodes/trending-posts/trending-posts-style.css
 */

.tp-trending-wrapper {
	width: 100%;
	margin: 0 auto;
}

.tp-trending-header {
	display: flex;
	align-items: center;
	margin-bottom: 18px;
}

.tp-trending-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.25;
	color: #111;
	text-transform: uppercase;
	letter-spacing: 0.2px;
}

.tp-trending-title__icon {
	position: relative;
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px dashed #e50914;
	border-radius: 50%;
}

.tp-trending-list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.tp-trending-card {
	min-width: 0;
}

.tp-trending-card__thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
	background: #f2f2f2;
	text-decoration: none;
}

.tp-trending-card__thumb img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	transition: transform 0.25s ease, filter 0.25s ease;
}

.tp-trending-card:hover .tp-trending-card__thumb img {
	transform: scale(1.04);
	filter: brightness(0.96);
}

.tp-trending-card__placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f0f0f0, #ddd);
}

.tp-trending-card__rank {
	position: absolute;
	left: 8px;
	bottom: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 25px;
	height: 25px;
	padding: 0 5px;
	border-radius: 50%;
	background: #e50914;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	line-height: 1;
	border: 2px solid #fff;
	box-shadow: 0 2px 7px rgba(0, 0, 0, 0.18);
}

.tp-trending-card__title {
	margin: 10px 0 0;
	font-size: 0.88rem;
	font-weight: 800;
	line-height: 1.45;
	color: #111;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tp-trending-card__title a {
	color: inherit;
	text-decoration: none;
}

.tp-trending-card__title a:hover {
	color: #e50914;
}

.tp-trending-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 20px 0;
	text-align: center;
	color: #888;
}

/* Tablet */
@media (max-width: 1024px) {
	.tp-trending-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Mobile */
@media (max-width: 640px) {
	.tp-trending-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}

	.tp-trending-card__thumb {
		aspect-ratio: 16 / 8.5;
	}
}