.bp-element-gallery-images {
    &.layout-3 {
        padding: 0 10px;
        article.post & {
            margin-bottom: 30px;
        }
        .grid-item  {
            position: relative;
            float: left;
            height: 295px;
            .item-inner {
                display: contents;
            }
            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

            &.size-md {
                width: 70%;
            }
            &.size-md2 {
               width: 30%;
            }
        }
    }

    &.layout-4 {
      .grid-wrapper {
        padding: 0 30px;
      }

      .grid-item  {
        position: relative;
        float: left;
        height: 295px;
        .item-inner {
          display: contents;
        }
        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
        &.size-md {
          width: 33.333333%;
        }
        &.size-md2 {
          width: 16.666667%;
        }
      }
    }

    &.layout-1,
    &.layout-3,
    &.layout-4 {
        .grid-wrapper {
            margin: 0 -20px;
            .grid-item {
                padding: 10px;
            }
        }
    }

  &.layout-1 {
      .grid-wrapper {
          .grid-item {
              .item-inner {
                  position: relative;
                  text-align: center;
                  overflow: hidden;

                  &:hover {
                      .zoom-image {
                          opacity: 1;
                          -moz-transform: scale(1);
                          -webkit-transform: scale(1);
                          -ms-transform: scale(1);
                          transform: scale(1);
                      }
                  }
              }
          }
      }

      .zoom-image {
          z-index: 1;
          opacity: 0;
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          width: 100%;
          height: 100%;
          background: rgba(0, 0, 0, 0.6);
          color: #fff;
          padding: 15px;
          -moz-transition: all 0.4s ease-in-out 0s;
          -webkit-transition: all 0.4s ease-in-out 0s;
          -ms-transition: all 0.4s ease-in-out 0s;
          transition: all 0.4s ease-in-out 0s;
          -moz-transform: scale(0);
          -webkit-transform: scale(0);
          -ms-transform: scale(0);
          transform: scale(0);
          i {
            text-align: center;
            font-size: 24px;
            display: inline-block;
            position: absolute;
            top: 0;
            left: 0;
            width: 35px;
            height: 35px;
            line-height: 35px;
            margin: auto;
            right: 0;
            bottom: 0;
          }
      }
  }

  &.vblog-layout-sidebar {
      .wrap-element {
      .title-gallery {
        font-family: Playfair Display;
        font-weight: 400;
        font-style: italic;
        font-size: 18px;
        line-height: 1.666666;
        color: #1f1f1f;
        text-align: center;
        word-break: break-word;
        border: 1px dashed #cfcfcf;
        padding: 10px 15px;
        position: relative;
        margin-bottom: 30px;

        &::before {
          content: '';
          display: block;
          width: 8px;
          height: 8px;
          background-color: #fff;
          border-left: 1px dashed #cfcfcf;
          border-bottom: 1px dashed #cfcfcf;
          transform: rotate(-45deg);
          position: absolute;
          bottom: -5px;
          left: calc(50% - 5px);
        }
      }

      .grid-gallery {
        display: flex;
        flex-wrap: wrap;
        margin: -5px;

        .item-gallery {
          display: block;
          width: calc((100% - 30px) / 3);
          position: relative;
          margin: 5px;

          &::before {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            background-color: #fa777c;
            opacity: 0;
            transition: all .2s;
          }

          img {
            width: 100%;
          }

          &:hover:before {
            opacity: .3;
          }
        }
      }
    }
  }

  &.layout-2 {
    .grid-wrapper {
      margin: 0 -9px;
      &:after,
      &:before {
        content: '';
        clear: both;
        display: block;
      }

      .grid-item {
        width: 33.33%;
        float: left;
        padding: 4.5px;
        .item-inner {
          position: relative;
          text-align: center;
          overflow: hidden;
          margin: 0 4.5px;
          &:hover {
            .zoom-image {
              opacity: 1;
              -moz-transform: scale(1);
              -webkit-transform: scale(1);
              -ms-transform: scale(1);
              transform: scale(1);
            }
          }
        }
      }
    }

    .zoom-image {
      z-index: 1;
      opacity: 0;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      color: #fff;
      padding: 15px;
      -moz-transition: all 0.4s ease-in-out 0s;
      -webkit-transition: all 0.4s ease-in-out 0s;
      -ms-transition: all 0.4s ease-in-out 0s;
      transition: all 0.4s ease-in-out 0s;
      -moz-transform: scale(0);
      -webkit-transform: scale(0);
      -ms-transform: scale(0);
      transform: scale(0);
      i {
        text-align: center;
        font-size: 24px;
        display: inline-block;
        position: absolute;
        top: 0;
        left: 0;
        width: 35px;
        height: 35px;
        line-height: 35px;
        margin: auto;
        right: 0;
        bottom: 0;
      }
    }
  }

  &.kindergarten-layout-1 {
      .wrap-element {
          .gallery-item {
              display: block;
              position: relative;
              margin: 0;
              img {
                  width: 100%;
              }

              &::after {
                  content: '';
                  display: block;
                  width: 100%;
                  height: 100%;
                  position: absolute;
                  top: 0;
                  left: 0;
                  background: #ff6682;
                  opacity: 0;
                  transition: all .2s;
              }

              &:hover:after {
                  opacity: .3;
              }
          }
      }
  }

  &.kindergarten-layout-2 {
    .wrap-element {
      .gallery-gird {
        display: flex;
        flex-wrap: wrap;
        margin: -5px;

        .gallery-item {
          width: calc((100% - 50px) / 5);
          display: block;
          margin: 5px;
          border-radius: 10px;
          overflow: hidden;
          position: relative;

          &:nth-child(2),
          &:nth-child(4),
          &:nth-child(7),
          &:nth-child(9) {
            transform: translateY(28px);
          }

          &::before {
            content: '';
            display: block;
            width: 100%;
            height: 100%;
            background: #000;
            opacity: 0;
            position: absolute;
            top: 0;
            left: 0;
            transition: all .3s;
          }

          &::after {
            content: '+';
            font-family: Lato;
            font-weight: 400;
            font-size: 25px;
            line-height: 1.5;
            color: #f96a9a;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 45px;
            height: 45px;
            background: #ece8e7;
            border-radius: 50%;
            position: absolute;
            top: calc(50% - 22.5px);
            left: calc(50% - 22.5px);
            transform: scale(0);
            transition: all .3s;
          }


          img {
            width: 100%;
          }

          &:hover:before {
            opacity: .5;
          }

          &:hover:after {
            transform: scale(1);
          }
        }
      }
    }
  }
}
/*\
 *
 * Custom Magnific-popup
 *
\*/
.mfp-bg {
  z-index: 10000;
  background-color: #000;
  opacity: 0.9;
}

.mfp-wrap {
  z-index: 10000;
}

/* overlay at start */
.mfp-fade.mfp-bg {
  opacity: 0;

  -webkit-transition: all 0.3s ease-out;
  -moz-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}
/* overlay animate in */
.mfp-fade.mfp-bg.mfp-ready {
  opacity: 0.9;
}
/* overlay animate out */
.mfp-fade.mfp-bg.mfp-removing {
  opacity: 0;
}

/* content at start */
.mfp-fade.mfp-wrap .mfp-content {
  opacity: 0;

  -webkit-transition: all 0.3s ease-out;
  -moz-transition: all 0.3s ease-out;
  transition: all 0.3s ease-out;
}
/* content animate it */
.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
  opacity: 1;
}
/* content animate out */
.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
  opacity: 0;
}

/*responsive*/
@media (max-width: 767px) {
    .bp-element-gallery-images {
        &.kindergarten-layout-2 {
            .wrap-element {
                .gallery-gird {
                    .gallery-item {
                        width: calc((100% - 20px) / 2);
                        &:nth-child(2),
                        &:nth-child(4),
                        &:nth-child(7),
                        &:nth-child(9) {
                            transform: translateY(0px);
                        }
                    }
                }
            }
        }
    }
}
