.block-reviews {
  background-color: var(--color-background-page);
  max-width: 100%;
}

.block-main-reviews {
  position: relative;
  flex-direction: column;
  width: calc(100vw - 32px * 2);

  padding-top: 198px;
  padding-bottom: calc(128px + 20px);
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.title {
    font-size: var(--font-size-4xl);
    line-height: 110%;
    color: var(--color-foreground-accent);
}

.to-form-cont {
    width: 100%;
    padding: 16px;
    background-color: var(--color-foreground-accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px;
}

.to-form-cont-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.to-form-cont-left-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-background-primary);
    border-radius: 28px;
    flex-shrink: 0;
}

.to-form-cont-left-icon img {
    width: 28px;
    height: 28px;

    object-fit: contain;
}

.to-form-cont-left-info {
    font-size: 16px;
    line-height: 140%;
    color: var(--color-background-primary);
    width: 794px;
}

.to-form-cont-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 24px;
  border-radius: 28px;
  background-color: var(--color-background-primary);
  color: var(--color-foreground-accent);
  font-size: 16px;
  font-weight: 500;
  line-height: 140%;
  transition: background-color 0.3s ease, color 0.3s ease;
  gap: 30px;
}

.to-form-cont-btn-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: var(--color-foreground-accent);
  border-radius: 50%;
  transition: background-color 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.to-form-cont-btn-img div {
  width: 8px;
  height: 8px;
  background-image: url("../img/faq/right-icon.svg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.to-form-cont-btn:hover {
  background-color: var(--color-foreground-accent);
  color: var(--color-background-primary);
}

.to-form-cont-btn:hover .to-form-cont-btn-img {
  background-color: var(--color-background-primary);
}

.to-form-cont-btn:hover .to-form-cont-btn-img div {
  background-image: url("../img/faq/right-hover-icon.svg");
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reviews-list-review {
    display: flex;
    gap: 12px;
    min-height: 211px;
}

.reviews-list-review-info {
    padding: 20px 20px 24px 20px;
    background-color: var(--color-background-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 10px;

    flex: 1;
    gap: 24px;
}

.reviews-list-review-imgs {
    width: 410px;
    display: flex;
    background-color: var(--color-background-primary);
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
}

.reviews-list-review-imgs.empty {
    align-items: center;
    justify-content: center;
}

.reviews-list-review-info-top {
    display: flex;
    justify-content: space-between;
}

.reviews-list-review-info-top-about {
    display: flex;
    gap: 20px;
}

.reviews-list-review-info-top-about-img {
    width: 55px;
    height: 55px;
}

.reviews-list-review-info-top-about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.reviews-list-review-info-top-about-t {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reviews-list-review-info-top-about-t-name {
    font-size: var(--font-size-xl);
    line-height: 120%;
    color: var(--color-foreground-primary);
}

.reviews-list-review-info-top-about-t-date {
    font-size: 16px;
    line-height: 140%;
    color: var(--color-foreground-tertiary);
}

.reviews-list-review-info-top-score {
    display: flex;
    gap: 6px;
}

.reviews-list-review-info-top-score-star {
    width: 20px;
    height: 20px;

    background-image: url('../img/reviews/star-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

.reviews-list-review-info-top-score-star.solid {
    background-image: url('../img/reviews/star-solid-icon.svg');
}

.review-text-container {
    position: relative;
}

.review-text {
    max-height: 60px;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;

    background: linear-gradient(to bottom, rgba(100, 113, 134, 1) 0%, rgba(100, 113, 134, 0) 95%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.read-more-btn {
    background: none;
    border: none;

    font-size: var(--font-size-sm);
    line-height: 140%;
    color: var(--color-foreground-accent);

    cursor: pointer;
    margin-top: 8px;
    padding: 0;
}

/* Скрываем кнопку, если текст не обрезан (опционально, через JS) */
.review-text-container.expanded .read-more-btn {
    display: none;
}

.review-text-container.expanded .review-text {
    max-height: fit-content;
    color: var(--color-foreground-secondary);
    background: transparent;
}

/* Блок с фото */
.reviews-list-review-imgs {
    width: 410px;
    display: flex;
    gap: 12px;
    padding: 12px;
    background-color: var(--color-background-primary);
    border-radius: 10px;
    flex-wrap: wrap;
}

.reviews-list-review-imgs .img-item {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    position: relative;
    height: 187px;
}

.reviews-list-review-imgs .img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8.11px;
}

/* Индикатор "еще фото" через псевдоэлемент (для 2-го фото) */
.reviews-list-review-imgs.has-more .img-item:nth-child(2) {
    position: relative;
}

.reviews-list-review-imgs.has-more .img-item:nth-child(2)::after {
    content: attr(data-count);
    position: absolute;
    bottom: 9.99px;
    right: 9.95px;
    width: 25.95px;
    height: 25.95px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-foreground-accent);
    border-radius: 22.7px;
    color: var(--color-background-primary);
    font-size: var(--font-size-sm);
    line-height: 140%;
    font-weight: 500;
    cursor: pointer;
}

/* Пустое состояние */
.reviews-list-review-imgs.empty {
    align-items: center;
    justify-content: center;
}

.reviews-list-review-imgs-empty {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 8px;
    gap: 12px;
    background-color: var(--color-background-page);
    border-radius: 28px;
    height: fit-content;
}

.reviews-list-review-imgs-empty-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--color-background-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reviews-list-review-imgs-empty-t {
    font-size: var(--font-size-sm);
    line-height: 140%;
    color: var(--color-foreground-tertiary);
}

/* ========== СТИЛИ ДЛЯ МОДАЛЬНОГО СЛАЙДЕРА ========== */
.review-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.review-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: pointer;
}

.review-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    font-family: Arial, sans-serif;
    transition: color 0.3s ease;
}

.review-lightbox-close:hover {
    color: #ccc;
}

.review-lightbox-prev,
.review-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    padding: 20px;
    user-select: none;
    transition: color 0.3s ease;
}

.review-lightbox-prev {
    left: 20px;
}

.review-lightbox-next {
    right: 20px;
}

.review-lightbox-prev:hover,
.review-lightbox-next:hover {
    color: #ccc;
}

.review-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 20px;
    z-index: 10001;
}

/* Экраны 1400px и выше - индикатор на 3-м фото */
@media screen and (min-width: 1400px) {
    .reviews-list-review-imgs.has-more .img-item:nth-child(2)::after {
        display: none;
    }
    
    .reviews-list-review-imgs.has-more .img-item:nth-child(3)::after {
        content: attr(data-count);
        position: absolute;
        bottom: 9.99px;
        right: 9.95px;
        width: 25.95px;
        height: 25.95px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--color-foreground-accent);
        border-radius: 22.7px;
        color: var(--color-background-primary);
        font-size: var(--font-size-sm);
        line-height: 140%;
        font-weight: 500;
        cursor: pointer;
    }
}

/* Экраны 768px и меньше - индикатор на 3-м фото */
@media screen and (max-width: 768px) {
    .reviews-list-review-imgs {
        width: 100%;
    }
    
    .reviews-list-review-imgs .img-item {
        height: 150px;
    }
    
    .reviews-list-review-imgs.has-more .img-item:nth-child(2)::after {
        display: none;
    }
    
    .reviews-list-review-imgs.has-more .img-item:nth-child(3)::after {
        content: attr(data-count);
        position: absolute;
        bottom: 9.99px;
        right: 9.95px;
        width: 25.95px;
        height: 25.95px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--color-foreground-accent);
        border-radius: 22.7px;
        color: var(--color-background-primary);
        font-size: var(--font-size-sm);
        line-height: 140%;
        font-weight: 500;
        cursor: pointer;
    }
}

/* Экраны от 769px до 1399px - оставляем 2 фото с индикатором на 2-м */
@media screen and (min-width: 769px) and (max-width: 1399px) {
    .reviews-list-review-imgs {
        width: 410px;
    }
    
    .reviews-list-review-imgs .img-item {
        height: 187px;
    }
}