:root {
  /*==== colors =====*/
  --primaryCardBg: hsl(300, 43%, 22%);
  --primaySPink: hsl(333, 80%, 67%);
  --secondaryCardStar: hsl(303, 10%, 53%);
  --secondaryCream: hsl(300, 24%, 96%);
  --white: hsl(0, 0%, 100%);
}
/*=== basic configuration ===*/
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1.1;
  list-style: none;
}
img {
  display: block;
  width: 100%;
}
strong {
  display: block;
}

body {
  font-family: "League Spartan", serif;
  background-color: var(--white);
  height: 100vh;
}
/*top section*/
.wrapper {
  height: 100vh;
}
.container {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  padding-inline: 1.5rem;
  text-align: center;

  .topSection {
    margin-bottom: 3rem;
    h1 {
      color: var(--primaryCardBg);
      font-size: 2.5rem;
      line-height: 0.8;
      letter-spacing: -1px;

      padding-inline: 2rem;
      margin-bottom: 1.3rem;
    }
    p {
      color: var(--secondaryCardStar);
      font-size: 18px;
      font-weight: 500;
      line-height: 1.3;
      margin-bottom: 2.5rem;
    }
  }
  .rateContainer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    div {
      border-radius: 8px;
      background-color: var(--secondaryCream);
      padding-block: 1rem;
      display: flex;
      flex-direction: column;
      gap: 0.9rem;

      ul {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
      }
      strong {
        color: var(--primaryCardBg);
      }
    }
  }
}
.bottomSection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  .card {
    border-radius: 9px;
    background-color: var(--primaryCardBg);
    padding-inline: 2rem;
    padding-block: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    .cardHeader {
      display: flex;
      align-items: center;
      gap: 1.5rem;

      img {
        border-radius: 50%;
        width: 40px;
      }
      p {
        color: var(--white);
        font-size: 17px;
        font-weight: 500;
        margin-bottom: 2px;
      }
      span {
        color: var(--primaySPink);
        font-weight: 300;
        font-size: 16px;
      }
    }
    p {
      text-align: start;
      line-height: 1.4;
      color: var(--white);
    }
  }
}

@media screen and (min-width: 800px) {
  /*top section*/
  .container {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
    padding-inline: 1.5rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;

    .topSection {
      margin-bottom: 3rem;
      h1 {
        font-size: 3.5rem;
        padding-inline: 8rem;
        margin-bottom: 2rem;
      }
      p {
        font-size: 20px;
      }
    }
    .rateContainer {
      padding-top: 1.5rem;
      justify-self: end;
      flex: 1;
      gap: 1rem;

      div {
        padding-inline: 2rem;
        padding-block: 1.2rem;
        flex-direction: row;
        gap: 2rem;
        width: max-content;
        ul {
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 0.5rem;

          img {
            height: 16px;
          }
        }
        strong {
          font-size: 17px;
          padding-right: 45px;
        }
      }
      div:nth-of-type(1) {
        position: relative;
        right: 90px;
      }
      div:nth-of-type(2) {
        position: relative;
        right: 45px;
      }
      div:nth-of-type(3) {
        align-self: flex-end;
      }
    }
  }
}
@media screen and (min-width: 1440px) {
  body {
    background-image: url(./images/bg-pattern-top-desktop.svg);
    background-repeat: no-repeat;
  }
  .wrapper {
    background-image: url(./images/bg-pattern-bottom-desktop.svg);
    background-repeat: no-repeat;
    background-position: right;
    background-size: contain;
  }
  /*top section*/
  .container {
    padding-top: 7.4rem;
    padding-bottom: 5.5rem;
    padding-inline: 10.2rem;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;

    .topSection {
      display: grid;
      grid-template-columns: 450px auto;
      gap: 4rem;
      margin-bottom: 2rem;
      h1 {
        text-align: start;
        font-size: 3.5rem;
        line-height: 0.85;
        padding-inline: 0rem;
        margin-bottom: 1.75rem;
      }
      p {
        font-size: 19px;
        text-align: start;
      }
    }
    .rateContainer {
      display: flex;
      gap: 1rem;
    }
  }
  .bottomSection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;

    .card:nth-of-type(2) {
      position: relative;
      top: 16px;
    }
    .card:nth-of-type(3) {
      position: relative;
      top: 32px;
    }
    .card {
      padding-inline: 2rem;
      padding-block: 2.4rem;
      gap: 1.6rem;

      .cardHeader {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        p {
          color: var(--white);
          font-size: 17px;
          font-weight: 500;
          margin-bottom: 0px;
        }
        span {
          display: block;
          color: var(--primaySPink);
          font-weight: 300;
          font-size: 16px;
        }
      }
      p {
        text-align: start;
        line-height: 1.4;
        color: var(--white);
      }
    }
  }
}
