/**
 * Styles for [dveag_latest_posts] shortcode.
 *
 * Uses CSS custom properties for dynamic colors:
 *   --dveag-title-color (default: #1a3c5e)
 *   --dveag-text-color  (default: #333333)
 */

/* ── Container ── */
.dveag-latest-posts {
	--dveag-title-color: #1a3c5e;
	--dveag-text-color: #333333;
	--dveag-date-color: #1a6b6a;

	display: grid;
	grid-template-columns: 55% 1fr;
	gap: 30px;
	max-width: 100%;
	box-sizing: border-box;
}

/* ── Featured post (left column) ── */
.dveag-featured-post {
	display: flex;
	flex-direction: column;
}

.dveag-featured-post .dveag-post-thumbnail-link {
	display: block;
	margin-bottom: 14px;
	border-radius: 4px;
	overflow: hidden;
	line-height: 0;
}

.dveag-featured-post .dveag-post-thumbnail {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	aspect-ratio: 16 / 10;
	transition: transform 0.3s ease;
}

.dveag-featured-post .dveag-post-thumbnail-link:hover .dveag-post-thumbnail {
	transform: scale(1.03);
}

/* ── Date ── */
.dveag-post-date {
	font-size: 13px;
	font-weight: 600;
	color: var(--dveag-date-color);
	margin-bottom: 6px;
	line-height: 1.4;
}

/* ── Title (featured) ── */
.dveag-featured-post .dveag-post-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 10px 0;
	color: var(--dveag-title-color);
}

.dveag-featured-post .dveag-post-title a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.dveag-featured-post .dveag-post-title a:hover {
	opacity: 0.75;
}

/* ── Excerpt ── */
.dveag-post-excerpt {
	font-size: 14px;
	line-height: 1.65;
	color: var(--dveag-text-color);
	margin-bottom: 12px;
}

/* ── Categories ── */
.dveag-post-categories {
	font-size: 13px;
	font-style: italic;
	color: var(--dveag-text-color);
	line-height: 1.4;
}

.dveag-post-categories a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: opacity 0.2s ease;
}

.dveag-post-categories a:hover {
	opacity: 0.7;
}

/* ── Secondary posts column (right) ── */
.dveag-secondary-posts {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ── Individual secondary post ── */
.dveag-secondary-post {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.dveag-secondary-post .dveag-secondary-thumbnail-link {
	display: block;
	flex-shrink: 0;
	width: 120px;
	border-radius: 4px;
	overflow: hidden;
	line-height: 0;
}

.dveag-secondary-post .dveag-secondary-thumbnail {
	width: 120px;
	height: 90px;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.dveag-secondary-post .dveag-secondary-thumbnail-link:hover .dveag-secondary-thumbnail {
	transform: scale(1.05);
}

.dveag-secondary-post .dveag-post-meta {
	flex: 1;
	min-width: 0;
}

/* ── Title (secondary) ── */
.dveag-secondary-post .dveag-post-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 6px 0;
	color: var(--dveag-title-color);
}

.dveag-secondary-post .dveag-post-title a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.dveag-secondary-post .dveag-post-title a:hover {
	opacity: 0.75;
}

/* ── Archive list (posts 5+) ── */
.dveag-archive-list {
	margin-top: 30px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.dveag-archive-item {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	padding: 20px 0;
	border-top: 1px solid #e5e5e5;
}

.dveag-archive-item:last-child {
	border-bottom: 1px solid #e5e5e5;
}

.dveag-archive-thumbnail-link {
	display: block;
	flex-shrink: 0;
	width: 160px;
	border-radius: 4px;
	overflow: hidden;
	line-height: 0;
}

.dveag-archive-item .dveag-list-thumbnail {
	width: 160px;
	height: 110px;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.dveag-archive-thumbnail-link:hover .dveag-list-thumbnail {
	transform: scale(1.05);
}

.dveag-archive-meta {
	flex: 1;
	min-width: 0;
}

.dveag-archive-meta .dveag-post-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 6px 0;
	color: var(--dveag-title-color, #1a3c5e);
}

.dveag-archive-meta .dveag-post-title a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.dveag-archive-meta .dveag-post-title a:hover {
	opacity: 0.75;
}

.dveag-archive-meta .dveag-post-categories {
	font-size: 13px;
}

/* ── Pagination ── */
.dveag-pagination {
	margin-top: 30px;
	--dveag-title-color: #1a3c5e;
	--dveag-text-color: #333333;
}

.dveag-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.dveag-pagination li {
	margin: 0;
	padding: 0;
}

.dveag-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	color: var(--dveag-text-color);
	text-decoration: none;
	background: #fff;
	transition: all 0.2s ease;
}

.dveag-pagination .page-numbers:hover {
	border-color: var(--dveag-title-color);
	color: var(--dveag-title-color);
	background: rgba(26, 60, 94, 0.05);
}

.dveag-pagination .page-numbers.current {
	background: var(--dveag-title-color);
	border-color: var(--dveag-title-color);
	color: #fff;
}

.dveag-pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

.dveag-pagination .page-numbers.prev,
.dveag-pagination .page-numbers.next {
	font-size: 16px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.dveag-latest-posts {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.dveag-secondary-post .dveag-secondary-thumbnail-link {
		width: 100px;
	}

	.dveag-secondary-post .dveag-secondary-thumbnail {
		width: 100px;
		height: 75px;
	}

	.dveag-archive-thumbnail-link {
		width: 120px;
	}

	.dveag-archive-item .dveag-list-thumbnail {
		width: 120px;
		height: 85px;
	}

	.dveag-pagination .page-numbers {
		min-width: 34px;
		height: 34px;
		font-size: 13px;
	}
}
