.team-container-nd {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.team-grid-nd {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns by default */
    gap: 20px; /* Space between grid items */
}

.team-member-nd {
    position: relative;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    padding: 0;
    border-radius: 14px;
    box-shadow: 0 5px 6px #0000000f;
    background:white;
    position: relative;
    overflow: hidden; /* Ensure the overlay stays within the image bounds */
}

.image-container-nd {
    position: relative;
    display: inline-block;
    border-radius: inherit; /* Inherit border-radius from parent */
    overflow:hidden;
}

.image-container-nd img {
    display: block;
    width: 100%;
    height: auto;
}

.image-container-nd::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 0, 0, 0); /* Start with transparent red */
    transition: background-color 0.3s ease; /* Smooth transition on hover */
    border-radius: inherit; /* Ensure the overlay follows the border radius */
    z-index:1;
}

.team-member-nd:hover .image-container-nd::before {
    background-color: rgba(255, 0, 0, 0.1); /* Red overlay with 50% opacity on hover */
}

.team-member-nd img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 4; /* Ensures the image maintains a 4:4 aspect ratio */
    object-fit: cover; /* Ensures the image covers the entire container without stretching */
    border-radius:14px 14px 0 0;
    transition: all ease 0.5s
}

.team-member-nd:hover img:first-child {
    transform: scale(1.05);
  }

.team-member-titles-nd {
    padding:30px;
}

.team-member-nd:hover img.chevron-nd {
    filter: grayscale(50%);
  }

.team-member-nd h3, .text-content-nd h3 {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 24px;
  font-weight: 600;
  text-align:left;
}

.team-member-nd h4, .text-content-nd h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 400;
    color:#ED1c29;
    text-align:left;
}

.team-member-nd .chevron-nd {
    position: absolute;
    bottom: 40px;
    right: 20px;
    aspect-ratio: auto;
    width: 100%;
    max-width: 20px;

}


  .team-member-detail-nd {
    display: none; /* Hidden by default */
    width: 100%;
    grid-column: 1 / -1; /* Span full width of the grid */
    margin-top: 20px;
    margin-bottom: 20px;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-10px); /* Adjust this value for your desired effect */
}

.team-member-detail-nd.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.team-member-content-nd {
    display: flex;
    align-items: flex-start;
    padding: 0;
    border: none;
    position: relative;
    box-shadow: 0 5px 8px #00000017;
    border-radius: 14px;
    background:white;
    overflow:hidden;
}

.img-cont {
    background-image: url('https://starter.nuel.digital/wp-content/uploads/2024/08/20FDDF4C-A896-4EF1-A265-F9D5570D8C8C.jpg');
    width: 80%;
    display: flex;
    align-self: stretch;
    background-position: center;
    background-size: cover;
    border-radius: 14px 0 0 14px;
  }


.text-content-nd {
    width: 100%;
    padding:40px;
}

.close-btn-nd, .close-btn-nd:Hover, .close-btn-nd:Focus {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color:#ED1c29;
    background:white!important;
    border-radius:200px;
}

@media (max-width: 767px) {
    .team-grid-nd {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
    
    .img-cont {
        display:none;
    }
    
    
}

