/* Classic container styles */
.reviews-carousel {
  position: relative;
  padding: 20px 60px;
  margin: 2rem auto;
  max-width: 1400px;
  border-radius: 40px;
  overflow: hidden;
}

.reviews-carousel__track {
  display: flex;
  gap: 30px;
  transition: transform 0.3s ease;
}

@media (max-width: 1100px) {
  .reviews-carousel {
    padding: 15px;
    max-width: 900px;
    border-radius: 15px;
  }
}
@media (max-width: 768px) {
  .reviews-carousel {
    padding: 10px;
    max-width: 100vw;
    border-radius: 12px;
  }
  .reviews-carousel__track {
    gap: 0;
  }
}
@media (max-width: 480px) {
  .reviews-carousel {
    padding: 5px;
    max-width: 100vw;
    border-radius: 10px;
  }
}

/* Стили для широких экранов (3 карточки) */
.reviews-carousel__card {
  flex: 0 0 calc((100% - 60px) / 3);
  width: calc((100% - 60px) / 3);
  background: #fff;
  border-radius: 30px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

/* Стили для средних экранов (2 карточки) */
@media (max-width: 1100px) {
  .reviews-carousel__card {
    flex: 0 0 calc((100% - 30px) / 2);
    width: calc((100% - 30px) / 2);
  }
}

.reviews-carousel__header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 1.5rem;
  width: 100%;
}

.reviews-carousel__avatar {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 50%;
  background: #a48cf0;
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reviews-carousel__info {
  flex: 1;
}

.reviews-carousel__title {
  font-size: var(--wp--preset--font-size--large);
  font-weight: 600;
  margin: 0 0 5px;
  color: #333;
}

.reviews-carousel__country {
  color: #888;
  font-size: var(--wp--preset--font-size--medium);
}

.reviews-carousel__text-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.reviews-carousel__text {
  font-size: var(--wp--preset--font-size--medium);
  font-style: normal;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1rem;
  cursor: default;
  max-height: 230px;
  overflow: hidden;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
}

.reviews-carousel__text.is-truncated {
  cursor: pointer;
}

.reviews-carousel__text.is-truncated:hover {
  color: #a48cf0;
}

.reviews-carousel__more {
  display: none;
  align-self: flex-end;
  background: none;
  border: none;
  color: #a48cf0;
  font-size: var(--wp--preset--font-size--x-large);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-top: auto;
  position: absolute;
  bottom: 0;
  right: 0;
}

.reviews-carousel__text.is-truncated + .reviews-carousel__more {
  display: block;
}

.reviews-carousel__arrow {
  background: #a48cf0;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
  padding: 0;
}

.reviews-carousel__arrow svg {
  width: 24px;
  height: 24px;
}

.reviews-carousel__arrow--left { left: 20px; }
.reviews-carousel__arrow--right { right: 20px; }
.reviews-carousel__arrow:hover { background: #8e73e6; }

/* Модальное окно */
.reviews-carousel__modal-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(50,50,100,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reviews-carousel__modal {
  background: #fff;
  border-radius: 30px;
  padding: 3rem;
  max-width: calc(100% - 40px);
  width: 800px;
  max-height: calc(100vh - 140px);
  box-shadow: 0 4px 32px rgba(0,0,0,0.15);
  position: relative;
  display: flex;
  flex-direction: column;
}

.reviews-carousel__modal-content {
  overflow-y: auto;
  padding-right: 15px;
  margin-right: -15px;
  flex: 1;
  height: calc(100% - 120px); /* Учитываем высоту хедера */
}

/* Стилизация скроллбара */
.reviews-carousel__modal-content::-webkit-scrollbar {
  width: 8px;
}

.reviews-carousel__modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.reviews-carousel__modal-content::-webkit-scrollbar-thumb {
  background: #a48cf0;
  border-radius: 4px;
}

.reviews-carousel__modal-content::-webkit-scrollbar-thumb:hover {
  background: #8e73e6;
}

.reviews-carousel__modal .reviews-carousel__header {
  margin-bottom: 2rem;
}

.reviews-carousel__modal .reviews-carousel__avatar {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  font-size: 2.2rem;
}

.reviews-carousel__modal .reviews-carousel__title {
  font-size: var(--wp--preset--font-size--x-large);
}

.reviews-carousel__modal .reviews-carousel__text {
  font-size: var(--wp--preset--font-size--medium);
  max-height: none;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  cursor: default;
}

.reviews-carousel__modal-close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  font-size: var(--wp--preset--font-size--xx-large);
  color: #a48cf0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Стили для мобильных экранов (1 карточка) */
@media (max-width: 768px) {
  .reviews-carousel__track {
    gap: 0;
    padding: 10px 0;
    margin: 0 35px;
  }

  .reviews-carousel__card {
    flex: 0 0 100%;
    width: 100%;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    transform: scale(0.93);
  }

  .reviews-carousel__card.active {
    transform: scale(1);
  }

  .reviews-carousel__arrow {
    width: 32px;
    height: 32px;
    
    top: 50%;
    transform: translateY(-50%);
    background: rgba(164, 140, 240, 0.9);
    z-index: 2;
    position: absolute;
  }
  .reviews-carousel__arrow--left { left: 0; }
  .reviews-carousel__arrow--right { right: 0; }

  .reviews-carousel__header {
    gap: 15px;
    margin-bottom: 1rem;
  }

  .reviews-carousel__avatar {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    font-size: 1.4rem;
  }

  .reviews-carousel__title {
    
  }

  .reviews-carousel__country {
    
  }

  .reviews-carousel__text {
    
    margin-bottom: 0.8rem;
    max-height: 190px;
    -webkit-line-clamp: 9;
  }

  .reviews-carousel__more {
    
  }

  /* Модальное окно для мобильных */
  .reviews-carousel__modal-bg {
    padding: 15px;
  }
  
  .reviews-carousel__modal {
    padding: 2rem;
    max-width: calc(100% - 30px);
    height: calc(100vh - 86px);
    border-radius: 20px;
  }

  .reviews-carousel__modal-content {
    padding-right: 10px;
    margin-right: -10px;
    height: calc(100% - 100px); /* Меньше отступ для мобильных */
  }

  .reviews-carousel__modal .reviews-carousel__header {
    margin-bottom: 1.5rem;
  }

  .reviews-carousel__modal .reviews-carousel__avatar {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    
  }

  .reviews-carousel__modal .reviews-carousel__title {
    
  }

  .reviews-carousel__modal .reviews-carousel__text {
    
  }

  .reviews-carousel__modal-close {
    top: 1.5rem;
    right: 1.5rem;
    
  }
}

@media (max-width: 480px) {
  .reviews-carousel__track {
    margin: 0 30px;
  }

  .reviews-carousel__card {
    padding: 1rem 1.2rem;
    transform: scale(0.9);
  }

  .reviews-carousel__arrow {
    width: 28px;
    height: 28px;
    
  }
  .reviews-carousel__arrow--left { left: 3px; }
  .reviews-carousel__arrow--right { right: 3px; }

  .reviews-carousel__avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    
  }

  .reviews-carousel__title {
    
  }

  .reviews-carousel__text {
    
    line-height: 1.4;
    max-height: 170px;
  }

  .reviews-carousel__modal-bg {
    padding: 10px;
  }
  
  .reviews-carousel__modal {
    max-width: calc(100% - 20px);
    height: calc(100vh - 80px);
  }
} 