* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #134444;
}

body {
  background-color: #f4f4f4;
  color: #333;
}

.header {
  background: #d9e2dc;
  color: white;
  text-align: center;
}

.search-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 25px;
  padding: 12px 15px;
  transition: all 0.3s ease;
}

.btn {
  color: rgb(30, 75, 95);
  padding: 10px 20px;
  outline: none;
  border: none;
  box-shadow: none;
  border-radius: 25px;
  box-shadow: 0 2px 5px rgba(16, 41, 50, 0.9);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn:hover {
  background: #0e81d8;
  color: white;
  transform: translateY(-2px);
}

.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler-icon:focus {
  outline: none;
  box-shadow: none;
}

.recipe-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 10px;
}

.recipe {
  background: #90d1ca;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  width: 300px;
  height: auto;
  margin: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.recipe:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.recipe img {
  border-radius: 5px;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recipe h2 {
  padding: 10px;
  text-align: center;
  font-size: clamp(1.75rem, 2.5vw, 3rem);
}

.recipe h3 {
  padding: 5px;
  text-align: center;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.recipe p {
  font-size: clamp(1rem, 1.8vw + 0.2rem, 1.25rem);
  color: #015a53;
  text-align: center;
}

.hover-card {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%; 
  max-width: 500px; 
  height: 80vh; 
  max-height: 600px; 
  font-size: clamp(1rem, 3vw, 1.5rem); 
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(11, 61, 70, 0.5);
  transition: all 0.3s ease; 
  background: #c9f2e5;
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000; 
}

.instructions {
  text-align: justify;
  padding: 0.5rem;
  text-wrap: wrap;
  font-size: clamp(1rem, 1.8vw + 0.2rem, 1.25rem);
}

.hover-card::-webkit-scrollbar {
  width: 5px;
}

.hover-card::-webkit-scrollbar-thumb {
  background: rgb(0 115 131);
  border-radius: 5px;
  --webkit-border-radius: 16px;
}

.close-btn {
  border: 1px solid #0385a5;
  border-radius: 50%;
}
.close-btn:hover {
  background: #0e81d8;
}

.link,
.linkBtn {
  margin-top: 2rem;
  text-decoration: none;
  color: white;
  font-size: 1rem;
  text-align: center;
}

.ingredients {
  list-style: disc inside;
  margin: 0 15px 15px;
  padding: 0;
  color: #555;
  font-size: 0.95rem;
}
.ingredients li {
  margin-bottom: 4px;
}

h3 {
  text-align: center;
  font-size: clamp(1.25rem, 1.75vw + 0.6rem, 1.75rem);
}

li {
  font-size: clamp(1rem, 1.8vw + 0.2rem, 1.25rem);
  margin-bottom: 0.5em;
  color: #333;
}

/* Loader CSS */

.loader {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
}

.square {
  display: flex;
  flex-wrap: wrap;
  width: 100px;
  height: 100px;
  box-sizing: content-box;
  animation: load-big 4s infinite;
  transform-origin: 0px 100px;
}

.mini_square {
  box-sizing: border-box;
  height: 50px;
  width: 50px;
  background-color: darkcyan;
}

.sq-1 {
  animation: load-left-top 4s infinite;
}

.sq-2 {
  animation: load-right-top 4s infinite;
}

.sq-4 {
  animation: load-right-bottom 4s infinite;
}

@keyframes load-right-bottom {
  0% {
    translate: -50px 0px;
  }

  25% {
    translate: 0px 0px;
  }

  100% {
    translate: 0px 0px;
  }
}

@keyframes load-right-top {
  0% {
    translate: -50px 50px;
  }

  25% {
    translate: 0px 50px;
  }

  50% {
    translate: 0px 0px;
  }

  100% {
    translate: 0px 0px;
  }
}

@keyframes load-left-top {
  0% {
    translate: 0px 50px;
  }

  25% {
    translate: 50px 50px;
  }

  50% {
    translate: 50px 0px;
  }

  75% {
    translate: 0px 0px;
  }

  100% {
    translate: 0px 0px;
  }
}

@keyframes load-big {
  0% {
    scale: 1;
    background-color: rgba(0, 0, 0, 0);
  }

  74% {
    scale: 1;
    background-color: rgba(0, 0, 0, 0);
  }

  75% {
    scale: 1;
    background-color: darkcyan;
  }

  100% {
    scale: 0.5;
    background-color: darkcyan;
  }
}


@media (max-width: 768px) {
  .hover-card {
    width: 95%; 
    height: 85vh; 
    padding: 1rem; 
    font-size: 1rem; 
  }
}

@media (max-width: 480px) {
  .hover-card {
    height: 90vh; 
    border-radius: 0;
  }
}

