/*
 * Testimonials: heading and social links on the left, a carousel of quote
 * cards on the right with its own arrow buttons.
 *
 * --photo puts a photo on the left instead (service pages), with the social
 * links laid over its bottom edge:
 *
 *   <section class="yb-reviews yb-reviews--photo yb-container">
 *     <div class="yb-reviews__photo"><img …><ul class="yb-reviews__social">…</ul></div>
 *     <div class="yb-carousel yb-reviews__carousel">…</div>
 *   </section>
 */
.yb-reviews {
  display: grid;
  grid-template-columns: 513fr 570fr;
  column-gap: 43px;
  padding-top: var(--yb-space-section);
}

.yb-reviews__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.yb-reviews__head .yb-tag,
.yb-reviews__head h2 {
  margin: 0;
}

.yb-reviews__social {
  display: flex;
  gap: 23px;
  margin: auto 0 6px;
  padding: 0;
  list-style: none;
}

.yb-reviews__social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: var(--yb-color-primary);
  font-size: 20px;
}

.yb-reviews__social a:hover {
  background: var(--yb-color-accent);
}

.yb-reviews--photo {
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  padding-top: 0;
  margin-bottom: 150px;
}

.yb-reviews__photo {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  border-radius: var(--yb-radius-panel);
}

.yb-reviews__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yb-reviews__photo .yb-reviews__social {
  position: absolute;
  right: 30px;
  bottom: 30px;
  left: 30px;
  margin: 0;
  padding: 10px 20px;
  border-radius: var(--yb-radius-card);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.yb-reviews--photo .yb-review {
  min-height: 400px;
  gap: 60px;
}

.yb-reviews__carousel {
  position: relative;
  min-width: 0;
}

.yb-review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  height: 100%;
  min-height: 615px;
  margin: 0;
  padding: 30px;
  border-radius: var(--yb-radius-panel);
  background: var(--yb-color-surface);
}

.yb-review blockquote {
  margin: 0;
  padding-left: 60px;
  font-size: var(--yb-size-lead);
  line-height: 1.5;
}

.yb-review blockquote::before {
  content: "";
  display: block;
  width: 45px;
  height: 45px;
  margin: 0 0 17px -60px;
  background: var(--yb-color-primary);
  -webkit-mask: url("../../icons/quote.svg") center / contain no-repeat;
  mask: url("../../icons/quote.svg") center / contain no-repeat;
  transform: rotate(180deg);
}

.yb-review blockquote p {
  margin: 0;
}

.yb-review figcaption {
  display: flex;
  flex-direction: column;
  max-width: 275px;
  color: var(--yb-color-muted);
  font-size: 11px;
  font-weight: var(--yb-weight-medium);
  line-height: 1.8;
  text-transform: uppercase;
}

.yb-review figcaption strong {
  color: var(--yb-color-primary);
  font-size: var(--yb-size-button);
  font-weight: var(--yb-weight-medium);
  line-height: 1.2;
  text-transform: none;
}

.yb-reviews__nav {
  position: absolute;
  right: 30px;
  bottom: 25px;
  display: flex;
  gap: 18px;
}

.yb-reviews__nav button {
  width: 52px;
  height: 52px;
  background: var(--yb-color-white);
  font-size: 14px;
}

@media (max-width: 1024px) {
  .yb-reviews--photo {
    margin-bottom: 120px;
  }

  .yb-reviews--photo {
    grid-template-columns: 35fr 65fr;
  }

  .yb-reviews--photo .yb-reviews__carousel .yb-carousel__slide {
    flex-basis: 100%;
  }

  .yb-reviews {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .yb-reviews__social {
    margin-top: 0;
  }

  .yb-reviews__photo {
    min-height: 400px;
  }

  .yb-reviews__carousel .yb-carousel__slide {
    flex-basis: calc(50% - 15px);
  }

  .yb-review {
    min-height: 560px;
    padding-bottom: 100px;
  }
}

/* --strip (juhtimiskoolitused, kestliku arengu): below 1025 px the photo
   shrinks to a strip over half the width and two quotes sit side by side
   under it; on phones the photo is 250 px tall. Both as on the old pages. */
@media (min-width: 768px) and (max-width: 1024px) {
  .yb-reviews--strip {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }

  .yb-reviews--strip .yb-reviews__photo {
    min-height: 114px;
  }

  .yb-reviews--strip .yb-reviews__carousel {
    grid-column: 1 / -1;
  }

  .yb-reviews--strip .yb-reviews__carousel .yb-carousel__slide {
    flex-basis: calc(50% - 10px);
  }

  .yb-reviews--strip .yb-review {
    min-height: 0;
    padding: 20px;
  }

  .yb-reviews--strip .yb-review figcaption {
    max-width: calc(100% - 140px);
  }
}

@media (max-width: 767px) {
  .yb-reviews--photo {
    grid-template-columns: 1fr;
  }

  .yb-reviews--strip .yb-reviews__photo {
    min-height: 250px;
  }

  .yb-reviews--strip .yb-review {
    min-height: 0;
  }

  .yb-reviews__carousel .yb-carousel__slide {
    flex-basis: 100%;
  }

  .yb-review {
    min-height: 480px;
    padding: 20px 20px 100px;
  }

  .yb-review blockquote {
    padding-left: 0;
  }

  .yb-review blockquote::before {
    margin-left: 0;
  }

  .yb-reviews__nav {
    right: 20px;
    bottom: 20px;
  }
}
