@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}
html{
  overflow-x: hidden;
}
body{
  background-color: #FFB000;
  background-image: url("images/bg-food.png");
  background-position: center;
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
h1 {
  color: #FFB000;
  margin-bottom: 20px;
  font-weight: 900;
  font-size: 2.5rem;
}
 
p{
  line-height: 1.5em;
}
figure{
  position: relative;
}
figure img {
  display: block;
  position: absolute;
  right: 0px;
  height: 100vh;
}
.container {
  height: 100vh;
}
.container > div {
  display: flex;
  align-items: center;
  justify-content: center;
}
.container > div > div {
  margin: 50px;
  width: 100%;
}
.container > span {
    font-size: 0.8em;
}
form {
  display: flex;
  margin-top: 10px;
  position: relative;
  align-items: center;
}
input[type="text"] {
  border: 0;
  background-color: #FDE5D4;
  padding: 20px;
  border-radius: 10px 0px 0px 10px;
  color: #000;
  z-index: 9;
}
button{
  border: 0;
  background-color: #FFB000;
  color: #004225;
  padding: 20px;
  border-radius: 0px 10px 10px 0px;
  cursor: pointer;
  z-index: 9;
}
#find-recipes{
  background: rgba(0,0,0,.7);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  -webkit-box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  -moz-box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  color: #fff;
}
.searchresult{
  margin: 20px 0px;
}

#recipes-list {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 15px;
}
#recipes-list li {
  list-style-type: none;
  padding: 30px;
  border-radius: 20px;
  background: rgba(0,0,0,.7);
  box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  -webkit-box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  -moz-box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  gap: 15px;
  color: #fff;
}
a.cuisine {
  text-decoration: none;
  color: #FFB000;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid #FFB000;
  text-align: center;
}
a.cuisine:hover {
  border: 2px solid #FFB000;
  background-color: #FFB000;
  color: #004225;
}

#recipes {
  display: flex;
  flex-direction: column;
  margin-top: 20px;
  gap: 20px;
}
#recipes > div {
  display: flex;
  box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  -webkit-box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  -moz-box-shadow: 3px 4px 5px 0px rgba(0,0,0,0.2);
  border-radius: 20px;
  z-index: 9;
}
#recipes-list li > span:first-child {
  text-decoration: none;
  font-weight: 800;
  color: #FFB000;
}
#recipes a {
  text-decoration: none;
  color: #FFB000;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 9;
  background: rgba(0,0,0,.7);
  align-self: baseline;
}
#recipes a:hover {
  background-color: #FFB000;
  color: #004225;
}
ol{
  margin-left: 20px;
  line-height: 1.5em;
}


.ingredients-section {
  padding: 30px;
  border-radius: 10px 0px 0px 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 40%;
  background: rgba(0,0,0,.7);
  color: #ffffff;
}
.ingredients-section h2 {
  color: #FFB000;
}
.instructions-section {
  padding: 30px;
  background-color: #FDE5D4;
  width: 60%;
  border-radius: 0px 10px 10px 0px;
}
.instructions-section h3 {
  margin-bottom: 20px;
}

.loader {
    width: 30px;
    height: 30px;
    border: 2px solid #ddd;
    border-bottom-color: #004225;
    border-radius: 50%;
    display: none;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-left: 20px;
}
@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


@media (max-width: 1190px){
  #recipes-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 980px){
  #recipes-list {
    grid-template-columns: repeat(3, 1fr);
  }
  figure img{
    display: none;
  }
  #find-recipes {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  #recipes > div {
    flex-direction: column;
  }
  .ingredients-section{
    border-radius: 20px 20px 0px 0px;
  }
  .instructions-section{
    border-radius: 0px 0px 20px 20px;
  }
  .ingredients-section h2 {
    text-align: center;
  }
  .instructions-section, .ingredients-section{
    width: 100%;
  }
}
@media (max-width: 800px){
  #recipes-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px){
  #recipes-list {
    grid-template-columns: repeat(1, 1fr);
  }
}
@media (max-width: 480px){
  .container > div > div{
    margin: 0px;
  }
  #find-recipes, .ingredients-section, .instructions-section, #recipes-list li{
    border-radius: 0;
  }
  #recipes-list{
    gap:1px;
  }
  .searchresult {
    padding-left: 30px;
  }
 
  #recipes{
    margin-top: 0;
    gap:0;
  }
  #recipes a {
    color: #000;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    z-index: 9;
    align-self: baseline;
    padding-left: 30px;
    margin: 20px 0px;
  }
  #recipes a:hover {
    border: 0;
  }
 
}

