﻿/* Slider */
.cd-hero {
  position: relative;
  margin-bottom: 15rem;
  margin-top: 2.4rem;
}

.cd-hero__slider {
  position: relative;
  height: 360px;
  width: 100%;
  overflow: hidden;
  list-style-type: none;
}

.cd-hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Force Hardware Acceleration */
  -webkit-transform: translateZ(0px);
          transform: translateZ(0px);
  will-change: transform;
  -webkit-transform: translateX(100%);
      -ms-transform: translateX(100%);
          transform: translateX(100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cd-hero__slide.cd-hero__slide--selected {
  /* this is the visible slide */
  -webkit-transform: translateX(0);
      -ms-transform: translateX(0);
          transform: translateX(0);
}

.cd-hero__slide.cd-hero__slide--move-left {
  /* slide hidden on the left */
  -webkit-transform: translateX(-100%);
      -ms-transform: translateX(-100%);
          transform: translateX(-100%);
}

.cd-hero__slide.cd-hero__slide--is-moving,
.cd-hero__slide.cd-hero__slide--selected {
  /* the cd-hero__slide--is-moving class is assigned to the slide which is moving outside the viewport */
  -webkit-transition: -webkit-transform 0.5s;
  transition: -webkit-transform 0.5s;
  transition: transform 0.5s;
  transition: transform 0.5s, -webkit-transform 0.5s;
}

@media only screen and (min-width: 768px) {
  .cd-hero__slider {
    height: 500px;
  }
}

@media only screen and (min-width: 1170px) {
  .cd-hero__slider {
    height: 548px;
  }
}

/* Slide style */
.cd-hero__slide {
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.cd-hero__slide:first-of-type {
	background-color: #d6d6d6;
	background-image: url("../image/hero_laptop_bg.jpg"), url("../image/hero_laptop_bg_tile.jpg");
    background-position: left 0px bottom 80px;
	background-repeat: no-repeat, repeat;
	background-size: auto;
}

.cd-hero__slide:nth-of-type(2) {
  background: #7ebb53 url("../image/hero_phone_green_bg.png") no-repeat;
  background-position: left 25% bottom 80px;
}

.cd-hero__slide:nth-of-type(3) {
	background: #f6f7f9 url("../image/hero_how_it_works_bg.png") no-repeat;
	background-position: right 10% bottom 80px;
}

.cd-hero__content.cd-hero__content--full-width,
.cd-hero__content.cd-hero__content--half-width {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
  left: 0;
  top: 0;
  /* this padding is used to align the text */
  padding-top: 100px;
  /* Force Hardware Acceleration */
  -webkit-transform: translateZ(0);
          transform: translateZ(0);
  will-change: transform;
}

.cd-hero__content h2, .cd-hero__content p, .cd-hero__btn, .cd-hero__content--img img {
  /* Force Hardware Acceleration */
  -webkit-transform: translateZ(0);
          transform: translateZ(0);
  will-change: transform;
}

.cd-hero__content.cd-hero__content--img {
  /* hide image on mobile device */
  display: none;
}

.cd-hero__content--img img {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  right: auto;
  -webkit-transform: translateX(-50%) translateY(-50%);
      -ms-transform: translateX(-50%) translateY(-50%);
          transform: translateX(-50%) translateY(-50%);
}

.cd-hero__content.cd-hero__content--bg-video {
  /* hide video on mobile device */
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cd-hero__content--bg-video video {
  /* you won't see this element in the html, but it will be injected using javascript */
  display: block;
  min-height: 100%;
  min-width: 100%;
  max-width: none;
  height: auto;
  width: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  right: auto;
  -webkit-transform: translateX(-50%) translateY(-50%);
      -ms-transform: translateX(-50%) translateY(-50%);
          transform: translateX(-50%) translateY(-50%);
}

.cd-hero__content h2, .cd-hero__content p {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  line-height: 1.2;
  margin: 0 auto 14px;
  color: #1a475e;
  width: 90%;
  max-width: 400px;
}

.cd-hero__slide:first-of-type .cd-hero__content h2, 
.cd-hero__slide:first-of-type .cd-hero__content p {
	margin: 0 auto 14px 50%;
}

.cd-hero__slide:nth-of-type(2) .cd-hero__content h2, 
.cd-hero__slide:nth-of-type(2) .cd-hero__content p {
	color: #fff;
	margin: 0 auto 14px 42%;
}

.cd-hero__slide:nth-of-type(3) .cd-hero__content h2, 
.cd-hero__slide:nth-of-type(3) .cd-hero__content p {
	margin: 0 auto 14px 20%;
}

.cd-hero__content h2 {
  font-size: 3.84rem;
}

.cd-hero__content p {
  font-size: 2.24rem;
  line-height: 2.5rem;
}

.cd-hero__content .btn-p {
	margin-top:3.2rem !important;
}

@media only screen and (min-width: 768px) {
  .cd-hero__content.cd-hero__content--full-width,
  .cd-hero__content.cd-hero__content--half-width {
    padding-top: 150px;
  }
  .cd-hero__content.cd-hero__content--bg-video {
    display: block;
  }
  .cd-hero__content.cd-hero__content--half-width {
    width: 45%;
  }
  .cd-hero__content.cd-hero__content--half-width:first-of-type {
    left: 5%;
  }
  .cd-hero__content.cd-hero__content--half-width:nth-of-type(2) {
    right: 5%;
    left: auto;
  }
  .cd-hero__content.cd-hero__content--img {
    display: block;
  }
  .cd-hero__content h2, .cd-hero__content p {
    max-width: 520px;
  }
  .cd-hero__content h2 {
    font-size: 3.84rem;
	font-weight: 600;
	text-transform: uppercase;
	border:0;
  }
  .cd-hero__btn {
    font-size: 2.24rem;
  }
}

@media only screen and (min-width: 1170px) {
  .cd-hero__content.cd-hero__content--full-width,
  .cd-hero__content.cd-hero__content--half-width {
    padding-top: 8rem;
  }
  .cd-hero__content h2, .cd-hero__content p {
    margin-bottom: .4rem;
  }
  .cd-hero__content h2 {
    font-size: 4rem;
  }
  .cd-hero__content p {
    font-size: 1.8rem;
  }
  
}

/* Single slide animation */
@media only screen and (min-width: 768px) {
  .cd-hero__content.cd-hero__content--half-width {
    opacity: 0;
    -webkit-transform: translateX(40px);
        -ms-transform: translateX(40px);
            transform: translateX(40px);
  }
  .cd-hero__slide--move-left .cd-hero__content.cd-hero__content--half-width {
    -webkit-transform: translateX(-40px);
        -ms-transform: translateX(-40px);
            transform: translateX(-40px);
  }
  .cd-hero__slide--selected .cd-hero__content.cd-hero__content--half-width {
    /* this is the visible slide */
    opacity: 1;
    -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
            transform: translateX(0);
  }
  .cd-hero__slide--is-moving .cd-hero__content.cd-hero__content--half-width {
    /* this is the slide moving outside the viewport 
    wait for the end of the transition on the <li> parent before set opacity to 0 and translate to 40px/-40px */
    -webkit-transition: opacity 0s 0.5s, -webkit-transform 0s 0.5s;
    transition: opacity 0s 0.5s, -webkit-transform 0s 0.5s;
    transition: opacity 0s 0.5s, transform 0s 0.5s;
    transition: opacity 0s 0.5s, transform 0s 0.5s, -webkit-transform 0s 0.5s;
  }
  .cd-hero__slide--from-left.cd-hero__slide--selected .cd-hero__content.cd-hero__content--half-width:nth-of-type(2),
  .cd-hero__slide--from-right.cd-hero__slide--selected .cd-hero__content.cd-hero__content--half-width:first-of-type {
    /* this is the selected slide - different animation if it's entering from left or right */
    -webkit-transition: opacity 0.4s 0.2s, -webkit-transform 0.5s 0.2s;
    transition: opacity 0.4s 0.2s, -webkit-transform 0.5s 0.2s;
    transition: opacity 0.4s 0.2s, transform 0.5s 0.2s;
    transition: opacity 0.4s 0.2s, transform 0.5s 0.2s, -webkit-transform 0.5s 0.2s;
  }
  .cd-hero__slide--from-left.cd-hero__slide--selected .cd-hero__content.cd-hero__content--half-width:first-of-type,
  .cd-hero__slide--from-right.cd-hero__slide--selected .cd-hero__content.cd-hero__content--half-width:nth-of-type(2) {
    /* this is the selected slide - different animation if it's entering from left or right */
    -webkit-transition: opacity 0.4s 0.4s, -webkit-transform 0.5s 0.4s;
    transition: opacity 0.4s 0.4s, -webkit-transform 0.5s 0.4s;
    transition: opacity 0.4s 0.4s, transform 0.5s 0.4s;
    transition: opacity 0.4s 0.4s, transform 0.5s 0.4s, -webkit-transform 0.5s 0.4s;
  }
  .cd-hero__content--full-width h2,
  .cd-hero__content--full-width p,
  .cd-hero__content--full-width .cd-hero__btn {
    -webkit-transform: translateX(100px);
        -ms-transform: translateX(100px);
            transform: translateX(100px);
  }
  .cd-hero__slide--move-left .cd-hero__content--full-width h2,
  .cd-hero__slide--move-left .cd-hero__content--full-width p,
  .cd-hero__slide--move-left .cd-hero__content--full-width .cd-hero__btn {
    -webkit-transform: translateX(-100px);
        -ms-transform: translateX(-100px);
            transform: translateX(-100px);
  }
  .cd-hero__slide--selected .cd-hero__content--full-width h2,
  .cd-hero__slide--selected .cd-hero__content--full-width p,
  .cd-hero__slide--selected .cd-hero__content--full-width .cd-hero__btn {
    /* this is the visible slide */
    -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
            transform: translateX(0);
  }
  .cd-hero__slide--is-moving .cd-hero__content--full-width h2,
  .cd-hero__slide--is-moving .cd-hero__content--full-width p,
  .cd-hero__slide--is-moving .cd-hero__content--full-width .cd-hero__btn {
    /* this is the slide moving outside the viewport 
    wait for the end of the transition on the li parent before set translate to 100px/-100px */
    -webkit-transition: -webkit-transform 0s 0.5s;
    transition: -webkit-transform 0s 0.5s;
    transition: transform 0s 0.5s;
    transition: transform 0s 0.5s, -webkit-transform 0s 0.5s;
  }
  .cd-hero__slide--selected h2 {
    -webkit-transition: -webkit-transform 0.5s 0.2s;
    transition: -webkit-transform 0.5s 0.2s;
    transition: transform 0.5s 0.2s;
    transition: transform 0.5s 0.2s, -webkit-transform 0.5s 0.2s;
  }
  .cd-hero__slide--selected p {
    -webkit-transition: -webkit-transform 0.5s 0.3s;
    transition: -webkit-transform 0.5s 0.3s;
    transition: transform 0.5s 0.3s;
    transition: transform 0.5s 0.3s, -webkit-transform 0.5s 0.3s;
  }
  .cd-hero__slide--selected .cd-hero__btn {
    -webkit-transition: background-color 0.2s 0s, -webkit-transform 0.5s 0.4s;
    transition: background-color 0.2s 0s, -webkit-transform 0.5s 0.4s;
    transition: transform 0.5s 0.4s, background-color 0.2s 0s;
    transition: transform 0.5s 0.4s, background-color 0.2s 0s, -webkit-transform 0.5s 0.4s;
  }
}

/* Slider navigation */
.cd-hero__nav {
  position: absolute;
  width: 100%;
  bottom: 0;
  z-index: 2;
  text-align: center;
  height: 55px;
  background-color: #fff;
}

.cd-hero__nav nav, .cd-hero__nav ul, .cd-hero__nav li, .cd-hero__nav a {
  height: 100%;
}

.cd-hero__nav nav {
  position: relative;
  margin-top: 2.4rem;
}

.cd-hero__marker {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0; /* hide it */
  height: 100%;
  color: #d44457;
  background-color: #ffffff;
  -webkit-box-shadow: inset 0 2px 0 currentColor;
          box-shadow: inset 0 2px 0 currentColor;
  -webkit-transition: -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
  transition: -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
  transition: transform 0.2s, box-shadow 0.2s;
  transition: transform 0.2s, box-shadow 0.2s, -webkit-transform 0.2s, -webkit-box-shadow 0.2s;
}

.cd-hero__marker.cd-hero__marker--item-2 {
  -webkit-transform: translateX(100%);
      -ms-transform: translateX(100%);
          transform: translateX(100%);
}

.cd-hero__marker.cd-hero__marker--item-3 {
  -webkit-transform: translateX(200%);
      -ms-transform: translateX(200%);
          transform: translateX(200%);
}

.cd-hero__nav ul{
	justify-content: space-between;
}

.cd-hero__nav ul::after {
  clear: both;
  content: "";
  display: table;
}

.cd-hero__nav li {
  display: inline-block;
  width: 60px;
  background-color: #f0f1f4;
  border-bottom:8px solid #1a475e;
}

.cd-hero__nav a:link {
	color: #1a475e;
}

.cd-hero__nav .cd-selected a {
  color: #fff;
  background-color: #1a475e;
}

.cd-hero__nav a {
  display: block;
  position: relative;
  font-size: 1.6rem;
  font-weight: 700;
  color: #a8b4be;
  -webkit-transition: background-color 0.2s;
  transition: background-color 0.2s;
  line-height: 80px;
}

.cd-hero__nav a::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  top: 8px;
  left: 50%;
  right: auto;
  -webkit-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
          transform: translateX(-50%);
}

.cd-hero__nav a:hover {
  background-color: #7db751;
  color: #fff;
}
.cd-hero__nav .cd-selected a:hover {
	background-color: #1a475e;
}

.cd-hero__nav li:first-of-type a::before {
  background-position: 0 0;
}

.cd-hero__nav li.cd-selected:first-of-type a::before {
  background-position: 0 -24px;
}

.cd-hero__nav li:nth-of-type(2) a::before {
  background-position: -24px 0;
}

.cd-hero__nav li.cd-selected:nth-of-type(2) a::before {
  background-position: -24px -24px;
}

.cd-hero__nav li:nth-of-type(3) a::before {
  background-position: -48px 0;
}

.cd-hero__nav li.cd-selected:nth-of-type(3) a::before {
  background-position: -48px -24px;
}

@media only screen and (min-width: 768px) {
  .cd-hero__nav {
    height: 80px;
  }
  .cd-hero__nav a {
    font-size: 1.6rem;
    text-transform: uppercase;
  }
  .cd-hero__nav a::before {
    top: 18px;
  }
}

/* Main Content */
.cd-main-content {
  width: 90%;
  max-width: 768px;
  margin: 0 auto;
  padding: 2em 0;
}

.cd-main-content p {
  font-size: 2.24rem;
  line-height: 1.8;
  color: #999999;
  margin: 3.2em 0;
}

@media only screen and (min-width: 1170px) {
  .cd-main-content {
    padding: 3em 0;
  }
  .cd-main-content p {
    font-size: 2.56rem;
  }
}

/* Javascript disabled */
.no-js .cd-hero__slide {
  display: none;
}

.no-js .cd-hero__slide.cd-hero__slide--selected {
  display: block;
}

.no-js .cd-hero__nav {
  display: none;
}

@media (max-width: 1170px) {
	.cd-hero__content h2 {
		font-size: 2.4rem;
   		text-transform: uppercase;
	}
	.cd-hero__content p {
		font-size: 1.6rem;
	}	
	.cd-hero__slide:nth-of-type(1) .cd-hero__content h2, 
	.cd-hero__slide:nth-of-type(1) .cd-hero__content p {
		margin: 0 3rem 14px auto;
		width: 29rem;
	}	
	.cd-hero__slide:nth-of-type(1) .cd-hero__content h2 {
		margin-top: 2.6rem;
	}	
	.cd-hero__slide:nth-of-type(2) .cd-hero__content h2, 
	.cd-hero__slide:nth-of-type(2) .cd-hero__content p {
		margin: 0 11rem 14px auto;
		width: 28.8rem;
	}
	.cd-hero__slide:nth-of-type(3) .cd-hero__content h2, 
	.cd-hero__slide:nth-of-type(3) .cd-hero__content p {
		margin: 0 55rem 14px auto;
		width: 28.8rem;
	}	
	.cd-hero__content.cd-hero__content--full-width, 
	.cd-hero__content.cd-hero__content--half-width {
		padding-top:4.8rem;
	}
	.cd-hero__slide:first-of-type {
		background-position: left bottom 4.8rem;
	}
	.cd-hero__slide:nth-of-type(2) {
	  background-position: left 15% bottom 0;
	}
	.cd-hero__slide:nth-of-type(3) {
		background-position: left 15% bottom 0;
	  }		
	.cd-hero__nav {
		height: 50px;
	  }	
	.cd-hero__nav a {
		font-size: 1.4rem;
		line-height: 50px;
	}	
}

@media (max-width: 768px) {
	.cd-hero {
		margin-bottom:1.6rem;
	}
	.cd-hero__slider {
		height:400px;
	}
	.cd-hero__nav {
		display: none;
	}
	.cd-hero__content h2 {
		font-size: 2.4rem !important;
   		text-transform: uppercase;
	}
	.cd-hero__content p {
		font-size: 1.4rem;
	}	
	.cd-hero__slide:nth-of-type(1) .cd-hero__content h2, 
	.cd-hero__slide:nth-of-type(1) .cd-hero__content p,
	.cd-hero__slide:nth-of-type(2) .cd-hero__content h2, 
	.cd-hero__slide:nth-of-type(2) .cd-hero__content p,
	.cd-hero__slide:nth-of-type(3) .cd-hero__content h2, 
	.cd-hero__slide:nth-of-type(3) .cd-hero__content p {					
		margin: 0 auto;
		width: auto;
		text-align: center;
		padding-left: .8rem;
		padding-right: .8rem;
	}		
	.cd-hero__content.cd-hero__content--full-width, 
	.cd-hero__content.cd-hero__content--half-width {
		padding-top:3.2rem;
	}
	.cd-hero__slide:first-of-type {
		background-image: url("https://surveysavvy.com/wp-content/themes/surveysavvy/img/hero/hero_laptop_bg_sml.jpg"), url("../img/hero/hero_laptop_bg_tile_sml.jpg");
		background-position: left 0 bottom 0, left bottom 0;		
	}
	.cd-hero__slide:nth-of-type(2) {
		background-image: url("https://surveysavvy.com/wp-content/themes/surveysavvy/img/hero/hero_phone_green_bg_sml.png");
		background-position: center bottom 0;
	}	
	.cd-hero__slide:nth-of-type(3) {
		background-image: url("https://surveysavvy.com/wp-content/themes/surveysavvy/img/hero/hero_how_it_works_bg_sml.png");
		background-position: center bottom 0;
	}
}

@media ( max-width: 660px ) {
	.cd-hero {
		margin-bottom: 11rem;
	}
}
