/* =====================================================================
   Секция «Vertrauen, das Kunden bestätigen» (Reviews)
   Слайдер на Swiper: ПК — 2 слайда + стрелки, моб — 1.2 слайда + пагинация
   ===================================================================== */

.reviews {
  background: #f6f6f8; /* instead of var(--page-bg) */
  color: var(--ink);
  padding: clamp(48px, 7vw, 96px) 0;
  overflow: hidden; /* режем всё, что уходит за правый край */
}

.reviews .section-title {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 56px);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 600;
  color: var(--ink);
}

.reviews__wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  padding-right: 6px;
}

/* ---------------------------------------------------------------------
   Левая карточка-саммари с SVG-подложкой
   --------------------------------------------------------------------- */
.reviews__summary {
  position: relative;
  flex: 0 0 380px;
  min-height: 531px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 140px 36px 36px;
  border-radius: 36px;
  overflow: hidden;
}

.reviews__summary-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.reviews__summary-content {
  position: relative;
  z-index: 1;
}

.reviews__summary-number {
  display: block;
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  color: #FF4002;
  margin-bottom: 16px;
}

.reviews__summary-text {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.13;
  color: #fff;
  margin: 0 0 24px;
}

.reviews__summary-since {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.13;
  color: #FF561F;
  margin: 0;
}

/* ---------------------------------------------------------------------
   Стрелки навигации (ПК)
   --------------------------------------------------------------------- */
.reviews__arrows {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.reviews__arrow {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  transition: transform .2s ease, opacity .2s ease;
}

.reviews__arrow:hover {
  transform: scale(1.08);
}

.reviews__arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 50%;
}

/* Состоянием управляет Swiper, а не жёстко прописанная opacity */
.reviews__arrow.swiper-button-disabled {
  opacity: .4;
  cursor: default;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Слайдер
   --------------------------------------------------------------------- */
.reviews__slider {
  flex: 1 1 0;
  min-width: 0;
}

/* height: auto — иначе Swiper растянет слайды по самому высокому */
.reviews__slider .swiper-slide {
  height: auto;
  display: flex;
}

/* ---------------------------------------------------------------------
   Карточка отзыва
   --------------------------------------------------------------------- */
.review-card {
  width: 100%;
  height: 531px;
  background: #ffffff;
  border-radius: 36px;
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  color: #030303;
}

.review-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid #EBEBEB;
}

.review-card__avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.review-card__name {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  color: #030303;
}

.review-card__date {
  font-size: 14px;
  color: #acacac;
  line-height: 1.2;
}

.review-card__stars {
  display: inline-flex;
  gap: 3px;
  padding: 4px 8px;
  width: max-content;
  background: #FFF8E2;
  border-radius: 53px;
  align-items: center;
  margin-bottom: 16px;
}

.review-card__stars svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.review-card__text {
  font-size: 16px;
  line-height: 1.45;
  color: #030303;
  opacity: .7;
  margin: 0;
  flex: 1;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  -webkit-box-orient: vertical;
}

.review-card__source {
  margin-top: 24px;
  /*display: flex;
  align-items: center;
  gap: 6px;*/
}

.review-card__source span {
  display: block;
  font-size: 14px;
  color: #acacac;
  line-height: 1;
}

.review-card__google {
  width: 62px;
  height: 22px;
}

/* ---------------------------------------------------------------------
   Пагинация — только мобильная
   --------------------------------------------------------------------- */
.reviews__pagination {
  display: none;
}

/* ---------------------------------------------------------------------
   Планшет
   --------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .reviews__summary {
    flex: 0 0 340px;
    min-height: 480px;
    padding: 90px 28px 28px;
  }
  .reviews__summary-text {
    font-size: 24px;
  }
  .review-card {
    height: 480px;
    padding: 24px;
  }
  .review-card__text {
    -webkit-line-clamp: 8;
    line-clamp: 8;
  }
}

/* ---------------------------------------------------------------------
   Мобильная версия (граница совпадает с брейкпоинтом style.css)
   --------------------------------------------------------------------- */
@media (max-width: 769px) {
  .reviews {
    padding: 32px 0 40px;
  }

  .reviews__wrap {
    flex-direction: column;
    gap: 0;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  /* Карточка-саммари на мобиле скрыта (её заменяют .reviews-title__mb
     и .reviews-sub-title__mb из style.css) */
  .reviews__summary {
    display: none;
  }

  /* Пик следующего слайда уходит под правый край экрана.
     overflow: visible обязателен — иначе Swiper обрежет пик по контейнеру. */
  .reviews__slider {
    flex: none;
    width: 100%;
    margin-right: calc(-1 * var(--gutter));
    overflow: visible;
  }

  .reviews__slider .swiper-slide {
    overflow: hidden;
  }

  .review-card {
    height: auto;
    min-height: 360px;
    padding: 20px;
    border-radius: 28px;
  }

  .review-card__text {
    font-size: 15px;
    -webkit-line-clamp: 7;
    line-clamp: 7;
  }

  .review-card__source {
    margin-top: 18px;
  }

  /* position: relative обязателен: у .swiper-pagination в бандле
     position: absolute, а элемент лежит вне контейнера слайдера */
  .reviews__pagination {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 32px;
  }

  .reviews__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 !important;
    background: none;
    border: 1px solid #030303;
    opacity: 1;
    transition: background .2s ease, border-color .2s ease;
  }

  .reviews__pagination .swiper-pagination-bullet-active {
    background: #000;
    border-color: #000;
  }
}

@media (max-width: 400px) {
  .review-card {
    min-height: 320px;
  }
  .review-card__text {
    -webkit-line-clamp: 6;
    line-clamp: 6;
  }
}

/* ---------------------------------------------------------------------
   Доступность
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reviews__arrow,
  .reviews__pagination .swiper-pagination-bullet {
    transition: none;
  }
  .reviews__arrow:hover {
    transform: none;
  }
}
