/* ============================================ */
/* COMPACT TEAM CARD (Smaller Front) */
/* ============================================ */

.team-card-compact {
    background: #f7f7f7;
    border: 1px solid hsl(215, 20%, 90%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.team-card-compact:hover {
    /* border-color: rgba(223, 172, 42, 0.4); */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* transform: translateY(-4px); */
}

/* Front Content - Smaller */
.team-card-compact-front {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Image - Smaller Square */
.team-compact-image {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    border: 2px solid rgba(223, 172, 42, 0.5);
    overflow: hidden;
    margin-bottom: 1rem;
}

.team-compact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* Name - Smaller */
.team-compact-name {
    font-size: 25px;
    font-weight: 600;
    color: hsl(215, 55%, 14%);
    margin-bottom: 0.25rem;
}

/* Job Title - Smaller */
.team-compact-title {
    color: #2f744c;
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* Short Bio - Smaller */
.team-compact-bio {
    color: hsl(215, 25%, 42%);
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Read Bio Button */
.team-compact-btn {
    background: #005030;
    border: none;
    color: #e6bd56;
    font-size: 17px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.team-compact-btn:hover {
    background: #008045;
    transform: scale(1.02);
}

/* ============================================ */
/* MODAL POPUP - FIXED Z-INDEX */
/* ============================================ */

.team-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999999;
    align-items: center;
    justify-content: center;
}

.team-modal.active {
    display: flex;
}

.team-modal-content {
    background: white;
    border-radius: 1rem;
    /* max-width: 1100px; */
    width: 90%;
    /* max-height: 90vh; */
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
    position: relative;
    z-index: 99999999;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.team-modal-header {
    background: linear-gradient(135deg, #005030, #0a0a0a);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.team-modal-name {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.team-modal-title {
    color: #e6bd56;
    font-size: 0.8rem;
}

.team-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.team-modal-close:hover {
    opacity: 0.7;
}

/* Modal Body */
.team-modal-body {
    margin-top: 1.5rem;
    overflow-y: auto;
    /* max-height: calc(85vh - 80px); */
}

.team-modal-bio {
    /* font-size: 0.9rem; */
    line-height: 1.6;
    color: hsl(215, 25%, 38%);
    margin-bottom: 1.5rem;
}

.team-modal-bio p {
    margin-bottom: 1rem;
    /* font-size: 0.9rem; */
}

/* Certifications */
.team-modal-certs {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid hsl(215, 20%, 90%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.team-modal-cert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: hsl(215, 30%, 40%);
    font-size: 0.85rem;
}

.team-modal-cert i {
    color: #2f744c;
    font-size: 0.9rem;
    width: 1.25rem;
}

/* Contact Info */
.team-modal-contact {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid hsl(215, 20%, 90%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.team-modal-contact a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: hsl(215, 25%, 42%);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.team-modal-contact a:hover {
    color: #dfac2a;
}

.team-modal-contact i {
    color: #2f744c;
    font-size: 0.9rem;
    width: 1.25rem;
}

/* When modal is open, ensure it's on top of everything */
body.modal-open .team-card-compact {
    z-index: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .team-compact-image {
        width: 120px;
        height: 120px;
    }
    
    .team-compact-name {
        font-size: 1.1rem;
    }
    
    .team-compact-title {
        font-size: 0.75rem;
    }
    
    .team-compact-bio {
        font-size: 0.7rem;
    }
    
    .team-modal-content {
        width: 95%;
    }
}