/* Media Items - Common Side and Top Image Items */
//making media

.bordered .item-media,
.bordered .entry-thumbnail {
  margin: 0;
  z-index: 1;
}

.bordered.full-padding .item-media {
  margin: 0;
}

/* side and vertical items paddings */
.full-padding {
  padding: 40px;
}

.content-padding .item-content {
  padding: 63px 40px 72px;
}

//make padding smaller on small screens
@media (max-width: 992px) {
  .full-padding {
    padding: 30px;
  }
  .content-padding .item-content {
    padding: 30px;
  }
}

/*side item*/
.side-item {
  h2, h3, h4 {
    line-height: 1;
  }
  .row {
    margin: 0;
    [class*="col-"] {
      padding: 0;
      margin: 0;
    }
  }
  .item-title + .item-content {
    padding-top: 30px;
  }
  [class*="col-"] > .item-title {
    padding: 15px 30px;
    h2, h3, h4 {
      margin: 0;
    }
  }
  //color item title not inside .item-content - border width 1px
  &.bordered [class*="col-"] > .item-title {
    margin: -1px;
  }
}

/*-xs- -sm- side-item paddings and margins*/
@media (max-width: 767px) {
  .no-content-padding,
  .full-padding {
    [class*='col-sm-'],
    [class*='col-xs-'] {
      .item-content {
        padding-left: 30px;
      }
      //bootstrap 3
      &[class*='sm-pull-'],
      &[class*='xs-pull-'],
        //bootstrap 4
      &[class*='order-sm-1'],
      &[class*='order-xs-1'] {
        .item-content {
          padding-left: 0;
          padding-right: 30px;
        }
      }
    }
    .col-sm-12 .item-content,
    .col-xs-12 .item-content {
      padding-top: 30px;
      padding-left: 0;
      padding-right: 0;
    }
  }
}

/*-md- side-item paddings and margins*/
@media (min-width: 768px) {
  .no-content-padding,
  .full-padding {
    [class*='col-md-'] {
      .item-content {
        padding-left: 30px;
      }
      //bootstrap 3
      &[class*='md-pull-'],
      //bootstrap 4
      &[class*='order-md-1'] {
        .item-content {
          padding-left: 0;
          padding-right: 30px;
        }
      }
    }
    .col-sm-12 .item-content {
      padding-top: 30px;
      padding-left: 0;
      padding-right: 0;
    }
  }
}

/*-lg- side-item paddings and margins*/
@media (min-width: 992px) {
  .no-content-padding,
  .full-padding {
    [class*='col-lg-'] {
      .item-content {
        padding-left: 30px;
      }
      //bootstrap 3
      &[class*='lg-pull-'],
      //bootstrap 4
      &[class*='order-lg-1'] {
        .item-content {
          padding-left: 0;
          padding-right: 30px;
        }
      }
    }
    .col-md-12 .item-content {
      padding-top: 30px;
      padding-left: 0;
      padding-right: 0;
    }
  }
}

/*-xl- side-item paddings and margins*/
@media (min-width: 1200px) {
  .no-content-padding,
  .full-padding {
    [class*='col-xl-'] {
      .item-content {
        padding-left: 30px;
      }
      &[class*='order-xl-1'] {
        .item-content {
          padding-left: 0;
          padding-right: 30px;
        }
      }
    }
    .col-lg-12 .item-content {
      padding-top: 30px;
      padding-left: 0;
      padding-right: 0;
    }
  }
}

/* vertical media item */
.vertical-item {
  .item-media + .item-content {
    padding-top: 24px;
  }

  &.content-padding {
    .item-content {
      padding: 24px;
    }
    &.padding-small .item-content {
      padding: 26px 10px 23px;
    }
  }

  &.content-absolute {
    position: relative;
    .item-content {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 20px 30px 40px;
      z-index: 2;
      @media (max-width: 991px) {
        padding: 20px 10px 20px;
      }
    }
    &.vertical-center .item-content {
      top: 0;
    }
  }
  //title at the bottom of item
  & + .item-title {
    padding: 10px 30px;
    h2, h3, h4 {
      margin: 0;
    }
  }
}

/* item meta */
.item-meta {
  i {
    width: 1em;
    text-align: center;
    position: relative;
    font-size: 14px;
    margin-right: 2px;
  }
  span {
    padding: 0 0.5em;
  }
}

/* item media & item links */
.item-media {
  position: relative;
  overflow: hidden;
  //fixing cut images on extra large screens
  img {
    width: 100%;
  }
  &.cover-image {
    height: 100%;
  }
}

.media-links {
  text-align: center;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  //.links-wrap
  div {
    position: absolute;
    top: 50%;
    width: 100%;

    // media-link a height 60/2
    margin-top: -30px;
    z-index: 4;
    //making links to top right corner when absolute content is used
    //to avoid overlap the content
    .content-absolute & {
      a {
        transition: all 0.35s ease 0.1s;
        &:hover {
        }
        &:first-child {
          transition-delay: 0s;
        }
      }
    }
  }
}

@media (max-width: 991px) {
  .small-image {
    .media-links div {
      margin-top: -60px;
    }
  }
}

//overlay
.media-links:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba($darkColor, 0.3);
  opacity: 0;
  transition: all 0.2s linear;
}

[class*="-item"]:hover .media-links:before {
  opacity: 1;
}

.media-links a.abs-link {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0;
  [class*="-item"]:hover & {
    opacity: 1;
  }
}

[class*="-item"] {
  .links-wrap {
    a {
      position: relative;
      width: 60px;
      height: 60px;
      line-height: 58px;
      top: -100px;
      display: inline-block;
      z-index: 5;
      font-size: 30px;
      text-align: center;
      opacity: 0;
      transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s;
    }
   
    a.link-zoom {
      transition: all 0.35s ease 0.1s;
      color: $lightColor;
      &:hover {
          transform: scaleX(-1);
        opacity: 1;
        color: $colorMain;
      }
    }
    a:before {
      font-family: 'FontAwesome';
      content: "\f002";
    }
    a.link-anchor:before {
      content: "\f041";
    }
  }
}

[class*="-item"]:hover {
  .links-wrap a {
    top: 0;
    filter: alpha(opacity=100);
    opacity: 1;
  }
  .media-links div {
    filter: alpha(opacity=100);
    opacity: 1;
  }
}

/* item icons */
.item-icons {
  margin-top: 20px;
  font-size: 16px;
  i {
    font-size: 14px;
    padding: 0 4px;
  }
  .col {
    text-align: center;
    padding-top: 15px;
    padding-bottom: 20px;
  }
}
