.leadership-team {
    margin-top: 5rem;
    text-align: center;
    padding: 20px;
    font-family: Arial, sans-serif;
}
.leadership-team{
    font-size: 2rem;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 60px;
}

.leader-card {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 200px; /* Limit width for larger screens */
    height: 130px; /* Adjust height */
    position: relative;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
}

.leader-image-container {
    position: relative;
    overflow: hidden;
}

.leader-image {
    width: 100%;
    height: 100%; /* Fill the card */
    object-fit: cover;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.leader-hover-info {
    position: absolute;
    top: 0;
    left: -100%; /* Initially hidden off-screen to the left */
    right: 0;
    bottom: 0;
    background: rgba(243, 242, 242, 0.7);
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Hidden by default */
    transition: left 0.5s ease, opacity 0.5s ease; /* Smooth sliding and fading transition */
}

.leader-hover-info h3 {
    margin: 0;
    font-size: 20px;
}

.leader-hover-info p {
    margin: 0;
    font-size: 16px;
}

.leader-card:hover .leader-image {
    opacity: 0.3;
}

.leader-card:hover .leader-hover-info {
    left: 0; /* Slide from left to full visibility */
    opacity: 1; /* Make it visible */
}

/* Media Queries for better responsiveness */
@media (max-width: 768px) {
    .leadership-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .leader-card {
        max-width: 150px;
        height: 100px;
    }

    .leader-hover-info h3 {
        font-size: 18px;
    }

    .leader-hover-info p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .leader-card {
        height: 100px;
    }

    .leader-hover-info h3 {
        font-size: 16px;
    }

    .leader-hover-info p {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .leader-card {
        height: 100px;
    }

    .leader-hover-info h3 {
        font-size: 10px;
    }

    .leader-hover-info p {
        font-size: 10px;
    }
}
