@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Young+Serif&display=swap");

:root {
  /* Colores */
  --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%);

  /* Fuentes */
  --font-Outfit: "Outfit", sans-serif;
  --font-Young-Serif: "Young Serif", serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-Outfit);
}

.container {
  width: 100%;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .card {
    width: 100%;
    margin: 0 auto;

    .card__image img {
      width: 100%;
      height: auto;
    }

    .card__content {
      padding: 2rem;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;

      .card__content--title {
        color: var(--Stone-900);
        font-size: 2.2rem;
        font-weight: 600;
        font-family: var(--font-Young-Serif);
      }

      .card__content--description {
        color: var(--Stone-600);
        font-size: 1rem;
        line-height: 1.5;
        font-weight: 400;
      }

      .card__content--preparation {
        background-color: var(--Rose-50);
        width: 100%;
        border-radius: 1rem;
        padding: 1rem;
        display: flex;
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
        .card__content--preparation-title {
          color: var(--Rose-800);
          font-size: 1.2rem;
          font-weight: 700;
          font-family: var(--font-Outfit);
          text-align: left;
        }
        .card__content--preparation-list {
          display: flex;
          justify-content: center;
          flex-direction: column;
          gap: 0.5rem;
          padding-left: 1.5rem;
          li {
            font-family: var(--font-Outfit);
            position: relative;
            list-style: none;
            padding-left: 1.5rem;
            &::before {
              content: "•";
              color: var(--Rose-800);
              font-size: 1.2rem;
              font-weight: bold;
              position: absolute;
              left: 0;
              top: 0;
            }
            strong {
              color: var(--Stone-900);
              font-weight: 700;
            }
            p {
              color: var(--Stone-600);
              margin: 0;
            }
          }
        }
      }

      .card__content--ingredients {
        display: flex;
        justify-content: center;
        flex-direction: column;
        gap: 1rem;

        .card__content--ingredients-title {
          color: var(--Brown-800);
          font-family: var(--font-Young-Serif);
          font-size: 2rem;
          font-weight: 400;
        }
        .card__content--ingredients-list {
          display: flex;
          justify-content: center;
          flex-direction: column;
          gap: 0.5rem;
          padding-left: 1.5rem;

          li {
            font-family: var(--font-Outfit);
            position: relative;
            list-style: none;
            padding-left: 1.5rem;
            &::before {
              content: "•";
              color: var(--Brown-800);
              font-size: 1.2rem;
              font-weight: bold;
              position: absolute;
              left: -5px;
              top: 0;
            }
            p {
              color: var(--Stone-600);
              font-weight: 500;
            }
          }
        }
      }

      hr {
        border: none;
        height: 1px;
        background-color: var(--Stone-150);
        margin: 1rem 0;
      }

      .card__content--instructions {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;

        .card__content--instructions-title {
          color: var(--Brown-800);
          font-family: var(--font-Young-Serif);
          font-size: 2rem;
          font-weight: 400;
        }
        .card__content--instructions-list {
          display: flex;
          flex-direction: column;
          gap: 1rem;
          padding-left: 1.5rem;
          counter-reset: step; /* Resetea el contador */

          li {
            font-family: var(--font-Outfit);
            position: relative;
            list-style: none;
            padding-left: 2rem; /* Espacio para la numeración */
            counter-increment: step; /* Aumenta el contador */
            &::before {
              content: counter(step) "."; /* Muestra el número */
              color: var(--Brown-800);
              font-size: 1.2rem;
              font-weight: bold;
              position: absolute;
              left: 0;
              top: 0;
            }
            p {
              color: var(--Stone-600);
            }
          }
        }
      }

      .card__content--nutrition {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        .card__content--nutrition-title {
          color: var(--Brown-800);
          font-family: var(--font-Young-Serif);
          font-size: 2rem;
          font-weight: 400;
        }
        .card__content--nutrition-description {
          color: var(--Stone-600);
          font-size: 1rem;
          line-height: 1.5;
          font-weight: 400;
        }
        .card__content--nutrition-table {
          width: 100%;
          border-collapse: collapse;
          margin-top: 1rem;

          th,
          td {
            border: 1px solid var(--Stone-150);
            padding: 0.5rem;
          }

          th {
            color: var(--Stone-600);
            font-weight: 400;
            font-family: var(--font-Outfit);
          }
          td {
            color: var(--Brown-800);
            font-family: var(--font-Outfit);
            font-weight: 700;
            text-align: center;
          }
        }
      }
    }
  }
}

footer {
  background-color: #333;
  width: 100%;
  margin-top: 20px;
  color: #fff;
  padding: 20px;
  text-align: center;
  border-top: 2px solid #555;

  p {
    margin: 10px 0;
  }

  a {
    color: #1e90ff;
    text-decoration: none;
    font-weight: bold;
    &:hover {
      color: #ff6347;
      text-decoration: underline;
    }
  }
}

.language-switcher {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

.language-switcher button {
  padding: 10px 16px;
  border: 2px solid var(--Stone-100);
  background: var(--Brown-800);
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  color: var(--White);
  transition: all 0.3s ease;
  font-family: var(--font-Outfit);
}

.language-switcher button:hover {
  background: var(--Stone-600);
  color: var(--White);
}

@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--Stone-100);
  }

  .container {
    width: 80%;
    max-width: 800px;
    background-color: var(--White);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;

    .card {
      display: flex;
      justify-content: space-between;
      flex-direction: column;
      gap: 1rem;
      padding: 2rem;

      .card__image {
        width: 100%;
        position: relative;
        display: flex;
        align-items: start;

        img {
          max-width: 100%;
          height: auto;
          max-height: 300px;
          border-radius: 10px;
        }
      }

      .card__content {
        padding: 0;

        .card__content--title {
          font-size: 2.5rem;
          font-weight: 400;
        }
      }
    }
  }

  footer {
    width: 40%;
    margin-top: 3rem;
    border-radius: 20px;
    margin-bottom: 1rem;
  }
}
