/* =========================================================
 * GRID (náhledy)
 * ========================================================= */
.mpg-grid{
	display:grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	height: 100vh;
	margin: 0;
}

@media (max-width: 1024px){
	.mpg-grid{
		grid-template-columns: repeat(2, minmax(0, 1fr));
		height:auto;
		min-height: 100vh;
	}
}

@media (max-width: 640px){
	.mpg-grid{ grid-template-columns: 1fr; }
}

.mpg-item{
	position:relative;
	padding:0;
	border:0;
	background:transparent;
	cursor:pointer;
	height: 100%;
	min-height: 60vh;
	overflow:hidden;
}

.mpg-bg{
	position:absolute;
	inset:0;
	background-size:cover;
	background-position:center;
	background-repeat:no-repeat;
	transform: scale(1.01);
	transition: transform 220ms ease, filter 220ms ease;
}

.mpg-item:hover .mpg-bg{
	transform: scale(1.06);
	filter: saturate(1.05);
}

.mpg-title{
	position:absolute;
	left:18px;
	right:18px;
	bottom:18px;
	padding:14px 16px;
	border-radius: 18px;
	background: rgba(0,0,0,0.45);
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.2;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	text-align:left;
}


/* =========================================================
 * LIGHTBOX
 * ========================================================= */

.mpg-lightbox{
	position:fixed;
	inset:0;
	display:none;
	z-index:9999;
}

.mpg-lightbox.is-open{
	display:block;
}

/* BACKDROP – celá tmavá plocha */
.mpg-backdrop{
	position:absolute;
	inset:0;
	background:rgba(0,0,0,0.85);
	z-index:1;
	cursor:pointer;
}

/* MODAL – jen obsah uprostřed (NE celá obrazovka!) */
.mpg-modal{
	position:relative;
	z-index:2;
	max-width:95vw;
	max-height:95vh;
	margin:auto;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	background:transparent;
	border-radius:0;
	box-shadow:none;
}

/* horní lišta */
.mpg-top{
	position:absolute;
	top:20px;
	left:0;
	right:0;
	padding:0 40px;
	display:flex;
	justify-content:space-between;
	color:#fff;
	z-index:3;
	pointer-events:none;
}

.mpg-top-title,
.mpg-top-count{
	pointer-events:none;
}

/* stage */
.mpg-stage{
	position:relative;
	display:flex;
	align-items:center;
	justify-content:center;
	background:transparent;
}

/* obrázek – bez rámečku */
.mpg-stage img{
	max-width:95vw;
	max-height:90vh;
	width:auto;
	height:auto;
	display:block;
	border-radius:0;
}

/* close */
.mpg-close{
	position:absolute;
	top:20px;
	right:30px;
	width:44px;
	height:44px;
	border-radius:50%;
	border:none;
	background:rgba(255,255,255,0.15);
	color:#fff;
	font-size:26px;
	cursor:pointer;
	z-index:4;
}

/* arrows */
.mpg-nav{
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	width:60px;
	height:60px;
	border-radius:50%;
	border:none;
	background:rgba(255,255,255,0.15);
	color:#fff;
	font-size:32px;
	cursor:pointer;
	z-index:3;
}

.mpg-prev{ left:30px; }
.mpg-next{ right:30px; }