/* Styles the lightbox, removes it from sight and adds the fade-in transition */

.lightbox-target {
position: fixed;
top: -100%;
width: 100%;
left: 0px;    
background: rgba(0,0,0,.7);
width: 100%;
opacity: 0;
-webkit-transition: opacity .35s ease-in-out;
-moz-transition: opacity .35s ease-in-out;
-o-transition: opacity .35s ease-in-out;
transition: opacity .35s ease-in-out;
overflow: hidden;
    z-index: 9999;
}

/* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */

.lightbox-target img {
margin: auto;
position: absolute;
top: 0;
left:0;
right:0;
bottom: 0;
max-height: 0%;
max-width: 0%;
border: 2px solid white;
box-shadow: 0px 0px 8px rgba(0,0,0,.3);
box-sizing: border-box;
-webkit-transition: .3s ease-in-out;
-moz-transition: .3s ease-in-out;
-o-transition: .3s ease-in-out;
transition: .3s ease-in-out;
}

a.lightbox img {
border: 2px solid white;
}

/* Styles the close link, adds the slide down transition */

a.lightbox-close {
display: block;
width:75px;
height:75px;
background-image: url("cross.png");
background-size: cover; 
color: #242424;
text-decoration: none;
position: absolute;
top: -80px;
right: 0;
-webkit-transition: .35s ease-in-out;
-moz-transition: .35s ease-in-out;
-o-transition: .35s ease-in-out;
transition: .35s ease-in-out;
}

a.lightbox-close:hover {
background-color: #a1a1a1;
}


/* Provides part of the "X" to eliminate an image from the close link */

a.lightbox-close:before {
content: "";
display: block;
height: 50px;
width: 2px;
background: #242424;
position: absolute;
left: 36px;
top:10px;
-webkit-transform:rotate(45deg);
-moz-transform:rotate(45deg);
-o-transform:rotate(45deg);
transform:rotate(45deg);
    -webkit-transition: opacity .35s ease-in-out;
-moz-transition: opacity .35s ease-in-out;
-o-transition: opacity .35s ease-in-out;
transition: opacity .35s ease-in-out;
}

/* Provides part of the "X" to eliminate an image from the close link */

a.lightbox-close:after {
content: "";
display: block;
height: 50px;
width: 2px;
background: #242424;
position: absolute;
left: 36px;
top:10px;
-webkit-transform:rotate(-45deg);
-moz-transform:rotate(-45deg);
-o-transform:rotate(-45deg);
transform:rotate(-45deg);
    -webkit-transition: opacity .35s ease-in-out;
-moz-transition: opacity .35s ease-in-out;
-o-transition: opacity .35s ease-in-out;
transition: opacity .35s ease-in-out;
}


/*Next*/

a.nextLight {
display: block;
width:75px;
height:75px;
background-image: url("forward.png");
background-size: cover; 
text-decoration: none;
position: absolute;
top: 40%;
right: 0;
-webkit-transition: .35s ease-in-out;
-moz-transition: .35s ease-in-out;
-o-transition: .35s ease-in-out;
transition: .35s ease-in-out;
}

a.nextLight:hover {
background-color: #a1a1a1;
}

a.nextLight:before{
content: "";
display: block;
position: absolute;
}

a.prevLight {
display: block;
width:75px;
height:75px;
background-image: url("back.png");
background-size: cover; 
color: #242424;
font-size: 20px;
text-decoration: none;
position: absolute;
top: 40%;
left: 0px;
-webkit-transition: .35s ease-in-out;
-moz-transition: .35s ease-in-out;
-o-transition: .35s ease-in-out;
transition: .35s ease-in-out;
}

a.prevLight:hover {
background-color: #a1a1a1;
}

a.prevLight:before{
content: "";
display: block;
position: absolute;
}

/* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */

.lightbox-target:target {
opacity: 1;
top: 0;
bottom: 0;
}

.lightbox-target:target img {
max-height: 100%;
max-width: 100%;
}

.lightbox-target:target a.lightbox-close {
top: 0px;
}
