/** BOF Team **/
#homepage-team .custom-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

#homepage-team .team-member {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

#homepage-team .team-member:hover {
    transform: translateY(-5px);
}

#homepage-team {
    padding: 60px 0;
}

#homepage-team .team-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 50px;
    font-weight: 600;
    color: black;
    text-align:center;
}

#homepage-team .team-section-title span {
    background-color: #B6D54B;
    padding: 4px;
}

#homepage-team .team-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

#homepage-team .team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

#homepage-team .team-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

#homepage-team .team-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

#homepage-team .team-member-card {
    text-align: center;
}

#homepage-team .team-member-image-wrapper {
    position: relative;
    display: inline-block;
}

#homepage-team .team-member-image {
    width: 180px; /* Increased from 120px by 50% */
    height: 180px; /* Increased from 120px by 50% */
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f8f8;
    transition: transform 0.3s ease;
    cursor: pointer;
    /* Removed border styles */
}

#homepage-team .team-member-image:hover {
    transform: scale(1.05);
    /* Removed border-color change */
}

#homepage-team .team-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#homepage-team .team-member-info {
    padding: 0 10px;
}

#homepage-team .team-member-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #FF7F50;
}

#homepage-team .team-member-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0;
}

/* Popover Styles - Modified to appear over the image */
#homepage-team .team-popover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background: linear-gradient(135deg, #FF7F50 0%, #FF9068 100%);
    border-radius: 8px;
    padding: 24px 16px 16px;
    color: white;
    width: 183px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    text-align: left; /* Align all text content to the left */
}

/* Remove the arrow since popover is now centered */
#homepage-team .team-popover::after {
    display: none;
}

#homepage-team .team-member-image-wrapper:hover .team-popover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-50%) scale(1);
}

#homepage-team .popover-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
}

#homepage-team .popover-avatar {
    width: 54px; /* Increased to accommodate 2px border */
    height: 54px; /* Increased to accommodate 2px border */
    border-radius: 50%;
    flex-shrink: 0;
    position: absolute;
    top: -47px; /* Adjusted for new size */
    left: 100px; /* Changed from right positioning to left positioning - moves avatar to the left */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: linear-gradient(128.29deg, #B6D54B 31.3%, #F47F30 57.84%);

    /* background: conic-gradient(
        from 0deg,
        #B6D54B,
        #F47F30
    ); */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove the ::before pseudo-element - we don't need it anymore */
#homepage-team .popover-avatar::before {
    display: none;
}

/* Create the inner white circle and image container */
#homepage-team .popover-avatar img {
    width: 50px; /* Original size */
    height: 50px; /* Original size */
    object-fit: cover;
    border-radius: 50%;
    background: white;
    border: none;
    position: relative;
    z-index: 1;
}

@keyframes rainbow-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#homepage-team .popover-name {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0;
    flex: 1;
    text-align: left; /* Explicitly align name to the left */
    line-height: 20px;
}

#homepage-team .popover-content {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: white;
    margin-bottom: 10px;
    line-height: 1.5;
    opacity: 0.95;
    text-align: left; /* Align description to the left */
}

#homepage-team .popover-content p {
    margin: 0;
    text-align: left; /* Ensure paragraph text is left-aligned */
}

#homepage-team .popover-footer {
    display: flex;
    justify-content: space-between; /* Space out learn more text and arrow */
    align-items: center;
    margin-top: 12px;
}

#homepage-team .learn-more-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%; /* Take full width to separate text and arrow */
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.2s;
    margin-top: 0; /* Remove margin since we're using popover-footer */
}

#homepage-team .learn-more-btn:hover {
    transform: translateX(4px);
}

#homepage-team .learn-more-btn .btn-text {
    text-align: left; /* Align "Learn More" text to the left */
    font-weight: 700;
    font-size: 14px;
}

#homepage-team .learn-more-btn svg {
    width: 30px; /* Increased from 20px to 40px (2x larger) */
    height: 30px; /* Increased from 20px to 40px (2x larger) */
    /* background: rgba(255, 255, 255, 0.2); */
    border-radius: 50%;
    padding: 4px 0px; /* Increased padding proportionally from 2px to 4px */
    transition: background 0.2s;
    margin-left: auto; /* Push arrow to the right */
}

#homepage-team .learn-more-btn:hover svg {
    /* background: rgba(255, 255, 255, 0.3); */
}

/* Simplified positioning - all popovers are centered over the image */
#homepage-team .team-grid .team-member-card .team-popover {
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
}

#homepage-team .team-grid .team-member-card:hover .team-popover {
    transform: translateX(-50%) translateY(-50%) scale(1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    #homepage-team .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #homepage-team .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    #homepage-team .team-popover {
        width: 280px;
    }
    
    /* Adjust main image size for mobile */
    #homepage-team .team-member-image {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    #homepage-team .team-grid {
        grid-template-columns: 1fr;
    }
    
    #homepage-team .team-popover {
        width: 90vw;
        max-width: 320px;
    }
    #homepage-team .team-member-image {
        width: 200px;
        height: 200px;
    }
}
/* ****** */

@media (max-width: 1130px) {

    #homepage-team {
        /* background-color: violet; */
        margin: 0 50px;
    }

    #team .wp-block-uagb-container.uagb-block-e6840104 {
    max-width: 100% !important;
    margin-left: 20px !important;
    margin-right: 20px !important;
    }
    .wp-block-uagb-container.uagb-block-e6bc50fc {
        padding-top: 0px;
        padding-bottom: 40px;
    }

    .wp-block-uagb-container.uagb-block-e684010 {
    margin-top: 0px !important;
    }
}

@media (max-width: 767px) {

    #team {
        margin: 0px;
        padding-top: 40px;
    }

    #homepage-team {
        /* background-color: orange; */
        margin: 0px;
    }

    #team .team-section-title {
        font-size: 40px;
    }

    #team .wp-block-uagb-container.uagb-block-e6840104 {
    max-width: 700px !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
    margin-top: 0px !important;
    }
}

@media (max-width: 330px) {
    #team .team-section-title {
        font-size: 30px;
    }
    #homepage-team {
        padding: 30px 0;
    }
    .wp-block-uagb-container.uagb-block-e6bc50fc {
        padding-top: 50px;
        padding-bottom: 40px;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}
/** EOF Team **/