/**
 * Latest Blog Posts widget.
 */

.dw-post-card__date {
	position: absolute;
	top: var(--dw-space-4);
	inset-inline-start: var(--dw-space-4);
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 58px;
	padding: var(--dw-space-2) var(--dw-space-3);
	border-radius: var(--dw-radius);
	background: var(--dw-color-primary);
	color: var(--dw-color-on-primary);
	line-height: 1.1;
	text-align: center;
}

.dw-post-card__date strong {
	color: inherit;
	font-family: var(--dw-font-heading);
	font-size: var(--dw-fs-lg);
}

.dw-post-card__date span {
	font-size: var(--dw-fs-xs);
	font-weight: 700;
	text-transform: uppercase;
}

.dw-post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--dw-space-2) var(--dw-space-4);
	margin-block-end: var(--dw-space-3);
	color: var(--dw-color-muted);
	font-size: var(--dw-fs-xs);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.dw-post-card__cat {
	color: var(--dw-color-secondary);
	font-weight: 700;
}

.dw-posts__list.dw-grid {
	grid-template-columns: minmax(0, 1fr) !important;
}

@media (min-width: 768px) {
	.dw-posts--list .dw-post-card.has-image {
		flex-direction: row;
	}

	.dw-posts--list .dw-post-card.has-image .dw-card__media {
		flex: 0 0 36%;
		aspect-ratio: auto;
		min-height: 220px;
	}
}

/*
 * Editorial news: a lead story beside a dated list. No cards; hierarchy
 * comes from size, weight and thin rules. Each story is one link.
 */
.dw-news {
	display: grid;
	gap: var(--dw-space-7);
}

@media (min-width: 1025px) {
	.dw-news {
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
		gap: clamp(3rem, 5vw, 5rem);
		align-items: start;
	}
}

.dw-news__lead,
.dw-news__item {
	position: relative;
}

.dw-news__lead-media {
	overflow: hidden;
	aspect-ratio: 16 / 10;
	margin-block-end: var(--dw-space-5);
	background: var(--dw-color-light);
}

.dw-news .dw-news__lead-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s var(--dw-ease-out);
}

.dw-news__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--dw-space-2) var(--dw-space-3);
	margin-block-end: var(--dw-space-3);
	color: var(--dw-color-muted);
	font-size: var(--dw-fs-xs);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.dw-news__cat {
	color: var(--dw-color-primary);
	font-family: var(--dw-font-heading);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.dw-news__dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.6;
}

.dw-news__lead-title {
	margin-block-end: var(--dw-space-3);
	font-size: var(--dw-fs-display-sm);
}

.dw-news__lead-text {
	max-width: 56ch;
	margin: 0;
	font-size: var(--dw-fs-md);
}

.dw-news__lead-title a,
.dw-news__item-title a {
	color: var(--dw-color-heading);
	text-decoration: none;
	transition: color 0.2s var(--dw-ease-out);
}

/* Whole story is the link. */
.dw-news__lead-title a::before,
.dw-news__item-title a::before {
	content: "";
	position: absolute;
	inset: 0;
}

.dw-news__lead:hover .dw-news__lead-title a,
.dw-news__item:hover .dw-news__item-title a,
.dw-news a:focus-visible {
	color: var(--dw-color-primary);
}

@media (hover: hover) and (pointer: fine) {
	.dw-news__lead:hover .dw-news__lead-media img {
		transform: scale(1.03);
	}
}

.dw-news__lead:focus-within,
.dw-news__item:focus-within {
	outline: 2px solid var(--dw-color-primary);
	outline-offset: 6px;
}

.dw-news a:focus-visible {
	outline: none;
}

.dw-news__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dw-news__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--dw-space-5);
	align-items: start;
	padding-block: var(--dw-space-5);
	border-block-start: 1px solid var(--dw-color-border);
}

.dw-news__item:last-child {
	border-block-end: 1px solid var(--dw-color-border);
}

.dw-news__item-title {
	margin: 0;
	font-size: var(--dw-fs-lg);
	line-height: 1.25;
}

.dw-news__thumb {
	width: 96px;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--dw-color-light);
}

.dw-news .dw-news__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dw-news__all {
	display: inline-flex;
	align-items: center;
	gap: var(--dw-space-2);
	margin-block-start: var(--dw-space-5);
	color: var(--dw-color-primary);
	font-family: var(--dw-font-heading);
	font-size: var(--dw-fs-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
}

.dw-news__all svg {
	transition: transform 0.25s var(--dw-ease-out);
}

.dw-news__all:hover svg,
.dw-news__all:focus-visible svg {
	transform: translateX(4px);
}

[dir="rtl"] .dw-news__all svg {
	transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
	.dw-news .dw-news__lead-media img {
		transform: none !important;
	}
}
