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

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #edf2f8;
  line-height: 1.6;
  font-size: 13px;
  font-family: "Barlow Semi Condensed", sans-serif;
}

.testimonials {
  max-width: 1440px;
  margin: 100px auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.card {
  background: #ffff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 9px 10px 28px -1px rgba(0, 0, 0, 0.22);
  margin-bottom: 10px;
  cursor: pointer;
}
.card:hover {
  transition: 0.4s ease-in;
  transform: translateY(-5px);
  box-shadow: 12px 15px 35px -3px rgba(0, 0, 0, 0.25);
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.card-header h3 {
  font-size: 15px;
}

.card-header p {
  opacity: 50%;
}

.card-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #996ed9;
  margin-right: 10px;
}

.card-lead {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 20px;
}

.card-quote {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  opacity: 70%;
}

.card-bg-purple {
  background-color: hsl(263, 55%, 52%);
  color: #ffff;
  background-image: url("./images/bg-pattern-quotation.svg");
  background-repeat: no-repeat;
  background-position: top 10px right 100px;
}

.card-bg-gray {
  background: hsl(219, 29%, 14%);
  color: #ffff;
}

/* Start at column 1 and end at column 3 */
.card:nth-of-type(1) {
  grid-column: 1/3;
}

/* Start at column 2 and end at column 4 - and place at row 2's start*/
.card:nth-of-type(4) {
  grid-column: 2/4;
  grid-row: 2;
}

/* Start at row 1 and end at row 3 - and place at grid */
.card:nth-of-type(5) {
  grid-column: 4;
  grid-row: 1/3;
}
/* Add media query to shift to 3 columns before switching to 1 column*/
@media (max-width: 1096px) {
  .testimonials {
    grid-template-columns: repeat(3, 1fr);
  }

  .card:nth-of-type(1) {
    grid-column: 1/3;
  }

  .card:nth-of-type(4) {
    grid-column: 2/4;
    grid-row: 2;
  }

  .card:nth-of-type(5) {
    grid-column: 1/4;
    grid-row: 3;
  }
}

/* Final media query for making everything to make 1 column */
@media (max-width: 768px) {
  .testimonials {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .card:nth-of-type(1) {
    grid-column: 1;
  }
  .card:nth-of-type(4) {
    grid-column: 1;
    grid-row: 4;
  }
  .card:nth-of-type(5) {
    grid-column: 1;
    grid-row: 5;
  }
}
