*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

h1,
h2,
h3 {
  font-weight: 500;
}

.container {
  min-height: 100vh;
  background-image: url("../public/images/board.jpeg");
  background-size: cover;
  background-repeat: no-repeat;
  font-family: 'Ubuntu', sans-serif;

}

.header {
  height: 60px;
  background-color: rgba(0, 0, 0, 0.785);
  color: white;
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.menu {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  margin-left: 100px;
  font-size: 1.3rem;
}

.logo img {
  height: 30px;
  margin-right: 10px;
}

.menu ul{
  display: flex;
  list-style: none;
  margin: auto 100px;
  font-size: 1.3rem;
}

.menu ul li {
  margin: 0 1rem;
}

.menu ul li:hover {
  opacity: 0.8;
  cursor: pointer;
}


.wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  color: white;

}

.select-category {
  margin: 1rem 0;
  height: 30px;
  min-width: 120px;
}

h2 {
  margin-top: 2rem;
  font-size: 1.7rem;
}

.search {
  margin: 2rem 0;
}

.search-box {
  margin: 1rem 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  color: rgb(253, 197, 11);
}

.search-button {
  width: 100%;
  cursor: pointer;
  width: 40px;
  height: 40px;
  color: white;
  font-size: 1.25rem;
  background-color: rgb(253, 197, 11);
  border-style: none;
  border-top-right-radius: 1.5rem;
  border-bottom-right-radius: 1.5rem;
}

.search-ingredient {
  padding: 0 1rem;
  border-top-left-radius: 1.5rem;
  border-bottom-left-radius: 1.5rem;
  border: 1px solid;
  border-color: rgb(253, 197, 11);
}
.search-ingredient:focus {
  outline: none;
  border-color: rgb(253, 197, 11);
}

.search-button:hover {
  background-color: rgb(235, 172, 0);
}

.meal-name {
  min-height: 100px;
  color: white;
}

.meal-name h3 {
  margin: 1.5rem;
}

.meal-name a {
  text-decoration: none;
  color: white;
  background-color: rgb(253, 197, 11);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  margin: 2rem;
  border-radius: 2rem;
}
.meal-name a:hover {
  background-color: rgb(235, 172, 0);
}

.meal-result {
  border-radius: 1rem;
  box-shadow: 5px 5px 5px 0 rgba(0, 0, 0, 0.8);
  margin: 2rem 0;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.785);
}

.meal-img img {
  width: 100%;
  display: block;
}

.meal-item {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.pop-up {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9); /* sadece popup kendisi küçük başlar */
  background-color: rgba(235, 172, 0, 0.95);
  padding: 2rem 0;
  border-radius: 1rem;
  height: 90%;
  width: 90%;
  color: white;
  opacity: 0;             /* görünmez başlar */
  visibility: hidden;     /* tıklanamaz */
  overflow-y: scroll;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.showPopup {
  transform: translate(-50%, -50%) scale(1); /* açılınca normal boyut */
  opacity: 1;
  visibility: visible;
}

.popup-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 5px 10px;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
}

.popup-close-btn:hover {
  opacity: 0.8;
  cursor: pointer;
}

.recipe-title {
  margin: 1rem 0;
}

.recipe-category {
  background-color: white;
  color: rgb(235, 172, 0);
  padding: 0.2rem 0.5rem;
  display: inline-block;
  font-weight: 600;
  border-radius: 0.3rem;
  margin: 1rem 0;
}

.recipe-instructions {
  margin: 1rem 0;
}

.recipe-instructions h3 {
  font-size: 1.5rem;
}

.recipe-instructions p {
  margin: 2rem 4rem;
  text-align: left;
  font-size: 1.2rem;
}

.recipe-meal-img img {
  width: 200px;
  height: 200px;
  border-radius: 2rem;
}

.recipe-link {
  padding: 1rem 0;
}

.recipe-link a {
  color: white;
  font-weight: 600;
}

.noResult {
  grid-template-columns: 1fr!important;
  color: rgb(0, 0, 0);
  font-size: 1.5rem;
  font-weight: 500;
  width: 100%;
  margin: 2rem 0;
}

@media (max-width: 960px) {
  .meal-item {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .meal-item {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .meal-item {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }

  .logo {
    font-size: 1rem;
    margin-left: 20px;
    width: 100px;
  }

  .menu {
    width: 70vw;
  }

  .menu ul {
    font-size: 1rem;
    margin-left: 40px;
  }

  .menu ul li {
    margin: 0 5px;
    font-size: 0.8rem;
  }

  h1,
  h2,
  h3 {
    font-size: 1rem;
  }
}
