html, body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #986723;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #4a4a4a;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  gap: 10px;
}

@media (min-width: 768px) {
  header {
    padding: 1rem 2rem;
  }
}


.logo p {
  font-size: 1.1rem;
  font-weight: bold;
  color: #ffd700;
  line-height: 1.1;
  margin: 0;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ffd700;
}

form {
  display: flex;
  gap: 5px;
}

form input[type="text"] {
  padding: 5px;
  font-size: 1em;
}

form button {
  padding: 5px 10px;
  font-size: 1em;
  cursor: pointer;
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  nav {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  form {
    flex-direction: column;
    width: 100%;
  }

  form input[type="text"],
  form button {
    width: 100%;
  }
}

main {
  padding: 2rem 1rem;
  text-align: center;
  flex: 1;
}

.categories {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.categories a {
  text-decoration: none;
  color: inherit;
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 250px;
  text-align: center;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card .label {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #228b22;
  color: white;
  font-weight: bold;
  border-radius: 20px;
  display: inline-block;
}

.view-all p {
  margin-top: 2rem;
  font-size: 1.2rem;
  font-weight: 500;
}

.view-all a {
  text-decoration: none;
  color: #8b4513;
  font-size: 1.2rem;
  font-weight: 500;
}

.recipe-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
  padding: 20px;
}

.recipe-card {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.recipe-card:hover {
  transform: scale(1.02);
}

.recipe-card h2 {
  margin-top: 0;
}

.recipe-card a {
  text-decoration: none;
  color: #333;
}

.recipe-card a:hover {
  text-decoration: underline;
}

.recipe-card img.recipe-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.recipe-detail {
  max-width: 800px;
  margin: 40px auto;
  text-align: left;
  flex: 1;
  min-height: 0;
}

.recipe-detail h1 {
  margin-top: 20px;
  font-size: 32px;
  color: #d2691e;
}

.recipe-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin: 20px 0;
}

.meta {
  font-size: 16px;
  color: #666;
}

.ingredients, .instructions {
  margin-top: 30px;
}

.ingredients h2,
.instructions h2 {
  color: #444;
  border-bottom: 2px solid #ffd180;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.ingredients p,
.instructions p {
  white-space: pre-line;
  background: #fff8e1;
  padding: 15px;
  border-radius: 6px;
  line-height: 1.6;
}

footer {
  text-align: center;
  padding: 20px;
  background: #fff3e0;
  color: #666;
  font-size: 14px;
  border-top: 1px solid #ddd;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
