.vs-gallery-layout1 {

  .vs-gallery-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: all ease 0.4s;
    background-color: rgba(#000, 0.6);
  }

  .vs-gallery-content {
    text-align: center;
    position: absolute;
    left: 0;
    top: 45%;
    width: 100%;
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: all ease 0.4s;
    transform: translateY(-50%);
  }


  .vs-gallery-btn {
    @include equal-size(80px);
    line-height: 78px;
    font-size: 22px;
    display: inline-block;
    border: 2px solid rgba($color: #ffffff, $alpha: 0.60);
    margin-bottom: 25px;
    color: $white-color;
    border-radius: 50%;

    &:hover {
      background-color: $theme-color;
      color: $white-color;
      border-color: transparent;
    }
  }


  .instagram-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    @include equal-size(80px);
    line-height: 80px;
    margin: -40px 0 0 -40px;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    transition: all ease 0.4s;

    i {
      line-height: 78px;
    }
  }

  .vs-gallery {
    position: relative;

    &:hover {

      .vs-gallery-content,
      .vs-gallery-overlay,
      .instagram-btn {
        opacity: 1;
        visibility: visible;
      }

      .vs-gallery-content {
        top: 50%;
        transition-delay: 0.4s;
      }

      .vs-gallery-overlay {
        height: 100%;
      }
    }
  }

}

.gallery-box {
  position: relative;
  --shape-space: 45px;
  --btn-size: 50px;
  overflow: hidden;

  &.box-rounded {
    border-radius: 50%;
  }

  img {
    border-radius: inherit;
    transition: all ease 0.4s;
  }


  .gal-btn {
    background-color: transparent;
    display: inline-block;
    text-align: center;
    width: var(--btn-size);
    height: var(--btn-size);
    line-height: var(--btn-size);
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 26px;
    z-index: 3;
    color: $white-color;
    transform: translate(-50%, -50%);
    transition: all ease 0.4s;
    opacity: 0;
    visibility: hidden;

    &:hover {
      background-color: $white-color;
      color: $theme-color;
    }
  }

  &:before {
    content: '';
    position: absolute;
    top: var(--shape-space);
    right: var(--shape-space);
    bottom: var(--shape-space);
    left: var(--shape-space);
    z-index: 2;
    opacity: 0;
    background-color: $theme-color;
    border-radius: inherit;
    transition: all ease 0.4s;
    transform: scale(0);
  }


  &:hover {
    .gal-btn {
      opacity: 1;
      visibility: visible;
      transition-delay: 0.2s;
    }

    &:before {
      opacity: 0.86;
      transform: scale(1);
    }

    img {
      transform: scale(1.2);
    }
  }


}



@include lg {
  .gallery-box {
    --shape-space: 20px;
    --btn-size: 30px;
  }
  
  .vs-gallery-layout1 {
    .instagram-btn {
      @include equal-size(60px);
      line-height: 60px;
      font-size: 14px;

      i {
        line-height: inherit;
      }
    }
  }
}


@include xs {
  .vs-gallery-layout1 {
    .vs-gallery-title {
      font-size: 18px;
    }

    .vs-gallery-btn {
      @include equal-size(60px);
      line-height: 60px;
      font-size: 18px;
    }

  }
}
