/*------------------------------------------------------------
BLOCKS CMS
====================================*/

/* Variables Custom */
/**************************************/

// Section
.block-section {
  margin-bottom: 5rem;
}

// Banner
.block-banner {
  text-align: center;
  .img-wrapper {
    margin-bottom: 1.5rem;
  }
  .text-wrapper {
    font-size: 1.6rem;
    p {
      margin-bottom: 0;
    }
  }
  .btn {
    margin-top: 1.5rem;
  }
  svg {
    display: none;
  }
}

// Img + text
.block-img-text {
  text-align: center;
  .img-wrapper {
    margin-bottom: 2.5rem;
  }
  .title-wrapper {
    margin-bottom: 1.5rem;
  }
  .subtitle-wrapper {
    margin-top: -1rem;
    margin-bottom: 3.5rem;
  }
  p {
    margin-bottom: 0;
  }
  .btn {
    margin-top: 1.5rem;
  }
}

// Icon + text
.block-icon-text-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1.5rem;
}
.block-icon-text {
  @extend .h6;
  display: flex;
  padding: 0 1.5rem;
  margin-bottom: 2rem;
  align-items: center;
  text-decoration: none;

  .text-wrapper {
    margin-left: 3rem;
    p {
      margin-bottom: 0;
    }
  }
}
a.block-icon-text:hover {
  color: $secondary;
}

// Text
.block-text {
  text-align: center;
  .title-wrapper, .subtitle-wrapper {
    margin-bottom: 1.5rem;
  }
  p:last-of-type {
    margin-bottom: 0;
  }
  .btn {
    margin-top: 1.5rem;
  }
}

// Title
.block-title {
  margin: 0;
  .title-wrapper {
    margin-bottom: 1.5rem;
  }
}

// Blockquote
.block-blockquote {
  .blockquote {
    padding: 1rem 0 1rem 2rem;
    border-left: 0.5rem solid $dark;
  }
}

// Button
.block-button {
  text-align: center;
}
.block-text-default + .block-button {
  margin-top: -3rem;
}

// Image
.block-img {
  .img-wrapper {
    display: block;
  }
}

/* RESPONSIVE */
/***************************************/
@include media-breakpoint-down(sm) {
  // Icon + text
  .block-icon-text {
    br {
      display: none;
    }
  }
}
@include media-breakpoint-only(md) {
  // Banners
  .col-md-6 .block-banner {
    .text-wrapper {
      padding: 0 1.5rem;
    }
    .title-wrapper {
      font-size: 3rem;
    }
  }
}
@include media-breakpoint-up(md) {
  // Banner
  .block-banner {
    position: relative;
    .img-wrapper {
      margin-bottom: 0;
    }
    .text-wrapper {
      position: absolute;
      bottom: 3rem;
      width: 100%;
      padding: 0 10%;
      z-index: 1;
      font-weight: $font-weight-light;
    }
    .btn {
      margin-top: 2rem;
    }

    &.light {
      .text-wrapper, .title-wrapper {
        color: $white;
      }
      svg {
        fill: $white;
      }
      .btn {
        color: $secondary;
        background: $white;
        border-color: $white;
        &.disabled, &:disabled {
          color: $secondary;
          background: $white;
        }
        &:hover {
          color: $secondary;
          background: $white;
          border-color: $light;
        }
      }
    }
  }

  // Img + text
  .block-img-text {
    display: flex;
    & > .row {
      align-items: center;
    }

    .img-wrapper {
      margin-bottom: 0;
    }

    .title-wrapper {
      margin-bottom: 2.5rem;
    }
    .subtitle-wrapper {
      margin-top: -1.5rem;
      margin-bottom: 3.5rem;
    }

    &.left {
      text-align: left;
    }
    &.right {
      text-align: right;
      & > .row {
        flex-direction: row-reverse;
      }
    }
  }

  // Icon + text
  .block-icon-text {
    flex: 0 0 50%;
    margin-bottom: 2rem;
  }

  // Text
  .block-text {
    .btn {
      margin-top: 2rem;
    }
  }
}
@include media-breakpoint-up(lg) {
  // Section
  .block-section {
    margin-bottom: 8rem;
  }

  // Banner
  .block-banner {
    .text-wrapper {
      padding: 0 15%;
      font-size: 2rem;
      line-height: 2.6rem;
    }
    svg {
      display: block;
      width: 7rem;
      height: 7rem;
      margin: 0 auto 0.5rem;
    }
  }

  // Img + text
  .block-img-text {
    margin-bottom: 9rem;
    .text-wrapper {
      padding: 0 15%;
    }
  }

  // Icon + text
  .block-icon-text-row {
    justify-content: center;
  }
  .block-icon-text {
    flex-direction: column;
    flex: 1;
    max-width: 25%;
    margin-bottom: 0;
    text-align: center;
    .icon-pattern-wrapper {
      margin-right: 0;
      margin-bottom: 1rem;
      margin-left: 2rem;
    }
  }

  // Text
  .block-text {
    margin-bottom: 9rem;
    .text-wrapper {
      padding: 0 15%;
    }
  }

  // Title
  .block-title {
    margin: 0;
  }

  // Button
  .block-text-default + .block-button {
    margin-top: -6rem;
  }
}
