@import url('https://fonts.googleapis.com/css2?family=Calligraffitti&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playwrite+CU:wght@100..400&family=Satisfy&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Changa:wght@200..800&family=Playwrite+CU:wght@100..400&family=Satisfy&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Changa:wght@200..800&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Playwrite+CU:wght@100..400&family=Satisfy&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');

body,
html {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background-color: azure;
  scroll-behavior: smooth;
}
span{
  display: inline-block;
}
header {
  position: sticky;
  top: 0px;
  z-index: 10000;
  background: linear-gradient(to right, rgb(252, 247, 186), rgb(255, 255, 255));
}

/* navbar styling */

.nav {
  min-height: 60px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 29px;



}

.h3 {
  position: absolute;
  left: 8rem;
  font-size: 1.7rem;
  font-family: "Satisfy", cursive;
  background: linear-gradient(to right, #fa6b18, #f7913e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.navBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  font-family: "Josefin Sans", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  padding: 7px;
}

.nav img {
  border-radius: 1rem;
  width: 5rem;
  margin: 12px;

}

.navBar li a {
  text-decoration: none;
  color: #014704;
  position: relative;
}


.navBar li a:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: #006b05;
  border-radius: 12px;
  transition: all 0.4s ease;
}

.navBar li a:hover:before {
  width: 100%;
}

/* Hamburger navbar styling */

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.5s ease-in-out;
  transition: all 0.4s ease-in-out;
  background-color: #014704;
}

/* Intro styling */

div.img_bg {

  width: 100%;
  height: 80vh;
  overflow: hidden;
  position: relative;
  background-image: url(https://images.pexels.com/photos/1640773/pexels-photo-1640773.jpeg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  margin: 0;
  padding: 0;
  opacity: 0.9;

}

.content {
  font-family: "lobster", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #014704;
  animation: fadeInScale 3s ease-in-out forwards; 
  animation-delay:  0.7s;
  opacity: 0;

}


@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* separation */

.line{
  height: 4px;
  width: 100%;
  background-color: #699270;
}

/* About Us section */

.aboutUs,.manageRecipes {
  margin: 5rem 8rem;
}

.heading {
  text-align: center;
  font-size: 2.5rem;
  font-family: "Changa", sans-serif;
  color: #0e7013;

}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-items: center;
  align-items: center;
  font-family: "DM sans", sans-serif;
  font-weight: 500;

}

.container>:first-child {
  font-size: 2rem;
  text-align: center;
}

.info {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin: 32px 22px;
}

.info div {
  flex: 1;
}

.info img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.info h3 {
  margin-top: 0;
  font-size: 2rem;
}

.info p {
  font-size: 1.2rem;
}

#rev{
  display: flex;
  flex-direction: row-reverse;
}

/* Recipe Search */
#find{
  margin-top: 5rem;
}


.searchBar * {
  box-sizing: border-box;
  margin: auto; 
 }
 
 .searchBar .search-box{
  width: fit-content;
  height: fit-content;
  position: relative;
 }
 
 .searchBar .input-search{
  height: 50px;
  width: 50px;
  border-style: none;
  padding: 10px;
  font-size: 18px;
  letter-spacing: 2px;
  outline: none;
  border-radius: 25px;
  transition: all .5s ease-in-out;
  background-color: #014704;
  padding-right: 40px;
  color:#014704;
 }

 .searchBar .input-search::placeholder{
  color:#014704 ;
  font-size: 18px;
  letter-spacing: 2px;
  font-weight: 100;
 }

 .searchBar .btn-search{
  width: 50px;
  height: 50px;
  border-style: none;
  font-size: 20px;
  font-weight: bold;
  outline: none;
  cursor: pointer;
  border-radius: 50%;
  position: absolute;
  right: 0px;
  color:#014704 ;
  background-color:transparent;
  pointer-events: painted;  
 }

 .searchBar .btn-search:focus ~ .input-search{
  width: 300px;
  border-radius: 0px;
  background-color: transparent;
  border-bottom:1px solid #014704 ;;
  transition: all 500ms cubic-bezier(0, 0.110, 0.35, 2);
 }

 .searchBar .input-search:focus{
  width: 300px;
  border-radius: 0px;
  background-color: transparent;
  border-bottom:1px solid rgba(1, 78, 65, 0.74);
  transition: all 500ms cubic-bezier(0, 0.110, 0.35, 2);
 }

/* recipe modal styling */

.modal{
  max-width: 76%;
  min-height: 10vh;
  margin: 22px;
  background:linear-gradient(to right, rgb(10 73 1 / 75%), #699270);
  padding: 12px;
  border-radius: 22px;
  font-family: "Lobster",sans-serif;
  color: rgb(1, 32, 1);
  
}

#output{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding-top: 52px;
}


.modal img{
  border-radius: 12px;
  width: 100%;
}

.viewBtn{
  background-color:rgb(2, 54, 2);
  border: none;
  border-radius: 7px;
  padding: 5px;
  color:white;
  cursor: pointer;
  margin: 12px;
  font-family: "Oswald",sans-serif;
  letter-spacing: 1px;
}

.viewBtn:hover{
  color: #004203;
  background-color:  white;
}


.popup{
  display: none;
  position: fixed;
  bottom:0;
  background-color: #000000d2;
  height: 100%;
  width: 100%;
  z-index: 10000;
  margin: 0rem;
  overflow:scroll;
  object-fit: cover;
}


.recipeBox{
  min-height: 40vh;
  width: 50vw;
  padding: 13px;
  border-radius: 22px;
  margin: auto;
  background-color: aliceblue;
  box-shadow: 6px 4px 2px rgb(24 24 24 / 92%);
  font-family: "Changa", sans-serif;
}

.recipeBox img{
border-radius: 12px;
width: 70%;
}
.recipeBox span{
  position: absolute;
  top: -30px;right: 10px;
  font-size: 60px;
  font-weight: 400;
  color: white;
  cursor: pointer;
  z-index: 10000;
}
.recipeBox .rname{
  color: #000000;
  text-decoration: underline;
  font-family: "lobster",sans-serif;
}
.recipeBox h2{
  color: #000000;
  text-decoration: underline;
  font-family: "lobster",sans-serif;
}


/* Recipe manager styling */

.form-container {
  margin: 2rem 8rem;
  padding: 2rem;
  background-color: rgb(255, 255, 255);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.form-container form {
  display: flex;
  flex-direction: column;
}

.form-container label {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #014704;
}

.form-container input, .form-container textarea {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #a09f9f;
  border-radius: 5px;
}

.form-container button {
  margin-top: 1rem;
  padding: 0.5rem 2rem;
  border: none;
  border-radius: 5px;
  background-color: #014704;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.form-container button:hover {
  background-color: #126d18;
}

.recipes-container {
  margin: 2rem 8rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  
}

.recipe-card {
  background:linear-gradient(to left, #ffffff, #a2b843);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  
}

.recipe-card h3 {
  
  margin: 0;
  padding: 1rem;
  font-size: 1.5rem;
  color: #000000;
  cursor: pointer;
  font-family: "lobster",sans-serif;
  
}

.recipe-card .contents {
  display: none;
  padding: 1rem;
  font-family: "Changa",sans-serif
}

.recipe-card .contents img {
  border-radius: 12px;
width: 40%; 
  border-radius: 10px;
}

.recipe-card .contents .ingredients, .recipe-card .contents .instructions {
  margin-top: 1rem;
}

.recipe-card .contents .ingredients h4, .recipe-card .contents .instructions h4 {
  margin: 0;
  font-size: 1.2rem;
  font-family: "lobster",sans-serif
}

.recipe-card .contents p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #333;
}
.flex{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-recipe{
  background-color: #014704;
  color: white;
padding: 7px;
margin-right: 10px;
border-radius: 10px;
cursor: pointer;
}

.delete-recipe:hover{
  background-color: #216e26;
}

/* Responsiveness */

@media only screen and (max-width:1120px) {
  .content {
    font-size: 1rem;
  }

  .navBar {
    font-size: 1.2rem;
  }

  .heading {
    font-size: 1.7rem;
  }

  .container>:first-child {
    font-size: 1.5rem;
  }

  .info h3 {
    margin-top: 0;
    font-size: 1.3rem;
  }

  .info p {
    font-size: 0.8rem;
  }

}



@media only screen and (max-width:900px) {

  .hamburger {
    display: block;

  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav {
    padding-left: 5px;
  }

  .h3 {
    left: 6.5rem;
    /* font-size: 1.2rem; */
  }

  .navBar {
    position: fixed;
    z-index: 10000;
    left: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background: linear-gradient(to bottom, rgb(248, 244, 226), rgb(245, 206, 147));
    text-align: center;
    transition: 0.4s;
  }

  .navBar.active {
    left: 0;
    width: 100%;
    margin: 20px 0px;
    gap: 22px;
  }

  .recipeBox{
    width: 50vw;
  }

  .aboutUs,.manageRecipes {
    margin: 5.3rem 2rem 2rem 2rem;
  }

  .heading {
    font-size: 1.5rem;
  }

  .container>:first-child {
    font-size: 1rem;
  }

  .form-container , .recipes-container
  {
    margin:1rem;
  }
  .searchBar .input-search{
    font-size: 12px;
  }

}

@media only screen and (max-width:700px) {
  .info,#rev {
    flex-direction: column;
  }

  .info span {
    width: 100%;
    text-align: center;
  }

  #output{
    grid-template-columns: 1fr 1fr;
  }

  .recipeBox{
    font-size: 0.68rem;
  }
  .recipeBox span{
    font-size: 40px;
    top: -15px;
  }
}

@media only screen and (max-width:590px) {
  .content {
    font-size: 0.7rem;
  }

  .container>:first-child {
    font-size: 1.3rem;
  }

  div.img_bg {
    height: 70vh;
  }

  #output{
    grid-template-columns: 1fr 1fr;
  }  
  
  .heading {
    font-size: 2rem;
  }

  .form-container label , .recipe-card h3 ,.recipe-card .contents .ingredients h4, .recipe-card .contents .instructions h4 {
    font-size: 1rem;
  }

  .delete-recipe{
    padding: 3px;
  }

  .recipe-card .contents img{
    width: 60%;
  }

  .recipe-card .contents p{
    
    font-size:0.8rem ;
  }

  .form-container input, .form-container textarea{
  font-size: 10px;
  }

}

@media only screen and (max-width:450px) {
  #output{
    grid-template-columns:1fr;
    grid-area: auto;
    margin-left: 42px;
  }

  div.img_bg {
    height: 60vh;
  }

  .recipeBox{
    width: 70vw;
  }
  
}
