/* Team Page Styling */

/* Team Grid */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.team-grid .team-card {
    flex: 0 0 auto;
    width: 340px;
}

/* Team Card */
.team-card {
    background: var(--surface-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26, 51, 41, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(45, 125, 110, 0.08);
    position: relative;
    cursor: pointer;
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(26, 51, 41, 0.15);
    border-color: var(--primary-color);
}

/* Team Photo */
.team-photo {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-photo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 51, 41, 0.2) 100%);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.05);
}

/* Placeholder for cards without photos */
.team-photo:not(:has(img))::before {
    content: '👤';
    font-size: 4rem;
    z-index: 1;
    position: relative;
    opacity: 0.5;
}

/* Team Info */
.team-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.team-info h3 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-dark);
}

/* Team Role */
.team-role {
    margin: 0;
    font-size: 0.938rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.375rem 0.75rem;
    background: rgba(45, 125, 110, 0.1);
    border-radius: 6px;
    display: inline-block;
    align-self: flex-start;
}

/* Team Bio */
.team-bio {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 0.938rem;
    flex: 1;
}

/* Team Contact */
.team-contact {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(45, 125, 110, 0.1);
    font-size: 0.875rem;
}

.team-contact .material-icons {
    font-size: 1.125rem;
    color: var(--primary-color);
}

.team-contact a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    word-break: break-all;
}

.team-contact a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--surface-light);
    border-radius: 12px;
    color: var(--text-muted);
}

.no-results p {
    margin: 0;
    font-size: 1.125rem;
}

/* Team Modal */
.team-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(26, 51, 41, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.team-modal-content {
    background-color: var(--surface-white);
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(26, 51, 41, 0.3);
    width: 90%;
    max-width: 900px;
    position: relative;
    animation: slideDown 0.3s ease;
}

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

.team-modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-light);
    transition: all 0.2s ease;
}

.team-modal-close:hover,
.team-modal-close:focus {
    background: var(--primary-color);
    color: var(--surface-white);
    transform: rotate(90deg);
}

.team-modal-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.team-modal-photo {
    flex-shrink: 0;
    width: 300px;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(26, 51, 41, 0.15);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.team-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.team-modal-info h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-dark);
}

.team-modal-role {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.625rem 1rem;
    background: rgba(45, 125, 110, 0.1);
    border-radius: 8px;
    display: inline-block;
    align-self: flex-start;
}

.team-modal-bio,
.team-modal-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.team-modal-bio h3,
.team-modal-contact h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 2px solid rgba(45, 125, 110, 0.2);
    padding-bottom: 0.5rem;
}

.team-modal-bio p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1rem;
}

.team-modal-contact p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1rem;
}

.team-modal-contact .material-icons {
    font-size: 1.375rem;
    color: var(--primary-color);
}

.team-modal-contact a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.team-modal-contact a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .team-grid {
        gap: 1.5rem;
    }

    .team-grid .team-card {
        width: 250px;
    }

    .team-photo {
        height: 180px;
    }

    .team-info {
        padding: 1.25rem;
    }

    .team-info h3 {
        font-size: 1.125rem;
    }

    .team-modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .team-modal-body {
        flex-direction: column;
        padding: 1.5rem;
    }

    .team-modal-photo {
        width: 100%;
        height: 300px;
    }

    .team-modal-info h2 {
        font-size: 1.625rem;
    }

    .team-modal-close {
        right: 1rem;
        top: 1rem;
    }
}

@media (max-width: 640px) {
    .team-grid .team-card {
        width: 100%;
        max-width: 320px;
    }

    .team-photo {
        height: 220px;
    }

    .team-modal-content {
        margin: 2% auto;
    }

    .team-modal-body {
        padding: 1rem;
    }

    .team-modal-photo {
        height: 250px;
    }
}
