/* Overall Styling
 *****************/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  background: #faf7f5;
  color: black;
  font-family: Verdana, sans-serif;
}


/* Navigation Bar
 ****************/
header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0.4rem;
  border-radius: 0.2rem;
  background: lightslategray;
}

@media screen and (min-width: 900px) {
  header {
    padding: 1rem 2rem;
    flex-direction: row;
    text-align: center;
  }
}

header h1 {
  text-align: center;
  font-size: 1.6rem;
  padding-bottom: 0.6rem;
  color: beige;
}

@media screen and (min-width: 800px) {
  header h1 {
    font-size: 2.0em;
    padding-bottom: 0;
  }
}

@media screen and (min-width: 1000px) {
  header h1 {
    font-size: 2.5rem;
  }
}


nav {
  margin: auto 0;
}

nav ul {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  list-style: none;
}

@media screen and (min-width: 900px) {
  nav ul {
    justify-content: space-between;
  }
}

.nav__link, .nav__link:visited {
  text-decoration: none;
  font-size: 1.3rem;
  color: white;
}

.nav__item + .nav__item {
  margin-left: 0.5rem;
}

@media screen and (min-width: 800px) {
    .nav__link, .nav__link:visited {
        font-size: 1.75rem;
    }

    .nav__item + .nav__item {
        margin-left: 2.0rem;
    }
}


/* Title
 *******/
.title {
  padding-top: 2rem;
  text-align: center;
  font-size: 2.5rem;
}


/* Cards
 *******/
.cards-container {
  margin: 1.0rem 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.0rem;
  justify-content: center;
}

@media screen and (min-width: 1000px) {
  .cards-container {
    margin: 3.0rem;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 3.0rem;
  }
}

.card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  border-radius: 0.2rem;
}

.card a {
  text-decoration: none;
}

.card__image {
  height: 16rem;
  width: 100%;
  object-fit: cover;
}

.card__body {
  width: 100%;
  text-align: center;
  padding: 0.5rem 1rem;
  position: absolute;
  top: 70%;
  background: rgba(0, 0, 0, 0.4); /* Black background with 0.4 opacity */
  color: #f1f1f1; /* Grey text */
}

.card__body h2 {
  border-bottom: 3px solid black;
  font-weight: bold;
}

.card__body p {
  font-weight: lighter;
}

.recipe-title-long {
  font-size: 1.4rem;
  padding-bottom: 0.2rem;
}

.recipe-title-extra-long {
  font-size: 1.3rem;
  padding-bottom: 0.35rem;
}

.recipe-badge {
  border-radius: 6px;
  padding: 4px;
  display: inline-block;
  font-size: 0.8em;
  margin-top: 6px;
}

.dairy-free-badge {
  background-color: green;
  color: white;
}

.soy-free-badge {
  background-color: purple;
  color: white;
}


/* Footer
 ********/
footer {
  /* display: flex;
  justify-content: center;
  align-items: center; */
  text-align: center;
  padding: 1.5rem 0;
  border-radius: 0.2rem;
  background: lightslategray;
  color: white;
}

footer a {
  text-decoration: none;
  color: lightskyblue;
}
