/* Grid container */
.team-popup-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Each team member */
.team-member {
    width: 23%; 
    position: relative;
}

.team-member .image-container{
    position: relative;
    cursor: pointer;
min-height: calc(410px + (107.5vw - 1920px) * 0.175);
overflow: hidden;
background-color: lightblue;
border-radius: 20px;
}


.team-member .image-container .hover-item{
    padding-top:25px;overflow:hidden;
}

/* Team member name and position */
.team-member h3 {
    font-size: 18px;
    color: #333;
    margin: 10px 0 5px;
}

.relative_container:hover .main-item{
    transition: opacity 1s ease-out; 
    opacity: 0;  
}

.relative_container .main-item{
    transition: opacity 1s ease-in; 
    opacity: 1;  
}

.team-member p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.member-details{
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    padding: 30px 10px 10px 10px;
    padding-left: 20px;
    z-index: 99;
    background:var(--wp--preset--gradient--custom-title-gradient) !important;
}

.member-details p{
    cursor: pointer; color: #FFF; font-family: 'Neue Haas Unica';margin-bottom:5px; font-size: 24px; font-weight: 500; line-height: 120%; letter-spacing: -0.72px;
}
.member-details p.position{
    font-weight: 350;
}

/* Popup styling */

.popup-content {
    display: none;
    position: fixed;
    top: 0;
    right: -100%; 
    transform: translateY(0); 
    transition: right 0.4s ease-out; /* Smooth transition for the right position */
    background-color: white;
    width: 759px; 
    height: 1137px;
/*     max-height: calc(91vh - 48px); */
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.popup-content.open {
    right: 0; /* Slide the popup in from the right */
}

.popup-inner {
    display: flex;
    height: 100%;
}

.popup-bg {
    background: rgba(11, 55, 73, 0.50);
    flex: 1;
    padding: 20px;
    border-radius: 8px 0 0 8px;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
}