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

.block-main-reviews {
  position: relative;
  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: 62.031vw;
    max-width: 885px;
}

.to-form-cont-btn {
  display: flex;
  align-items: center;
  padding: 12px 12px 12px 24px;
  border-radius: 28px;
  background-color: var(--color-background-primary);
  color: var(--color-foreground-accent);
  font-size: var(--font-size-md);
  font-weight: 500;
  line-height: 125%;
  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: contain;
  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 18px 20px;
    background-color: var(--color-background-primary);
    display: flex;
    flex-direction: column;
    border-radius: 10px;

    flex: 1;
    gap: 24px;
}

.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;
}

.review-text.no-gradient {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--color-foreground-secondary);
}

.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: 32.031vw;
    max-width: 608px;
    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;
    position: relative;
    height: 187px;

    cursor: zoom-in;
}

.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: default;
}

/* Пустое состояние */
.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(145, 153, 170, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    display: none;
}

.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;
    transition: transform 0.2s;
    touch-action: none;
    user-select: none;
    cursor: grab;
    transform: scale(1) translate(0px, 0px);
}

.review-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--color-background-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    user-select: none;
}

.img-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--color-background-primary);
    border-radius: 50%;
    position: fixed;
    z-index: 10001;
    top: 50%;
}

.prev-image {
    left: 5%;
}

.next-image {
    right: 5%;
}

.img-arrow img {
    width: 12.8px;
    height: 12.8px;
}

/* Адаптация на большие экраны (> 1280)*/
@media screen and (min-width: 1440px) {
    .title {
        font-size: var(--font-size-5xl);
        line-height: 105%;
    }

    .to-form-cont-left-info {
        width: 61.458vw;
        max-width: 1147px;
    }

    .to-form-cont-btn {
        font-size: var(--font-size-md);
        font-weight: 500;
        line-height: 125%;
    }

    .reviews-list {
        gap: 24px;
    }

    .review-text {
        max-height: 66px;
    }

    /* Блок с фото */
    .reviews-list-review-imgs {
        width: 42.222vw;
        max-width: 750px;
    }

    .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: default;
    }

    /* Пустое состояние */
    .reviews-list-review-imgs-empty {
        padding: 12px 24px 12px 12px;
    }

    .reviews-list-review-imgs-empty-t {
        font-size: var(--font-size-md);
        line-height: 125%;
    }
}

/* Адаптация на большие экраны (> 1280)*/
@media screen and (min-width: 1920px) {
    .block-main-reviews {
        width: calc(100vw - 48px * 2);

        padding-top: 206px;
    }

    .to-form-cont-left-info {
        font-size: var(--font-size-md);
        line-height: 125%;
        width: 59.74vw;
        max-width: 1529px;
    }

    .reviews-list-review {
        min-height: 258px;
    }

    .reviews-list-review-info {
        padding: 24px;

        gap: 27px;
    }

    .reviews-list-review-info-top-about {
        gap: 24px;
    }

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

    .reviews-list-review-info-top-about-t {
        gap: 8px;
    }

    .reviews-list-review-info-top-about-t-date {
        font-size: var(--font-size-md);
        line-height: 125%;
    }

    .reviews-list-review-info-top-score {
        gap: 8px;
    }

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

    .review-text {
        max-height: 92px;
        font-size: var(--font-size-md);
        line-height: 125%;
    }

    .read-more-btn {
        font-size: var(--font-size-md);
        line-height: 125%;
    }

    /* Блок с фото */
    .reviews-list-review-imgs {
        width: 39.063vw;
        max-width: 1000px;
    }

    .reviews-list-review-imgs .img-item {
        height: 234px;
    }

    .reviews-list-review-imgs .img-item img {
        border-radius: 10px;
    }
}

/* Экраны 768px и меньше - индикатор на 3-м фото */
@media screen and (max-width: 1200px) {
    .block-main-reviews {
        width: calc(100vw - 24px * 2);
    }

    .to-form-cont {
        flex-direction: column;
        gap: 32px;
    }

    .to-form-cont-left-icon {
        width: 48px;
        height: 48px;
        border-radius: 24.89px;
    }

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

    .to-form-cont-left-info {
        font-size: var(--font-size-sm);
        width: 100%;
        max-width: 100%;
        flex: 1;
    }

    .to-form-cont-btn {
        flex: 1;
        width: 100%;
        justify-content: center;
    }

    .reviews-list {
        gap: 24px;
    }

    .reviews-list-review-info {
        padding: 12px;
    }

    .reviews-list-review-info-top-about {
        gap: 12px;
    }

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

    .reviews-list-review-info-top-about-img img {
        border-radius: 8px;
    }

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

    .reviews-list-review-info-top-about-t-name {
        font-size: var(--font-size-md);
        line-height: 125%;
    }

    .reviews-list-review-info-top-about-t-date {
        font-size: var(--font-size-sm);
        line-height: 140%;
    }

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

    .review-text {
        max-height: 100px;
        font-size: var(--font-size-sm);
        line-height: 140%;
    }

    .read-more-btn {
        margin-top: 4px;
    }

    /* Блок с фото */
    .reviews-list-review-imgs {
        width: 222px;
        gap: 8px;
    }
    
    .reviews-list-review-imgs .img-item {
        height: 95px;
        min-width: 95px;
    }

    .reviews-list-review-imgs .img-item img {
        border-radius: 8px;
    }
    
    .reviews-list-review-imgs.has-more .img-item:nth-child(2)::after {
        display: none;
    }

    .reviews-list-review:has(.review-text-container.expanded) .reviews-list-review-imgs .img-item:nth-child(3) {
        margin-top: calc(-12px - 3px);
    }
    
    .reviews-list-review-imgs.has-more .img-item:nth-child(3)::after {
        content: attr(data-count);
        position: absolute;
        bottom: 10.05px;
        right: 10.05px;
        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: default;
    }

    .img-arrow {
        width: 32px;
        height: 32px;
    }

    .img-arrow img {
        width: 8px;
        height: 8px;
    }
}


@media screen and (max-width: 745px) {
    .block-main-reviews {
        width: calc(100vw - 12px * 2);

        padding-top: 176px;
    }

    .title {
        font-size: var(--font-size-3xl);
    }

    .to-form-cont {
        padding: 12px;
        gap: 24px;
    }

    .to-form-cont-left {
        flex-direction: column;
        align-items: start;
    }

    .reviews-list-review {
        flex-direction: column;
        gap: 6px;
        min-height: fit-content;
    }

    .reviews-list-review-info-top {
        position: relative;
    }

    .reviews-list-review-info-top-about-t {
        justify-content: center;
    }

    .reviews-list-review-info-top-about-t-name {
        font-size: 16px;
        line-height: 140%;
        max-width: 82px;
    }

    .reviews-list-review-info-top-about-t-date {
        position: absolute;
        bottom: 0;
        right: 0;
        font-size: 16px;
        line-height: 140%;
    }

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

    .review-text {
        max-height: 100px;
    }

    /* Блок с фото */
    .reviews-list-review-imgs {
        width: 100%;
        max-width: 100%;
        min-height: 122px;
    }

    .reviews-list-review-imgs .img-item {
        height: 98px;
        min-width: 98px;
    }

    .reviews-list-review:has(.review-text-container.expanded) .reviews-list-review-imgs .img-item:nth-child(3) {
        margin-top: 0;
    }

    .reviews-list-review-imgs.has-more .img-item:nth-child(3)::after {
        bottom: 7.55px;
        right: 8.05px;
    }
}

