.geodir-image-container{
  ul.geodir-images{
    list-style: none !important; // we never want a list style here
    clear: both;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    li{
      box-sizing: border-box;
      position: relative;
      width: 100%;
      display: inline-block;
      text-align: center;
      //border: 1px solid #CCCCCC;
      overflow: hidden;
      padding:0 !important;
      margin: 0; // don't important this as it breaks the fade effect
      border-radius: 4px;
      min-width: 110px;

      &:after{
        content: '';
        display: block;
        margin-top: 65%;
      }
      img{
        padding: 0;
        float: left;
        min-width: 92%;
        max-width: 100%;
        position: absolute;
        margin: auto;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
        transition: transform .5s;
        transition-timing-function: ease-in-out;
        width: 100%;
        height: auto;
      }


      a{
        position: initial !important;
        display: block;
      }

      a.geodir-link-image,
      a.geodir-lightbox-image{

        i,svg.svg-inline--fa{
          display: none;
        }

        &:hover{

          i,svg.svg-inline--fa{
            display: block;
            text-rendering: auto;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            position: absolute;
            color: #ffffffbd;
            background: #0000002b;
            width: 100%;
            height: 100%;
            padding-top: 25%;
            padding-bottom: 20%;
          }

          i{
            font-size: 30px;
          }

        }
        &:hover img{
          transform: scale(1.1);
        }
      }

      img{
        border-radius: 4px;
        object-fit: cover;
        height:100%;
      }
    }



    // if we want to show a background image instead of the actual image for background cover/contain, use: https://css-tricks.com/replace-the-image-in-an-img-with-css/
    &.geodir-slides{
      li{

        a.geodir-link-image,
        a.geodir-lightbox-image{
          &:hover:after{
            font-size: 25px;
            padding-top: 30%;

          }
        }

      }
    }
    &.geodir-gallery{
      li{
        box-sizing: border-box;
        position: relative;
        width: 24%;
        margin-right: 1%;
        margin-bottom: 1%;
        display: inline-block;
        text-align: center;
        border: 1px solid #CCCCCC;
        overflow: hidden;
        padding:0;

        @media screen and (max-width: 420px) {
          width: 100%;
        }
      }
    }
  }

  .geodir-carousel{
    padding: 0;
    margin: 0;
    ul.geodir-images li{
      border-radius: 0;
      img{
        border-radius: 0;
      }
    }
  }

  // keep thumbnails square
  &.geodir-image-sizes-thumbnail{
    ul.geodir-images li img{
      position: inherit;
    }
  }

  &.gd-image-cover-x{
    ul.geodir-images{
      li{
        img{
          height: auto;
        }
      }
    }
  }

  &.gd-image-cover-y{
    ul.geodir-images{
      li{
        img{
          object-fit: contain;
          height: 100%;
          width: auto;
          max-width: none;
          //left: 50%;
          //-webkit-transform: translateX(-50%);
          //transform: translateX(-50%)
        }
      }
    }
  }

  &.gd-image-cover-n{
    ul.geodir-images{
      li{
        img{
          object-fit: contain;
        }
      }
    }
  }

}


// only show first image of gallery on cat list view
.geodir-category-list-view{
  .geodir-image-container {
    ul.geodir-images {
      li.geodir-active-slide{
        z-index: 1 !important;
      }
      &.geodir-gallery{
        li {
            display: none;
            width: 100%;
          &:first-child{
            display: block;
          }
        }
      }
    }
  }
}
