/* Client Logo Showcase v4.0 - 5 COLUMNS PERFECT RESPONSIVE */

.cls-clients-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 0;
    background: transparent;
    margin: 40px auto;
    max-width: 1400px;
}

.cls-client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px 35px !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    outline: none !important;
    transition: all 0.3s ease;
    min-height: 150px;
}

/* Remove duplicate top borders (keep first row only) */
.cls-client-logo:nth-child(n+6) {
    border-top-width: 0 !important;
}

/* Remove duplicate left borders (keep first column only) */
.cls-client-logo:not(:nth-child(5n+1)) {
    border-left-width: 0 !important;
}

.cls-client-logo img {
   max-width:80% !important;
    max-height: 75px!important;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.cls-client-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
}

.cls-client-logo:hover {
    background: #fafafa !important;
}

.cls-client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}

/* ========== RESPONSIVE - LARGE TABLET (4 columns) ========== */
@media (max-width: 1200px) {
    .cls-clients-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .cls-client-logo {
        padding: 40px 30px !important;
        min-height: 140px;
    }
    
    /* Reset 5 column rules */
    .cls-client-logo:not(:nth-child(5n+1)) {
        border-left-width: 1px !important;
    }
    
    /* Apply 4 column rules */
    .cls-client-logo:not(:nth-child(4n+1)) {
        border-left-width: 0 !important;
    }
    
    /* Keep first row top border, remove from 5th item onwards */
    .cls-client-logo:nth-child(n+5) {
        border-top-width: 0 !important;
    }
    
    .cls-client-logo img {
        max-height: 70px;
    }
}

/* ========== RESPONSIVE - TABLET (3 columns) ========== */
@media (max-width: 900px) {
    .cls-clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cls-client-logo {
        padding: 35px 25px !important;
        min-height: 130px;
    }
    
    /* Reset 4 column rules */
    .cls-client-logo:not(:nth-child(4n+1)) {
        border-left-width: 1px !important;
    }
    
    /* Apply 3 column rules */
    .cls-client-logo:not(:nth-child(3n+1)) {
        border-left-width: 0 !important;
    }
    
    /* Keep first row top border, remove from 4th item onwards */
    .cls-client-logo:nth-child(n+4) {
        border-top-width: 0 !important;
    }
    
    .cls-client-logo img {
        max-height: 65px;
    }
}

/* ========== RESPONSIVE - MOBILE (2 columns) ========== */
@media (max-width: 600px) {
    .cls-clients-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 30px auto;
    }
    
    .cls-client-logo {
        padding: 30px 20px !important;
        min-height: 120px;
    }
    
    /* Reset 3 column rules */
    .cls-client-logo:not(:nth-child(3n+1)) {
        border-left-width: 1px !important;
    }
    
    /* Apply 2 column rules */
    .cls-client-logo:not(:nth-child(2n+1)) {
        border-left-width: 0 !important;
    }
    
    /* Keep first row top border, remove from 3rd item onwards */
    .cls-client-logo:nth-child(n+3) {
        border-top-width: 0 !important;
    }
    
    .cls-client-logo img {
        max-height: 60px;
    }
}

/* ========== RESPONSIVE - SMALL MOBILE (2 columns - 360px+) ========== */
@media (max-width: 400px) {
    .cls-clients-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 20px 10px;
    }
    
    .cls-client-logo {
        padding: 25px 15px !important;
        min-height: 110px;
    }
    
    .cls-client-logo img {
        max-height: 55px;
    }
}

