/* auto-fill keeps the empty columns, so a lone card is as wide as the cards of a full row. */
.nemea-press-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: clamp(20px, 3vw, 36px);
	width: 100%;
}

/* A fixed column count only from tablet width up; below it the grid fits what the width allows. */
@media (min-width: 900px) {
	.nemea-press-grid.has-columns {
		grid-template-columns: repeat(var(--nemea-press-columns), minmax(0, 1fr));
	}
}

.nemea-press-grid + .nemea-press-section,
.nemea-press-section + .nemea-press-grid,
.nemea-press-grid + .nemea-press-grid {
	margin-top: clamp(34px, 5vw, 64px);
}

/*
 * In the card layouts a rule and a wider gap than the rows' one mark where each block starts,
 * so articles without a section placed after a section do not read as its last row.
 */
.nemea-press.nemea-press--grid > * + *,
.nemea-press.nemea-press--cards > * + * {
	margin-top: clamp(48px, 6vw, 88px);
	padding-top: clamp(28px, 3.5vw, 48px);
	border-top: 1px solid var(--nemea-press-card-border, #d8d8d8);
}

.nemea-press--grid > .nemea-press-section:first-child,
.nemea-press--cards > .nemea-press-section:first-child {
	margin-top: 0;
}

.nemea-press--grid .nemea-press-section__title,
.nemea-press--cards .nemea-press-section__title {
	margin-bottom: clamp(16px, 2vw, 24px);
	font-size: var(--nemea-press-section-size, clamp(1rem, 1.2vw, 1.125rem));
	font-weight: 700;
	line-height: 1.35;
}

.nemea-press--editorial {
	width: 100%;
	font-size: 1rem;
	line-height: 1.55;
}

.nemea-press-loose__item {
	margin: 0 0 28px;
}

.nemea-press-loose__item,
.nemea-press-list__entry {
	display: grid;
	grid-template-columns: clamp(112px, 22vw, 190px) minmax(0, 1fr);
	align-items: start;
	gap: clamp(14px, 2.5vw, 24px);
}

.nemea-press-loose__item.no-image,
.nemea-press-list__entry.no-image {
	display: block;
}

.nemea-press-entry-image {
	display: block;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #f1f3f4;
	border-radius: 3px;
}

.nemea-press-entry-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.nemea-press-loose__meta {
	margin-bottom: 2px;
	color: #525252;
}

.nemea-press-loose__title,
.nemea-press-list__title,
.nemea-press-links {
	font-size: 1.02rem;
}

.nemea-press-loose__title a,
.nemea-press-list__title a,
.nemea-press-links a {
	color: #176a9e;
	text-underline-offset: .14em;
}

.nemea-press-loose__title a:not(:hover):not(:focus),
.nemea-press-list__title a:not(:hover):not(:focus),
.nemea-press-links a:not(:hover):not(:focus) {
	text-decoration: none;
}

.nemea-press-card {
	overflow: hidden;
	min-width: 0;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.nemea-press-card__image {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #f2f2f2;
}

.nemea-press-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform .25s ease;
}

.nemea-press-card__image:hover img,
.nemea-press-card__image:focus img {
	transform: scale(1.025);
}

.nemea-press-card__body {
	padding: 20px;
}

.nemea-press-card__meta {
	margin: 0 0 8px;
	color: #626262;
	font-size: .82rem;
	line-height: 1.4;
}

.nemea-press-card__source {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .035em;
}

.nemea-press-card__title {
	margin: 0;
	padding: 0;
	font: inherit;
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	font-weight: 700;
	line-height: 1.3;
}

.nemea-press-card__title a {
	color: inherit;
	text-decoration: none;
}

.nemea-press-card__title a:hover,
.nemea-press-card__title a:focus {
	text-decoration: underline;
	text-underline-offset: .15em;
}

/*
 * "Schede con riassunto": image on top, then title, date | source and the summary.
 * The title keeps the theme's heading font and colour; the other colours can be tuned through the custom properties.
 */
.nemea-press--cards {
	--nemea-press-gap: clamp(24px, 3.5vw, 48px);
}

.nemea-press--cards .nemea-press-grid {
	gap: clamp(28px, 4vw, 56px) var(--nemea-press-gap);
	align-items: start;
}

.nemea-press-post {
	min-width: 0;
	background: var(--nemea-press-card-background, #fff);
	border: 1px solid var(--nemea-press-card-border, #d8d8d8);
}

.nemea-press-post__image {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: #f2f2f2;
}

.nemea-press-post__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.nemea-press-post__body {
	padding: clamp(20px, 2.4vw, 32px) clamp(20px, 2vw, 30px) clamp(22px, 2.4vw, 34px);
}

.nemea-press-post__title {
	margin: 0 0 18px;
	padding: 0;
	font-size: clamp(1.2rem, 1.9vw, 1.5rem);
	line-height: 1.3;
	overflow-wrap: break-word;
}

.nemea-press-post__title a {
	color: inherit;
	text-decoration: none;
}

.nemea-press-post__title a:hover,
.nemea-press-post__title a:focus {
	text-decoration: underline;
	text-underline-offset: .15em;
}

.nemea-press-post__meta {
	margin: 0 0 18px;
	color: var(--nemea-press-meta-color, #4a4a4a);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.4;
}

.nemea-press-post__excerpt {
	margin: 0;
	color: var(--nemea-press-text-color, #6b6b6b);
	font-size: 1.05rem;
	font-weight: 300;
	line-height: 1.85;
}

@media (prefers-reduced-motion: reduce) {
	.nemea-press-card__image img { transition: none; }
}

.nemea-press-section {
	margin: clamp(30px, 4vw, 52px) 0 0;
}

.nemea-press-section__title {
	margin: 0 0 12px;
	padding: 0;
	font: inherit;
	font-size: var(--nemea-press-section-size, clamp(1.25rem, 2.2vw, 1.5rem));
	font-weight: 500;
	line-height: 1.3;
}

.nemea-press-section__label {
	margin-bottom: 7px;
	font-size: .92rem;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.nemea-press-section__label--link {
	margin-top: 18px;
}

.nemea-press-list {
	margin: 0;
	padding-left: 0;
	list-style: none;
}

.nemea-press-list__item {
	margin: 0 0 18px;
	padding-left: 0;
	list-style: none;
}

.nemea-press-list__meta {
	color: #5f5f5f;
	font-size: .96rem;
	line-height: 1.4;
}

.nemea-press-list__title {
	line-height: 1.45;
}

.nemea-press-links {
	margin: 0;
	padding-left: 1.3em;
}

.nemea-press-links li {
	margin: 0 0 6px;
}

.nemea-press-standalone-links {
	margin-top: 24px;
}

.nemea-press-section + .nemea-press-loose,
.nemea-press-section + .nemea-press-standalone-links {
	margin-top: clamp(30px, 4vw, 52px);
}

@media (max-width: 520px) {
	.nemea-press-loose__item,
	.nemea-press-list__entry {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 12px;
	}
}
