/* =========================
   RESET
========================= */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
li {
  margin: 0;
  padding: 0;
}

/* =========================
   PAGE LAYOUT
========================= */

#root {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;

  min-height: 210%;

  background-color: #e7c69e;
}

/* =========================
   MAIN CONTENT
========================= */

.main {
  display: flex;
  flex-direction: column;
  justify-content: center;

  gap: 20px;
}

/* =========================
   REVIEWS CONTAINER
========================= */

.card_box {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;

  gap: 30px;

  padding-top: 20px;
}

/* =========================
   REVIEW CARD
========================= */

.card {
  display: flex;
  justify-content: center;
  align-items: stretch;

  width: 100%;
  min-width: 320px;
  max-width: 560px;

  min-height: auto;
  max-height: none;

  color: #682b08;

  background: #feeeba;

  border: 4px solid #682b08;
  border-radius: 10px;

  word-wrap: break-word;
  overflow: hidden;
}

/* =========================
   REVIEW TEXT
========================= */

.review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  column-gap: 16px;
  row-gap: 8px;

  width: 100%;
  min-width: 0;
  max-width: none;

  min-height: auto;
  max-height: none;

  padding: 16px;

  color: #682b08;

  background: #fff3cd;

  border: 1px solid #682b08;
  border-radius: 10px;

  font-size: 20px;

  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.review-customer {
  grid-column: 1;
  font-weight: bold;
  font-size: 22px;
}

.review-date {
  grid-column: 1;
  font-size: 16px;
}

.review-rating {
  grid-column: 1;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 2px;
}

.review-text {
  grid-column: 1;
  line-height: 1.5;
  min-width: 0;
  max-height: 180px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =========================
   REVIEW IMAGE
========================= */

.img {
  grid-column: 2;
  grid-row: 1 / span 4;

  width: 100%;
  max-width: 160px;
  height: auto;
  max-height: 220px;

  object-fit: cover;

  margin-bottom: 0;

  border-radius: 10px;

  align-self: start;
  justify-self: end;
}

@media (max-width: 768px) {
  .card_box {
    width: 100%;
    padding: 16px;
    gap: 20px;
  }

  .card {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    min-height: auto;
    max-height: none;
  }

  .review {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: 100%;

    min-height: auto;
    max-height: none;

    gap: 12px;
  }

  .review-customer,
  .review-date,
  .review-rating,
  .review-text {
    width: 100%;
  }

  .img {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 220px;
    max-height: none;
    margin: 0 auto;
  }
}

@media (min-width: 769px) and (max-width: 1368px) and (min-height: 601px) {
  #root {
    min-height: 100vh;
  }

  .main {
    width: 100%;
    padding: 0 24px;
    box-sizing: border-box;
  }

  .card_box {
    width: 100%;
    justify-content: center;
    gap: 24px;
    padding: 20px 0;
  }

  .card {
    min-width: 0;
    width: calc(50% - 24px);
    max-width: 360px;
    min-height: auto;
    max-height: none;
  }

  .review {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    max-height: none;
    align-items: stretch;
    gap: 12px;
    font-size: 18px;
  }

  .img {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 200px;
    max-height: none;
    margin: 0 auto;
  }
}