* {  
  margin: 0;
  padding: 0;
  font-family: Sunflower, Arial, Helvetica, sans-serif;
}

:root {
  --cream: #fffcf2;
  --lgray: #ccc5b9;
  --dgray: #403d39;
  --charcoal: #252422;
  --orange: #eb5e28;
}

h1 {
  padding: 2rem;
  color: var(--charcoal);
}

h2 {
  font-family: Waterfall, Arial, Helvetica, sans-serif;
  font-size: xx-large;
  color: var(--charcoal);
  padding-bottom: 1rem;
}

header {
  color: var(--cream);
  background-color: var(--orange);
  text-align: center;  
  grid-column: 1 / 4;
  width: 100%;
}

html, body {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--cream);
}

nav {
  max-width: 100%;
}

.navigation {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.navigation li {
  flex: 1 1 auto;
}

.navigation a {
  display: block;
  color: #eee;
  padding: 1rem;
  text-decoration: none;
  text-align: center;
  background-color: var(--dgray);
}

.navigation a:hover {
  font-weight: 700;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

footer {
  color: var(--cream);
  background-color: var(--charcoal);
  padding: 1rem;
  text-align: center;
  width: 100%;
  margin-top: auto;
}

.dish-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem;
  justify-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  align-items: stretch;
}

.dish-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 350px;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.dish-card img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
  flex-shrink: 0;
}

.dish-card p {
  flex-grow: 1;
}

.label {
  font-weight: bold;
  color: var(--dgray);
}

@media screen and (max-width: 64em) {
  .dish-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 37.5em) {
  .dish-cards {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0 auto;
  }

  .dish-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 90%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    margin: 0 auto;
    overflow: hidden;
  }

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

#menu {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background-color: var(--orange);
  color: var(--cream);
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  width: fit-content;
  padding: 1rem 1.5rem;
  margin: 1rem auto;
  font-size: large;
}

#menu::before {
  content: "Popularity Filter";
}

#menu.show::before {
  content: "X";
}

.popularity {
  display: none;
  flex-direction: column;
  color: var(--charcoal);
  width: fit-content;
  border-radius: 10px;
  list-style: none;
}

.popularity.show {
  display: flex;
}

.popularity a {
  display: block;
  padding: 0.2rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--charcoal);
  transition: 0.5s;
}

.popularity a:hover {
  background-color: var(--orange);
  color: var(--cream);
  border-radius: 5px;
}
