/**
 * News Element — Grid block.
 * Structure + fallback look only; colours, spacing and type come from the
 * block's Style controls. Filter bar / pagination styles live in
 * assets/css/common.css.
 */

/* Items ------------------------------------------------------------------ */

.ne-grid-items > .ne-df-20 > .ne-grid-item {
	flex: 1 1 auto;
	width: 100%;
}

.ne-grid-empty {
	flex: 0 0 100%;
	text-align: center;
}

/* Style 2 — overlay card: the image box sets the card's size (so Thumbnail
   Width / Height on .ft-thumbwrap resize the card), the meta sits over its
   bottom; the Overlay control shades the image. Plain block box, no flex. */
.ne-grid-items.style_two .ne-grid-item {
	color: #fff;
}


/* Column divider (General > Column divider, opt-in): a line half a gap left of every card.
   The first column's lines fall outside the block and are clipped, so lines show only
   between columns, whatever the column count. In :where() so the colour and width
   controls win (this file loads after the per-post CSS). */
.ne-coldiv-yes .ne-grid-wrap {
	overflow-x: clip;
}

:where(.ne-coldiv-yes .ne-grid-item) {
	position: relative;
}

:where(.ne-coldiv-yes .ne-grid-item)::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(var(--ne-gap, 24px) / -2);
	border-left: 1px solid #e5e5e5;
	pointer-events: none;
}

/* Masonry (General > Masonry, opt-in): the cards flow down CSS columns
   (Masonry columns) instead of rows and keep their own heights, so columns
   stagger. Gap still pads each card; Column width no longer applies. */
.ne-masonry-yes .ne-grid-items.ne-gutter {
	display: block;
	column-gap: 0;
}

/* Fallback count only: in :where() so the Masonry columns control
   ({{WRAPPER}} .ne-gutter) wins (it was outranked, 2026-11-09). */
:where(.ne-masonry-yes .ne-grid-items.ne-gutter) {
	column-count: 3;
}

.ne-masonry-yes .ne-grid-items.ne-gutter > .ne-df-20 {
	width: 100%;
	max-width: none;
	break-inside: avoid;
}
