.testimonials {
    height: 100vh;
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.8s ease, opacity 0.8s ease;
    will-change: transform, opacity;
    z-index: 1;
}

.image-wrapper img.fade-out {
    opacity: 0;
    transform: scale(0.95);
    z-index: 1;
}

.image-wrapper img.fade-in {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.left-section {
    flex: 1;
    display: flex;
    padding: 0;
    height: 80vh;
    width: auto;
    text-align: center;
    justify-content: flex-end;
    padding-bottom: 16px;
    flex-direction: column;
}

.left-section h2 {
    font-size: 52px;
    color: #575141;
    text-align: left;
    margin-left: 180px;
    margin-bottom: 80px;
    line-height: 55px;
    font-family: 'Avenir-Black';
}

.profile-thumbnails {
    display: flex;
    gap: 10px;
}

.profile-thumbnails img {
    width: 100%;
    height: 290px;
    border-radius: 10px !important;
    object-fit: cover;
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.profile-thumbnails img.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.profile-thumbnails img.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.main-image {
    flex: 0.7;
    height: 80%;
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding-bottom: 15px;
}

.main-image img {
    width: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: 10px !important;
}

.right-section {
    flex: 1;
    display: flex;
    justify-content: center;
}

.right-section .rightInner {
    width: 380px;
}

.testimonial-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.text-wrapper {
    display: block;
    height: 150px;
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.text-wrapper.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.text-wrapper.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.text-wrapper q,
.text-wrapper strong {
    display: block;
    width: 100%;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    font-family: 'Avenir-Book';
}

.next-button {
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    margin-top: 10px;
}

.next-button:hover {
    background: #555;
}

.next-button:focus {
    background-color: #555;
}

/* MOBILE */
@media (max-width: 768px) {
    .testimonials {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 30px;
    }

    .left-section,
    .right-section,
    .main-image {
        flex: none;
        width: 100%;
        height: auto;
    }

    .left-section {
        align-items: flex-start;
        text-align: left;
        padding: 0;
    }

    .left-section h2 {
        display: none;
        margin-left: 0;
        font-size: 36px;
        margin-bottom: 20px;
        line-height: 42px;
        font-family: 'Avenir-Black';
    }

    .profile-thumbnails {
        justify-content: flex-start;
        gap: 10px;
    }

    .profile-thumbnails img {
        width: 48%;
        height: auto;
        aspect-ratio: 2/3;
        border-radius: 10px !important; 
    }

    .main-image {
        padding: 0;
    }

    .image-wrapper {
        aspect-ratio: 2/3;
        height: auto;
        position: relative;
        overflow: hidden;
    }

    .image-wrapper img {
        position: absolute;
        width: 100%;
        height: 100% !important;
        object-fit: cover;
    }

    .right-section .rightInner {
        width: 100%;
    }

    .testimonial-title {
        font-size: 16px;
    }

    .testimonial-text {
        font-size: 14px;
        height: 120px;
    }

    .next-button {
        font-size: 18px;
        padding: 8px 12px;
    }
}