/* MARQUEE TESTIMONIALS - STRICT ONE-LINE HEADER */
.marquee-testimonials-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-row {
    display: flex;
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

.marquee-row-1 .marquee-content {
    display: flex;
    animation: marquee-left-to-right var(--marquee-speed, 30s) linear infinite;
}

.marquee-row-2 .marquee-content {
    display: flex;
    animation: marquee-right-to-left var(--marquee-speed, 30s) linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.testimonial-item {
    flex: 0 0 auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* STRICT HEADER - ALWAYS ONE LINE */
.testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
    min-height: 50px; /* Minimum height to accommodate content */
}

.client-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0; /* CRITICAL: Allows text truncation */
    max-width: 70%; /* Limit width for client info */
}

.client-image {
    flex-shrink: 0;
}

.client-image img {
    object-fit: cover;
    display: block;
}

.client-name {
    margin: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 50px; /* Minimum width for name */
}

/* STAR RATING - ALWAYS ON SAME LINE */
.star-rating {
    display: flex;
    gap: 2px;
    flex-shrink: 0; /* NEVER shrink stars */
    margin-left: 10px;
}

.star-rating i {
    flex-shrink: 0; /* Each star icon won't shrink */
}

.testimonial-text {
    margin: 0;
    line-height: 1.6;
}

/* MARQUEE ANIMATIONS */
@keyframes marquee-left-to-right {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes marquee-right-to-left {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* ENSURE ONE-LINE ON ALL SCREENS */
@media (max-width: 1024px) {
    .testimonial-header {
        flex-wrap: nowrap !important;
    }
    
    .client-info {
        max-width: 65%; /* Adjust for smaller screens */
    }
    
    .client-name {
        font-size: 0.9em; /* Shrink text, not layout */
    }
}

@media (max-width: 767px) {
    .testimonial-header {
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
    
    .client-info {
        max-width: 60%;
        gap: 8px;
    }
    
    .client-name {
        font-size: 0.85em;
        min-width: 40px;
    }
    
    .client-image img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .star-rating i {
        font-size: 12px !important;
    }
    
    .testimonial-item {
        min-width: 280px; /* Ensure enough width */
    }
}

@media (max-width: 480px) {
    .testimonial-header {
        flex-wrap: nowrap !important;
        min-height: 45px;
    }
    
    .client-info {
        max-width: 55%;
    }
    
    .client-name {
        font-size: 0.8em;
        min-width: 30px;
    }
    
    .client-image img {
        width: 30px !important;
        height: 30px !important;
    }
    
    .star-rating i {
        font-size: 10px !important;
    }
    
    .testimonial-item {
        min-width: 250px;
    }
}

/* EXTREME SMALL SCREENS - STILL ONE LINE */
@media (max-width: 360px) {
    .testimonial-header {
        flex-wrap: nowrap !important;
    }
    
    .client-info {
        max-width: 50%;
    }
    
    .client-name {
        font-size: 0.75em;
    }
    
    .star-rating {
        gap: 1px;
    }
    
    .star-rating i {
        font-size: 9px !important;
    }
    
    .testimonial-item {
        min-width: 230px;
    }
}

/* FORCE ONE-LINE WITH OVERFLOW SCROLL AS LAST RESORT */
@media (max-width: 320px) {
    .testimonial-header {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px; /* Space for scroll if needed */
    }
    
    .testimonial-header::-webkit-scrollbar {
        height: 3px;
    }
    
    .testimonial-header::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 3px;
    }
}