/* References Section */
.references-section {
    padding: 30px 0 60px 0;
    width: 100%;
    margin: 0 auto;
    background-color: #fcfcfc;
    /* Optional: slight background diff or keep white */
}

/* Match container width */
@media (min-width: 1500px) {
    .references-section .container {
        max-width: 1450px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

.references-slider-wrapper {
    width: 100%;
    padding: 20px 0;
}

.references-swiper {
    width: 100%;
    padding: 10px;
    /* Space for shadow */
}

/* Grid for <= 6 items */
/* Grid for <= 6 items */
/* Grid/Flex for <= 6 items */
.references-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Ensures perfect centering regardless of count */
    gap: 40px;
    width: 100%;
    margin: 0 auto;
}

/* Base Card Sizing */
.references-card-static {
    flex: 0 1 calc(16.66% - 34px);
    /* Default to fitting 6 items approx */
    min-width: 160px;
    /* Minimum reasonable size */
    max-width: 220px;
    /* Restrict max size to keep them 'small' */
}

/* Responsive Sizing */
@media (max-width: 1200px) {
    .references-card-static {
        flex: 0 1 calc(20% - 32px);
        /* 5 cols */
    }
}

@media (max-width: 1024px) {
    .references-card-static {
        flex: 0 1 calc(33.33% - 27px);
        /* 3 cols */
    }
}

@media (max-width: 600px) {
    .references-card-static {
        flex: 0 1 calc(50% - 20px);
        /* 2 cols */
    }
}


/* Card Style */
.references-slide {
    background: #fff;
    border-radius: 8px;
    /* Slightly sharper */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    /* Reverted to 3/2 for wider/shorter look */
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.references-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.references-slide__image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.references-slide__image {
    max-width: 90%;
    /* Increased from 80% */
    max-height: 80%;
    /* Increased from 60% */
    object-fit: contain;
    filter: grayscale(100%);
    /* Optional: Make logos grayscale by default */
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.references-slide:hover .references-slide__image {
    filter: grayscale(0%);
    opacity: 1;
}