/* General container for the members list */
.mpm-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(550px, 1fr));
    column-gap: 16px;
    row-gap: 24px;
    margin: 0 auto;
}

.mpm-member {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 8px;
}

.mpm-member:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.mpm-member-picture {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
    border-radius: 8px;
}

.mpm-member-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mpm-member:hover .mpm-member-picture img {
    transform: scale(1.05);
}

/* Placeholder picture with new red gradient */
.mpm-placeholder-picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2F80ED 0%, #2059A8 100%); /* Chosen Vibrant Blue gradient */
    color: white;
    font-size: 48px;
    font-weight: 600;
    text-transform: uppercase;
}

.mpm-member-content {
    flex: 1;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mpm-member-content h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.mpm-member-content p {
    margin: 0 0 10px 0;
    color: #6b7280;
    font-size: 15px;
    line-height: 1.5;
}

.mpm-member-content p:first-of-type {
    color: #2F80ED; 
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 12px;
}

.mpm-member-content p:nth-of-type(2),
.mpm-member-content p:nth-of-type(3) {
    color: #374151;
    font-size: 14px;
}

.mpm-member-content p:last-child {
    margin-bottom: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* Research section styling with new primary red border */
.mpm-member-content p:nth-last-child(2) {
    color: #374151;
    font-style: italic;
    padding-left: 12px;
    margin: 16px 0;
}

.mpm-members-header {
    grid-column: 1 / -1; 
    margin-bottom: 32px;
}

.mpm-search-container {
    background-color: white;
    border-radius: 16px;
    padding: 8px;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mpm-search-container input {
    border: none;
    padding: 4px;
    font-size: 16px;
    width: 200px;
    outline: none;
}

/* Search button with new primary red color */
.mpm-search-button {
    background-color: #2059A8; /* Primary red */
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

/* Search button hover state with darker red */
.mpm-search-button:hover {
    background-color: #1a4a8c; /* Darker shade of primary red */
}

#mpm-members-message {
    display: none;
    text-align: center;
    grid-column: 1 / -1; /* Ensure message spans full width in grid */
    font-size: 18px;
    color: #6b7280;
    margin-top: 16px;
}

.mpm-category-label{
    border: 1px solid #e5e7eb; /* Light gray border */
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mpm-category-label:hover {
    background-color: #f3f4f6; /* Light gray background on hover */
}

.mpm-category-radio{
    display: none; /* Hide the radio button */
}

.mpm-category-label:has(.mpm-category-radio:checked) {
    background-color: #2059A8; /* Primary red when checked */
    color: white; /* Change text color to white when checked */
}

.mpm-category-filter{
    display: flex;
    flex-direction: row;
    column-gap: 8px;
    margin-top: 12px;
    align-items: center;
}


/* Responsive design */
@media (max-width: 768px) {
    .mpm-members {
        grid-template-columns: 1fr; /* Stack members vertically on small screens */
    }

    .mpm-member {
        flex-direction: column; /* Stack content vertically within each card */
    }
    
    .mpm-member-picture {
        width: 100%;
        height: 250px;
        border-radius: 8px 8px 0 0; /* Adjust border-radius for stacked layout */
    }
    
    .mpm-member-content {
        padding: 20px;
        text-align: center; /* Center text when stacked */
    }
    
    .mpm-member-content h3 {
        font-size: 22px;
        text-align: center;
    }
    
    .mpm-member-content p:first-of-type,
    .mpm-member-content p:nth-last-child(2) { /* Re-center these specific paragraphs */
        text-align: center;
        padding-left: 0; /* Remove left padding for research border */
        border-left: none; /* Remove border for research section */
    }

    .mpm-member-contact {
        align-items: center; /* Center contact icons */
    }
}

@media (max-width: 480px) {
    .mpm-members {
        padding: 10px;
        gap: 15px;
    }
    
    .mpm-member-picture {
        height: 200px;
    }
    
    .mpm-member-content {
        padding: 16px;
    }
    
    .mpm-member-content h3 {
        font-size: 20px;
    }
}

/* Additional styling for contact info */
.mpm-member-contact {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 16px;
    margin: 12px 0;
}
