.modal-overlay {
    z-index:2;
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
	height:100%;/*for old Safari*/
    height:100vh;
    background-color:rgba(0,0,0,.5)}
.modal-overlay (:target) {height:100%\9;} /* IE9,10 */

.modal-content{
	border-radius: 16px!important;
	box-sizing: border-box;
	width: 60%!important;
	height: auto;
	max-height: 80%;
	padding: 80px 100px;
    position:fixed;
    display:none;
    z-index:3;
	background: #fff;
}
.modal-close{
	position: absolute;
	top: -20px;
	background: #258b81;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	text-align: center;
	right: -20px;
	font-size: 30px;
	line-height: 54px;
	font-weight: bold;
	cursor: pointer;
	transition: .3s ;
	border: 2px solid #258b81;
}

.modal-close{
	color: #fff;
	display: block;
}

.modal-close:hover{
	background: #fff;
	border: 2px solid #258b81;
}

.modal-close a:hover{
	color: #258b81;
}

.modal-contentM{
	border-radius: 16px!important;
	box-sizing: border-box;
	width: auto;
	max-width: 1040px;
	height: 70%;
	padding: 15px;
    position:fixed;
    display:none;
    z-index:3;
	background: #fff;
	margin-top: 3%;
}

.modal-contentM img{
	height: 100%;
}

@media screen and (max-width:1366px) {
	.modal-content{
		padding: 50px;
		width: 90%!important;
	}
	
	.modal-contentM{
		height:70%;
	}
	
	.modal-contentM img{
		height: 100%;
	}
}

@media screen and (max-height: 640px) {
	.modal-content {max-height: 70%;}
	
	a.modal-close:hover {opacity:1}
}
@media screen and (max-width: 640px) {
	.modal-content {
		padding: 50px 25px;
		height: 65%;
	}
	.modal-contentM{
		height:auto;
		width: 90%;
	}
	
	.modal-contentM img{
		width: 100%;
		height: auto;
	}
	
	.modal-close{
	top: -25px;
	width: 50px;
	height: 50px;
	right: -10px;
	font-size: 30px;
	line-height: 46px;
}
}