
.team-section {
    padding: 50px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.team-header {
    text-align: center;
    margin-bottom: 50px;
}

.team-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
}

.team-description {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
}

.team-grid {
    display: grid;
    /* Force 2 columns on desktop (min-width: 992px) by default or use minmax that fits 2 */
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;
    padding: 20px 30px; /* Extra padding for sticking out elements if needed */
}

.team-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 30px 30px 30px 0; /* Remove left padding, let image handle spacing */
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    margin-left: 60px; /* Space for the sticking out image */
    overflow: visible; /* CRITICAL: Allow image to be seen outside */
    position: relative;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.member-image-wrapper {
    flex: 0 0 140px;
    margin-left: -70px; /* Pull image left outside the card (half of 140px) */
    margin-right: 20px;
    position: relative;
    z-index: 10;
}

.member-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    background: #fff; /* Ensure no transparency issues */
}

.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.member-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.3;
}

.member-role {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f39c12;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.member-bio {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.member-contact {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #1a2b4c;
    color: #fff;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-link:hover {
    background: #f39c12;
    color: #fff;
}

.contact-link i {
    font-size: 1rem;
}

.email-link {
    display: inline-flex;
    align-items: center;
    color: #1a2b4c;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.email-link:hover {
    color: #f39c12;
}

.email-link span {
    margin-right: 8px;
}

.email-link i {
    font-size: 1rem;
}

@media (max-width: 991px) {
    .team-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .team-card {
        margin-left: 0;
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
        margin-top: 50px; /* Space for image on top */
    }
    
    .member-image-wrapper {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 20px;
        margin-top: -80px; /* Pull image up */
    }
    
    .member-contact {
        justify-content: center;
        flex-wrap: wrap;
    }
}
