/* --- General Page Styling --- */
.partners-intro {
    font-size: 1.2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    /* Centers text and adds bottom space */
    color: #555;
    line-height: 1.6;
}

.partners-section-title {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 30px;
    font-weight: 700;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

/* Optional: Add a small underline to titles */
.partners-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #ddd;
    /* Change to your brand color */
    margin: 10px auto 0;
}

/* --- The Responsive Grid System --- */
.partners-grid {
    display: grid;
    /* Default: 1 column (Mobile phones) */
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    /* Space between logos */
    justify-items: center;
    align-items: center;
    /* Vertically center logos */
    margin-bottom: 40px;
}

/* --- The Partner Card --- */
.partner-card {
    background: #fff;
    width: 100%;
    height: 100%;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Flexbox used to center the image inside the card */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hover Effect */
.partner-card:hover {
    transform: translateY(-5px);
    /* Moves up slightly */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* --- Image Handling --- */
.partner-card img {
    max-width: 100%;
    /* Ensures image never overflows card */
    max-height: 100px;
    /* Keeps logos consistent height */
    width: auto;
    height: auto;
    object-fit: contain;
    /* Preserves aspect ratio */
    filter: grayscale(100%);
    /* Optional: Makes logos black & white */
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Color on hover */
.partner-card:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- RESPONSIVE BREAKPOINTS --- */

/* Small Tablets and Large Phones (min-width: 576px) */
@media (min-width: 576px) {
    .partners-grid {
        /* 2 columns */
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets / Laptops (min-width: 768px) */
@media (min-width: 768px) {
    .partners-grid {
        /* 3 columns */
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktops (min-width: 992px) */
@media (min-width: 992px) {
    .partners-grid {
        /* 4 columns */
        grid-template-columns: repeat(4, 1fr);
    }
}