/* -------------------CUSTOM CSS------------------- */
.testimonials-div .container {
    padding: 80px 0;
    max-width: 78%;
    margin: 0 auto;
    padding: 0 20px;
}

.success-stories-content {
    display: flex;
    /* display grid; */
    /* grid-template-columns 1fr 1fr; */
    gap: 20px;
    align-items: center;
}

.success-stories-content .image-container {
    position: relative;
    overflow: hidden;
    background: white;
    aspect-ratio: 1;
    align-content: center;
    flex: 1;
    /* max-width: 450px; */
    max-height: 450px;
}

.success-stories-content .image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: opacity 0.3s ease;
    max-width: 450px;
    max-height: 450px;
    margin: 0 auto;
}

.testimonial-section {
    position: relative;
    padding: 20px;
    border: 1px solid #adadad;
    background-color: white;
    /* margin-left -120px; */
    z-index: 2;
    flex: 1;
}

.testimonial-section .testimonial-avatars {
    position: relative;
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    height: 80px;
    margin-bottom: 30px;
    overflow: visible;
}

.testimonial-section .testimonial-avatars .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-section .testimonial-avatars .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: inherit;
}

.testimonial-section .testimonial-avatars .avatar.side {
    width: 50px;
    height: 50px;
    opacity: 0.6;
    transform: scale(1);
}

.testimonial-section .testimonial-avatars .avatar.center {
    width: 80px;
    height: 80px;
    opacity: 1;
    filter: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.testimonial-section .testimonial-avatars .avatar:not(.side):not(.center) {
    display: none !important;
}

.testimonial-section .testimonial-avatars .avatar.hidden {
    width: 0;
    height: 0;
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.testimonial-section .testimonial-avatars .active {
    opacity: 1;
}

.nav-prev,
.nav-next {
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #666;
    transition: all 0.3s ease;
    min-width: 50px;
    min-height: 50px;
    flex-shrink: 0;
    align-self: center;
}
.nav-next{
    transform: rotate(180deg);
}

.testimonial-content-and-nav {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    min-height: 250px;
}

.testimonial-content {
    position: relative;
    min-height: 300px;
    width: 100%;
    flex: 1;
    min-height: auto;
}

.testimonial-content .active {
    opacity: 1;
    visibility: visible;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
}

.testimonial-item {
    position: absolute;
    text-align: center;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0 10px;
    word-wrap: break-word;
}

.testimonial-item .client-avatar {
    display: none !important;
}

.testimonial-item .client-name {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.testimonial-item .quote-icon {
    margin-bottom: 20px;
}

.testimonial-item .quote-icon img {
    margin-right: auto;
    margin-left: auto;
}

.testimonial-item .quote-icon {
    margin-bottom: 20px;
}

.testimonial-item .quote-icon img {
    margin-right: auto;
    margin-left: auto;
}

.testimonial-item .testimonial-text {
    font-size: 24px;
    line-height: 1.4;
    color: black;
    margin: 0;
    font-style: normal;
}

.client-image.loading {
    opacity: 0.7;
}

.client-image {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.client-image.changing {
    opacity: 0.7;
    transform: scale(1.02);
}

/* Responsive Design */
@media only screen and (max-width: 1536px) {

    .testimonial-item .quote-icon {
        scale: 60%;
    }

    .testimonial-item .testimonial-text {
        font-size: 18px;
    }
}

@media only screen and (max-width: 1024px) {
    .success-stories-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .image-container {
        display: none !important;
    }

    .testimonial-avatars,
    .testimonial-content-and-nav .nav-prev,
    .testimonial-content-and-nav .nav-next {
        display: none !important;
    }

    .testimonial-section {
        border: none;
        padding: 0;
        margin-left: 0;
        z-index: auto;
    }

    .testimonial-content-and-nav {
        display: block !important;
        align-items: unset;
        gap: unset;
        min-height: unset;
    }

    .testimonial-content {
        position: static;
        min-height: unset;
        width: 100%;
        flex: unset;
    }

    .testimonial-item {
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        /* margin-bottom 40px; */
        margin-bottom: 20px;
        padding: 0;
        overflow: hidden;
        background: white;
    }

    .testimonial-item::before {
        content: '';
        display: block;
        width: 100%;
        height: 210px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        position: relative;
    }

    .testimonial-item .client-avatar {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        position: absolute;
        top: 140px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        background-color: white;
        display: block !important;
    }

    .testimonial-item .client-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    .testimonial-item .testimonial-content-area {
        padding: 90px 20px 30px;
        border: 1px solid #adadad;
        text-align: center;
    }

    .testimonial-item .client-name {
        font-size: 24px;
        font-weight: 600;
        color: #333;
        margin: 0 0 5px 0;
    }

    .testimonial-item .client-title {
        color: #666;
        margin: 0 0 20px 0;
    }

    .testimonial-item .quote-icon {
        margin-bottom: 15px;
    }

    .testimonial-item .quote-icon img {
        width: 40px;
        height: auto;
        margin: 0 auto;
    }

    .testimonial-item .testimonial-text {
        font-size: 16px;
        color: #555;
        margin: 0;
    }

    .testimonial-item[data-testimonial="0"]::before {
        background-image: url('/wp-content/uploads/2025/11/ToolsToday-Logo.png');
    }

    .testimonial-item[data-testimonial="1"]::before {
        background-image: url('/wp-content/uploads/2025/11/UESPain-Logo.png');
    }

    .testimonial-item[data-testimonial="2"]::before {
        background-image: url('/wp-content/uploads/2025/11/NYDF-Logo.png');
    }
}

@media only screen and (max-width: 768px) {
    .testimonial-item .client-name {
        font-size: 22px;
    }

    .testimonials-div .container {
        max-width: 95% !important;
        width: 95% !important;
    }

    .success-stories-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* .section-title {
        font-size: 36px;
    } */

    .testimonial-avatars {
        justify-content: center;
    }
}

@media screen and (max-width: 450px) {
    .testimonial-item[data-testimonial="0"]::before {
        background-size: contain;

    }

    .testimonial-item[data-testimonial="1"]::before {
        background-size: cover;
    }

    .testimonial-item[data-testimonial="2"]::before {
        background-size: cover;
    }
}