/* ============================================
   CLIENT LOGOS + TESTIMONIALS - UNIFIED
   Modern SaaS Style - Horizontal Layout
   OPTIMIZED FOR PERFORMANCE
   Moved from inline styles in home/index.php
   ============================================ */

.client-testimonial-section {
    background: transparent;
    padding: 1rem 0 0.5rem;
    overflow: hidden;
    position: relative;
}

.client-testimonial-section>.container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    max-width: calc(var(--container-max-width, 1320px) - var(--container-padding, 24px) * 2);
    margin: 0 auto;
    border-radius: 16px;
    padding: 1rem var(--container-padding, 24px);
}

/* ===== GRID LAYOUT - Logo Left, Testimonial Right ===== */
.ct-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

/* MOBILE: Keep side-by-side layout like desktop */
@media (max-width: 991px) {
    .ct-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 767px) {
    .ct-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.75rem;
    }
}

/* ===== LEFT: CLIENT LOGOS ===== */
.left-logos {
    padding-right: 1rem;
    min-width: 0;
    overflow: hidden;
}

.logos-header {
    margin-bottom: 1.5rem;
}

.logos-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 174, 239, 0.12);
    color: #0891b2;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0, 174, 239, 0.25);
}

.logos-badge i {
    font-size: 0.7rem;
}

.logos-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

/* Logo Loop Wrapper */
.logo-loop-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    overflow: hidden;
}

/* Logo Loop Container */
.logo-loop {
    padding: 0.5rem 0;
    overflow: hidden;
}

/* Reverse logo loop - start from center */
.logo-loop.reverse {
    display: flex;
    justify-content: center;
}

/* Logo Item - smaller size, no background */
.logo-item {
    flex-shrink: 0;
    width: 300px;
    height: 150px;
    background: transparent;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
}

.logo-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(0%);
    opacity: 1;
}

.logos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 2rem;
    color: #64748b;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    border: 1px dashed rgba(0, 174, 239, 0.3);
}

.logos-empty i {
    font-size: 2rem;
    opacity: 0.4;
}

/* ===== RIGHT: TESTIMONIALS ===== */
.right-testimonials {
    padding-left: 1rem;
    min-width: 0;
    overflow: hidden;
}

.testi-header-inline {
    margin-bottom: 1rem;
}

.testi-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 174, 239, 0.12);
    color: #0891b2;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0, 174, 239, 0.25);
}

.testi-badge i {
    font-size: 0.7rem;
}

.testi-title-inline {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

/* Testimonial Auto Scroll Wrapper - animation in scroll-performance.css */
.testi-scroll-wrapper {
    height: 320px;
    position: relative;
}

/* Testimonial Cards Stack (legacy fallback) */
.testi-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Single Testimonial Card */
.testi-card {
    background: #ffffff;
    border: 1px solid rgba(0, 174, 239, 0.12);
    border-radius: 20px;
    padding: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.testi-scroll-wrapper .testi-card {
    opacity: 1;
    transform: none;
    animation: none;
}

.testi-card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Author Row */
.testi-author-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.testi-avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #00AEEF 0%, #0891b2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(0, 174, 239, 0.2);
}

.testi-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-letter {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.testi-author-info {
    flex: 1;
    min-width: 0;
}

.testi-author-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.15rem;
    line-height: 1.2;
}

.testi-author-role {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

/* Rating Inline */
.testi-rating-inline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(251, 191, 36, 0.15);
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.rating-num {
    font-size: 0.85rem;
    font-weight: 700;
    color: #d97706;
}

.testi-rating-inline i {
    font-size: 0.75rem;
    color: #f59e0b;
}

/* Quote */
.testi-quote {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.testi-empty-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 4rem 2rem;
    color: #64748b;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.testi-empty-inline i {
    font-size: 2rem;
    opacity: 0.4;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {

    .left-logos,
    .right-testimonials {
        padding: 0;
    }

    .logos-title,
    .testi-title-inline {
        font-size: 1.1rem;
    }
}

@media (max-width: 767px) {
    .client-testimonial-section {
        padding: 0.5rem 0;
    }

    /* FORCE 2-COLUMN LAYOUT ON MOBILE */
    .ct-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 0.5rem !important;
    }

    .left-logos {
        display: block !important;
        overflow: hidden;
    }

    .right-testimonials {
        display: block !important;
        overflow: hidden;
    }

    .logos-header,
    .testi-header-inline {
        margin-bottom: 0.5rem;
    }

    .logos-badge,
    .testi-badge {
        font-size: 0.55rem;
        padding: 0.2rem 0.4rem;
        margin-bottom: 0.3rem;
        gap: 0.2rem;
    }

    .logos-badge i,
    .testi-badge i {
        font-size: 0.5rem;
    }

    .logos-title,
    .testi-title-inline {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* Logo smaller for mobile side-by-side */
    .logo-item {
        width: 100px;
        height: 50px;
    }

    .logo-item img {
        width: 100%;
        height: 100%;
    }

    .logo-track {
        gap: 0.4rem;
    }

    .logo-loop-wrapper {
        gap: 1rem;
    }

    .logo-loop {
        padding: 0.2rem 0;
    }

    /* Testimonial section - must be visible */
    .testi-scroll-wrapper {
        height: 180px !important;
        overflow: hidden;
    }

    .testi-cards-stack {
        gap: 0.4rem;
    }

    .testi-card {
        padding: 0.5rem;
        border-radius: 8px;
        margin-bottom: 0.4rem;
    }

    .testi-card-content {
        gap: 0.4rem;
    }

    .testi-author-row {
        gap: 0.4rem;
    }

    .testi-avatar-small {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .avatar-letter {
        font-size: 0.65rem;
    }

    .testi-author-name {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .testi-author-role {
        font-size: 0.55rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .testi-quote {
        font-size: 0.6rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }

    .testi-rating-inline {
        padding: 0.15rem 0.3rem;
        flex-shrink: 0;
    }

    .rating-num {
        font-size: 0.55rem;
    }

    .testi-rating-inline i {
        font-size: 0.5rem;
    }
}