/* Page Container */
.testimonials-page {
    background: linear-gradient(90deg, #ffffff 0%, #e4fcf4 50%, #ffffff 100%);
    min-height: 100vh;
    padding: calc(var(--sections-vertical-spacing) * 1.5) 0;
}

/* Page Header */
.testimonials-header {
    text-align: center;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--horizontal-padding);
    margin-bottom: calc(var(--sections-vertical-spacing) * 2.5);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out 0.2s forwards;
}

.testimonials-title {
    font-family: 'TeXGyreChorus';
    font-weight: 500;
    font-style: italic;
    font-size: clamp(42px, 4.5vw, 64px);
    color: var(--header-background-color);
    margin-bottom: 20px;
    position: relative;
}

.testimonials-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2b4670, transparent);
    border-radius: 2px;
}

.testimonials-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(16px, 2vw, 22px);
    color: #666;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Chat Container */
.testimonials-chat {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--horizontal-padding);
    position: relative;
}

/* Testimonial Message Bubbles */
.testimonial-message {
    display: flex;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.testimonial-message:nth-child(1) {
    animation-delay: 0.3s;
}
.testimonial-message:nth-child(2) {
    animation-delay: 0.4s;
}
.testimonial-message:nth-child(3) {
    animation-delay: 0.5s;
}
.testimonial-message:nth-child(4) {
    animation-delay: 0.6s;
}
.testimonial-message:nth-child(5) {
    animation-delay: 0.7s;
}
.testimonial-message:nth-child(6) {
    animation-delay: 0.8s;
}
.testimonial-message:nth-child(7) {
    animation-delay: 0.9s;
}
.testimonial-message:nth-child(8) {
    animation-delay: 1s;
}
.testimonial-message:nth-child(9) {
    animation-delay: 1.1s;
}
.testimonial-message:nth-child(10) {
    animation-delay: 1.2s;
}
.testimonial-message:nth-child(11) {
    animation-delay: 1.3s;
}

.testimonial-message.right {
    flex-direction: row-reverse;
}

.message-bubble {
    max-width: 630px;
    background: white;
    padding: 25px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(34, 58, 94, 0.12);
    position: relative;
    transition: all 0.4s ease;
    border: 1px solid rgba(34, 58, 94, 0.08);
    z-index: 1;

    margin-right: auto;
}

.testimonial-message:not(.right) .message-bubble {
    margin-left: 65px;
}

.testimonial-message.right .message-bubble {
    margin-right: 65px;
}

.message-bubble::before {
    content: '';
    position: absolute;
    bottom: -27px;
    width: 0;
    height: 0;
    z-index: 0;
}

.testimonial-message:not(.right) .message-bubble::before {
    left: 32px;
    border-top: 24px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 20px solid white;
    filter: none;
    transform: rotate(50deg);
}

.testimonial-message.right .message-bubble::before {
    right: 32px;
    border-top: 24px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 20px solid white;
    filter: none;
    transform: rotate(-50deg);
}

.message-bubble::after {
    content: '';
    position: absolute;
    bottom: -27px;
    width: 0;
    height: 0;
    z-index: -1;
}

.testimonial-message:not(.right) .message-bubble::after {
    left: 32px;
    border-top: 24px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 20px solid rgba(34, 58, 94, 0.04);
    transform: rotate(50deg);
}

.testimonial-message.right .message-bubble::after {
    right: 32px;
    border-top: 24px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 20px solid rgba(34, 58, 94, 0.04);
    transform: rotate(-50deg);
}

.message-bubble:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(34, 58, 94, 0.18);
}

.testimonial-text {
    line-height: 1.6;
    margin: 0px;
    text-align: justify;
}

.testimonial-author {
    position: relative;
    margin-bottom: 35px;
}

.testimonial-author.left {
    text-align: left;
}

.testimonial-author.right {
    text-align: right;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 500px) {
    .message-bubble {
        margin-right: 0px !important;
        margin-left: 0px !important;
    }
}
