.team-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    transition: 0.3s ease-in-out;
}

.team-item {
    position: relative;
    width: calc(25% - 20px);
    max-width: 280px;
    height: auto;
    overflow: hidden;
    border-radius: 10px;
}

.team-item img {
    width: 100%; 
    height: auto;
    object-fit: cover; 
    border-radius: 10px;
}

.team-item:hover .team-text {
    background: rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

.container-xxl {
    max-width: 100%;
    padding: 100px 0 50px;
}

.team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.team-checkboxes {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.team-checkboxes label {
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #343a40;
}

.team-checkboxes input {
    margin-right: 5px;
    cursor: pointer;
}

.team-group {
    display: none;
}

.team-group.active {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.border-start {
    border-left: 5px solid #007bff;
    padding-left: 15px;
    position: relative;
    z-index: 1;
}

/* Text Styling */
h6.text-body {
    color: #6c757d;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
}

h1.display-6 {
    font-weight: bold;
    color: #343a40;
    font-family: 'Poppins', sans-serif;
}

/*Responsive Design for all screens */

/* For Extra Large Screens (Above 2400px) */
@media (min-width: 2400px) {
 .team-item {
        width: calc(25% - 20px); /* 4 per row */
        max-width: 320px;
    }

    .team-item img {
        height: 500px;
    }
}

/* Large Screens (1920px - 2399px) */
@media (max-width: 2399px) {
    .team-item {
        width: calc(25% - 20px); /* 4 per row */
        max-width: 300px;
    }

    .team-item img {
        height: 450px;
    }
}

/* Medium-Large Screens (1600px - 1919px) */
@media (max-width: 1919px) {
    .team-item {
        width: calc(25% - 20px); /* 4 per row */
        max-width: 280px;
    }

    .team-item img {
        height: 400px;
    }
}

/* Standard Desktop (1200px - 1599px) */
@media (max-width: 1599px) {
    .team-item {
        width: calc(25% - 20px); /* 4 per row */
        max-width: 260px;
    }

    .team-item img {
        height: 350px;
    }
}

/* Laptops & Small Desktops (992px - 1199px) */
@media (max-width: 1199px) {
    .team-item {
        width: calc(33.33% - 20px); /* 3 per row */
    }
    
    .team-item img {
        height: 320px;
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) {
    .team-item {
        width: calc(33.33% - 20px); /* 3 per row */
    }

    .team-item img {
        height: 300px;
    }
}

/* Small Tablets & Large Phones (576px - 767px) */
@media (max-width: 767px) {
    .team-item {
        width: calc(50% - 20px); /* 2 per row */
    }

    .team-item img {
        height: 250px;
    }

    .team-text {
        position: relative;
        bottom: 0;
        background: rgba(255, 255, 255, 1);
        color: black;
        width: 100%;
    }
}

/* Large Phones (480px - 575px) */
@media (max-width: 575px) {
    .team-item {
        width: 100%;
    }

    .team-item img {
        height: 220px;
    }

    .team-text {
        position: relative;
        bottom: 0;
        background: rgba(255, 255, 255, 1);
        width: 100%;
        color: black;
    }
}

/* Small Phones (320px - 479px) */
@media (max-width: 479px) {
    .team-item {
        width: 100%;
    }

    .team-item img {
        height: 200px;
    }

    .team-text {
        position: relative;
        bottom: 0;
        background: rgba(255, 255, 255, 1);
        width: 100%;
        color: black;
    }
}

/* Very Small Devices (Below 320px) */
@media (max-width: 320px) {
    .team-item {
        width: 100%;
    }

    .team-item img {
        height: 180px;
    }

    .team-text {
        position: relative;
        bottom: 0;
        background: rgba(255, 255, 255, 1);
        width: 100%;
        color: black;
    }
}
