* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-color: #fce138;
  --secondary-color: #024e76;
  --tertiary-color: #39a6b2;
  --primary-color-transparent: rgba(252,225,56, 0.8);
  --secondary-color-transparent: rgba(2, 78, 118, 0.8);
}

body {
  color: var(--tertiary-color);
  font-family: Helvetica, Arial, sans-serif;
}

header {
  padding: 20px 35px;
  background-image: url('../images/hero-bg.jpg');
  background-position: 80%;
  background-attachment:fixed;
  background-size: cover;
  /* 2.2 - added flex and removed inline / float properties from h1 and nav */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position:sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 9999;
}

header h1 {
  font-weight: bold;
  margin: 0;
  font-size: 36px;
  color: var(--primary-color);
  text-shadow: 0px 0 15px rgba(0, 0, 0, 0.5);
}

header a {
  text-decoration: none;
  color: var(--primary-color);
}

header nav {
  margin: 7px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

header nav ul li a {
  padding: 10px 15px;
  font-weight: 200;
  font-size: 1.55vw;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

header nav ul li a:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  border-radius: 15px;
  text-shadow:none;
}

/* FOOTER STYLES START */
footer {
  background: var(--secondary-color);
  padding: 40px 35px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--primary-color);
  width: 100%;
}

footer h2 {
  font-size: 30px;
  margin: 0;
}

footer div {
  line-height: 1.5;
  text-align: right;
}

footer a {
  color: var(--primary-color);
}
/* END FOOTER STYLES */

/* STYLE ALL SECTION TAGS */
section {
  padding: 60px;
}

/* HERO STYLES START */

/* 2.2 - REMOVED POSITIONING AND ADDED FLEX, MARGINS, AND FONT STYLING FOR CTA */
.hero {
  background-image: url('../images/hero-bg.jpg');
  background-position: 80%;
  background-attachment: fixed;
  background-size:cover;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.hero-cta {
  width: 35%;
  text-align: right;
  margin: 3.5%;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
}

.hero-cta h2 {
  font-style: italic;
  font-size: 55px;
  color: var(--primary-color);
  line-height: 1.2;
  text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.hero-form {
  border: 3px solid var(--secondary-color);
  background-color: var(--primary-color-transparent);
  padding: 20px;
  width: 40%;
  margin: 3.5%;
  color: var(--secondary-color);
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.hero-form h3 {
  font-size: 24px;
  margin: 0;
}

.hero-form p {
  margin: 5px 0 15px 0;
}

.form-input {
  border: 1px solid var(--secondary-color);
  display: block;
  padding: 7px 15px;
  font-size: 16px;
  color: var(--secondary-color);
  width: 100%;
  margin-bottom: 15px; 
  border-radius: 10px;
}

.form-input {
  background-color: rgba(255,255,255, 0.75);
}

.form-input:focus {
  background-color: rgba(255,255,255, 1);
}

.hero-form label {
  margin: 0 5px;
}

.hero-form button {
  color: var(--primary-color);
  background-color: var(--secondary-color);
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 10px;
}

.hero-form button:hover {
  background-color: var(--tertiary-color);  
}

.checkbox-wrapper input[type="checkbox"], 
.radio-wrapper input[type="radio"] {
  opacity: 0;
}

.checkbox-wrapper label::before,
.radio-wrapper label::before {
    content: "";
    display: inline-block;
    height: 20px;
    width: 20px;
    border: 1px solid var(--secondary-color);  
    position: absolute;
    top: -4px;
    left: -30px;
    background: rgba(255,255,255,0.75);  
}

.checkbox-wrapper label::after {
    content: "";
    display: inline-block;    
    height: 6px;
    width: 14px;
    border-left: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    transform: rotate(-58deg);
    position:absolute;
    left: -26px;
    top: 1px;
}

.checkbox-wrapper label, .radio-wrapper label  {
    position: relative;
    left: 10px;
    margin: 10px;
    line-height: 1.6;
}

.radio-wrapper label::before {
  border-radius: 50%;
}

.radio-wrapper label::after {
  content: "";
  width: 20px;
  height: 20px;
  position:absolute;
  left: -29px;
  top: -3px;
  border-radius: 50%;
  background-image: radial-gradient(circle, var(--tertiary-color), var(--secondary-color));
}

/*Hide checked state */
.checkbox-wrapper input[type="checkbox"] + label::after, 
.radio-wrapper input[type="radio"] + label::after {
    content: none;
}

/* show the checked state*/
.checkbox-wrapper input[type="checkbox"]:checked + label::after, 
.radio-wrapper input[type="radio"]:checked + label::after {
    content: "";
}
/* HERO STYLES END */

/* SECTION TITLE STYLES START */
.section-title {
  font-size: 48px;
  padding-bottom: 20px;
  width: 50%;
  border-bottom: 3px solid;
  margin: 0 auto 35px auto;
  color: var(--secondary-color);
  text-align: center;
}

.primary-border {
  border-color: var(--primary-color);
}

.secondary-border {
  border-color: var(--tertiary-color);
}
/* SECTION TITLE STYLES END */

/* WHAT WE DO STYLES */

.intro p {
  line-height: 1.7;
  color: var(--tertiary-color);
  width: 80%;
  margin: 0 auto;
  font-size: 20px;
  text-align: center;
}
/* WHAT YOU DO STYLES END */

/* WHAT YOU DO STYLES START */
.steps { 
  background: var(--primary-color);
}

/* 2.2 - added specific child selector */
.step {
  margin: 50px auto;
  padding-bottom: 50px;
  width: 80%;
  border-bottom: 1px solid var(--tertiary-color);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.step:last-of-type {
  border-bottom: none;
}

.step h3 {
  color: var(--secondary-color);
  font-size: 46px;
  flex: 1 30%;
}

.step-info {
  flex: 2 70%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.step-img {
  flex: 1 12%;
  margin-right: 20px;
}

.step-img img {
  max-width: 100%;
}

.step-text {
  flex: 12;
}

.step-text h4 {
  font-size: 26px;
  line-height: 1.5;
  color: var(--secondary-color);
}

.step-text p {
  color: var(--tertiary-color);
  font-size: 18px;
}
/* WHAT YOU DO STYLES END */

/* MEET THE TRAINERS START */
.trainers {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.trainer {
  margin: 20px;
  flex: 1;
  background: var(--secondary-color);
  color: var(--primary-color);
}

.trainer img {
  width: 100%;
}

.trainer-bio {
  padding: 25px;
  line-height: 1.3;
}

.trainer-bio h3 {
  font-size: 28px;
}

.trainer-bio h4 {
  font-weight: lighter;
  font-size: 22px;
  margin-bottom: 15px;
}

.trainer-bio p {
  font-size: 17px;
}
/* TRAINER STYLES END */

/* REACH OUT STYLES START */
.contact {
  background: var(--secondary-color);
}

.contact h2 {
  color: var(--primary-color);
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: left;
}

.contact-info > * {
  flex: 1;
  margin: 15px
}

.contact-info iframe {
  min-height: 400px;
}

.contact-info div {
  color: white;
}

.contact-info h3 {
  color: var(--primary-color);
  font-size: 32px;
}

.contact-info p, .contact-info address {
  margin: 20px 0;
  line-height: 1.5;
  font-size: 16px;
  font-style: normal;
}

.contact-info a {
  color: var(--primary-color);
}

.contact-form label {
  opacity: 0;
}

.contact-form input, .contact-form textarea {
  border: 1px solid var(--secondary-color);
  display: block;
  padding: 7px 15px;
  font-size: 16px;
  color: var(--secondary-color);
  width: 100%;
  margin-bottom: 15px;
  margin-top: 5px; 
  border-radius: 10px;
  background-color: rgba(255,255,255, 0.75);
}

.contact-form textarea {
  resize: none;
}

.contact-form input:focus, .contact-form textarea:focus {
  background-color: rgba(255,255,255, 1);
  outline: none;
}

.contact-form button {
  width: 100%;
  border: none;
  background: var(--primary-color);
  color: var(--secondary-color);
  text-align: center;
  padding: 15px 0;
  font-size: 16px;
  border-radius: 10px;
}

.contact-form button:hover {
  color: var(--primary-color);
  background: var(--tertiary-color);
}
/* REACH OUT STYLES END */

/* UTILITIES */
.flex-row {
  display: flex;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* 2.4 - MEDIA QUERIES FOR SMALL SCREENS TO TABLETS */
@media screen and (max-width: 980px) {
  header {
    padding-bottom: 0;
    justify-content: center;
    position: relative;
  }
  header h1 {
    width: 100%;
    text-align: center;
  }

  header nav ul {
    margin-top: 20px;
    width: 100%;
    justify-content: center;
  }

  header nav ul li a {
    font-size: 20px;
  }

  .hero-cta, .hero-form {
    width: 100%;
  }

  .hero-cta {
    text-align: center;
  }

  .trainer {
    flex: 0 70%;
  }

  .contact-info iframe{
    flex: 1 100%;
  }

  footer h2, footer div {
    text-align: center;
    width: 100%;
  }

}

/* 2.4 - MEDIA QUERIES FOR TABLETS DOWN TO PHONES */
@media screen and (max-width: 768px) {
  section {
    padding: 30px 15px;
  }

  .checkbox label, .radio label {
    margin: 24px;
  }
  
  .section-title {
    width: 100%;
  }

  .step h3 {
    flex: 1 100%;
    text-align: center
  }

  .step-info {
    flex: 2 100%;
    text-align: center;
    justify-content: center;
  }

  .step-img {
    flex: 0 32%;
    margin-right: 0;
    margin-top: 15px;
    margin-bottom: 15px;
  }

  .step-text {
    flex: 100%;  
  }

  .trainer-bio h3, .trainer-bio h4 {
    display: block;
  }
}

/* 2.4 - MEDIA QUERIES FOR PHONE */
@media screen and (max-width: 575px) {
  
  .hero-form button {
    width: 100%;
  }

  .section-title {
    width: 95%;
  }

  .intro p {
    width: 100%;
  }

  .trainer {
    flex: 0 100%;
  }

  .contact-info > * {
    flex: 0 100%;
  }

  .contact-form {
    order: 3;
  }
}
