.testimonial-section {
    width: 100%;
    min-height: auto;
    background-color: #0ADBCD;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 18px 20px;
    box-sizing: border-box;
}

.testimonial-title {
    margin-top: 46px;
    font-family: 'Young Serif', serif;
    font-weight: 400;
    font-size: 48px;
    line-height: 48px;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 12px;
}

.testimonial-subtitle {
    margin-top: 12px;
    max-width: 900px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 28px;
    text-align: center;
    color: #000;
    width: 100%;
}

.testimonial-subtitle span {
    display: block;
}


.testimonial-cards-container {
    margin-top: 13px;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    max-width: 1200px;
    padding: 50px 0 0 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    contain: layout style paint;
}

.testimonial-cards-container::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    width: 368px;
    height: 323px;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0px 2px 5px 0px #171A1F17;
    position: relative;
    flex: 0 0 368px;
    scroll-snap-align: start;
}

.client-photo {
    position: absolute;
    top: -41px;
    right: 25px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFFFFF;
}

/* Style video element same as image */
video.client-photo {
    object-fit: cover;
}

/* Modal video styling */
video.modal-client-photo {
    object-fit: cover;
    border-radius: 50%;
}

.quote-icon {
    margin-left: 25px;
    margin-top: 25px;
    width: 32px;
    height: 32px;
}
.stars-container {
    margin-left: 25px;
    margin-top: 16px;
    display: flex;
    gap: 4px;
}

.star {
    width: 20px;
    height: 20px;
}

.star.filled {
    color: #0ADBCD;
}

.star.unfilled {
    color: #DEE1E6;
}

.review-text {
    margin: 16px 25px 0 25px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.divider {
    position: absolute;
    top: 238px;
    left: 25px;
    right: 25px;
    height: 1px;
    background-color: #DEE1E6;
}

.client-name {
    position: absolute;
    top: 254px;
    left: 25px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.client-title {
    position: absolute;
    top: 278px;
    left: 25px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #565D6D;
}

/* Scrollbar styling for testimonials */
.testimonial-cards-container::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    cursor: pointer;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    will-change: transform, box-shadow;
}

.testimonial-card:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0px 4px 12px 0px rgba(23, 26, 31, 0.15);
}

/* Testimonial Modal Styles */
.testimonial-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.testimonial-modal.show {
    display: flex;
    animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.testimonial-modal__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.testimonial-modal__dialog {
    position: relative;
    background: #FFFFFF;
    border-radius: 18px;
    max-width: 680px;
    width: 100%;
    max-height: 88vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
    contain: layout style paint;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.testimonial-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #424242;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.testimonial-modal__close:hover {
    background: #FFFFFF;
    transform: rotate(90deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.testimonial-modal__header {
    background: linear-gradient(135deg, #0ADBCD 0%, #00a89e 100%);
    padding: 36px 32px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.modal-client-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.modal-client-info {
    flex: 1;
    color: #FFFFFF;
}

.modal-client-info h3 {
    font-family: 'Young Serif', serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 6px 0;
    color: #FFFFFF;
}

.modal-client-info p {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: rgba(255, 255, 255, 0.9);
}

.modal-stars-container {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.modal-stars-container .star.filled {
    color: #FFFFFF;
}

.modal-stars-container .star.unfilled {
    color: rgba(255, 255, 255, 0.3);
}

.testimonial-modal__body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(88vh - 200px);
}

.testimonial-modal__body::-webkit-scrollbar {
    width: 5px;
}

.testimonial-modal__body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.testimonial-modal__body::-webkit-scrollbar-thumb {
    background: #0ADBCD;
    border-radius: 10px;
}

.testimonial-modal__body::-webkit-scrollbar-thumb:hover {
    background: #00a89e;
}

.modal-quote-icon {
    color: #0ADBCD;
    margin-bottom: 20px;
    opacity: 0.8;
}

.modal-review-text {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: #424242;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .testimonial-modal__dialog {
        max-width: calc(100% - 32px);
        max-height: calc(100vh - 40px);
    }

    .testimonial-modal__header {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px 24px;
    }

    .modal-client-photo {
        width: 80px;
        height: 80px;
    }

    .modal-client-info h3 {
        font-size: 24px;
    }

    .testimonial-modal__body {
        padding: 24px;
        max-height: calc(100vh - 260px);
    }

    .modal-review-text {
        font-size: 16px;
    }

    .modal-quote-icon svg {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 1200px) {
    .testimonial-title {
        font-size: 42px;
        line-height: 42px;
        margin-top: 40px;
    }

    .testimonial-subtitle {
        font-size: 18px;
        line-height: 26px;
    }

    .testimonial-card {
        width: 340px;
        height: 310px;
        flex: 0 0 340px;
    }

    .testimonial-cards-container {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .testimonial-section {
        padding: 0 16px 18px 16px;
    }

    .testimonial-title {
        font-size: 36px;
        line-height: 38px;
        margin-top: 36px;
    }

    .testimonial-subtitle {
        font-size: 17px;
        line-height: 25px;
    }

    .testimonial-card {
        width: 320px;
        height: 300px;
        flex: 0 0 320px;
    }

    .testimonial-cards-container {
        gap: 18px;
        padding: 42px 0 0 0;
    }

    .client-photo {
        width: 74px;
        height: 74px;
        top: -37px;
    }

    .quote-icon {
        margin-left: 20px;
        margin-top: 20px;
        width: 28px;
        height: 28px;
    }

    .review-text {
        margin: 14px 20px 0 20px;
        font-size: 15px;
        line-height: 22px;
    }

    .divider {
        top: 222px;
        left: 20px;
        right: 20px;
    }

    .client-name,
    .client-title {
        left: 20px;
    }
}

@media (max-width: 768px) {
    .testimonial-section {
        padding: 0 12px 18px 12px;
    }

    .testimonial-title {
        font-size: 32px;
        line-height: 36px;
        margin-top: 32px;
    }

    .testimonial-subtitle {
        font-size: 16px;
        line-height: 24px;
    }

    .testimonial-card {
        width: 300px;
        height: 290px;
        flex: 0 0 300px;
    }

    .testimonial-cards-container {
        gap: 16px;
        padding: 38px 0 0 0;
    }

    .client-photo {
        width: 70px;
        height: 70px;
        top: -35px;
        right: 20px;
    }

    .quote-icon {
        margin-left: 18px;
        margin-top: 18px;
        width: 26px;
        height: 26px;
    }

    .stars-container {
        margin-left: 18px;
        margin-top: 14px;
    }

    .review-text {
        margin: 12px 18px 0 18px;
        font-size: 14px;
        line-height: 21px;
    }

    .divider {
        top: 212px;
        left: 18px;
        right: 18px;
    }

    .client-name {
        top: 226px;
        left: 18px;
        font-size: 15px;
    }

    .client-title {
        top: 248px;
        left: 18px;
        font-size: 13px;
    }

    .testimonial-modal__dialog {
        max-width: calc(100% - 32px);
        max-height: calc(100vh - 40px);
    }

    .testimonial-modal__header {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px 24px;
    }

    .modal-client-photo {
        width: 80px;
        height: 80px;
    }

    .modal-client-info h3 {
        font-size: 24px;
    }

    .testimonial-modal__body {
        padding: 24px;
        max-height: calc(100vh - 260px);
    }

    .modal-review-text {
        font-size: 16px;
    }

    .modal-quote-icon svg {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .testimonial-section {
        padding: 0 12px 18px 12px;
    }

    .testimonial-title {
        font-size: 28px;
        line-height: 32px;
        margin-top: 28px;
        margin-bottom: 10px;
    }

    .testimonial-subtitle {
        font-size: 15px;
        line-height: 22px;
    }

    .testimonial-card {
        width: 280px;
        height: 280px;
        flex: 0 0 280px;
    }

    .testimonial-cards-container {
        gap: 14px;
        padding: 34px 0 0 0;
    }

    .client-photo {
        width: 64px;
        height: 64px;
        top: -32px;
        right: 18px;
    }

    .quote-icon {
        margin-left: 16px;
        margin-top: 16px;
        width: 24px;
        height: 24px;
    }

    .stars-container {
        margin-left: 16px;
        margin-top: 12px;
    }

    .star {
        width: 18px;
        height: 18px;
    }

    .review-text {
        margin: 10px 16px 0 16px;
        font-size: 13px;
        line-height: 20px;
        -webkit-line-clamp: 3;
    line-clamp: 3;
    }

    .divider {
        top: 198px;
        left: 16px;
        right: 16px;
    }

    .client-name {
        top: 210px;
        left: 16px;
        font-size: 14px;
    }

    .client-title {
        top: 230px;
        left: 16px;
        font-size: 12px;
    }

    .testimonial-modal__header {
        padding: 24px 20px;
    }

    .modal-client-photo {
        width: 72px;
        height: 72px;
    }

    .modal-client-info h3 {
        font-size: 22px;
    }

    .modal-client-info p {
        font-size: 14px;
    }

    .testimonial-modal__body {
        padding: 20px;
        max-height: calc(100vh - 240px);
    }

    .modal-review-text {
        font-size: 15px;
        line-height: 1.6;
    }
}