/*! HTML5 Boilerplate v8.0.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.1.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
/* General Styles */

html {
  background-color: #202322;
  font-size: 16px;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 1em;
  text-align: left;
  color: #e2e3ed;
}

ul {
  font-size: 1.125em;
  margin: 0; /* --- clears default browser margin */
  padding: 0;  /* --- clears default browser padding */
  list-style-type: none;
}

a {
  color: #e2e3ed;
  text-decoration: none;
}

h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.875em;  /*30px*/
  font-weight: 500;
}

h3,
h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125em;  /*18px*/
  font-weight: 500;
  margin: 20px 0;
}

h4 {
  color: #ffffff;
}

p {
  font-size: 0.875em;  /*14px*/
  line-height: 1.285em;  /*1em=14px*/
}

img {
  width: 100%;
}

figure {
  margin: 0;
}

address {
  font-style: normal;
}

.content-wrapper {
  width: 90%;
  margin: 50px 0;
}

/* -------------------- Base Header - Footer Styles -------------------- */

header, 
footer {
  background-color: #202322;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
}

/* ----- Header Styles ----- */

header {
  padding: 15px 0;
}

header .content-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
  margin: 0;
  width: 100%;
}

header figure {
  width: 60%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
}

.header-divider {
  width: 100%; /* --- extends divider to edge of screen */
  height: 1px;
  margin: 10px 0 20px 0;
  background: #3a3a3a; 
}

header nav {
  width: 60%;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-flow: row wrap;
}

header nav ul {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

/* ----- Footer Styles ----- */

footer {
  flex-direction: column;
  text-align: center;
}

footer h4 {
  margin: 0 0 20px 0;
}

footer p {
  margin: 0;
  color: #ffffff;
}

footer .content-wrapper {
  width: 55%;
  margin: 50px 0;
}

footer .contact {
  margin-bottom: 50px;
}

footer .social-icons {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

footer .social-icons p {
  background-color: #527158;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

footer .social-icons i {
  font-size: 1.3125em;
}

footer .social p {
  display: flex;
  justify-content: center;
  align-items: center;
}

footer .copyright {
  margin: 0 0 20px 0;
}

/* ================== Mobile Styles - Homepage ================== */

/* ----- Hero Area ----- */

.hero-area {
  display: flex;
  justify-content: center;
  flex-flow: row wrap;
  background-image: url('../img/unplugged-hero-img-72ppi_2500x1667.jpg');
  background-size: cover;
  background-position: center;
  min-height: 500px;
}

.hero-area h1 { 
  font-size: 2.25em;
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  font-weight: 500; 
  line-height: 1.2em; 
  margin: 0; /* --- clears default browser margin */
}

/* ----- Aside ----- */

aside {
  background: #527158;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
}

aside .content-wrapper { /* --- clears 50px base margin style of content-wrapper */
  margin: 30px 0 55px 0; 
}

aside .form-description h3 { /* --- clears 20px base margin style of h3 */
  margin: 0;
}

aside .form {
  margin-top: 30px;
}
 
input[type=text] {
  box-sizing: border-box;
  width: 100%;
/*  color: #2a423a; <-- given color from lesson code */
  color: #9d9ea4;
  font-style: italic;
  padding: 1em;
}
 
input[type=button] {
  width: 100%;
  padding: 20px 0;
  margin-top: 20px;
  background-color: #2a423a;
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 1.125em;
  color: #e2e3ed;
  border: none;
  text-align: center;
  text-transform: uppercase;
}

/* ----- Features ----- */

.features {
  display: flex;
  justify-content: center;
  flex-flow: row wrap;
  background: url('../img/features-background-img-72ppi.jpg') center no-repeat #333;
  background-size: cover;
  background-position: center;
}

.features h2 {
  line-height: 1.2em;
  margin: 0 0 40px 0;
}

.features .features-items {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
}

.features article {
  width: 63%;
  margin: 25px 0;
}

.features i {
  font-size: 3.75em;
  margin-bottom: 40px;
}

.features p {
  margin: 0;
  text-align: center;
}

/* ----- Reviews ----- */

.reviews {
  display: flex;
  justify-content: center;
  flex-flow: row wrap;
  background: #2a423a;
}

.reviews h2 {
  line-height: 1em;
  margin: 0 0 25px 0;
}

.reviews h3 {
  line-height: 1.2em;;
  width: 55%;
  margin: 20px 0;
}

.reviews p {
  margin: 0;
}
/* ================== About Page ================== */

/* ----- Mission ----- */

.mission {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
  background: #527158;
}

.mission h2 {
  line-height: 1.2em;
  margin: 0;
}

.mission p {
  margin: 20px 0 0 0;
}

/* ----- Map ----- */

.map figure {
  width: 100%;
  height: 0; 
  padding-bottom: 125%; 
  overflow: hidden;
  position: relative;
}

.map iframe {
  width: 100%;
  height: 100%;
  position: absolute; 
  top: 0; 
  left: 0; 
}

/* ----- Contact -------*/

.contact-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
  background: #2a423a;
}

.contact-section .content-wrapper {
  margin: 50px 0 30px 0;
}

.contact-section h2 {
  line-height: 1.2em;
  margin: 0 0 10px 0;
}

.contact-content h4 {
  margin: 0;
}

.contact-content p {
  margin: 15px 0 20px 0;
}

/* ================== FAQ Page ================== */

.faq {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
  background: #527158;
}

.faq .content-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: row wrap;
  margin: 50px 0 0 0;

}

.faq h2 {
  line-height: 1em;
  margin: 0 0 45px 0;
}

.faq-content {
  margin-bottom: 50px;
}

.faq-content h3 {
  line-height: 1.33em;
  margin: 0 0 20px 0;
}

.faq-content p { /* --- clears default browser margin */
  margin: 0;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .sr-only class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

  .clearfix::before,
  .clearfix::after {
    content: " ";
    display: table;
  }

  .clearfix::after {
    clear: both;
  }

/* =========== Media Queries =================================================
   MEDIA QUERIES FOR RESPONSIVE DESIGN
      These examples override the primary ('mobile first') styles.
      Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 768px) {
    /* ===== Tablet styles here ===== */

  /* General Styles */

  h2 {
    font-size: 2.25em;
    line-height: 1.33em;
  }

  h3,
  h4 {
    font-size: 1.5em;
    line-height: 1.25em;
  }

  .content-wrapper {
    max-width: 640px;
    margin: 100px 0;
  }

  /* Header Styles */
  header {
    justify-content: space-around;    
    padding: 30px 0;
  }

  header .content-wrapper {
    width: 100%; 
    justify-content: space-between;
  }

  header figure {
    width: 30%;
  }

  .header-divider {
    display: none;
  }

  header nav {
    width: 20%; 
  }

  header nav ul {
    justify-content: space-between;
  }

  /*  Footer Styles  */
  footer .content-wrapper {
    width: 65%;
    margin: 100px 0;
  }

  footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  footer .contact {
    margin-bottom: 0;
  }

  footer .contact h4,
  footer .social h4 {
    margin: 0 0 35px 0;
  }

  footer .social-icons {
      width: 12.5em;
      justify-content: space-between;
  }

  footer .copyright {
    width: 100%;
  }

    /* ---------- Tablet - Homepage ---------- */

  /*  Hero  */
  .hero-area {
    min-height: 600px;
  }

  .hero-area h1 { 
    font-size: 3em;
    line-height: 1em; 
  }

  /*  Aside  */
  aside .content-wrapper{
    display: flex;
    justify-content: space-between;
    flex-flow: row wrap;
    margin: 50px 0;
  }
  
  aside .form-description {
    width: 40%;
    margin: 0;
  }
  
  aside .form {
    width: 45%;
    margin: 0;
  }
  
  aside .form h3 { /* --- clears 20px base margin style from top of h3 */
    margin: 0 0 20px 0;
  }

  input[type=text] {
    padding: 0.75em;
  }

  input[type=button] {
    padding: 0.78em 0;
    margin-top: 1em;
  } 

  /*  Features  */
  .features .content-wrapper {
    margin: 100px 0 75px 0;
  }

  .features h2 {
    margin-bottom: 15px;
    line-height: 1.33em;
  }
  
  .features article {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: column wrap; 
    flex-basis: 50%;
  }

  .features .features-item-description {
    width: 62%;
  }

  .features i {
    font-size: 4.125em;
    margin-bottom: 30px;
  }

  /*  Reviews  */
  .reviews .content-wrapper{
    display: flex;
    justify-content: space-between;
    flex-flow: row wrap;
  }
  
  .reviews h2 {
    width: 87%;
    line-height: 1.2em;
  }

  .reviews figure,
  .reviews article {
    width: 49%;
  }

  .reviews h3 {
    width: 75%;
    line-height: 1.25em;
    margin: 0 0 20px 0;
  }

  /* ---------- Tablet - About Page ---------- */
  
  /*  Mission  */
  .mission-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mission-content p {
    width: 45%;
    margin: 40px 0 0 0;
  }

  /*  Map  */
  .map figure {
    padding-bottom: 45%;
  }
  
  /*  Contact  */
  .contact-section .content-wrapper h2{
    width: 80%;
    line-height: 1.33em;
    margin: 50px 0; /* --- .contact-section .content-wrapper has inherited 50px top-margin, this totals 100px top-margin */
  }
    
  .contact-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .contact-content p {
    margin: 20px 0 70px 0; /* --- .contact-section .content-wrapper has inherited 30px bottom-margin, this totals 100px bottom-margin */
  }
  
  /* ---------- Tablet - FAQ Page ---------- */
  .faq .content-wrapper {
    margin: 100px 0 60px 0;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .faq h2 {
    width: 80%;
    margin: 0 0 30px 0;
  }
  
  .faq-content {
    flex-basis: 46.5%;
    margin-bottom: 40px;
  }

  .faq h3 {
    font-size: 0.875em;  /*14px*/
    line-height: 1.285em;
    margin: 0 0 15px 0;
  }
}

/* ======================================================================
   ====================================================================== */
@media only screen and (min-width: 1200px) {
  /* ===== Desktop styles here ===== */

    /* General Styles */
  h2 {
    font-size: 2.25em;
  }

  h3,
  h4 {
    font-size: 1.875em;
  }

  p {
    font-size: 1.125em;
    line-height: 1.333;
  }

  .content-wrapper {
    max-width: 960px;
    margin: 50px 0;
  }

  /* Header Styles */
  header {
    padding: 25px 0;
  }

  header nav {
    width: 15%;
  }  

  /* Footer Styles */
  footer .social p {
    font-size: 0.875em;  /*14px*/
    line-height: 1.285em;  /*1em=14px*/
  }
    /* ---------- Desktop - Homepage ---------- */

  /*  Hero  */
  .hero-area h1 {
    width: 70%;
    font-size: 3.75em;
    line-height: 1.2em;
  }

  /*  Aside  */
  aside .content-wrapper {
    justify-content: space-around;
  }    

  aside .form-description,
  aside .form {
    width: 33%;
  }

  aside .form-description h3,
  aside .form h3 {
    margin: 0 0 15px 0;
  }

  aside .form-description p {
    margin: 0;
  }

  input[type=text] {
    padding: 0.78em;
    font-size: 1.125em;
  }

  input[type=button] {
    padding: 0.625em;
    font-size: 1.5em;
    margin-top: 0.75em;
  }
  
  /*  Features  */
  .features .content-wrapper {
    margin: 100px 0 35px 0;
  }

  .features h2 {
    width: 90%;
    line-height: 1.2em;
    margin-bottom: 35px;
  }
  
  .features article {
    flex-basis: 33%;
    margin: 65px 0;
  }

  /*  Reviews  */
  .reviews .content-wrapper{
    margin: 100px 0;
  }

  .reviews h2 {
    margin: 0 0 90px 0;
  }

  .reviews article {
    width: 48%;
  }

  /* ---------- Desktop - About Page ---------- */
  
  .mission .content-wrapper,
  .contact-section .content-wrapper {
    margin: 100px 0;
  }

  .mission-content p,
  .contact-content p {
    margin: 0;
  }

  .mission .content-wrapper h2,
  .contact-section .content-wrapper h2 {
    width: 96%;
    font-size: 3em;
    line-height: 1.2em;
    margin: 0 0 25px 0;
  }

  .map figure {
    padding-bottom: 37.5%;
  }
  
  .contact-content {
    width: 88%;
  }

  .contact-content h4 {
    margin-bottom: 30px;
  }
  /* ---------- Desktop - FAQ Page ---------- */
  
  .faq h2 {
    width: 100%;
    font-size: 3em;
  }

  .faq h3,
  .faq p {
      font-size: 1.125em;
      line-height: 1;
  }
  
}

/* ================ Print styles ==============================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
   */
  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

