/* Mobile-first styles */
body {
  font-family: "Jost", sans-serif;
  background-color: #FAFBFF;
  margin: 0;
}

h1 {
  color: #0018A4;
  font-size: 3.5rem;
  font-weight: 700;
  text-align: center;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.bold {
  font-weight: bold;
}


.filters {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  width: 100%;
}


.filters p {
  margin: 0;
  font-weight: bold;
}

.filters div {
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

button {
  padding: 8px 16px;
  border-radius: 50px;
  outline: 0;
  border: 2px solid rgba(240, 223, 240, 0.178);
  color: #0018A4;
  font-size: 1rem;
  /* Adjusted font size for mobile */
  font-weight: 500;
  margin: 5px;
  cursor: pointer;
}

button:hover {
  border: 2px solid #0018A4;
}

.sort.active {
  background: #FF6589;
  color: white;
  border: 2px solid #4a43460f;
}

.filter.active {
  background: #0018A4;
  color: white;
  border: 2px solid #4a43460f;
}

.filter {
  background: #CCFFE2;
}

.sort {
  background: #FFECEA;
}

.recipes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

a {
  text-decoration: none;
  color: initial;
}

.card {
  background: #FFFFFF;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 288px;
  width: 100%;
  /* Make the card width 100% for small screens */
  padding: 16px;
  text-align: center;
}

.card h2 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

hr {
  border: 1px solid #FF6589;
}

img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}

.details {
  font-size: 16px;
  margin: 8px 0;
  text-align: left;
}

.ingredients ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.ingredients ul li {
  font-size: 14px;
  margin: 5px 0;
}

#messages {
  display: none;
  /* Hidden by default */
  text-align: center;
  margin: 20px auto;
  padding: 10px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 5px;
  max-width: 600px;
}

p {
  font-size: 16px;
}


.random {
  padding: 8px 16px;
  border-radius: 50px;
  outline: 0;
  border: 2px solid rgba(240, 223, 240, 0.178);
  color: #0018A4;
  background-color: #f3456dea;
  font-size: 1rem;
  /* Adjusted font size for mobile */
  font-weight: 500;
  margin: 5px;
  cursor: pointer;
}

.random:hover {
  background-color: #ffe3e2;
}

/* Media Queries for larger screens */
@media (min-width: 768px) {
  h1 {
    font-size: 3rem;
  }

  .filters {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }

  .filters div {
    margin: 0 10px;
  }

  button {
    font-size: 1.1rem;
  }

  .recipes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
    gap: 32px;
  }

  .card {
    max-width: 288px;
  }

  h2 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: 4rem;
    /* Larger font size on desktop */
  }

  .card {
    max-width: 320px;
    /* Slightly larger card size on larger screens */
  }
}