div.gallery {
	height: 215px; 
	width: 215px;
    margin: 11px;
    border: 1px solid #ccc;
    float: left;
}

div.gallery:hover {
    border: 1px solid #777;
}

div.clipper {
	overflow: hidden;
	height: 100%; 
	width: 100%;
}

div.gallery img {}

div.desc {
	position: relative;
	bottom: 20%;
	width: 96%;
	height: 20%;
	padding: 2%;
    text-align: center;
	background-color: rgba(0,0,0, 0.4);
	color: #ffffff;
	line-height: 100%;
}

 /* The Overlay (background) */
.overlay {
    /* Height & width depends on how you want to reveal the overlay (see JS below) */   
    height: 100%;
	margin: auto;
    width: 0;
    position: fixed; /* Stay in place */
    z-index: 3; /* Sit on top */
    left: 0;
    top: 0;
    background-color: rgb(0,0,0); /* Black fallback color */
    background-color: rgba(0,0,0, 0.9); /* Black w/opacity */
    overflow-x: hidden; /* Disable horizontal scroll */
	overflow-y: hidden; /* Disable vertical scroll */
    transition: 0.5s; /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */
}

/* Position the content inside the overlay */
.overlay-content {
    position: relative;
    top: 10px; /* 25% from the top */
    width: 90%; /* 100% width */
	height: 90%;
	max-height: 800px;
    text-align: center; /* Centered text/links */
    margin: 30px auto auto auto; /* 30px top margin to avoid conflict with the close button on smaller screens */
}

/* The navigation links inside the overlay */
.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: #818181;
    display: block; /* Display block instead of inline */
    transition: 0.3s; /* Transition effects on hover (color) */
}

/* When you mouse over the navigation links, change their color */
.overlay a:hover, .overlay a:focus {
    color: #f1f1f1;
}

/* Position the close button (top right corner) */
.overlay .closebtn {
    position: absolute;
    top: 0px; /*WAS top: -18px;*/
    right: 0px;
	padding: 5px;
    font-size: 40px;
	z-index: 3;
}

 /* Slideshow container */
.slideshow-container {
  width: 100%;
  height: 100%;
  max-width: 1500px;
  max-height: 800px;
  position: relative;
  margin: auto;
  top: 0px; /*WAS top: 50%;*/
}
/*to keep slider images from extending beyond bottom of window*/
#slideshow-container img {
	max-height: 775px;
}

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius:3px;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: -40px;
  left: 30px;
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  margin: auto;
  width: 100%;
  position: absolute;
  bottom: -25px;
  z-index: 3;
}

/* The dots/bullets/indicators */
.dotSec {
  margin: auto;
  width: 100%;
  position: absolute;
  bottom: -50px;
  z-index: 3;
}

.dot {
  cursor: pointer;
  height: 13px;
  width: 13px;
  margin: 0 apx;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #717171;
}

/* Fading animation */
.fade {
  -webkit-animation-name: fade;
  -webkit-animation-duration: 1.5s;
  animation-name: fade;
  animation-duration: 1.5s;
}

@-webkit-keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* When the height of the screen is less than 450 pixels, change the font-size of the links and position the close button again, so they don't overlap */
@media screen and (max-height: 820px) {
    .overlay a {font-size: 20px}
    .overlay .closebtn {
        font-size: 40px;
        top: 0px;
        right: 0px;
    }
.overlay-content {
	max-height: 700px;
}
.slideshow-container {
	max-height: 650px;
}
#slideshow-container img {
	max-height: 700px;
}	
}
@media screen and (max-width: 640px) {
	.overlay .closebtn {
	top: -30px;
}

}
@media screen and (max-height: 640px) {
.overlay-content {
	max-height: 570px;
}
#slideshow-container img {
	max-height: 500px;
}
}
@media screen and (max-height: 370px) {
	.overlay-content {
	max-height: 300px;
}
.slideshow-container {
	max-height: 300px;
}
#slideshow-container img {
	max-height: 280px;
}
}