
// Homepage Hero Header 
.at-hero {
  @extend %at-clearfix;
  position: relative;
  background-image: url('../img/hero2.jpg');
  background-repeat: no-repeat;
  background-position: center 20%;
  background-size: cover;
  padding: 100px 0 25px;
  min-height: 200px;
  text-align: center;
  &.at-slider{
      padding: 0;
    }
  @media screen and (min-width: 520px) {
    padding: 240px 0 40px;
    min-height: 450px;
  }
  .at-hero__content {
    background: rgba(255,255,255,0.85);
    padding: 25px 30px;    
    text-align: center;

    border: none;
    @media screen and (min-width: 520px) {
      padding: 37.5px 37.5px; 
    }
    @media screen and (min-width: 768px) {
      margin:auto;
      width: 75%;
    }
  }
  .at-hero__title {
    font-size: 30px;
    line-height: 1.2;
    padding: 0;
    margin: 0 0 15px;

  }
  .at-hero__text {}
  .at-hero__btn {
    display: inline-block;
    width: 75%;
    background: $at-main-color;
    border-bottom: 3px solid rgba(0,0,0,0.15);
    color: #fff;
    line-height: 1.3;    
    text-decoration: none;
    border-radius: 3px;
    transition: background, .2s, ease-in-out;
    @media screen and (min-width: 520px) {
      width: 50%;
    }
    &:hover {
      span {
        background: rgba(0, 0, 0, .2);
        transition: background, .2s, ease-in-out;
      }
    }
    span {
      display: block;
      padding: 20px 18px;
      border-radius: 3px;
    }
  }
} 


// Homepage CTA Blocks
.at-ctalist, .at-ctalist2{
  padding: ($at-vertspace * 2) 0;
  margin: 0;
}
.at-ctalist3 {
  margin: $at-margin-block;
}
.at-ctalist, .at-ctalist2, .at-ctalist3 {
  @extend %at-clearfix;
  .at-ctalist__title {
    display: block;
    font-size: 18px;
    font-weight: 400;
    color: #272727;
    margin: $at-margin-block-titles;
    text-align: center;
    text-transform: uppercase;
  }

  .at-ctalist__blocktext {
    background: #fff;
    padding: 20px;
    text-align: center;
    p {
      margin: 0px;
    }
  }

  .at-ctalist__blocktext3 {
    padding: 0 20px 20px;
    text-align: center;
    p {
      margin: 0px;
    }
  }

  .at-ctalist__blockbutton {
    margin: 20px 0 5px 0;
    display: inline-block;
    cursor: pointer;
    outline: 0;
    overflow: visible;
    span{
      display: inline-block;
      padding: 10px 20px;
      font-weight: 400;
      color: #fff;
      text-shadow: none;
      text-decoration: none;
      vertical-align: middle;
      width: auto;
      transition: all, 0.3s, ease-out;
      border-radius: 1px;
      text-align: center;
      
      &:hover {
        background: rgba(0, 0, 0, 0.2);
        transition: background, .2s, ease-in-out;
      }
    }
  }


  ul {
    @extend %at-clearfix;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    @media screen and (min-width: 768px) {
      margin: 0 -15px;
    }
    li {
        margin-bottom: 20px;

      @media screen and (min-width: 768px) {
        float: left;
        
        padding: 0 15px;
        /*&:nth-child(1n + 4) {
          margin-top: 20px;
        }*/
        &.at-ctalist__block-1{
          width: 100%;
        }
        &.at-ctalist__block-2{
          width: 50%;
        }
        &.at-ctalist__block-3{
          width: 33.33%;
        }
        &.at-ctalist__block-4{
          width: 25%;
        }
      }

      @media screen and (min-width: 992px) {
        &.at-ctalist__block-4{
          width: 25%;
          float: left;
          padding: 0 15px;
        }
      }

      @media screen and (min-width: 520px) and (max-width: 991px) {
        &.at-ctalist__block-4{
          width: 50%;
          float: left;
          padding: 0 15px;
        }
      }
    }
  }
  .at-ctalist__block {
    width: 100%;
    
    
    display: table;
    background-size: cover;
    background-position: center center;
    transition: all 0.3s ease-in-out;
    -webkit-transition: all 0.3s ease-in-out;


    .at-ctalist__content {
      height: 100%;
      display: table-cell;
      vertical-align: bottom;
      text-align: center;
      //padding: 25% 0;
      transition: all 0.3s ease-in-out;
      -webkit-transition: all 0.3s ease-in-out;
      h4 {
        background: #D8527C;
        color: #fff;
        display: inline-block;
        padding: 15px 15px;
        margin: 0;
        width: 100%;
        font-size: 20px;
      }
    }

    &.at-ctalist__block--hasimage{
      height: 250px;
      @media screen and (min-width: 768px) and (max-width: 880px) {
          height: 200px;
        }
      @media screen and (min-width: 420px) and (max-width: 767px) {
          height: 350px;
        }
      .at-ctalist__content {
        h4 {
          opacity: 0.9;
        }
      }
    }

    img {
      max-width: 125px;
      margin: auto;
    }
    
  }
  .at-ctalist__blockoverflow{
    //background: rgba( 0, 0, 0, .1 );
    text-align: center;
    width: 100%;
    overflow: hidden;
    position: relative;
    > a {
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 999;
    }

    &.at-ctalist__blockoverzoom {
      &:hover {
        .at-ctalist__block{
            transform: scale(1.1);
            -webkit-transform: scale(1.1);
        cursor:pointer;
        }   
        .at-ctalist__content {
          transform: scale(0.91);
          h4 {
            opacity: 1;
          }
        }
      }
    }
  }

  h4 {
    font-size: 20px;
    margin: 20px 0 15px;
  }


  
} 


// Homepage Featured Logos
.at-featured {
  @extend %at-clearfix;
  padding: ($at-vertspace) 0;
  background: #f5f7f8;
  //border: solid 10px;
  //padding: 37.5px 25px;
  .at-featured__title {
    display: block;
    font-size: 18px;
    font-weight: 400;
    color: #272727;
    margin: ($at-vertspace / 2) 0;
    text-align: center;
    text-transform: uppercase;
  }
  ul {
    @extend %at-clearfix;
    overflow: hidden;
    list-style: none;
    margin: 0 -10px;
    padding: 0;
    text-align: center;
    li {
      display: inline-block;
      padding: 0 10px;
      margin: 0 0 20px;
      width: 31%;
      @media screen and (min-width: 520px) {
        width: 24%;
        text-align: center;
      }
      @media screen and (min-width: 768px) {
        width: 16%;
        text-align: center;
      }
    }
  }
  img {
    max-height: 100px;
    width: auto;
  }
}


// Homepage Optin
.at-optin {
  @extend %at-clearfix;
  background: $at-secondary-color;
  padding: ($at-vertspace * 1.5) $at-vertspace;
  margin: 0px;
  @media screen and (min-width: 520px) {
    padding: ($at-vertspace * 1.5);
  }
  .at-optin__title {
    line-height: 1.5em;
    text-align: center;
    margin: 0 0 $at-vertspace;
  }
  .at-optin__subtitle {
    text-align: center;
    margin: -($at-vertspace / 2) 0 $at-vertspace;
  }
  .mc4wp-form {
    text-align: center;
    .mc4wp-form-fields {
      @extend %at-clearfix;
      width: 100%;
      display: table;
      margin: 0 auto;
      @media screen and (min-width: 520px) {
        width: 90%;
      }
      @media screen and (min-width: 720px) {
        p {
          &:last-of-type {
            width: 20%;
          }
        }
      }
    }
    p {
      margin: 0 0 10px;
      text-align: left;      
    }
    label {
      display: none;
    }
    input {
      width: 100%;
      max-width: 96%;
    }
  }


  .at-optin__noimg .mc4wp-form .mc4wp-form-fields p {
      @media screen and (min-width: 720px) {
        margin: 0;
        float: left;
        width: 40%;
        &:last-of-type {
            width: 20%;
        }
      }
    }

  .at-optin__form.at-optin__withimg .mc4wp-form .mc4wp-form-fields{
    margin-top: 20px;
    width: 100%;

    p input {
      max-width: 100%;
    }
  }

  .at-optin__img {
    text-align: center;
  }

  @media screen and (min-width: 520px) {
    .at-optin__img {
      display: inline-block;
      width: 30%;
    }
    .at-optin__form.at-optin__withimg {
      float: right;
      width: 65%;
      .mc4wp-form .mc4wp-form-fields{
        margin-top: 0;
        p {
          margin: 10px auto;
          width: 100%;
          &:last-of-type {
              width: 30%;
          }
          input {
            text-align: center;

          }
        }
      }
    }
  }
}
body.home {
  .at-optin {
    margin: 0px;
  }
}


// Homepage About block

.at-about {
  @extend %at-clearfix;
  margin: 0 0 50px;   
  @media screen and (min-width: 768px) {
  margin: $at-margin-block; 
         
      } 

  .at-about--hasimage {
    position: relative;
    display: inline-block;

    .at-about__image {
      position: absolute;
      top: 0;
      bottom: 0;
      right: 0;
      width: 100%;
      @media screen and (min-width: 521px)  and (max-width: 767px) {
        height: 350px;
        margin-top: 25px;
      }
      @media screen and (max-width: 520px) {
        height: 250px;
        margin-top: 25px;
      }
      @media screen and (min-width: 767px) and (max-width: 879px) {
         width: 45%;  
      }
      @media screen and (min-width: 880px) {
         width: 35%;
         
      }
    }
    .at-about__contentwrap {

      //border: solid 10px $at-main-color;
      @media screen and (min-width: 521px)  and (max-width: 767px) {
        margin-top: 350px;
      }
      @media screen and (max-width: 520px) {
        margin-top: 250px;
      }
      @media screen and (min-width: 767px) and (max-width: 879px) {
         width: 55%; 
         float: left; 
      }
      @media screen and (min-width: 880px) {
         width: 65%;
         float: left;
      }
    }
  }
  .at-about__blockbutton {
    //background: none;
    //font-size: 14px;
    font-weight: 400;
    color: #fff;
    background: $at-main-color;
    //border: 1px solid #1a1a1a;
    text-shadow: none;
    cursor: pointer;
    display: table;
    outline: 0;
    overflow: visible;
    margin: 25px auto 0px auto;
    text-decoration: none;
    vertical-align: middle;
    width: auto;
    transition: all, 0.3s, ease-out;
    border-radius: 1px;
    text-align: center;
    &:hover {
      span {
        background: rgba(0, 0, 0, .2);
        transition: background, .2s, ease-in-out;
      }
    }
    span {
      display: block;
      padding: 10px 20px;
      border-radius: 1px;
    }
  }
  .at-about__image {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
  }
  .at-about__contentwrap {
    position: relative;
    background: #fff; 
    padding: ($at-vertspace * 1.5) ($at-vertspace / 1.5);
    @media screen and (min-width: 768px) and (max-width: 880px){
      //margin: 25px;    
      padding: 0 ($at-vertspace) 0 0;
    }
    @media screen and (min-width: 880px){
      //margin: 25px;    
      padding: 0 ($at-vertspace * 2) ($at-vertspace * 1.5) 0;
    }
  }
  .at-about__title {
    font-size: 24px;
    line-height: 28px;
    margin: $at-margin-block-titles;
    text-align: center;
  }
  .at-about__content {
    p {
      margin: 0 0 ($at-vertspace / 2);
      &:last-of-type {
        margin-bottom: 0;
      }
    }
  }
}


// Homepage Testimonial List
.at-testimonals {
  @extend %at-clearfix;

  padding: $at-padding-block;
  .at-testimonals__title {
    display: block;
    font-size: 18px;
    font-weight: 400;
    color: #272727;
    margin: $at-margin-block-titles;
    text-align: center;
    text-transform: uppercase;
  }
  .at-testimonals__list {
    @extend %at-clearfix;
    list-style: none;
    margin: 0;
    padding: 0;
    @media screen and (min-width: 768px) {
      margin: 0 -10px 10px;
    }
    li {
      margin: 0 0 ($at-vertspace );
      @media screen and (min-width: 768px) {
        float: left;
        
        padding: 0 10px;
        margin: 0;
        &.at-testimonials-1 {
          width: 100%;
        }
        &.at-testimonials-2 {
          width: 50%;
        }
        &.at-testimonials-3 {
          width: 33.33%;
        }
        
      }
    }
  }
}


// Homepage Testimonials

.at-testimonial {
  @extend %at-clearfix;

  blockquote {
    margin: 0;
    padding: 0;

  }
  .at-testimonial__content  {
    background: #fff;
    padding: 25px 25px 25px 25px;
    margin: 0 0 55px;
    position: relative;
    //font-size: 14px;
    line-height: 22px;
    text-align: center;
    @media screen and (min-width: 520px) {
      padding: 35px 35px 35px 35px;
      &::before {
        top: 53px;
        left: 31px;
      }
    }
    
    &::before {
      content: '\201C';
      color: $at-main-color;
      position: absolute;
      top: 45px;
      left: 20px;
      font-weight: bold;
      font-size: 60px;
      font-family: georgia;
    }

    p {
      margin: 0 0 ($at-vertspace / 2);
      padding: 0 0 15px 30px;
      text-align: left;
      &:last-of-type {
        margin-bottom: 0;
      }
    }
  }
  
  .at-testimonial2-img {
    border-radius: 99px;
    border: 6px solid #fff;
    background-size: cover;
    background-position: center center;
    height: 100px;
    width: 100px;
    margin: 0 auto -60px;
  }

  .at-testimonial-info{
    margin: 3px 0 -75px 0;
    @media screen and (min-width: 520px) {
      margin: 3px 0 -85px 0
    }
  }
  .at-testimonial__author,
  .at-testimonial__authordetails {
    display: block;
    font-style: normal;
    line-height: 1;
  }
  .at-testimonial__author {    
    font-weight: bold;
    padding: 5px 0 0;
    margin: 0 0 5px;
  }
  .at-testimonial__authordetails {
    font-size: 13px;
    color: #999;
    font-style: italic;
    padding-bottom: 3px;
  }
}

// Homepage Text Block

.at-textblock {
  margin: $at-margin-block;
  .at-textblock__contentwrap{

    .at-textblock__title {
      text-align: center;
      margin: $at-margin-block-titles;
    }
  }
}

// Homepage offer block

.at-offer {
  @extend %at-clearfix;
  
  background: #D8527C;
  //padding: $at-vertspace;
  padding: ($at-vertspace * 1.5) 0;

  .at-offer--hasimage {
    position: relative;
    .at-offer__image {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      @media screen and (min-width: 521px)  and (max-width: 767px) {
        height: 350px;
      }
      @media screen and (max-width: 520px) {
        height: 250px;
      }
      @media screen and (min-width: 768px) and (max-width: 879px) {
         width: 45%;  
      }
      @media screen and (min-width: 880px) {
         width: 35%;
         
      }
    }
    .at-offer__contentwrap {

      position: relative; 
      padding: ($at-vertspace * 1.5) ($at-vertspace / 1.5);

      @media screen and (min-width: 521px)  and (max-width: 767px) {
        margin-top: 350px;
      }
      @media screen and (max-width: 520px) {
        margin-top: 250px;
      }
      @media screen and (min-width: 768px) and (max-width: 879px) {
         width: 55%; 
         float: right; 
        padding: 0 0 0 ($at-vertspace);
      }
      @media screen and (min-width: 880px) {
         width: 65%;
         float: right;
         padding: 0 0 ($at-vertspace * 1.5) ($at-vertspace * 2) ;
      }
    }
  }
  .at-offer__blockbutton {
    //background: none;
    //font-size: 14px;
    font-weight: 400;
    color: #fff;
    background: $at-main-color;
    //border: 1px solid #1a1a1a;
    text-shadow: none;
    cursor: pointer;
    display: table;
    outline: 0;
    overflow: visible;
    margin: 25px auto 0px auto;
    text-decoration: none;
    vertical-align: middle;
    width: auto;
    transition: all, 0.3s, ease-out;
    border-radius: 1px;
    text-align: center;
    &:hover {
      span {
        background: rgba(0, 0, 0, .2);
        transition: background, .2s, ease-in-out;
      }
    }
    span {
      display: block;
      padding: 10px 20px;
      border-radius: 1px;
    }
  }
  .at-offer__image {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
  }
  .at-offer__title {
    font-size: 24px;
    line-height: 28px;
    margin: 0 0 ($at-vertspace);
    text-align: center;
  }
  .at-offer__content {
    p {
      margin: 0 0 ($at-vertspace / 2);
      &:last-of-type {
        margin-bottom: 0;
      }
    }
  }
}


// Homepage Separator
.at-separator {
  margin: ($at-vertspace / 1.5) auto ($at-vertspace / 1.5);

  hr {
    width: 66%;
    border-color: $at-main-color;
  }
}


// Homepage Blog List
.at-bloglist {
  @extend %at-clearfix;
  margin: $at-margin-block;
  .at-bloglist__title {
    display: block;
    font-size: 18px;
    font-weight: 400;
    color: #272727;
    margin: $at-margin-block-titles;
    text-align: center;
    text-transform: uppercase;
  }
  ul {
    @extend %at-clearfix;
    display: flex;
    flex-flow: row wrap;
    overflow: hidden;
    list-style: none;
    margin: 0;
    padding: 0;
    @media screen and (min-width: 720px) {
      margin: 0 -10px;
    }
    li {
      margin: 0 0 ($at-vertspace * 1.5);
      @media screen and (min-width: 720px) {
        float: left;
        padding: 0 20px;
        width: 50%;
        @media screen and (min-width: 720px) and (max-width: 999px) {
          &:nth-child(2n+3) {
            clear: left;
          }
        }
      }
      @media screen and (min-width: 1000px) {
        width: 33.3%;
        /*&:nth-child(4) {
          display: none;
        }*/
      }
      .at-post__metaf {
        position: absolute;
        bottom: 10px;
        right: -5px;
        .at-socialshare {
          ul {
            margin: 0px;
          }
          li {
            margin: 0;
            padding: 0 5px;
            width: auto;
            a {
              font-size: 0%;
            }
          }
        }
      }
    }
  }
  .at-bloglist__post {
    @extend %at-clearfix;
    background: #fff;
    height: 100%;
    border-bottom: solid 2px;
    //margin: 0 0 $at-vertspace;
    overflow: hidden;
    position: relative;
    img {
      -webkit-transition: all .2s ease;
    -moz-transition: all .2s ease;
    -o-transition: all .2s ease;
    transition: all .2s ease;
    }
    &:hover {
      img {
        transform: scale(1.1);
      -webkit-transform: scale(1.1);
      cursor:pointer;
      }
    }
    .at-bloglist__contentwrap { 
      background: #fff;
      padding: 15px 0;
      position: relative;
      text-align: left;      
      /*@media screen and (min-width: 520px) {
        padding: 25px 25px;
      }*/
      &.at-bloglist__sm {
        padding: 15px 0 5px;
        .at-bloglist__link {
          bottom: 50px;
        }
      }
    }
    .at-bloglist__posttitle {
      margin: ($at-vertspace / 2) 0 ($at-vertspace / 1.5);
      //font-weight: normal;
      font-size: 18px;
      line-height: 22px;
      &,
      a {
        color: $at-heading-color;
      }
      a {
        text-decoration: none;
      }
    }
    .at-bloglist__postthumb {
      overflow: hidden;
      //margin: 0 0 ($at-vertspace / 2);
      img {
        width: 100%;
      }
    }
    .at-bloglist__excerpt {
      font-size: 95%;
      line-height: 22px;
      p {
        margin: 0 0 ($at-vertspace / 2);
        &:last-of-type {
          margin-bottom: 50px;
        }
      }
    }
    .at-bloglist__link {
      display: block;
      position:absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
    }
  }
  .at-blog__blockbutton {
    //background: none;
    //font-size: 14px;
    font-weight: 400;
    color: #fff;
    background: $at-main-color;
    //border: 1px solid #1a1a1a;
    text-shadow: none;
    cursor: pointer;
    display: table;
    outline: 0;
    overflow: visible;
    margin: 0 auto;
    text-decoration: none;
    vertical-align: middle;
    width: auto;
    transition: all, 0.3s, ease-out;
    border-radius: 1px;
    text-align: center;
    &:hover {
      span {
        background: rgba(0, 0, 0, .2);
        transition: background, .2s, ease-in-out;
      }
    }
    span {
      display: block;
      padding: ($at-vertspace / 1.5) ($at-vertspace * 4);
      border-radius: 1px;
    }
  }

  .at-post__meta {
    @extend %at-clearfix;
    display: table;
    position: absolute;
    bottom: 5px;
    list-style: none;
    padding: 0;
    font-size: 85%;
    text-transform: uppercase;
    margin: $at-vertspace 0 0 0;
    > li {
      display: inline-block;
      padding: 0;
      width: 100%;
      margin: 0;
    }
    &,
    a {
      color: #999;
    }
    a {
      text-decoration: none;
    }
  }
}

