.community-content-wrapper {
  margin-top: $navigation-height;

  article {
    padding: 0;
  }

  p {
    line-height: 22px;
    font-size: 14px;
  }

  article {
    background: transparent
  }
}
.m-a {
  margin: auto;
  float: none !important;
}

.header-lead {
  color: #fff
}

[debug] * {
 outline: rgba(red, 0.8) solid 1px
}

/**
 * ==========================================
 * COMMUNITY BLOCKS
 * ==========================================
 *
 * Each block / section of the landing page is
 * defined here.
 *
 * They shouldn't be related, moving a block
 * from it's original position, it should
 * work as expected.
 *
 * Namespace: .cm--
 *
 */

.cm--container {
  max-width: 1200px;
  margin: auto;
  width: 100%;

}

.cm--title {
  text-align: center;
  width: 100%;
  font-size: 1.8em;
  color: #4a4a4c;
  display: block;
  position: relative;
  margin-top: 60px;
  margin-bottom: 80px;
  font-weight: 800;

  &:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: #fb366e;
    top: 1.8em;
    left: 0;
    right: 0;
    margin: auto;
  }

  &.big-title {
    @media (max-width: $bp-small ) {
      &:after {
        top: 3em;
      }
    }
  }
}

.cm--center {
  @include vh-center(absolute);
}
.cm--h-center {
  @include h-center(absolute);
}
.cm--v-center {
  @include v-center(absolute);
}
.row {
  float: left;
  width: 100%;
}

.black-bg {
  background: rgba(0, 0, 0, 0.85)
}
.dark-blue-bg {
  background: #0e213b
}
.grey-bg {
  background: #F3F4F7
}

.light-blue-bg {
  background: #f7fbfc
}

.purple-bg {
  background: #96588A
}

/**
 * Crucial to work on diagonal layouts
 * setting the z-index
 */
 @for $i from 0 to 20 {
  .zi-#{$i} {
    z-index: $i;
  }
}
.zi-50 {
  z-index: 50;
}

/**
 *  Community header
 */
.cm--header {
  position: relative;
  height: $cm-header-height;
  width: 100%;
  font-family: $font-settings;
  background: url('../img/header-background.svg');
  background-repeat: no-repeat;
  background-size: cover;

  @media (max-width: $bp-medium + 280){
    min-height: 580px;
  }

  @media (max-width: $bp-medium){
    min-height: auto;
  }

  .al-badge {
    display: inline-block;
    padding-bottom: 3.25em;
    border-bottom: 2px solid #fff;
    width: 32px;
    height: 32px;

    use {
      fill: #46AEDA;
    }
  }

  .diagonal-white-tr {
    @include diagonal(-2deg, #fff, 170px, 'true') {}
    top: 100%;
    position: absolute;

    @media (max-width: $bp-medium) {
      display: none;
    }
  }

  .btn {
    max-width: 200px;

    img {
      top: -2px;
    }
  }
}

.header--content,
.header--graphic {
  position: relative;
  z-index: 50;
  min-height: 540px;
  overflow: hidden;

}
.header--content {
  color: #fff;
  @extend .fl;
  @extend .w-60;
  @extend .pl5;
  @extend .pr2;
  @extend .pv4;

  @media (max-width: $bp-medium) {
    padding: 60px 20px 0px 20px;
    min-height: auto;
  }

  .header--content__cta{
    margin: 20px 0 10px;
  }

  @media (max-width: $bp-small){
    width: 100%;
    text-align: center;

    .header--content__cta{
      width: 200px;
      margin: 20px auto 10px;
    }
  }

  h1, h3 {
    color: currentColor;

    span {
      font-size: 0.5em;
    }
  }

  h1 {
    padding-top: 0;
    margin-top: 0.5em;
    margin-bottom: 0.3em;
    font-weight: 800;
    font-size: 48px;
  }

  h3 {
    font-weight: normal;
  }

  &__page-subtitle {
    max-width: 420px;

    @media (max-width: $bp-small) {
      margin: 0 auto;
    }
  }
}

.header--graphic {
  @extend .fr;
  @extend .w-40;
  @extend .pv4;
  @extend .zi-12;
  @media (max-width: $bp-small){
    display: none;
  }
  img {
    max-height: 300px;
    transform: scale(1.6);
    transform-origin: top left;
  }
}


/**
 *  Community Sections
 */

.cm--section {

  @extend .pv5;
  width: 100%;
  clear: both;
  position: relative;
  float: left;

  &.relevant-search-result{
    min-height: 400px;
  }

  h4 {
    margin-bottom: 0.85em;
  }

  header {
    .icon {
      display: inline-block;
      margin-bottom: 24px;
    }
  }

  .content-title {
    font-family: 'Open Sans';
    font-weight: 600;
    color: $greyish-black;
    margin-bottom: 8px;
  }

  .content-article {
    display: block;
    max-width: 400px;

    @media ( max-width: $bp-small ) {
      position: relative;
      float: none;
      margin: auto;
    }
  }

  .flex {
    align-items: center;
    justify-content: center;

    @media (max-width: $bp-small) {
      display: block;
    }
  }


  &.realtime-search {
    .cm--container {
      transform: translateX(-50px);

      @media ( max-width: $bp-medium ) {
        transform: none
      }
    }
  }

  &.relevant-search-result {
    .cm--container {
      transform: translateX(-80px);

      @media ( max-width: $bp-medium ) {
        transform: none
      }
    }
  }
}

.section--content,
.section--graphic  {
  @extend .fl;
  @extend .ph4;
  @extend .mb4;
  position: relative;
  width: 50%;

  @media (max-width: $bp-small){
    width: 100%;
    text-align: center;
  }
}

.section--content {

  p {
    line-height: 21px;
  }
}

.section--graphic {
  img {
    &.iphone-screen {
      max-height: inherit;
      top: -220px;
      right: 0;
      position: absolute;
      height: 450px;
      @media (max-width: $bp-small){
        display: none;
      }
    }
  }
}


/**
 *  Community Section Dark/Dark-blue
 *  cm-showcase-right
 *  cm-showcase-center
 */
.cm--section__dark,
.cm--section__dark-blue {
  overflow: hidden;

  h1,h2,h3, h4,p {
    color: #fff
  }
}


/*
 * cm-showcase-right
 */

.cm-showcase {
  background-image: linear-gradient(to bottom, #26a0e7, #4b2e91);

  .section--graphic {

    @media (max-width: $bp-small) {
      overflow: hidden;

    }

    img {
      max-height: inherit;
      width: 130%;
      max-width: 560px;
      box-shadow: -4px -4px 40px rgba(black, 0.2);
      border-radius: 6px;
    }
  }

  .section--content {
    @extend .pv4;
    h1,h2,h3, h4,p {
      color: #fff
    }
  }

}

/*
 * cm-showcase-center
 */
.cm-showcase-center .section--content {
  left: inherit;
  right: inherit;
  transform: none;
  max-width: 620px;
  margin: auto;
}

.cm-showcase-center .section--graphic {
    left: inherit;
    top: inherit;
    bottom: 0;
    transform: none;
    max-width: inherit;
    position: absolute;


  img {
    max-height: inherit;
    max-width: 960px;
    width: 50%;
    position: absolute;
    display: block;
    top: inherit;
    left: 0;
    bottom: inherit;
    right: 0;
    transform: none;
    margin: auto;
  }
}

/**
 *  Community Get Started Section
 *
 */

.get-started {
  position: relative;

  .cm--container {
    z-index: 1;
    margin-top: -130px;
  }

  .diagonal-white-br {
    @include diagonal(4deg, #fff, 270px, 'true') {
      top: -200px;
      overflow: hidden;
      z-index: 0;
    }
  }

  .item--mention {
    font-weight: 600;
    color: #55606E;
    margin-bottom: 8px;
    font-size: 1em;
    font-family: 'Open Sans', sans-serif;
  }

  .item--description {
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    max-width: 360px;
    margin-top: 8px;
    width: 100%;
    float: none;
    margin: auto;
  }
}

/**
 *  Brands showcase section
 *
 */
.brands-showcase {
  background-image: linear-gradient(102deg, #3475c7, #4e006a);
  z-index: -1;
  color: #fff;

  @media (min-width: $bp-huge) {
    padding: 10em 0;
  }

  h2, h3, a {
    color: #fff
  }

  .diagonal-white-br {
    @include diagonal(4deg, #fff, 300px, 'true') {
      top: -250px;
      overflow: hidden;
      z-index: 99;

      body.safari &{
        top: -250px;
      }
    }
  }

  .content--graphic {
    width: 15%;
    float: left;
    position: relative;
    height: 200px;
    text-align: right;
    padding-top: 80px;

    img {
     display: inline-block;
     width: 74px;
    }
  }

  .content--text {
    width: 85%;
    float: left;
    position: relative;
    margin: 80px 0 60px;
  }

   .content--graphic,
   .content--text {
    @media ( max-width: $bp-small ) {
      width: 100%;
      text-align: center;
      padding-left: 1em;
      padding-right: 1em;

      &.content--text {
        margin-top: 1em;
      }
    }
   }

  ul.trust-us {
    list-style: none;
    padding: 0;
    margin: 0;

    li {
      display: inline-block;
      padding: 0;
      margin: 0 2.5% 10px 0;
      opacity: 0.65;

      img {
        display: block;
        max-height: 22px;
        max-width: 120px;
      }
    }
  }
}

/**
 *  Brands showcase section
 *
 */
.what-they-say {
  min-height: inherit;
  background: #FFF;
  z-index: 100;
  border-bottom: 1px solid #efefef;

  @media (max-width: $bp-small) {
    display: none;

  }

  .section--content__full {
    overflow: hidden;
  }

  .diagonal-white-br {
    z-index: -1;

    @include diagonal(-4deg, #fff, 260px, 'true') {
      top: -140px;
      overflow: hidden;
      z-index: 99;


      @media (min-width: $bp-huge) {
        top: -200px;
      }
    }
  }
}


.cm-showcase-center {
  background-image: linear-gradient(35deg, #4b2e91, #0e213b);
  min-height: 800px;

  @include diagonal(-4deg, #fff, 200px, 'true') {
    top: -120px;
    overflow: hidden;
    z-index: 99;
  }

  .section--content {
    margin-top: 180px;
  }
}

.item-holder {
  width: 100%;
  float: left;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;

  .item {
    flex: 20%;
    padding: 0 1em;
    @media (max-width: $bp-small){
      flex: 100%;
      margin-bottom: 40px;
    }

    &--graphic {
      margin: auto auto 24px;
    }
  }
}



/**
 * Developer Friendly
 */
.developer-friendly {
  background: #1d262f;
  color: #fff;
  position: relative;
  width: 100%;
  padding-bottom: 0em;

  @media (min-width: $bp-huge) {
    padding: 8em 0 0;
  }

  @media (max-width: $bp-small) {
    padding-bottom: 4em;
  }

  .cm--container {
    height: 880px;

    @media (max-width: $bp-small) {
      height: auto;
    }
  }

  .cm--h-center {
    bottom: 80px;

    @media (max-width: $bp-small) {
      display: none
    }
  }

  header {
    line-height: 1;

    svg {
      display: inline-block;
      width: 40px;
      margin-right: 0.6em;
      margin-top: 0.5em;
      position: relative;
      top: 0.3em;
    }
  }

  .section--content {
    top: inherit;
    transform: inherit;
    @media (max-width: $bp-small) {
      padding: 0 1em;
    }
  }

  article p {
    font-size: 19px;
    color: #fff;
    text-align: left;
  }

  .code-block{
    @media (max-width: $bp-small){
      display: none;
    }
  }

  ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;

    li {
      display: block;
      margin-bottom: 1em;
      padding-left: 0;

      &:before {
        content: '';
        display: inline-block;
        position: relative;
        left: 0;
        top: 4px;
        margin-right: 8px;
        width: 20px;
        height: 20px;
        background: url('../img/icons/icon-separator.svg')no-repeat center center / contain;
      }
    }
  }


  .ac-icon {
    width: 81px;
    height: 81px;
  }


   @include diagonal(-4deg, #F3F4F7, 220px, 'true') {
    top: -120px;
    overflow: hidden;
    z-index: 99;

    @media (min-width: $bp-huge) {
      top: -100px;
    }
  }

  h2,h3 {
    color: #fff
  }

}


/**
 * Recall section
 */

.recall-section {
  background-image: linear-gradient(165deg, #26a0e7, #4b2e91);
  min-height: 400px;
  width: 100%;
  top: -110px;
  position: relative;
  transform: skewY(2deg);



  @include diagonal(-4deg, #1d262f, 300px, 'true') {
    top: -220px;
    overflow: hidden;
    z-index: 99;


    @media (min-width: $bp-huge) {
      top: -200px;
    }
  }


  .section--content {
    position: relative;
    top: inherit;
    transform: none;
    float: left;
    transform: skewY(-2deg);
  }

  p {
    color: #fff;
    line-height: 32px;
    font-size: 20px;
  }

  .btn {
    margin: auto;
    position: relative;
    max-width: 260px;
    width: 100%;
    top: 28px;
    float: none;
    left: calc(50% - 130px);

    @media (max-width: $bp-small) {
      left: inherit;
    }
  }
}


/**
 * woocommerce-section
 */

.woocommerce-section {
  width: 100%;
  top: -160px;
  z-index: -1;
  margin-bottom: -160px;
  overflow: hidden;
  position: relative;

  @media (min-width: $bp-huge) {
    top: -170px;
    margin-bottom: -170px;
  }

  @media (max-width: $bp-small){
    background: #fff
  }


  .section--content:nth-child(1) {
    text-align: center;
    padding-top: 50px;

    &:before {
      content: '';
      display: block;
      position: absolute;
      height: 600px;
      top: -50px;
      left: -50px;
      width: 100%;
      background: #fff;
      transform: skewX(-8deg)
    }
    @media (max-width: $bp-small){
      width: 100%;
      text-align: left;
      text-align: center;

    }
  }
  .section--content:nth-child(2) {
    padding-top: 120px;
    img {
      position: absolute;
      right: 2em;
      top: 50%;
      width: 84px;

      @media (min-width: $bp-huge) {
        right: 20%;
        width: 120px;
      }
       @media (max-width: $bp-big) {
        right: 20%;
        top: 10%;
      }
      @media (max-width: $bp-medium + 200) {
        display: none;

      }
    }
    @media (max-width: $bp-small){
      display: none;
    }
  }

  h4 {
    font-weight: 600;
    color: #96588a;
    text-transform: uppercase;
    padding-bottom: 1em;
  }

  .brand {
    font-size: 33px;
    font-family: 'Raleway';
    font-weight: 600;
    line-height: 1;
    margin-bottom: 1em;

    .algolia-logo {
      width: 34px;
      position: relative;
      display: inline-block;
      vertical-align: bottom;
    }

    span {
      font-size: 18px;
    }
  }

  .woocommerce-logo{
    width: 200px;
  }



  ul {
    padding: 0;
    margin: 0;
    color: #fff;
    list-style: none;

    li {
      width: 100%;
      position: relative;
      padding-left: 1.2em;
      margin-bottom: 2em;
      font-size: 18px;
      line-height: 22px;

      &:before {
        content: '';
        position: absolute;
        left: 0;
        display: block;
        width: 12px;
        height: 12px;
        top: 6px;
        background: url("data:image/svg+xml;utf8,<svg width=\'10\' height=\'10\' viewBox=\'0 0 10 10\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M0 0h10v10H0z\' fill=\'%23FFF\' fill-rule=\'evenodd\'/></svg>")no-repeat center center / contain;
      }
    }
  }
}

/**
 * MC Newsletter
 */
#mc_embed_signup {
  input,
  button {
    float: left;
  }

  input {
    width: 280px;
    height: 42px;
    padding: 13px;
    background-color: #ffffff;
    box-shadow: inset 2px 2px 3px 0 rgba(0, 0, 0, 0.5);
    border: solid 1px #68255b;
  }

  button {
    width: 220px;
    height: 42px;
    border-radius: 3px;
    border: 0;
    color: #fff;
    margin-left: 8px;
    background-color: #6e205f;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.22);
  }
}

/**
 * ==========================================
 * COMMUNITY COMPONENTS
 * ==========================================
 *
 * Reusable components of Algolia's community
 * websites.
 *
 * Namespace: .cm--
 *
 */



 .cm--item-block {
  max-width: 120px;
  height: 120px;
  border-radius: 16px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  position: relative;


  img {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
  }

  &.block-green{
    background-image: linear-gradient(322deg, #29c9b2, #b7da46);
  }
  &.block-blue {
    background-image: linear-gradient(135deg, #53ddec, #463d9d);
  }
  &.block-orange {
    background-image: linear-gradient(140deg, #ffc003, #f02b2b);
  }
 }



.cm--feature-list {
  margin-left: 30px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;

  .list-item {
    flex: 300px;
    border-radius: 3px;
    background-color: #ffffff;
    box-shadow: 0 1px 0 0 rgba(197, 202, 216, 0.5), 0 2px 4px 0 #c7cbd6;
    padding: 24px;
    max-height: 74px;
    margin-bottom: 20px;
    margin-right: 30px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    &_muted {
      border: solid 2px #e3e4e8;
      padding: 35px;
      box-shadow: none;
      background: transparent;
    }

    svg {
      display: block;
      float: left;
    }

    span {
      color: $greyish-black;
      margin-bottom: 8px;
      line-height: 1.8;
      font-family: "Open Sans", $font-fallback;
      font-weight: 400;
      padding-left: 28px;
      font-size: 14px;
    }
    a {
      display: block;
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      text-decoration: none;
      border-radius: 3px;

      svg {
        display: inline-block;
        max-width: 26px;
        @include v-center(relative)
        margin: -2px 24px 0;
      }

      span {
        line-height: 74px;
      }

      &:hover {
        background: $brand-primary;

        span {
          color: #fff;
        }

        svg path{
          fill: #fff !important
        }
      }
    }
    &:last-of-type {
      span {
        padding-left: 0;
      }
    }
  }
}




/**
 * Diagonals layout
 */

.diagonal-white-tr,
.diagonal-white-br {
  position: absolute;
  width: 100%;
  opacity: 1;
}

.diagonal-white-tr {
  @include diagonal(-5deg, #fff, 400px) {
    top: -100px;
    overflow: hidden;
    z-index: 30;
  }
}

.diagonal-white-br {
  @include diagonal(5deg, #fff, 400px) {
    overflow: hidden;
    z-index: 30;
  }
}
