.pg-rv {
  --pg-tag-green: var(--color-primary, #124734);
  --pg-tag-text: #4c5652;
  --pg-tag-dark: var(--color-text-dark, #222222);
}

.pg-rv {
  padding: 80px 24px;
}

.pg-rv__inner {
  max-width: 1170px;
  margin: 0 auto;
}

.pg-rv__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.pg-rv__title {
  margin: 0;
  font-family: var(--font-heading, Arkhip, sans-serif);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--pg-tag-dark);
}

.pg-rv__ya {
  display: block;
  flex: none;
  width: auto;
  height: 20px;
}

.pg-rv__stars {
  display: inline-flex;
  gap: 2px;
  color: #e8a817;
}

.pg-rv__stars svg {
  display: block;
  width: 14px;
  height: 14px;
}

.pg-rv__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pg-rv__all {
  margin-right: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--pg-tag-green);
  text-decoration: underline;
  text-decoration-color: rgba(18, 71, 52, 0.35);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
}

.pg-rv__all:hover,
.pg-rv__all:focus-visible {
  color: var(--pg-tag-green);
  text-decoration-color: currentColor;
}

.pg-rv__all--bottom {
  display: none;
}

.pg-rv__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d5ddd8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--pg-tag-dark);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pg-rv__arrow:hover:not(:disabled),
.pg-rv__arrow:focus-visible {
  border-color: var(--pg-tag-green);
  background: var(--pg-tag-green);
  color: #ffffff;
}

.pg-rv__arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

.pg-rv__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 40px) / 3);
  align-items: stretch;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.pg-rv__track::-webkit-scrollbar {
  display: none;
}

.pg-rv__card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  background: #f4f6f5;
  scroll-snap-align: start;
  box-sizing: border-box;
}

.pg-rv__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pg-rv__avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dbe7e0;
  font-family: var(--font-heading, Arkhip, sans-serif);
  font-size: 20px;
  line-height: 1;
  color: var(--pg-tag-green);
}

.pg-rv__who {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pg-rv__name {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--pg-tag-dark);
}

.pg-rv__text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  font-size: 15px;
  line-height: 1.45;
  color: var(--pg-tag-text);
}

.pg-rv__text p {
  margin: 0 0 8px;
}

.pg-rv__text p:last-child {
  margin-bottom: 0;
}

.pg-rv__card.is-open .pg-rv__text {
  display: block;
  -webkit-line-clamp: none;
}

.pg-rv__text.is-anim {
  transition: height 0.35s ease;
}

.pg-rv__more {
  align-self: flex-start;
  margin-top: auto;
  padding: 2px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--pg-tag-green);
  text-decoration: underline;
  text-decoration-color: rgba(18, 71, 52, 0.35);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: text-decoration-color 0.2s ease;
}

.pg-rv__more:hover,
.pg-rv__more:focus-visible {
  text-decoration-color: currentColor;
}

.pg-rv__more[hidden] {
  display: none;
}

.pg-rv__track:focus-visible {
  outline: 2px solid var(--pg-tag-green);
  outline-offset: 4px;
  border-radius: 16px;
}

.pg-rv__track.has-open {
  align-items: start;
}

.pg-rv__track.is-drag {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.pg-rv__dots {
  display: none;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.pg-rv__dots[hidden] {
  display: none;
}

.pg-rv__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #cfdad4;
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.pg-rv__dot.is-active {
  width: 24px;
  background: var(--pg-tag-green);
}

.pg-rv__all--bottom {
  align-items: center;
  gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .pg-rv__track {
    scroll-behavior: auto;
  }

  .pg-rv__text.is-anim,
  .pg-rv__dot {
    transition: none;
  }
}

@media (max-width: 1024px) {
  .pg-rv__track {
    grid-auto-columns: calc((100% - 20px) / 2);
  }

  .pg-rv__dots {
    display: flex;
  }
}

@media (max-width: 767px) {
  .pg-rv {
    padding: 56px 0;
  }

  .pg-rv__head {
    display: block;
    margin-bottom: 20px;
    padding: 0 16px;
  }

  .pg-rv__controls {
    display: none;
  }

  .pg-rv__track {
    grid-auto-columns: 84%;
    gap: 12px;
    padding: 0 16px;
    scroll-padding: 0 16px;
  }

  .pg-rv__card {
    padding: 20px;
  }

  .pg-rv__all--bottom {
    display: inline-flex;
    margin: 16px 16px 0;
  }

  .pg-rv__dots {
    margin-top: 16px;
  }
}
