@import url("https://fonts.googleapis.com/css2?family=Young+Serif&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Young+Serif&display=swap");

:root {
  --white: hsl(0, 0%, 100%);
  --stone-100: hsl(30, 54%, 90%);
  --stone-150: hsl(30, 18%, 87%);
  --stone-600: hsl(30, 10%, 34%);
  --stone-900: hsl(24, 5%, 18%);
  --brown-800: hsl(14, 45%, 36%);
  --rose-800: hsl(332, 51%, 32%);
  --rose-50: hsl(330, 100%, 98%);
}

/* Color Styles */
body {
  background-color: var(--stone-100);
}
main {
  background-color: var(--white);
}
h1,
strong {
  color: var(--stone-900);
}
.prep-time {
  background-color: var(--rose-50);
  color: var(--stone-900);
}
.prep-heading {
  color: var(--rose-800);
  font-size: 1.5rem;
}
h2,
.brown-color {
  color: var(--brown-800);
}

/* Typography */
html {
  font-size: 16px;
}
body {
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  line-height: 1.5;
  font-size: 1.5rem;
}
h1,
h2 {
  font-family: "Young Serif", serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
}

/* Mobile Layout  */
img {
  width: 100%;
}
h1 {
  margin-top: 50px;
}
h2 {
  margin-top: 20px;
}
p {
  margin-bottom: 50px;
}
main {
  display: flex;
  flex-direction: column;
}
ul {
  list-style-position: inside;
  padding-left: 0;
}
article {
  align-self: center;
  width: 80%;
}
.prep-time {
  height: auto;
  border-radius: 20px;
  margin: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.prep-heading {
  padding-left: 30px;
  margin-bottom: 0;
  padding-bottom: 0;
}
ul {
  padding: 0;
  list-style: none;
  margin-left: 15px;
}
ul li {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
ul li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: black; /* Bullet color */
  border-radius: 50%; /* Makes it a circle */
  margin-right: 30px; /* Space between bullet and text */
  flex-shrink: 0; /* Keeps the bullet from shrinking */
}
.prep-time ul {
  width: 85%;
}
.prep-time li {
  margin-left: 45px;
}
.instructions,
.ingredients {
  border-bottom: 1px solid var(--stone-150);
  padding-bottom: 27px;
  padding-top: 27px;
}
.nutrition {
  padding-bottom: 27px;
  padding-top: 27px;
}
.nutrition p {
  margin-bottom: 10px;
}
ol {
  list-style: none; /* Removes default numbers */
  padding: 0;
  counter-reset: ol-counter; /* Initializes the counter 
  */
  margin-left: 15px;
}
ol li {
  display: flex;
  align-items: flex-start; /* Centers number and text vertically */
  counter-increment: ol-counter; /* Increments counter for each item */
  margin-bottom: 8px;
}
ol li::before {
  content: counter(ol-counter) "."; /* Displays the current count */
  margin-right: 25px; /* Space between number and text */
  flex-shrink: 0; /* Prevents number from squeezing */
  font-weight: bold; /* Optional styling for numbers */
  color: var(--brown-800);
}
tr:not(:last-child) td {
  border-bottom: 1px solid var(--stone-150);
}
td {
  text-align: left;
  width: 30%;
  padding-left: 30px;
  padding-bottom: 17px;
  padding-top: 17px;
}

/* Desktop Styles */
@media screen and (min-width: 500px) {
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    justify-content: center;
    padding: 40px 0;
  }
  img {
    width: 100%;
    border-radius: 12px;
  }
  main {
    width: 70%;
    border-radius: 20px;
    padding: 40px;
  }
  article {
    width: 100%;
  }
  table {
    width: 100%;
  }
}
