// Demo 29

// Home
// # Content
// 1. Home Base ---------
// 2. Home Sections --------
//    2.1) Home Section
//    2.2) Featured Section
//    2.3) Info Section
//    2.4) Banner Section
//    2.5) Blog Section
//    2.6) Partners

// 3 Responsive -------

// 1. Home Base
.home {
    section {
      margin-bottom: 1.5rem;
    }
  
    .featured-section {
      margin-bottom: 3.1rem;
    }

    .banner-section.home-banner img {
        height: 327px;
    }
}

a.with-icon {
  font: 700 1.4rem $font-family;
  letter-spacing: 0.15em;
  color: $primary-color-dark;
  border-bottom: 1px solid transparent;

  i {
    margin-left: 1rem;
  }

  &:hover {
    border-bottom-color: $secondary-color;
  }

  &.btn{
    padding: 1.5rem 2rem;
    border: 2px solid #e7e7e7;

    &:hover {
      background-color: $primary-color;
      border-color: $primary-color;
      color: #fff;
      text-decoration: none;
    }        
  }

  &.align-center {
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .section-title & {
    color: $primary-color;
  }
}

.section-title {
  h2 {
    font-size: 1.6rem;
    color: #222529;
    letter-spacing: 0.15em;
  }

  &.vertical-line {
    justify-content: flex-start;
  }

  hr.vertical {
    height: 25px;
  }
}

// 2. Home Sections
// 2.1). Home Banner
.height-x1 {
    height: 335px;

    &.col-lg-5 {
        height: 336px;
    }
}

.height-x2 {
  height: 671px;
}

.height-x3 {
  height: 380px;
}

.height-x1,
.height-x2 {
  >div {
    height: 100%;
  }
}

.home-banner {
  position: relative;
  padding-bottom: 2rem;

  figure {
    position: relative;
    height: 100%;
    margin: 0;
    background: #f1f4f9;

    img {
      object-fit: contain;
      height: 100%;

      .home & {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 75%;
      }
    }

    &:after {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      right: 0;
      background-color: rgba(0, 0, 0, .1);
      opacity: 0;
      transition: all 0.25s;
      z-index: 3;
      content: '';
    }
  }

  &:hover {
    figure:after {
      opacity: 1;
    }
  }

  .banner-content {
    position: absolute;
    font-family: $font-family;
    letter-spacing: 0.01em;
    line-height: 1;
    text-transform: uppercase;
    z-index: 3;
    padding: 0 1rem;

    p {
      color: $secondary-color;
      font-weight: 600;
      
      .height-x1 & {
        margin-bottom: 2.6rem;
        font-size: 1.07em;
      }

      .height-x2 & {
        margin-bottom: 3.2rem;
        font-size: 1.43em;
      }
    }

    span {
        font-size: .85em;
        opacity: 0.5;
        letter-spacing: 0.04em;
        font-weight:  400;
        line-height: 20px;
        color: #fff;
    }

    h3 {
      text-align: right;
      color: $primary-color-dark;
      text-transform: none;

      strong {
        line-height: 1.3;
        text-transform: uppercase;
      }

      .height-x1 & {
        margin-bottom: 1.9rem;
        font-size: 2em;
        line-height: 1.1;

        strong {
          font-size: 3.4rem;
        }
      }
    }

    h4 {
        font-size: 1.8em;
        line-height: 1.1;
        letter-spacing: 0.01em;
        color: #fff;
    }

    .container {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap-reverse;
      align-items: center;
    }
  }

  .banner-info {
    padding-left: 3px;

    a.btn.skew-box {
      margin-bottom: .9rem; 
      font: 700 1.72em $second-font-family;
      color: #fff;
      background-color: $primary-color-dark;
      padding: .7rem 1.3rem .8rem;
      letter-spacing: 0.01em;
      border: none;

      &:hover {
        background-color: $primary-color;
      }
    }

    .sale-off {
      margin-bottom: 4.3rem;
      font: 700 1.5em $second-font-family;
      color: $primary-color-dark;
      text-transform: uppercase;
      text-align: left;
      position: relative;
      transform: rotate(-2deg);

      &:before {
        content: 'UP TO';
        font: 700 1.34rem $second-font-family;
        letter-spacing: 0;
        color: $primary-color-dark;
        opacity: 0.6;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translate(-80%, -50%) rotate(-90deg);
      }
    }      

    span {
      display: inline-block;
      padding: 1px 1.2rem 2px 1.2rem;
      margin-right: 5px;
      font: 700 1.61em Poppins,sans-serif;
      letter-spacing: 0;
      opacity: 1;
      line-height: 1.2;
      color: #fff;
      background-color: $primary-color-dark;
    }
  }

  .skew-box {
      transform: rotate(-2.5deg);
  }

  .content-top {
    top: 3.4rem;
    text-align: center;
    width: 100%;
  }

  .content-right {
    bottom: 5rem;
    right: calc(3.68% - 8px);
    text-align: right;
  }

  .content-left {
      left: calc(5.79% - 9px);
      top: 51.3%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;

      > h3 {
        .height-x2 & {
          margin-bottom: 3.5rem;
          font-size: 3.22em;
          line-height: 1.1;
          letter-spacing: .007em;
        }
      }
  }

  .content-bottom {
      bottom: 3.8rem;
      text-align: center;
      width: 100%;

    span {
      font-weight: 500;
      font-size: .9em;
      letter-spacing: 0.055em;
    }

    h4 {
      margin-top: 4px;
      font-size: 2em;
    }
  }

  .full-content {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-bottom: 2rem;

    .left-content {
      margin-right: 5rem;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
    }

    span {
      font: 700 1.6rem $second-font-family;
    }

    h4 {
      margin-bottom: 6px;
      font-size: 3.58em;
      text-transform: none;
      letter-spacing: 0.005em;
    }

    button {
      color: #fff;
      padding: 1.8rem 2rem;
      margin-bottom: 1rem;
    }

    .banner-info {
      padding-top: 4.8rem;

      a.btn {
          padding: .29em .43em .3em;
          margin-bottom: 1rem;
          background-color: #fff;
          color: $primary-color-dark;
          font-size: 2.14em;
          text-transform: none;
      }

      .sale-off {
          font-size: 1.9em;
        color: #fff;

        &:before {
          color: #fff;
          font-size: 1.67rem;
        }

        span {
          margin-right: .6rem;
          font-size: 4.17rem;
          background-color: #606da6;
          padding: 1px 1.2rem 0;
          line-height: 1.2;
          letter-spacing: 0;
        }
      }
    }
  }

  .btn {
    color: $primary-color;
    letter-spacing: 0.15em;
    line-height: 1;
    background: transparent;
    border: 2px solid #e7e7e7;
    font-weight: 700;

    .height-x1 & {
      padding: 1.1rem 1.5rem;
      font-size: 1.1rem;
      letter-spacing: 0.17em;

      i {
          margin-left: .7rem;
      }
    }

    .height-x2 & {
          padding: 1.6rem 2.3rem;
        margin-bottom: 4rem;
        font-size: 1.4rem;

        i {
            margin-left: 7px;
        }
    }

    &:hover {
      background-color: $primary-color;
      border-color: $primary-color;
      color: #fff;
    }
  }
}

.grid-item {
    >.row,
    [class*='col-'] {
      height: 100%;
  
      .home-banner {
        height: 100%;
      }
    }
}

// 2.2) Featured Section
.featured-section {
  position: relative;
  margin-top: 3.4rem;

  .heading {
    margin-bottom: 2.5rem;  
  }

  a.with-icon {
    padding: .893em 1.56em;
    margin-top: 1.3rem;
    margin-bottom: .9rem;

    i {
        margin-left: 1.3rem;
    }
  }
}

.product-filter-item {
  display: flex;
  align-items: center;
  margin-right: 30px;

  &:hover a,
  a.active {
      color: $primary-color;
      border-bottom-color: $primary-color;;
  }

  a {
      display: inline-block;
      padding: 0;
      color: inherit;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: .15em;
      border-bottom: 3px solid transparent;
      border-top: 2px solid transparent;
      line-height: 24px;
      font-family: $second-font-family;
      color: #777;
  }
}

// 2.3) Info Box
.info-box-container {
  padding: 5px 0 2.9rem;

  .info-box {
    display: flex;
    align-items: center;

    i {
        margin-top: -2px;
        margin-right: 1.5rem;
        font-size: 3.5rem;
    }
  } 
}

// 2.4) Banner Section
.banner-section {
  padding-top: 307px;

  .btn {
    color: #fff;

    &:hover {
      background: #fff;
      color: $primary-color-dark;
      border-color: #fff;
    }
  }
  
  .banner-content.full-content {
      justify-content: space-between;
      left: 5.5%;
      right: 12.95%;
      top: 50.3%;

      span {
        font-size: 16px;
        color: rgba(255,255,255,0.4);
        line-height: .9;
        opacity: 1;
        font-weight: 700;
        letter-spacing: .025em;
      }
  }

  h4 {
      line-height: .95;
      letter-spacing: 0.006em;
  }

  .btn {
      padding: 1.6rem 2.3rem;

      i {
          margin-left: .7rem;
      }
  }

  .banner-info {
      padding-top: 3.6rem;

      .btn {
          padding: .783rem 1.7rem;
      }
  } 

  .sale-off span {
      display: inline-block;
      padding: 0 .5rem;
      line-height: 1.3;
  }
}

// 2.5) Blog Section
.blog-section {
  margin-bottom: 3px;
  padding-top: 1.9rem;

  .section-title {
    padding-bottom: 1.3rem;

    h2 {
      padding-bottom: 1px;
      font-size: 22px;
      line-height: 1;
      font-weight: 700;
    }

      hr.vertical {
        margin: 0 2.5rem;
        height: 20px;
      }
  }

  a.with-icon {
    font-family: $second-font-family;

    i {
        margin-left: 1.6rem;
    }

    &:hover {
      border-bottom-color: transparent;
    }
  } 

  >* {
    display: flex;
    align-items: center;
  }

  &:hover {
    figure:after {
      opacity: 1;
    }
  }  

  .post-media {
    position: relative;
    width: 100%;

    img {
        width: 100%;
      min-height: 280px;
    }

    &:after {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      right: 0;
      background-color: rgba(0, 0, 0, .1);
      opacity: 0;
      transition: all 0.25s;
      z-index: 1;
      content: '';
    }
  }

  .post-date {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    top: 1.2rem;
    left: 1.2rem;
    width: 6.6rem;
    height: 7.3rem;
  }

  .month {
    letter-spacing: -.015em;
  }

  .day {
    margin-bottom: .4rem;
    font-size: 2.8rem;
  }

  .post-body{
    display: flex;
    padding-bottom: 1.3rem;
    flex-direction: column;
    align-items: flex-start;

    p {
      -webkit-line-clamp: 3;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      overflow: hidden;
      font: 400 1.3rem $font-family;
      letter-spacing: 0;
      line-height: 25px;
      color: #777;
    }

    a.btn {
        padding: 0.7rem 1.9rem .6rem 2rem;
      font-size: 1.1rem;
      font-family: $second-font-family;
    }
  }

  .post-category {
        padding: .8rem 1.5rem;
        font: 600 1.1rem/1 $second-font-family;
        color: #fff;
        letter-spacing: 0.01em;
        border-radius: 5px;
        background-color: $primary-color-dark;
  }

  .post-title {
    margin: 1.8rem 0 1.5rem;
    font: 700 2rem/1 $second-font-family;
    letter-spacing: 0.005em;
    color: $primary-color-dark;
  }
}

.instagram-media {
  &:after {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    background-color: rgba(0, 0, 0, .1);
    opacity: 0;
    transition: all 0.25s;
    z-index: 1;
    content: '';
  }

  &:hover:after {
    opacity: 1;
  }
}

// 2.6) Partners
.partners-panel {
  height: 160px;
  display: flex;
  align-items: center;
  background-color: $primary-color-dark;

  .owl-carousel .owl-item img {
    max-width: none;
    width: auto;
    margin-left: auto;
    margin-right: auto;
  }

  .owl-stage {
    display: flex;
    align-items: center;
  }

  .owl-theme .owl-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

// 3. Responisve
@media (max-width: 1500px) and (min-width: 991px) {
  .custom-col-3 {
    -ms-flex: 0 0 25%;
    flex: 0 0 25%;
    max-width: 25%;
  }

  .custom-col-7 ,
  .custom-col-5 {
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 1400px) {
    .height-x1 {
        height: 250px;

        &.col-lg-5 {
            height: 251px;
        }
    }

    .info-box {
        i {
            margin-right: .6rem;
        }

        p {
            font-size: 1.2rem;
        }
    }

    .height-x2 {
        height: 501px;
    }

    .home-banner .banner-content {
        font-size: 1rem;
    }
}

@media (max-width: 1359px) {
  .home .featured-section .nav.nav-tabs {
    position: relative;
    left: 0;
  }
}

@media (max-width: 1199px) {
  .banner-post {
    margin-bottom: 4rem;
    
    .post-info {
      margin: 2rem 0;
    }
  }
}

@media (max-width: 991px) {
  .height-x3 {
    height: 440px;
  }

    .product-filter-item {
        margin: 0 1rem;
    }

  .home-banner .banner-content {
    &.full-content .left-content {
      margin-right: 0;
    }

    .container {
      flex-direction: column-reverse;
      align-items: center;
    }
  }
}

@media (max-width: 575px) {
  .info-box-container {
    .info-box {
      margin:  1rem 0;
    }
  }

  .height-x1 {
    height: 220px;
  }

  .height-x2 {
    height: 420px;
  }

  .height-x2 .home-banner .banner-content {
    margin-top: 1rem;
    margin-left: 1rem;

    .btn {
      padding: 1.5rem 2rem;
    }

    h3 {
      font-size: 3rem;
    }
  } 

  .home-banner .banner-content {
    margin-right: 1rem;

    h4 {
      font-size: 2rem;
    }

    .banner-info a.btn.skew-box {
      padding: .5rem 1rem;
    }
  }

  .home .featured-section .nav.nav-tabs {
    justify-content: center;
  }

  .home .nav-tabs .nav-item .nav-link {
    margin: 1rem;
  }

  .home-banner .banner-content.content-right {
    bottom: 3.5rem;
  }
}

@media (max-width: 479px) {
  .section-title.vertical-line {
    h2 {
      margin-right: 4rem;
      margin-bottom: 1rem;
    }

    hr {
      display: none;
    }
  }

    .partners-panel .owl-carousel .owl-item img {
      max-width: 130px;
    }

  .section-title {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }
}