.reviews-page [hidden] {
  display: none !important;
}

.reviews-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(255, 95, 47, 0.18), transparent 28%),
    linear-gradient(135deg, #fff8f5 0%, var(--accentColor) 62%);
}

.reviews-hero::after {
  position: absolute;
  right: -160px;
  bottom: -210px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255, 95, 47, 0.16);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.reviews-hero__container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 56px;
}

.reviews-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 720px;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.reviews-hero__eyebrow,
.reviews-form-section__eyebrow {
  color: var(--primaryColor);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reviews-hero__title {
  max-width: 660px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.035em;
}

.reviews-hero__description {
  max-width: 650px;
}

.reviews-hero__description p {
  margin: 0;
  color: var(--greyColor-1L);
  font-size: 16px;
  line-height: 1.65;
}

.reviews-hero__button {
  display: inline-flex;
  width: auto;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  padding-right: 24px;
  padding-left: 24px;
}

.reviews-hero__button,
.reviews-hero__button:hover {
  color: #fff;
}

.reviews-hero__decoration {
  position: absolute;
  right: 18px;
  bottom: -54px;
  display: none;
  width: 300px;
  height: 300px;
  align-items: center;
  justify-content: center;
  border-radius: 48% 52% 62% 38% / 38% 42% 58% 62%;
  background: rgba(255, 95, 47, 0.09);
  color: var(--primaryColor);
  transform: rotate(-7deg);
}

.reviews-hero__decoration span {
  color: inherit;
  font-family: Georgia, serif;
  font-size: 230px;
  line-height: 1;
  transform: translateY(25px) rotate(7deg);
}

.reviews-feed {
  padding-top: 54px;
  padding-bottom: 72px;
}

.reviews-feed__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.reviews-feed__header h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.025em;
}

.reviews-feed__count {
  width: max-content;
  padding: 8px 13px;
  border-radius: 999px;
  background: #fff1ec;
  color: var(--primaryColor);
  font-size: 13px;
  font-weight: 600;
}

.reviews-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reviews-grid.is-masonry {
  grid-auto-rows: 8px;
}

.reviews-grid__item {
  min-width: 0;
}

.reviews-grid__empty {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 22px;
  background: var(--accentColor-1D);
  color: var(--greyColor-1L);
  text-align: center;
}

.reviews-card {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #dfe3e6;
  border-radius: 22px;
  background: #f5f6f7;
  box-shadow: 0 12px 30px rgba(43, 52, 63, 0.07);
  scroll-margin-top: 110px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.reviews-card::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(
    90deg,
    var(--primaryColor) 0 52px,
    rgba(43, 52, 63, 0.12) 52px 100%
  );
  content: "";
}

.reviews-card[data-expandable="true"] {
  cursor: pointer;
}

.reviews-card:hover,
.reviews-page:not(.is-enhanced) .reviews-card:target,
.reviews-card.is-expanded {
  border-color: rgba(255, 95, 47, 0.35);
  box-shadow: 0 18px 44px rgba(43, 52, 63, 0.12);
  transform: translateY(-2px);
}

.reviews-card__header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.reviews-card__avatar {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff1ec;
  color: var(--primaryColor);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
}

.reviews-card__author {
  min-width: 0;
}

.reviews-card__author h3 {
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reviews-card__author time {
  color: var(--greyColor-2L);
  font-size: 12px;
}

.reviews-card__rating {
  display: flex;
  grid-column: 1 / -1;
  gap: 3px;
  margin-top: 5px;
  color: var(--primaryColor);
}

.reviews-card__rating svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.reviews-card__rating .reviews-card__star-muted {
  color: var(--accentColor-2D);
}

.reviews-card__specialist {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 17px;
  padding: 8px 11px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 95, 47, 0.14);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reviews-card__specialist span {
  margin-right: 5px;
  color: var(--greyColor-2L);
  font-size: 12px;
}

.reviews-card__text {
  display: -webkit-box;
  margin: 20px 0 0;
  overflow: hidden;
  color: var(--greyColor-1L);
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.reviews-card.is-expanded .reviews-card__text,
.reviews-page:not(.is-enhanced) .reviews-card:target .reviews-card__text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.reviews-card__text_full {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.reviews-card__footer {
  display: flex;
  min-height: 24px;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 20px;
}

.reviews-card[data-expandable="false"] .reviews-card__footer {
  display: none;
}

.reviews-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primaryColor);
  cursor: pointer;
  font: inherit;
}

.reviews-card__toggle span {
  color: inherit;
  font-size: 13px;
  font-weight: 500;
}

.reviews-card__toggle svg {
  transition: transform 0.2s ease;
}

.reviews-card.is-expanded .reviews-card__toggle svg {
  transform: rotate(180deg);
}

.reviews-card__toggle:focus-visible,
.reviews-feed__more:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--primaryColor);
  outline-offset: 4px;
}

html[data-theme="black"] .reviews-card {
  border-color: var(--accentColor-2D);
  background: var(--accentColor-1D);
}

html[data-theme="black"] .reviews-card::before {
  background: linear-gradient(
    90deg,
    var(--primaryColor) 0 52px,
    var(--accentColor-2D) 52px 100%
  );
}

html[data-theme="black"] .reviews-card__specialist {
  background: var(--accentColor);
}

.reviews-feed__more {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 30px auto 0;
  padding: 0 20px;
  border: 1px solid var(--accentColor-2D);
  border-radius: 999px;
  background: var(--accentColor);
  color: var(--textColor);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.reviews-feed__more[hidden] {
  display: none !important;
}

.reviews-feed__more:hover {
  border-color: var(--primaryColor);
  color: var(--primaryColor);
}

.reviews-form-section {
  padding: 60px 0;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 95, 47, 0.2), transparent 30%),
    var(--secondaryColor);
  scroll-margin-top: 70px;
}

.reviews-form-section__container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.reviews-form-section__intro {
  display: flex;
  max-width: 520px;
  flex-direction: column;
  gap: 14px;
}

.reviews-form-section__intro h2,
.reviews-form-section__intro p {
  margin: 0;
  color: #fff;
}

.reviews-form-section__intro h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: -0.03em;
}

.reviews-form-section__intro p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.6;
}

.reviews-form-section__panel {
  padding: 24px;
  border-radius: 24px;
  background: var(--accentColor);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-form__fieldset {
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--accentColor-2D);
  min-inline-size: 0;
}

.review-form__legend {
  padding: 0;
  color: var(--textColor);
  font-size: 14px;
  font-weight: 600;
}

.review-form__rating {
  display: flex;
  justify-content: flex-end;
  margin-top: -18px;
}

.review-form__stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.review-form__star {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  color: var(--accentColor-2D);
  cursor: pointer;
  transition: color 0.2s ease;
}

.review-form__star input {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  cursor: pointer;
}

.review-form__star svg {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
}

.review-form__star path {
  fill: currentColor;
}

.review-form__star:hover,
.review-form__star:hover ~ .review-form__star,
.review-form__star:has(input:checked),
.review-form__star:has(input:checked) ~ .review-form__star {
  color: var(--primaryColor);
}

.review-form__star input:checked + svg {
  color: var(--primaryColor);
}

.review-form__star input:focus-visible + svg {
  border-radius: 5px;
  outline: 2px solid var(--primaryColor);
  outline-offset: 2px;
}

.review-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 15px;
}

.review-form__field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.review-form__field > span {
  color: var(--textColor);
  font-size: 13px;
  font-weight: 500;
}

.review-form__field input,
.review-form__field select,
.review-form__field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--accentColor-2D);
  border-radius: 12px;
  outline: none;
  background: var(--accentColor-1D);
  color: var(--textColor);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-form__field textarea {
  min-height: 132px;
  resize: vertical;
}

.review-form__field input,
.review-form__field select,
.review-form__field textarea {
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.4;
}

.review-form__field select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%236a7076' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
}

.review-form__field textarea {
  -webkit-appearance: none;
}

.review-form__field input:focus,
.review-form__field select:focus,
.review-form__field textarea:focus {
  border-color: var(--primaryColor);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 95, 47, 0.12);
}

.review-form__field input::placeholder,
.review-form__field textarea::placeholder {
  color: var(--greyColor-2L);
}

.review-form__status {
  margin: -4px 0 0;
  color: var(--redColor);
  font-size: 13px;
}

.review-form__submit {
  width: 100%;
  min-height: 50px;
}

.review-form-result {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.review-form-result__icon {
  display: flex;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #fff1ec;
  color: var(--primaryColor);
}

.review-form-result h3 {
  margin: 0 0 8px;
}

.review-form-result p {
  margin: 0 0 24px;
  color: var(--greyColor-1L);
}

html[data-theme="black"] .reviews-hero {
  background:
    radial-gradient(circle at 82% 22%, rgba(255, 95, 47, 0.2), transparent 28%),
    var(--secondaryColor);
}

html[data-theme="black"] .reviews-feed__count,
html[data-theme="black"] .reviews-card__avatar,
html[data-theme="black"] .review-form-result__icon {
  background: rgba(255, 95, 47, 0.16);
}

html[data-theme="black"] .reviews-card {
  background: var(--secondaryColor);
}

html[data-theme="black"] .reviews-card__specialist {
  background: var(--accentColor-1D);
}

.bvi-body[data-bvi-theme="black"] .reviews-hero,
.bvi-body[data-bvi-theme="black"] .reviews-form-section {
  background-image: none;
}

@media screen and (min-width: 640px) {
  .reviews-feed__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .reviews-form-section__panel {
    padding: 32px;
  }

  .review-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-form__field_full {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 420px) {
  .review-form__rating {
    justify-content: flex-start;
    margin-top: 12px;
  }
}

@media screen and (min-width: 768px) {
  .reviews-hero__container {
    min-height: 410px;
    padding-top: 52px;
    padding-bottom: 72px;
  }

  .reviews-hero__decoration {
    display: flex;
  }

  .reviews-hero__content {
    max-width: calc(100% - 260px);
  }

  .reviews-feed {
    padding-top: 72px;
    padding-bottom: 92px;
  }

  .reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reviews-form-section {
    padding: 80px 0;
  }
}

@media screen and (min-width: 1024px) {
  .reviews-hero__decoration {
    right: 7%;
    width: 340px;
    height: 340px;
  }

  .reviews-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .reviews-card {
    padding: 24px;
  }

  .reviews-form-section__container {
    grid-template-columns: minmax(0, 0.75fr) minmax(540px, 1.25fr);
    gap: 70px;
  }

  .reviews-form-section__intro {
    position: sticky;
    top: 110px;
    padding-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-card,
  .reviews-card__toggle svg,
  .review-form__star,
  .review-form__field input,
  .review-form__field select,
  .review-form__field textarea {
    transition: none;
  }
}
