/* Affiliations Section */
#affiliations {
    background-color: var(--primary-bg-color);
    padding-top: 5rem;
    padding-bottom: 5rem;
}

#affiliations .container > h3 {
    color: var(--text-secondary-color) !important;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

#affiliations .row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem; /* Reduced gap between cards */
    padding-left: 10px;
    padding-right: 10px;
}

#affiliations .card {
    border-radius: 1.5rem;
    box-shadow: 0px 8px 56px rgb(15 80 100 / 16%);
    /*border: 2px solid var(--text-secondary-color) !important;*/
    overflow: hidden;
    background-color: var(--secondary-color) !important;
    max-width: 100%; /* Ensure the cards don't grow too large */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#affiliations .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#affiliations .card-img-top {
    max-width: 100%;
    height: auto;
    object-fit: contain; /* Keep image's aspect ratio */
    margin-bottom: 1rem;
    max-height: 100px;
    filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.5));
}

#affiliations .card-text {
    font-size: 1rem;
    /*font-weight: 500;*/
    text-align: center;
}

#affiliations .card:hover {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 20px rgba(197, 98, 98, 0.4);
    /*transform: translateY(-5px); !* Lift the card on hover *!*/
}

#affiliations .card-body a {
    color: var(--text-link-color) !important;
    text-decoration: none;
    opacity: 0.9;
}

#affiliations .card-body a:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    #affiliations .container {
        padding: 0 15px; /* Adjust container padding for better alignment */
    }

    #affiliations .row {
        gap: 0.5rem; /* Reduced gap for small screens */
    }

    #affiliations .card-body {
        padding: 1rem;
    }

    #affiliations .card-img-top {
        max-height: 60px;
    }
}
