/*
** Icon Box
*/
//styled icon
//used in icon box and inline icon
.icon-styled {
  text-align: center;
  display: inline-block;

  //icon style
  i {
    width: 1em;
  }

  //bordered icon, button icon and icon with background
  &[class*='bg-'],
  &[class*='btn-'],
  &.bordered,
  &.icon-bordered {
    width: 2.72em;
    height: 2.72em;
    box-sizing: content-box;
    display: flex;
    align-items: center;
    justify-content: center;
    .text-center & {
      margin-left: auto;
      margin-right: auto;
    }

    i {
      line-height: 3em;
    }

    border-width: 1px;
    border-style: solid;

    & + p {
      margin-top: 12px;
    }
  }

  &.icon-bordered:not([class*="color-"]) {
    border-color: $borderColor;
  }

  &[class*='bg-'] {
    border-color: transparent;
  }
  &.icon-top {
    align-self: flex-start;
    line-height: inherit;
  }

  //side icon box
  //styled icon in .media and in icon-inline component
  .media > &:first-child {
    flex-shrink: 0;
  }
  .media > &:last-child {
    flex-shrink: 0;
  }

  .icon-inline > &:first-child {
    flex-shrink: 0;
    margin-right: 10px;
  }
  .icon-inline > &:last-child {
    flex-shrink: 0;
    margin-left: 20px;
  }
}

//inline styled icon
.icon-inline {
  display: flex;
  align-items: center;
  .text-center & {
    justify-content: center;
  }

  & > * {
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 4px;
  }
}

//styled icon in box
.icon-box {
  //padding for icon box with borders and background
  &.ls,
  &.ds,
  &.cs,
  &.bordered,
  &.hero-bg,
  &.muted-bg,
  &.box-shadow {
    padding: 70px 30px;
  }

  //icon boxes in bordered columns
  .c-bordered & {
    padding: 70px 30px 30px;
    //if P element is a last child - adding bottom margin
    p:last-child {
      margin-bottom: 20px;
    }
  }
  //featured box in bordered columns
  @media (min-width:768px) {
    &.featured-box {
      position: relative;
      z-index: 2;
      margin: -6px -10px;
      //padding top and padding bottom more on negative top and bottom margins 70+6,
      //12px - 6 top and 6 bottom
      height: calc(100% + 12px);
      padding-top: 76px;
      padding-bottom: 36px;
    }
  }

  //icon
  .icon-styled {

    //bordered icon and icon with background
    &[class*='bg-'],
    &.icon-bordered {
      margin-bottom: 0.5em;
    }

    & + h2,
    & + h3,
    & + h4,
    & + h5 {
      margin-top: 0.9em;
    }
    //for counter teaser with counter h3 tag below p description
    & + p.small-text {
      font-size: 20px;
      font-weight: bold;
      letter-spacing: 0.2em;
      margin: 0.74em 0;
    }
  }

  //headings style
  h2, h3, h4, h5 {
    margin-bottom: 1em;
    line-height: 1;
  }
}

.media{
  h5{
    margin-top: 2px;
    margin-bottom: 17px;
  }
}
.icon-box{
  h5{
    margin-top: 0.9em;
    margin-bottom: 0.65em;
  }
}

.media,
.icon-box {
  h5{
    font-size: 24px;
    text-transform: capitalize;
  }
  //accent heading
  .heading-accent {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: inherit;
    font-size: 30px;
    margin-bottom: 0.6em;
    line-height: 1;

    @media (min-width: 1200px) {
      font-size: 38px;
    }
  }
  .icon-styled + .heading-accent {
    margin-top: 0.6em;
  }

  //special heading
  .special-heading {
    margin: 0;
    font-family: 'Poppins', sans-serif;
  }
}

.media {
  &.ls,
  &.ds,
  &.cs,
  &.bordered,
  &.hero-bg,
  &.muted-bg,
  &.box-shadow {
    padding: 30px;

    [class*='bg-'],
    .icon-bordered {
      margin-right: 10px;
      &:last-child {
        margin-right: 0;
        margin-left: 30px;
      }
    }

  }

  .media-body > p:first-child {
    margin-top: -0.2em;
  }
}

.side-icon-box {
  margin: 15px 0 32px;
  h4 {
    text-transform: uppercase;
    letter-spacing: 0.17em;
    margin-top: 0;
    margin-bottom: 15px;
  }
  @media (min-width: 1200px) {
    .icon-styled + .media-body {
      margin-left: 50px;
    }
    & {
      margin-bottom: 50px;
    }
  }
}
.cs .icon-absolute{
  position: relative;
  h5{
    margin: 0;
  }
  span{
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.8px;
    line-height: 16px;
    text-transform: uppercase;
    opacity: 0.8;
  }
  .icon-styled{
    position: absolute;
    top: 50%;
    left: 50%;
    transform:translate(-50% , -50%);
    z-index: -1;
    opacity:0.1;
    font-size: 100px;
  }
}
.ds .icon-absolute{
  position: relative;
  h5{
    margin: 0;
  }
  span{
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.8px;
    line-height: 16px;
    text-transform: uppercase;
    color: $colorMain;
  }
  .icon-styled{
    color:$lightColor;
    position: absolute;
    top: 50%;
    left: 50%;
    transform:translate(-50% , -50%);
    z-index: 0;
    opacity:0.1;
    font-size: 100px;
  }
}