.reviews h2 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.reviews h2 span {
    width: fit-content;
}

.reviews h2 span:not(span.main-title) {
    position: absolute;
    top: 21px;
    right: 125px;
    width: 376px;
    color: #48788c;
}

.reviews h2 span.main-title:nth-child(2) {
    margin-left: -450px;
}

.reviews h2 span.main-title:last-of-type {
    margin-right: -450px;
}

.reviews-container {
    position: relative;
}

.reviews-carousel {
    position: relative;
    width: 398px;
    height: 700px;
    margin: 0 auto 40px;
    perspective: 1000px;
}

.review {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    padding: 24px;
    background: #d8e1da;
    border-radius: 24px;
    box-shadow: 8px 8px 40px 0 #26252529;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease, z-index 0.6s;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    z-index: 3;
}

.review.prev {
    opacity: 0.3;
    transform: translate(-100%, -70%) scale(0.9) rotate(0deg);
    z-index: 2;
}

.review.next {
    opacity: 0.3;
    transform: translate(0%, -30%) scale(0.9) rotate(0deg);
    z-index: 2;
}

.review.hidden {
    opacity: 0;
    z-index: 1;
}

.review img {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    object-fit: cover;
}

.review .date {
    color: #48788c;
}

.review .title {
    font-weight: 500;
    font-size: 24px;
}

.review .author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.review .author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.review .author .info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review .author .info .name {
    font-weight: 500;
}

.review .author .info .position {
    color: #B8B8B8;
}

.reviews-container button {
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
    height: fit-content;
    width: fit-content;
    cursor: pointer;
    padding: 16px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    font-weight: 500;
    text-transform: uppercase;
}

.reviews-container button.prevBtn {
    left: 0;
}

.reviews-container button.nextBtn {
    right: 0;
}

.reviews-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination-dot {
    width: 24px;
    height: 2px;
    background: #F4EEE7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dot.active {
    background: #48788c;
    width: 48px;
}

@media screen and (max-width: 1365px) {
    .reviews h2 span:not(span.main-title) {
        right: 50px;
    }
}

@media screen and (max-width: 1199px) {
    .reviews h2 {
        align-items: flex-start;
    }

    .reviews h2 span:not(span.main-title) {
        position: unset;
        margin-left: auto;
        text-align: right;
    }

    .reviews h2 span.main-title:nth-child(2),
    .reviews h2 span.main-title:last-of-type {
        margin: 0;
    }

    .reviews h2 span:not(span.main-title) {
        right: 0;
    }

    .review.prev {
        transform: translate(-90%, -70%) scale(0.9) rotate(0deg);
    }

    .review.next {
        transform: translate(-10%, -30%) scale(0.9) rotate(0deg);
    }
}

@media screen and (max-width: 992px) {
    .review.prev {
        transform: translate(-70%, -65%) scale(0.9) rotate(0deg);
    }

    .review.next {
        transform: translate(-30%, -35%) scale(0.9) rotate(0deg);
    }

}

@media screen and (max-width: 767px) {
    .reviews h2 {
        margin-bottom: 24px;
    }

    .reviews h2 span:not(span.main-title) {
        font-size: 12px;
        max-width: 269px;
    }

    .reviews-container {
        padding-top: 40px;
    }

    .reviews-carousel {
        width: 254px;
        height: 500px;
        margin: 0 auto 24px;
    }

    .review {
        padding: 16px;
        border-radius: 16px;
        gap: 8px;
    }

    .review img {
        height: 127px;
        border-radius: 8px;
    }

    .review .date,
    .review .text,
    .review .author .info .name,
    .review .author .info .position {
        font-size: 12px;
    }

    .review .title {
        font-size: 16px;
    }

    .review .author img {
        width: 36px;
        height: 36px;;
    }

    .reviews-container button {
        font-size: 12px;
        padding: 12px;
        bottom: unset;
    }

    .pagination-dot {
        width: 12px;
    }

    .pagination-dot.active {
        width: 24px;
    }
}