﻿@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700");
body {
  background-color: #fff;
  font-family: "Open Sans", sans-serif;
  margin: 0;
  padding: 0;
}

.logo {
  cursor: pointer;
}

nav {
  background-color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav h4 {
  color: white;
  margin-left: 1.25em;
}
nav li:hover {
  transform: scale(1.2);
}
nav a {
  display: block;
  padding: 1em;
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 16px;
  transition: all 500ms;
}
nav a:hover, nav a:focus {
  color: #ffdea1;
}
nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}
.container a {
  display: inline-block;
  text-decoration: none;
}

.recipe {
  position: relative;
  padding: 0 0.5em;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
  width: 240px;
  margin: 10px;
  height: 360px;
  display: flex;
  flex-flow: column;
  justify-content: flex-end;
  transition: all 1000ms linear;
  overflow: hidden;
}

.recipe:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: #fff;
  animation: fadeout 500ms ease-in forwards;
  transition: all 500ms;
}

.recipe:hover:after, .recipe:active:after, .recipe:focus:after {
  opacity: 0;
  animation: fadein 500ms ease-in forwards;
  z-index: 1;
}

.recipe img {
  position: absolute;
  top: 0;
  left: -20%;
  height: 70%;
  animation: tallout 500ms ease-in-out forwards;
}

.recipe:hover img, .recipe:focus img {
  animation: tall 500ms ease-in-out forwards;
}

.recipe:hover i, .recipe:focus i {
  animation: fadein 500ms ease-in-out forwards;
}

.recipe h3, .recipe p {
  z-index: 2;
  color: black;
}

.recipe span {
  color: orange;
}

.icon {
  position: absolute;
  top: 5%;
  left: 10%;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  animation: fadeout 500ms ease-in-out forwards;
  font-size: 1.7em;
}

.icon2 {
  position: absolute;
  top: 5%;
  right: 10%;
  z-index: 1000;
  cursor: pointer;
  opacity: 0;
  animation: fadeout 500ms ease-in-out forwards;
  font-size: 1.7em;
}

.back {
  text-align: center;
}
.back a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  border: solid 2px black;
  padding: 0.5em 1em;
}
.back a:hover {
  color: white;
  background-color: orange;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.38;
  }
}
@keyframes fadeout {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 0;
  }
}
@keyframes tall {
  from {
    height: 70%;
  }
  to {
    height: 100%;
  }
}
@keyframes tallout {
  from {
    height: 100%;
  }
  to {
    height: 70%;
  }
}
#addItem {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1em;
}

#addItem label {
  padding: 1em;
  font-weight: 600;
  display: flex;
  flex-direction: column;
}

#addItem input {
  padding: 1em 0.5em;
  border: 1px solid #666;
  outline-color: orange;
}

#addItem textarea {
  outline-color: orange;
  padding: 1em;
}

#addItem button {
  cursor: pointer;
  padding: 1em;
}

.ingredients div {
  display: flex;
  margin: 1em 0;
}

.ingredients div input {
  width: 100%;
}

.ingredients div button {
  border: solid 1px #666;
  background-color: red;
  font-size: 1.2em;
  font-weight: 600;
}

.submit {
  margin: 1em 0;
  background-color: orange;
  color: white;
  font-weight: 600;
  font-size: 16px;
  border-color: orange;
}

#RecipePage {
  padding: 1em;
}
#RecipePage img {
  max-width: 100%;
}

#Home h2 {
  text-align: center;
  font-size: 2em;
}

@media all and (min-width: 900px) {
  #addItem, #Home, #RecipePage {
    max-width: 900px;
    margin: 0 auto;
  }
}
@media all and (max-width: 320px) {
  nav {
    flex-direction: column;
  }
}


/*
    <script>
        setTimeout(function () {
            window.location.href =
                'https://example.com/';
        }, 3000);
    </script>
*/