body {
    background-color: #ffffff;
    /* changed from #f5f7f6 */
}

.header-logo {
    color: #6c7a43;
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 2px;
}

.header-logo .subtext {
    color: #218838;
    font-size: 0.7em;
    font-weight: normal;
}

.testimonial-title {
    color: #444;
    font-size: 2em;
    font-weight: bold;
    margin: 30px 0 20px;
    letter-spacing: 1px;
}

.image-overlay-container {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    overflow: visible;
    /* allow bubbles to overflow horizontally */
}

.phone-img {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: block;
}

.chat-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    /* center horizontally relative to image */
    width: 140%;
    /* extend beyond the image horizontally while centered */
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* align from top so padding pushes content down/up */
    pointer-events: none;
    padding: 18% 6%;
    /* 30% padding top & bottom, horizontal padding for spacing */
    overflow: visible;
    /* ensure chat tails and bubbles are visible outside image */
}

.chat-row {
    width: 100%;
    display: flex;
    margin-bottom: 0;
    pointer-events: auto;
}

.chat-row.left {
    justify-content: flex-start;
}

.chat-row.right {
    justify-content: flex-end;
}

/* Chat bubble tails, alignment and tweaks */
.chat-row.left .testimonial-bubble,
.chat-row.right .testimonial-bubble {
    position: relative;
    margin: 12px 8px;
    padding: 10px 20px;
    max-width: 76%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Left bubble (incoming) */
.chat-row.left .testimonial-bubble {
    margin-left: 8px;
    margin-right: auto;
    border-top-left-radius: 6px;
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 18px;
    text-align: left;
}

.chat-row.left .testimonial-bubble::after {
    content: "";
    position: absolute;
    left: -10px;
    top: 18px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 10px solid #7cc043;
    /* match main bubble */
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
}

/* Right bubble (outgoing) */
.chat-row.right .testimonial-bubble {
    margin-right: 8px;
    margin-left: auto;
    border-top-right-radius: 6px;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    text-align: left;
}

.chat-row.right .testimonial-bubble::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 18px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 10px solid #7cc043;
    /* match main bubble */
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
}

/* Ensure light variant tails match its background */
.chat-row.left .testimonial-bubble.light::after,
.chat-row.right .testimonial-bubble.light::after {
    border-right-color: #cfe7a9;
    border-left-color: #cfe7a9;
}

/* Keep bubbles keyboard-focusable and not blocked by container */
.testimonial-bubble {
    pointer-events: auto;
}

.testimonial-bubble {
    position: relative;
    background: #7cc043;
    color: #fff;
    border-radius: 20px;
    padding: 10px 24px;
    margin: 14px 0;
    box-shadow: 0 4px 16px rgba(124, 192, 67, 0.13);
    max-width: 220px;
    font-size: 0.6em;
    display: inline-block;
    word-break: break-word;
    z-index: 5;
    /* ensure bubbles sit above the phone image */
    font-weight: 500;
}

.testimonial-bubble.light {
    background: #b7d97a;
    color: #333;
}

.testimonial-meta {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
    /* space between logo / name / rating */
}

/* image avatar inside meta */
.testimonial-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex: 0 0 36px;
}

/* company name next to logo */
.testimonial-company {
    font-weight: 700;
    font-size: 0.95em;
    color: #fff;
}

/* rating pushed to the far right of meta */
.testimonial-rating {
    margin-left: auto;
    color: #ffc107;
    font-size: 0.95em;
}

/* make sure light bubbles use darker name color for contrast */
.testimonial-bubble.light .testimonial-company {
    color: #222;
}

@media (max-width: 900px) {
    .main-flex {
        flex-direction: column !important;
        align-items: center !important;
    }

    .image-overlay-container {
        max-width: 100%;
    }

    .phone-img {
        margin-bottom: 30px;
    }

    .testimonial-bubble {
        max-width: 100%;
    }
}

/* Tighter shapes on small screens */
@media (max-width: 600px) {
    .testimonial-bubble {
        max-width: 88%;
        padding: 10px 14px;
        font-size: 0.98rem;
    }

    .chat-row.left .testimonial-bubble::after,
    .chat-row.right .testimonial-bubble::after {
        top: 16px;
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
        border-left-width: 8px;
        border-right-width: 8px;
    }

    .image-overlay-container {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .chat-container {
        padding: 18% 4%;
        /* keep 30% vertical padding, reduce horizontal space */
        width: 125%;
        left: 50%;
        transform: translateX(-50%);
    }

    .testimonial-bubble {
        max-width: 92%;
        padding: 8px 12px;
        font-size: 0.65rem;
        border-radius: 14px;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
        line-height: 1.3;
        display: inline-block;
        word-break: break-word;
    }

    .testimonial-meta {
        gap: 6px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .testimonial-avatar-img {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
    }

    .testimonial-company {
        font-size: 0.9em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 72px);
    }

    /* .testimonial-rating {
        font-size: 0.9em;
        margin-left: 8px;
    } */

    /* Slightly adjust bubble tails so they remain visible on very small screens */
    .chat-row.left .testimonial-bubble::after {
        left: -8px;
        top: 14px;
        border-top-width: 7px;
        border-bottom-width: 7px;
        border-right-width: 8px;
    }

    .chat-row.right .testimonial-bubble::after {
        right: -8px;
        top: 14px;
        border-top-width: 7px;
        border-bottom-width: 7px;
        border-left-width: 8px;
    }
}