* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: serif;
}
img {
  width: 100%;
  height: auto;
}

body {
  background: #fff9ee;
  color: #222;
}
/* NAVBAR */

.navbar {
  padding: 20px 40px;
  background: #ffffff;
  box-shadow: 0px -4px 20px rgba(0, 0, 0, 0.1);
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu span {
  margin-right: 30px;
  cursor: pointer;
}
.header-logo {
  width: 300px;
  justify-self: center;
}

/* HERO */

.hero {
  text-align: center;
  padding: 0px 20px;
}
.hero img {
  width: 600px;
  margin-top: -100px;
}
.hero h3 {
  margin-top: 40px;
  font-weight: 300;
  font-family: "Hedvig Letters Serif", serif;
}

/* CATEGORIES */

.categories {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  padding: 40px;
}

.subcategories {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  padding: 0 40px;
}

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

.cat {
  text-align: center;
}

.categories img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
}

.subcategories img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
}

.categories h3,
.subcategories h3 {
  text-align: center;
  font-size: 0.8em;
  font-weight: 500;
  font-family:
    Hedvig Letters Serif,
    serif;
}
.category img {
  transform: scale(1.05);
}
.category:hover img {
  transform: scale(1.08);
}

.category.active img {
  animation: coinFlip 0.8s ease-in-out;
  transform-style: preserve-3d;
  font-weight: 900;
  border: 2px solid #000;
  transform: scale(1.12);
}
.category.active h3 {
  transform: scale(1.1);

  animation: coinFlip 0.8s ease-in-out;
  transform-style: preserve-3d;
  font-weight: 900;
  border-bottom: 2px solid #bfb8ac;
}

@keyframes coinFlip {
  0% {
    transform: rotateY(0deg) scale(1.1);
  }

  100% {
    transform: rotateY(360deg) scale(1.1);
  }
}

/* POPULAR */

.popular {
  padding: 100px 60px;
  text-align: center;
}
h2 {
  border-bottom: 2px solid #bfb8ac;
  width: fit-content;
  margin: auto;
  padding-bottom: 10px;
  font-family: "Hedvig Letters Serif", serif;
}

.readmore {
  border-bottom: 2px solid #bfb8ac;
  width: fit-content;
  margin: auto;
  font-size: 0.8em;
  font-family: "Hedvig Letters Serif", serif;
}

.recipes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  row-gap: 50px;
  margin-top: 40px;
}

.card img {
  width: 100%;
}

.card {
  text-decoration: none;
  color: inherit;
  background-color: #f8f1e4;
  padding-bottom: 20px;
}

.card h3 {
  margin-top: 10px;
  margin-bottom: 40px;
  color: #2f2f2f;
}

.card a {
  font-size: 14px;
  text-decoration: none;
  color: #444;
}

.img-container {
  position: relative;
}

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

.img-container-last img {
  display: block;
  width: 100%;
  height: 200px;
}

.tag {
  position: absolute;
  top: 5%;
  left: 5%;
  background: #ece6db;

  padding: 5px 20px;
  border-radius: 999px;
  font-size: 0.8em;
}

/* SPIN */

.spin {
  background: #e9dcc7;
  margin: 80px 0;
  padding: 80px 0 80px 120px;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.spin-text h2 {
  font-size: 4em;
  font-weight: 300;
  margin: 0;
}

.spin-text p {
  margin-top: 5px;
  font-size: 18px;
}

.spin-action {
  display: flex;
  align-items: center;
  gap: 30px;
}

.spin-btn {
  padding: 15px 40px;
  border: none;
  background: white;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.spin-wheel {
  width: 330px;
}

#wheel {
  transform-origin: center;
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.allrecipes {
  padding: 50px 60px 100px 60px;
  text-align: center;
}

.more-btn {
  background: none;
  color: #000;
  border: none;
  font-size: 1.5rem;
  font-family: "Hedvig Letters Serif", serif;
  cursor: pointer;
  position: relative;
  border-bottom: 2px solid #bfb8ac;
  padding-bottom: 15px;
  display: block;
  width: fit-content;
  margin: 60px auto;
}

/* FOOTER */

footer {
  display: flex;
  justify-content: space-between;
  padding: 60px;
  background: #ffffff;
  box-shadow: 0px -4px 20px rgba(0, 0, 0, 0.1);
}

.footer-left h2 {
  font-size: 40px;
  font-weight: 300;
}

.footer-left img {
  width: 200px;
}

.footer-right p:first-child {
  margin-bottom: 20px;
  font-size: 1.1em;
}
.footer-right {
  margin-top: 30px;
}
.footerline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.footerline img {
  width: 20px;
}

/* RECIPE DETAILS */
.recipe {
  background: #ece6db;
  padding: 60px;
  margin: 20px 60px;
}

.title {
  text-align: center;
  font-size: 2.5rem;
  font-family: "Hedvig Letters Serif", serif;
  margin-bottom: 10px;
  font-weight: 300;
}

.top {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  margin-top: 40px;
}

.recipe-img {
  width: 100%;
}

.info-card {
  background: #fff9ee;
  padding: 30px;
}

.info-card h3 {
  text-align: center;
  margin-bottom: 20px;
  font-family: "Hedvig Letters Serif", serif;
}

.row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #ccc;
}

.bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-top: 50px;
}

.ingredients h4,
.instructions h4 {
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-size: 1.5em;
  font-weight: 600;
  font-family:
    hedvig letters serif,
    serif;
}

.ingredients label,
.instructions label {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}
label {
  display: block;
  margin-bottom: 10px;
  font-family: "Hedvig Letters Serif", serif;
}

label input:checked {
  text-decoration: line-through;
  opacity: 0.6;
}

input:checked + span {
  text-decoration: line-through;
  opacity: 0.5;
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  margin-bottom: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  background-color: #ccc;
  border-radius: 22px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background-color: #8ccf7e;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.toggle {
  display: flex;
  align-items: center;
  gap: 15px;
  grid-column: 2;
}

@media (max-width: 768px) {
  .header-logo {
    width: 180px;
  }

  .hero img {
    width: 100%;
    margin-top: -40px;
  }

  .categories,
  .subcategories {
    gap: 20px;
    padding: 20px;
  }

  .popular {
    padding: 60px 20px;
  }

  .recipes {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .spin {
    display: block;
    padding: 80px 0 80px 20px;
  }

  .spin-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .spin-text h2 {
    font-size: 2em;
  }

  .spin-action {
    position: relative;
    margin-top: 100px;
  }

  .spin-btn {
    margin-left: 50px;
    color: #000;
  }

  .spin-wheel {
    width: 200px;
    position: absolute;
    right: 0;
  }

  footer {
    flex-direction: column;
    gap: 30px;
    padding: 40px 20px;
  }

  .recipe {
    margin: 20px;
    padding: 20px;
  }

  .top {
    display: block;
  }

  .bottom {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .toggle {
    margin-top: 20px;
  }

  .allrecipes {
    padding: 60px 20px;
  }
}
