/* Universal Selector to remove default browser settings */
* {
  padding: 0rem;
  margin: 0rem;
  box-sizing: border-box;
}

@font-face {
  font-family: "Main";
  src: url(./assets/fonts/LeagueSpartan-VariableFont_wght.ttf);
}

/* CSS Custom Properties */
:root {
  /* Primary */
  --Very-Dark-Magenta: hsl(300, 43%, 22%);
  --Soft-Pink: hsl(333, 80%, 67%);

  /* Neutral */
  --Dark-Grayish-Magenta: hsl(303, 10%, 53%);
  --Light-Grayish-Magenta: hsl(300, 24%, 96%);
  --White: hsl(0, 0%, 100%);
}

html {
  font-weight: 400;
  font-size: 15px;
}

body {
  font-family: "Main";
  background-color: var(--White);
  background-image: url("./assets/images/bg-pattern-top-desktop.svg"),
    url("./assets/images/bg-pattern-bottom-desktop.svg");
  background-position: right 55vw bottom 54.5vh, left 23vw top 16vh;
  background-repeat: no-repeat, no-repeat;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 77.08vw;
  height: 68.75vh;
  gap: 45px 30px;
}

.row-1 {
  grid-column: span 6;
}

.row-2 {
  grid-row-start: 2;
  grid-column: span 4;
}

h1 {
  font-size: 4.1rem;
  font-weight: 700;
  color: var(--Very-Dark-Magenta);
}

.text p {
  margin-top: 1.5rem;
  margin-right: 30%;
  line-height: 1.2;
}

.star-ratings {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.rating-container {
  display: flex;
  align-items: center;
  width: 85%;
  background-color: var(--Light-Grayish-Magenta);
  padding: 1rem 2rem;
  border-radius: 5px;
}

.rating-container:not(:nth-of-type(3)) {
  margin-bottom: 1rem;
}

.star-ratings div:nth-of-type(2) {
  align-self: center;
}

.star-ratings div:nth-of-type(3) {
  align-self: flex-end;
}

.star-container img:not(:nth-of-type(5)) {
  margin-right: 0.5rem;
}

.rating-container p {
  color: var(--Very-Dark-Magenta);
  font-size: 1.2rem;
  font-weight: 700;
  margin-left: 2rem;
}

.review-card {
  background-color: var(--Very-Dark-Magenta);
  border-radius: 5px;
  padding: 2rem;
}

.user {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.user img {
  width: 15%;
  border-radius: 50%;
  margin-right: 1.5rem;
}

.title h2 {
  color: var(--White);
  font-size: 1.3rem;
  font-weight: 500;
}

.title h3 {
  color: var(--Soft-Pink);
  font-size: 1.2rem;
  font-weight: 500;
}

.review-card p {
  color: var(--Light-Grayish-Magenta);
  font-size: 1.1rem;
  line-height: 1.2;
}

article:nth-of-type(4) {
  align-self: center;
}

article:nth-of-type(5) {
  align-self: flex-end;
}

/* Extra small devices [iPhone SE - 375](phones, 600px and down) */
@media only screen and (max-width: 767px) {
  body {
    background-image: url("./assets/images/bg-pattern-top-mobile.svg"),
      url("./assets/images/bg-pattern-bottom-mobile.svg");
    background-position: right 0vw bottom 68vh, left 0vw top 120vh;
  }

  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 1fr);
    row-gap: 15px;
    width: 85%;
  }

  .row-1 {
    grid-column: span 1;
  }

  .row-2 {
    grid-column: span 1;
    grid-row-start: auto;
  }

  h1 {
    text-align: center;
    font-size: 2.5rem;
  }

  .text p {
    margin-right: 0;
    text-align: center;
    font-size: 1.15rem;
  }

  .rating-container {
    flex-direction: column;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .rating-container p {
    margin: 0;
  }

  .star-container {
    margin-bottom: 0.75rem;
  }

  .star-container img:not(:nth-of-type(5)) {
    margin-right: 0.2rem;
  }

  article:first-of-type {
    margin-top: -2.5rem;
  }

  article:last-of-type {
    padding-bottom: 5rem;
  }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) and (max-width: 767px) {
}

/* Medium devices [iPad Mini] (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  body {
    height: 120vh;
  }

  .grid {
    margin-top: -5rem;
  }

  .star-ratings {
    justify-content: space-around;
  }

  .rating-container {
    flex-direction: column;
  }

  .star-container {
    margin-bottom: 1rem;
  }

  .rating-container p {
    margin: 0;
    text-align: center;
  }

  article:nth-of-type(4),
  article:nth-of-type(5) {
    align-self: flex-start;
  }

  article:nth-of-type(4) .review-card {
    padding-bottom: 50px;
  }

  .user {
    flex-direction: column;
  }

  .user img {
    width: 50%;
    margin: 0;
    margin-bottom: 1rem;
  }

  body {
    background-position: right 20vw bottom 68vh, left 0vw top 50vh;
  }
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .grid {
    margin-top: -5rem;
  }

  .rating-container {
    flex-direction: column;
  }

  .star-container {
    margin-bottom: 1rem;
  }

  .rating-container p {
    margin: 0;
    text-align: center;
  }
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
}
