/* DISCLAIMER 
This is not the best solution, possible alterations:
- I started the base card layout with a grey colour instead of white.
- The color modifications could/should have been classes instead of using nth-of-type()
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@100;200;300;400;500;600&display=swap');

* {
  /* Defaults */
  box-sizing: border-box;
  margin: 0;
  padding: 0;

  /* Primary */
  --moderate-violet: hsl(263, 55%, 52%);
  --very-dark-grayish-blue: hsl(217, 19%, 35%);
  --very-dark-blackish-blue: hsl(219, 29%, 14%);

  /* Neutral */
  --light-gray: hsl(0, 0%, 81%);
  --light-grayish-blue: hsl(210, 46%, 95%);

  /* Font */
  --font-family-main: 'Barlow Semi Condensed';
}

.attribution {
  font-size: 11px;
  text-align: center;
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

body {
  display: flex;
  justify-content: center;
  background-color: var(--light-grayish-blue);
  font-family: var(--font-family-main), sans-serif;
  font-size: 13px;
}

.testimonials-grid {
  max-width: 1440px;
  margin: 100px auto;
  padding: 20px;
  display: grid;
  gap: 20px;
}

.testimonials-grid-item {
  background-color: var(--very-dark-grayish-blue);
  border-radius: 10px;
  padding: 30px;
  box-shadow: rgba(17, 12, 46, 0.15) 0 48px 100px 0;
  overflow: hidden;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: start;
  gap: 20px;
}

.testimonials-grid-item header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.testimonials-grid-item .avatar {
  align-self: center;
  justify-self: center;
  border-radius: 100%;
  border-style: solid;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.75);
  width: 40px;
}

.testimonials-grid-item h1 {
  font-size: 1rem;
  font-weight: 500;
}

.testimonials-grid-item h2 {
  font-size: 1rem;
  font-weight: 500;
  opacity: 50%;
}

.testimonial-title {
  font-size: 1.8rem;
  font-weight: 500;
}

.testimonial-quote {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 70%;
}

.testimonials-grid-item:nth-of-type(1) {
  background-color: var(--moderate-violet);
  background-image: url('../images/bg-pattern-quotation.svg');
  background-repeat: no-repeat;
  background-position: top 0 right 100px;
}

.testimonials-grid-item:nth-of-type(3),
.testimonials-grid-item:nth-of-type(5) {
  background-color: white;
  color: var(--very-dark-grayish-blue);
}

.testimonials-grid-item:nth-of-type(4) {
  background-color: var(--very-dark-blackish-blue);
}

@media (min-width: 1000px) {
  html,
  body {
    height: 100%;
    align-items: center;
  }
  .testimonials-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .testimonials-grid-item:nth-of-type(1) {
    grid-column: 1/3;
  }
  .testimonials-grid-item:nth-of-type(5) {
    grid-column: 4;
    grid-row: 1/3;
  }
  .testimonials-grid-item:nth-of-type(4) {
    grid-column: 2/4;
    grid-row: 2;
  }
}
