:focus{
	outline: none;
}

.gallery{
	width: 950px;
	height: 580px;
	position: relative;
}


a.imglink {
	display: inline-block;
	width: 234px;
	height: 148px;
	position: relative;
	border: 5px solid #fff;
	box-sizing: border-box;
}

a.imglink img {
	display: block;
	width: 100%;
	height: 100%;
	transition-property: width, height, top, bottom, left, right, z-index;
	transition-duration: 1s;
	position: absolute;
	z-index: 1;
	top: 0px;
	left: 0px;
	cursor: pointer;
}

dd {
	display: block;
	opacity: 0;
	color: lightgray;
	font-style: italic;
	text-align: center;
	transition: opacity 0s;
	transition-delay: 0s;
	width: 590px;
	position: absolute;
	z-index: 26;
}

.closed-layer {
	display: none;
	position: absolute;
	top: 140px;
	left: 150px;
	width: 500px;
	height: 352px;
	background: transparent;
	z-index: 30;
	cursor: pointer;
}

a:focus~.closed-layer {
	display: block;
}

a:focus {
	border: none;
}

a.imglink:focus img {
	width: 250%;
	height: 250%;
	box-shadow: 0 10px 30px 10px #000;
	z-index: 25;
}

a.imglink:focus dd {
	opacity: 1;
	transition: opacity 1s;
	transition-delay: 1s;
}

a.imglink:focus:nth-child(4n+1) img {
	left: 150px;
}

a.imglink:focus:nth-child(4n+2) img {
	left: -50px;
}

a.imglink:focus:nth-child(4n+3) img {
	left: -250px;
}

a.imglink:focus:nth-child(4n+4) img {
	left: -460px;
}

a.imglink:focus:nth-child(-n+4) img {
	top: 140px;
}

a.imglink:focus:nth-child(n+9) img {
	top: -150px;
}

a.imglink:focus:nth-child(n+13) img {
	top: -295px;
}

a.imglink:focus:nth-child(4n+1) dd {
	left: 150px;
	top: 370px;
}

a.imglink:focus:nth-child(4n+2) dd {
	left: -50px;
	top: 370px;
}

a.imglink:focus:nth-child(4n+3) dd {
	left: -250px;
	top: 370px;
}

a.imglink:focus:nth-child(4n+4) dd {
	left: -460px;
	top: 370px;
}

a.imglink:focus:nth-child(-n+4) dd {
	top: 510px;
}

a.imglink:focus:nth-child(n+9) dd {
	top: 220px;
}
a.imglink:focus:nth-child(n+13) dd {
    top: 75px;
}