/**
 * Posts List Styles
 *
 * @package TDT_Parallax_Theme
 */

.tdt-posts-list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin: 2rem 0;
}

.tdt-posts-list__item {
	padding-bottom: 1.5rem;
	position: relative;
}

.tdt-posts-list__item a:hover {
	text-decoration: none;
}

.tdt-posts-list__item:last-child {
	border-bottom: none;
}

.tdt-posts-list__link {
	display: flex;
	gap: 1.5rem;
	text-decoration: none;
	color: inherit;
	padding: 1rem;
	margin: -1rem;
	border-radius: 8px;
	transition: all 0.3s ease;
}

/* Hover effect - modern card style */
.tdt-posts-list__link:hover,
.tdt-posts-list__link:focus {
	background-color: #f8f9fa;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.tdt-posts-list__link:hover .tdt-posts-list__thumbnail img,
.tdt-posts-list__link:focus .tdt-posts-list__thumbnail img {
	transform: scale(1.05);
}

/* Alternating thumbnail position */
.tdt-posts-list__item:nth-child(odd) .tdt-posts-list__link {
	flex-direction: row;
}

.tdt-posts-list__item:nth-child(even) .tdt-posts-list__link {
	flex-direction: row-reverse;
}

.tdt-posts-list__thumbnail {
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 6px;
}

.tdt-posts-list__thumbnail img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.tdt-posts-list__content {
	flex: 1;
	min-width: 0;
}

.tdt-posts-list .entry-header {
	margin-bottom: 0;
}

.tdt-posts-list .entry-title {
	font-size: 1.5rem;
	line-height: 1.3;
	margin: 0 0 0.5rem 0;
	font-weight: 600;
	transition: color 0.2s ease;
}

.tdt-posts-list .entry-meta {
	font-size: 0.875rem;
	color: #666;
	line-height: 1.5;
	margin-bottom: 0.75rem;
}

.tdt-posts-list .entry-meta span + span::before {
	content: " // ";
}

.tdt-posts-list .entry-excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #444;
	margin-top: 0.75rem;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--excerpt-lines, 3);
	overflow: hidden;
}

.tdt-posts-list-empty {
	text-align: center;
	color: #666;
	font-style: italic;
	padding: 2rem 0;
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 600px) {
	.tdt-posts-list__item:nth-child(odd) .tdt-posts-list__link,
	.tdt-posts-list__item:nth-child(even) .tdt-posts-list__link {
		flex-direction: column;
	}

	.tdt-posts-list__link {
		gap: 1rem;
	}

	.tdt-posts-list__thumbnail {
		width: 100% !important;
	}

	.tdt-posts-list__thumbnail img {
		max-height: 200px;
		aspect-ratio: auto;
	}
}
