/* Секция Отзывы */
.reviews-section {
  background-color: #ffffff;
}

.reviews-container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.reviews-title {
  font-size: 48px;
  line-height: 1.25;
  font-weight: 700;
  color: #161c2d;
  text-align: center;
}

/* Вкладки отзывов */
.reviews-tabs {
  display: flex;
  gap: 30px;
  justify-content: center;
  padding: 0 60px;
}

.reviews-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 10px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  color: #161c2d;
  transition: border-color 0.3s, color 0.3s;
}

.reviews-tab:hover {
  color: #473bf0;
}

.reviews-tab.active {
  border-bottom-color: #473bf0;
  color: #473bf0;
}

/* Карусель отзывов */
.reviews-carousel {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
}

.reviews-carousel .carousel-btn {
  color: #787878;
}

.reviews-list {
  display: flex;
  gap: 30px;
  overflow: hidden;
  flex: 1;
}

/* Карточка отзыва */
.review-card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  padding-left: 0;
  padding-right: 20px;
  position: relative;
}

.review-image {
  width: 220px;
  height: 206.898px;
  flex-shrink: 0;
  border-radius: 25px;
  overflow: hidden;
  margin-right: -20px;
  position: relative;
  z-index: 1;
}

.review-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-right: -20px;
  position: relative;
  z-index: 2;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 400;
  color: #2a2a2a;
}

.review-car {
  font-size: 17px;
}

.review-date {
  font-size: 12px;
}

.review-body {
  background-color: #ffffff;
  border: 1px solid #f4f7fa;
  border-left: 1px solid #f4f7fa;
  border-radius: 25px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.review-author {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: #2a2a2a;
}

.review-text {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 400;
  color: #2a2a2a;
  opacity: 0.7;
  max-height: 135px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.review-expand {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: flex-end;
  font-size: 13px;
  line-height: normal;
  font-weight: 700;
  color: #2a2a2a;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

.review-expand:hover {
  opacity: 0.8;
}

.review-expand svg {
  flex-shrink: 0;
}

/* Стили для видео превью */
.review-image.video-preview {
  position: relative;
  cursor: pointer;
}

.video-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  transition: opacity 0.3s, transform 0.3s;
}

.review-image.video-preview:hover .video-play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Простое модальное окно для видео */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.video-player-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  z-index: 10001;
}

.video-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background-color 0.3s;
  z-index: 10002;
}

.video-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Стили для развертывания отзывов */
.review-text-wrapper {
  position: relative;
  overflow: hidden;
}

.review-text {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 400;
  color: #2a2a2a;
  opacity: 0.7;
  max-height: 135px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  transition: max-height 0.3s ease;
}

.review-text.expanded {
  max-height: none;
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

/* Адаптивность для отзывов */
@media (max-width: 1200px) {
  .reviews-title {
    font-size: 40px;
  }

  .reviews-tabs {
    padding: 0 30px;
    gap: 20px;
  }

  .reviews-tab {
    font-size: 18px;
  }

  .reviews-list {
    gap: 20px;
  }

  .reviews-carousel {
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .reviews-section {
    padding: 60px 20px;
  }

  .reviews-container {
    gap: 25px;
  }

  .reviews-title {
    font-size: 36px;
  }

  .reviews-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .reviews-list::-webkit-scrollbar {
    display: none;
  }

  .review-card {
    min-width: 600px;
  }
}

@media (max-width: 768px) {
  .reviews-title {
    font-size: 32px;
  }

  .reviews-tabs {
    padding: 0 20px;
    gap: 15px;
  }

  .reviews-tab {
    font-size: 16px;
    padding: 10px 8px;
    border-bottom-width: 2px;
  }

  .reviews-carousel .carousel-btn {
    display: none;
  }

  .reviews-carousel {
    gap: 0;
  }

  .review-card {
    flex-direction: column;
    min-width: 400px;
    gap: 15px;
    padding: 0;
  }

  .review-image {
    width: 100%;
    height: 180px;
    margin-right: 0;
    border-radius: 25px 25px 0 0;
  }

  .review-content {
    margin-right: 0;
    padding: 0 20px 20px;
  }

  .review-header {
    padding: 0;
  }

  .review-body {
    padding: 20px;
  }

  .review-author {
    font-size: 18px;
  }

  .review-text {
    font-size: 15px;
    max-height: 100px;
    -webkit-line-clamp: 4;
  }

  .review-expand {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .reviews-section {
    padding: 40px 15px;
  }

  .reviews-title {
    font-size: 28px;
  }

  .reviews-tabs {
    padding: 0 10px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .reviews-tab {
    font-size: 15px;
    padding: 8px 5px;
  }

  .review-card {
    min-width: 300px;
  }

  .review-image {
    height: 150px;
  }

  .review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .review-car {
    font-size: 15px;
  }

  .review-date {
    font-size: 11px;
  }

  .review-body {
    padding: 15px;
    gap: 12px;
  }

  .review-author {
    font-size: 16px;
  }

  .review-text {
    font-size: 14px;
    max-height: 90px;
    -webkit-line-clamp: 3;
  }

  .review-expand {
    font-size: 11px;
    gap: 8px;
  }

  .review-expand svg {
    width: 20px;
    height: 20px;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .video-player-container {
    width: 95%;
  }

  .video-play-button svg {
    width: 50px;
    height: 50px;
  }

  .video-close {
    top: -40px;
  }
}

@media (max-width: 480px) {
  .video-play-button svg {
    width: 40px;
    height: 40px;
  }

  .video-close {
    top: -35px;
  }
}
