/*

### Steps for production style CSS file ###

1 |Copy the content of your CSS file and paste it into the PostCSS playground for converting variables.
2 |Copy the output of the PostCSS playground and paste it into the autoprefixer.
3 |Create a new file called “style.production.css” and paste the output of the autoprefixer into the file.
4 |Important: Make sure you keep a copy of your original “styles.css” file. If you want to make any changes later, it’s best to make them in this file and repeat the process again.
5 |Update the links to your CSS file in all your HTML files.

*/

/*
Colors used

Text Color (Black): #000;
Primary Color (Dark Moderate Cyan): #357b70;
Secondary Color (Soft Orange): #e0b354;
*/

/* Declarations for color variables */

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  color: #000;
  font-weight: 400;
  font-size: 17px;

  /* Sets the font size to 16px */

  line-height: 1.6;

  /* Sets the line-height to 1.6 */
}

header {
  margin-bottom: 80px;
}

header img {
  max-height: 80px;
  max-width: 200px;
}

h1 {
  font-size: 30px;
  font-weight: 700;
}

h2 {
  font-size: 24px;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  font-weight: 700;
}

h4 {
  font-size: 17px;
  font-weight: 700;
  text-decoration: underline;
}

h5 {
  font-size: 17px;
  font-weight: 700;
  text-decoration: underline;
}

h6 {
  font-size: 17px;
  font-weight: 700;
  text-decoration: underline;
}

a {
  /* color: #357b70;  */
  color: #357b70;
}

a:visited {
  /* visited link */
  color: #05676e;
}

a:hover,
a:focus {
  /* No underlining when hovering over a link */
  text-decoration: none;
}

a:active {
  /* selected link */
  color: #489c79;
}

button {
  /* overwrites browser defaults and resets the border */
  border: none;

  /* takes the font from the outer container */
  font-family: inherit;
  font-size: inherit;

  /* styles the button */
  background-color: #357b70;
  color: #fff;
  text-decoration: none;

  /* adds spacing to the button; this will be discussed more in-depth later */
  padding: 10px;
  border-radius: 3px;

  /* width of the border, type, color */
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  -webkit-transition-duration: 0.2s;
  -o-transition-duration: 0.2s;
  transition-duration: 0.2s;
  -webkit-transition-property: opacity;
  -o-transition-property: opacity;
  transition-property: opacity;
}

.button {
  /* overwrites browser defaults and resets the border */
  border: none;

  /* takes the font from the outer container */
  font-family: inherit;
  font-size: inherit;

  /* styles the button */
  background-color: #357b70;
  color: #fff;
  text-decoration: none;

  /* adds spacing to the button; this will be discussed more in-depth later */
  padding: 10px;
  border-radius: 3px;

  /* width of the border, type, color */
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  -webkit-transition-duration: 0.2s;
  -o-transition-duration: 0.2s;
  transition-duration: 0.2s;
  -webkit-transition-property: opacity;
  -o-transition-property: opacity;
  transition-property: opacity;
}

button:hover,
button:focus,
.button:hover,
.button:focus {
  /* lets the mouse appear as a hand when hovering over the button */
  cursor: pointer;

  /* reduces the opacity of the button to 80% */
  opacity: 0.8;
}

a.button {
  color: #fff;
}

/* Form */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  margin-bottom: 10px;
  border: 1px solid #2b2b2b;
}

textarea {
  margin-bottom: 10px;
  max-width: 100%;
}

/* Table */
table {
  overflow-x: auto;
  margin: 50px auto;
}

th {
  text-align: center;
  font-size: 18px;
  padding: 10px;
  background-color: #d3d3d3;
}

td {
  text-align: center;
  padding: 10px;
}

/* Second Button */
.button__secondary {
  background-color: #e0b354;
  color: #2b2b2b;
}

.navigation-list__item--active {
  text-decoration: none;
}

.profile {
  max-width: 800px;
  margin: 10px auto;
  padding: 10px;
}

.profile__about {
  text-align: center;
}

.profile__about--list {
  list-style-type: none;
  margin-left: -30px;
}

/* Image float */
.profile__portrait {
  float: left;
  max-width: 300px;
  margin-right: 40px;
  border-radius: 50%;
}

/* Keep Footer from floating around other content */
.profile__footer {
  clear: both;
}

/* Header with flexbox */
.page-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  padding: 20px;
  border-bottom: 1px solid lightgray;
}

.page-header__item {
  -webkit-box-flex: 0;
  -ms-flex: 0 1 200px;
  flex: 0 1 200px;
}

.page-header :last-child {
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  text-align: right;
}

.navigation-list {
  list-style-type: none;
}

.navigation-list li {
  display: inline-block;
  margin-left: 15px;
}

/* Grid fallback */
.grid__item {
  display: inline-block;
  width: 33%;
}

/* Styling CSS grid */
.grid {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 20px 1fr 20px 1fr;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 20px;
}

.grid__item {
  background-color: #d3d3d3;
  padding: 10px;

  /* Set width to auto */
  width: auto;
}

.grid__item:last-child {
  -ms-grid-column: 3;
  grid-column: 3 / 3;
  -ms-grid-row: 1;
  -ms-grid-row-span: 2;
  grid-row: 1 / 3;
}

.page-footer {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.footer-centered {
  max-width: 800px;
  margin: 10px auto;
  margin-top: 80px;
  text-align: center;
}

/* Responsive Design */

@media all and (max-width: 500px) {
  .page-header {
    flex-direction: column;
    align-items: center;
  }

  .page-header__item {
    flex: auto;
  }

  .page-header :last-child {
    text-align: center;
    padding: 0;
  }

  .navigation-list li {
    margin: 0 10px;
  }

  .grid {
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
    grid-gap: 10px;
  }

  .grid__item:last-child {
    grid-column: auto / auto;
    grid-row: auto / auto;
  }

  h1 {
    font-size: 24px;
  }
}

/* Animation Test */

@-webkit-keyframes svg-size {
  /* from {width: 300px;}
  to {width: 290px;} */
  from {
    -webkit-transform: translate(-20px, 0);
    transform: translate(-20px, 0);
  }

  to {
    -webkit-transform: translate(20px, 0);
    transform: translate(20px, 0);
  }
}

@keyframes svg-size {
  /* from {width: 300px;}
  to {width: 290px;} */
  from {
    -webkit-transform: translate(-20px, 0);
    transform: translate(-20px, 0);
  }

  to {
    -webkit-transform: translate(20px, 0);
    transform: translate(20px, 0);
  }
}

.container__svg {
  width: 300px;
  margin: 50px auto;
  -webkit-animation-duration: 8s;
  animation-duration: 8s;
  -webkit-animation-name: svg-size;
  animation-name: svg-size;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-direction: alternate;
  animation-direction: alternate;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
}

@-webkit-keyframes color-change {
  0% {
    fill: #edc655;
  }

  50% {
    fill: #fcffad;
  }

  100% {
    fill: #f76414;
  }
}

@keyframes color-change {
  0% {
    fill: #edc655;
  }

  50% {
    fill: #fcffad;
  }

  100% {
    fill: #f76414;
  }
}

.sun {
  -webkit-animation-duration: 4s;
  animation-duration: 4s;
  -webkit-animation-name: color-change;
  animation-name: color-change;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-direction: alternate;
  animation-direction: alternate;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
}

/* The animation code */
@-webkit-keyframes image-round {
  from {
    border-radius: 50%;
  }

  to {
    border-radius: 0%;
  }
}

@keyframes image-round {
  from {
    border-radius: 50%;
  }

  to {
    border-radius: 0%;
  }
}

/* The element to apply the animation to */
.profile__portrait--round {
  border-radius: 50%;
  -webkit-animation-name: image-round;
  animation-name: image-round;
  -webkit-animation-duration: 8s;
  animation-duration: 8s;
  -webkit-animation-timing-function: ease;
  animation-timing-function: ease;
  animation-direction: alternate-reverse;
}

/* List animation */
@-webkit-keyframes list-scale {
  from {
    color: inherit;
    -webkit-transform: scale(1);
    transform: scale(1);
  }

  to {
    color: #357b70;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

@keyframes list-scale {
  from {
    color: inherit;
    -webkit-transform: scale(1);
    transform: scale(1);
  }

  to {
    color: #357b70;
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

.list-hover:hover {
  -webkit-animation-duration: 2s;
  animation-duration: 2s;
  -webkit-animation-name: list-scale;
  animation-name: list-scale;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-direction: alternate;
  animation-direction: alternate;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
}
