.rb-gallery-item {
  text-align: center;
  margin: 10px 0;
}
.rb-gallery-inner {
  position: relative;
}
.rb-gallery-link {
  outline: none !important;
  text-decoration: none !important;
  overflow: hidden;
}
.rb-gallery-img {
  width: 100%;
  box-sizing: border-box;
  transition: 0.5s;
}
.rb-gallery-img-outer{
  overflow: hidden;
}
.rb-gallery-img-outer.foto {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  border: 8px solid #fff;
}
.rb-gallery-item:hover .rb-gallery-img {
 -moz-transform: scale(1.2); /* Для Firefox */
  -ms-transform: scale(1.2); /* Для IE */
  -webkit-transform: scale(1.2); /* Для Safari, Chrome, iOS */
  -o-transform: scale(1.2); /* Для Opera */
  transform: scale(1.2);
}

.rb-gallery .text-gallery{
  color: #000;
  line-height: 1;
  text-align: left;
  padding: 10px 0;
  transition: 0.5s;
}
.rb-gallery-item:hover .text-gallery,
.rb-gallery-inner.style-over .rb-gallery-link:hover + .text-gallery{
  opacity: 1;
}
.rb-gallery-inner.style-over .rb-gallery-link {
  display: block;
  width: 100%;
  height: 100%; 
  position: absolute;
  top: 0;
  z-index: 10;
}
.rb-gallery-inner.style-over .text-gallery {
  position: absolute;
  padding: 20px;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.rb-gallery .col-lg-1, 
.rb-gallery .col-lg-12, 
.rb-gallery .col-lg-2, 
.rb-gallery .col-lg-3, 
.rb-gallery .col-lg-4, 
.rb-gallery .col-lg-6 {
  float: left;
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
  box-sizing: border-box;
}
/* Magnific Popup Style ----------------*/
.rb-gallery .mfp-image-holder .mfp-close, 
.rb-gallery .mfp-iframe-holder  .mfp-close {
    color: white;
    right: -6px;
    text-align: right;
    padding-right: 6px;
    width: 100%;
}
.rb-gallery .mfp-bottom-bar {
    margin-top: -36px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    cursor: auto;
}
.rb-gallery .mfp-title {
    text-align: left;
    line-height: 18px;
    color: #f3f3f3;
    word-wrap: break-word;
    padding-right: 36px;
}
.rb-gallery .mfp-counter {
    position: absolute;
    top: 0;
    right: 0;
    color: #cccccc;
    font-size: 12px;
    line-height: 18px;
}
.rb-gallery .mfp-arrow:hover, 
.rb-gallery .mfp-arrow:focus {
    opacity: 1;
}
.rb-gallery button.mfp-close, 
.rb-gallery button.mfp-arrow {
    overflow: visible;
    cursor: pointer;
    background: transparent;
    border: 0;
    -webkit-appearance: none;
    display: block;
    outline: none;
    padding: 0;
    z-index: 1046;
    -webkit-box-shadow: none;
    box-shadow: none;
}
.rb-gallery .mfp-arrow-right {
    right: 0;
}
.rb-gallery .mfp-arrow {
    position: absolute;
    opacity: 0.65;
    margin: 0;
    top: 50%;
    margin-top: -55px;
    padding: 0;
    width: 90px;
    height: 110px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@media (min-width: 1200px) { 
  .rb-gallery .col-lg-2:nth-child(6n+1), 
  .rb-gallery .col-lg-3:nth-child(4n+1), 
  .rb-gallery .col-lg-4:nth-child(3n+1), 
  .rb-gallery .col-lg-6:nth-child(2n+1) {
    clear: left;
  }
  .rb-gallery .col-lg-1 {
    width: 8.33333333%;
  }
  .rb-gallery .col-lg-2 {
    width: 16.66666667%;
  }
  .rb-gallery .col-lg-3 {
    width: 25%;
  }
  .rb-gallery .col-lg-4 {
    width: 33.33333333%;
  }
  .rb-gallery .col-lg-6 {
    width: 50%;
  }
  .rb-gallery .col-lg-12 {
    width: 100%;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .rb-gallery .col-md-2:nth-child(6n+1), 
  .rb-gallery .col-md-3:nth-child(4n+1), 
  .rb-gallery .col-md-4:nth-child(3n+1), 
  .rb-gallery .col-md-6:nth-child(2n+1) {
    clear: left;
  }
  .rb-gallery .col-md-4 {
    width: 33.3333%;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
	.rb-gallery  .col-sm-2:nth-child(6n+1),
	.rb-gallery  .col-sm-3:nth-child(4n+1),
	.rb-gallery  .col-sm-4:nth-child(3n+1),
	.rb-gallery  .col-sm-6:nth-child(2n+1) {
		clear:left;
	}
  .rb-gallery .col-sm-2 {
    width: 16.6666%;
  }
  .rb-gallery .col-sm-3 {
    width: 25%;
  }
  .rb-gallery .col-sm-4 {
    width: 33.3333%;
  }
  .rb-gallery .col-sm-6 {
    width: 50%;
  }
  .rb-gallery .col-sm-12 {
    width: 100%;
  }
}
@media (min-width: 640px) and (max-width: 768px) {
  .rb-gallery .col-xs-2:nth-child(6n+1),
	.rb-gallery .col-xs-3:nth-child(4n+1),
	.rb-gallery .col-xs-4:nth-child(3n+1),
	.rb-gallery .col-xs-6:nth-child(2n+1) {
		clear:left;
	}
  .rb-gallery .col-xs-6 {
    width: 50%;
  }
}
@media (max-width: 640px) {
  .rb-gallery .col-xs-6 {
    width: 100%;
  }
}
