.mgrid {
	display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Make columns adjust according to the available viewport */
	grid-gap: 10px;
    grid-auto-rows: 260px; /*Set the height for implicitly-created row track */
    grid-auto-flow: dense;
	height: fit-content;
}


@media screen and (max-width: 820) {
	.mgrid {
	    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	    grid-auto-rows: 160px;
	}
}

.mgrid-item.landscape {
    grid-column-end: span 2;
}
.mgrid-item.portrait {
    grid-row-end: span 1;
}

.mgrid-item {
  	position: relative;
  	overflow: hidden;
  	border-radius: 3px;
  	box-sizing: border-box;
}

.mgrid-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.zoomicon {
    position: absolute;
	top: 50%;
	left: 50%;
	margin: -24px auto 0 -24px;
    width: 48px;
    height:48px;
    z-index: 10;
    background-repeat: no-repeat;
	display: none;
}

.mgrid-item:hover img {
    cursor: pointer;
    filter: brightness(50%);
}

.mgrid-item:hover .zoomicon {
	display: block;
}
