/**
 * News Element — Image Grid block. Structure only: columns, gap,
 * heights, colours and type come from the block's controls.
 */

.ne-ig-wrap {
	position: relative;
}

.ne-ig-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

/* Square by default; Image height swaps the ratio for a fixed height. */
.ne-ig-item {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.ne-ig-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

.ne-ig-item::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .25);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}

.ne-ig-item:hover img {
	transform: scale(1.05);
}

.ne-ig-item:hover::after {
	opacity: 1;
}

/* Badge over the centre of the grid. */
.ne-ig-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid transparent;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-size: 20px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.ne-ig-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	padding: 10px 18px;
	background: #111;
	color: #fff;
	text-decoration: none;
	transition: background .3s ease, color .3s ease;
}

.ne-ig-full-yes .ne-ig-btn {
	display: flex;
	width: 100%;
}
