@charset "UTF-8";

/** Base **/

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  color: white;
  text-decoration: none;
}

h1 {
  padding: 2px;
  font-size: 2em;
}


/** Gallery Box **/

.gallery-box {
  position: relative;
  //max-width: 1800px;
  margin: 5px auto;
}

.gallery-box li {
  position: relative;
  width: 100%;
  height: 200px;
  background-position: center;
  background-size: cover;
  -webkit-transition: all 500ms ease;
  transition: all 500ms ease;
}

.gallery-box a {
  display: block;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  -webkit-transition: background-color 500ms ease;
  transition: background-color 500ms ease;
}


/** Viewport >= 630px **/

@media screen and (min-width: 630px) {
  .gallery-box li {
    float: left;
    width: 50%;
  }
//  .gallery-box li:nth-child(1) {
//    float: none;
//    width: 100%;
//    height: 300px;
//  }
}

/** Viewport >= 960px **/

@media screen and (min-width: 960px) {
  .gallery-box ul {
    height: 450px;
  }
  .gallery-box li {
    width: 25%;
    height: 50%;
  }
  .gallery-box li:hover {
    z-index: 5;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
  }
  .gallery-box li:hover a {
    background-color: rgba(0, 0, 0, 0);
  }
//  .gallery-box li:nth-child(1) {
//    float: left;
//    width: 50%;
//    height: 100%;
//  }
}

/** Viewport >= 1800px **/

@media screen and (min-width: 1800px) {
  .gallery-box ul {
    height: 650px;
  }
  .gallery-box li {
    width: 25%;
    height: 50%;
  }
  .gallery-box li:hover {
    z-index: 5;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
  }
  .gallery-box li:hover a {
    background-color: rgba(0, 0, 0, 0);
  }
//  .gallery-box li:nth-child(1) {
//    float: left;
//    width: 50%;
//    height: 100%;
//  }
}


//подпись к картинкам

.thumbs {
  width: 100%;
  max-width: 450px; /* опционально */
  margin: 10px;
  opacity: .99;
  overflow: hidden;
  position: relative;
  border-radius: 3px;
  cursor: pointer;
  -webkit-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
  -moz-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
  box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19);
}
.thumbs:before {
  content: '';
  background: -webkit-linear-gradient(top, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
  width: 100%;
  height: 50%;
  opacity: 0;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2;
  -webkit-transition-property: top, opacity;
  transition-property: top, opacity;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
}
.thumbs img {
  display: block;
  width: 100%; /* ширина картинки */
  height: auto; /* высота картинки */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.thumbs .caption {
  width: 100%;
  padding: 20px;
  color: #fff;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 3;
  text-align: center;
}
.thumbs .caption span {
  display: block;
  opacity: 0;
  position: relative;
  top: 100px;
  -webkit-transition-property: top, opacity;
  transition-property: top, opacity;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
}
.thumbs .caption .title {
  line-height: 1;
  font-weight: normal;
  font-size: 18px;
}
.thumbs .caption .info {
  line-height: 1.2;
  margin-top: 5px;
  font-size: 12px;
}
.thumbs:focus:before,
.thumbs:focus span, .thumbs:hover:before,
.thumbs:hover span {
  opacity: 1;
}
.thumbs:focus:before, .thumbs:hover:before {
  top: 50%;
}
.thumbs:focus span, .thumbs:hover span {
  top: 0;
}
.thumbs:focus .title, .thumbs:hover .title {
  -webkit-transition-delay: 0.15s;
          transition-delay: 0.15s;
}
.thumbs:focus .info, .thumbs:hover .info {
  -webkit-transition-delay: 0.25s;
          transition-delay: 0.25s;
}