/* Media Items - Common Side and Top Image Items */
//making media
.item-content p:last-child {
  margin-bottom: -.7em;
}

//image overlap borders for border items - remove if not needed
.bordered .item-media,
.bordered .entry-thumbnail {
  margin: -1px -1px -1px -1px;
  z-index: 1;
}

.bordered .item-media.cover-image {
  //border * 2
  height: calc(100% + 2px);
}

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

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

.content-padding .item-content {
  padding: 40px 38px 40px 40px;
}

//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;
    }
  }
  //color item title
  .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 */
.ds.ms{
  .vertical-item{
    background-color: $darkgreyColor;
  }
}
.vertical-item {
  background-color: transparent;

  .item-media + .item-content {
    padding: 25px;
  }

  &.content-padding {

    .item-content {
      h5{
        margin-top: 0;
        margin-bottom: 5px;
        text-transform: none;
      }
      p{
        margin-bottom: 15px;
      }
      .social-icons{
        margin-bottom: 0px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        a{
          width: 22px;
          height: 22px;
          color: #bbb6b1;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          &:hover{
            color: $colorMain;
          }
        }
      }
      padding: 36px 40px;
      @media(max-width: 1199px) {
        padding: 30px;
      }
    }
    &.padding-small .item-content {
      //padding: 56px 57px 43px;
      @media(max-width: 1200px){
        padding: 25px;
      }
    }
  }

  &.content-absolute {
    position: relative;
    .item-content {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 20px 30px 30px;
      z-index: 2;
    }
    &.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 {
  font-size: 12px;
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  color: $fontColor;
  line-height: 20px;
  a{
    color: $fontColor;
    &:hover{
      color: $colorMain;
    }
  }
  i {
    width: 1em;
    text-align: center;
    position: relative;
    font-size: 1em;
    margin-right: 8px;
  }

  @media (min-width: 320px) {
    a{
      margin-right: 26px;
      &:last-child{
        margin-right: 0;
      }
    }
  }
}

/* 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 & {
      display: flex;
      justify-content: center;
      margin-top: 0;
      top: 50%;
      transform: translateY(-50%);
      a {
        transition: all 0.35s ease 0.1s;
        &:hover {
          transform: scaleX(-1);
        }
        &:first-child {
          transition-delay: 0s;
        }
      }
    }
  }

}
blockquote.vertical-item{
  padding: 52px 60px;
  margin: 50px 0px;
  margin-right: 0;
  max-width: 100%;
  @media(max-width: 545px){
    padding: 30px 25px;
  }
  .small-text{
    display: flex;
  }
}
//overlay
.media-links:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba($darkColor, 0.8);
  opacity: 0;
  transition: all 0.2s linear;
}

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

.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: 50px;
      height: 50px;
      line-height: 50px;
      background-color: #FFFFFF;
      border-radius: 50%;
      display: inline-block;
      z-index: 5;
      font-size: 14px;
      text-align: center;
      opacity: 0;
      transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0s;
      margin: 0 3px;
    }
    a.link-zoom {
      color: $darkgreyColor;
      &:hover {
        opacity: 1;
        color: $colorMain;
      }
    }
    a.link-anchor {
      color: $darkgreyColor;
      &:hover {
        opacity: 1;
        color: $colorMain;
      }

      //delay for second link
      transition-delay: 0.1s;

    }
    a:before {
      font-family: 'FontAwesome';
      content: "\f002";
    }
    a.link-anchor:before {
      content: "\f08d";
    }
  }
}

[class*="-item"]:hover {
  .links-wrap a {
    top: 0;
    filter: alpha(opacity=100);
    opacity: 1;
  }
  .media-links div {
    filter: alpha(opacity=100);
    opacity: 1;
  }
}
.testimonial-item{
  max-width: 1030px;
  width: 100%;
  margin: 0 auto;
}
/* item icons */
.item-icons {
  margin-top: 35px;
  font-size: 12px;
  .content-padding & {
    margin-top: 0;
  }
  i {
    padding: 0 4px;
  }
  .col {
    text-align: center;
    padding-top: 15px;
    padding-bottom: 20px;
  }
}
.surgical{
  .vertical-item{
    position: relative;
    .services-icon{
      position: absolute;

      left: 50%;
      transform:translate(-50%, -50%);
      width: 60px;
      height: 60px;
      background-color: $colorMain;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      transition:all 0.3s ease-in;
      i{
        color:$lightColor;
        transition:all 0.3s ease-in;
      }
      &:hover{
        background-color: $lightColor;
        i{
          color:$colorMain;
        }
      }
    }
    .item-content{
      padding: 30px 25px 20px 25px;
      @media (max-width: 767px){
        padding-left: 0;
        padding-right: 0;
      }
      h5{
        font-size: 24px;
        font-weight: bold;
        margin-top: 15px;
        margin-bottom: 0px;
      }
      span{
        text-transform: uppercase;
        font-family: "Montserrat", sans-serif;
        font-size: 12px;
        font-weight: 500;
        letter-spacing: 0.05em;
        margin-bottom: 12px;
        color:$colorMain;
      }
      p{
        margin-top: 20px;
      }
      .btn{
        margin-top: 14px;
        margin-right: 0;
      }
    }
  }

}
