/* Sober Team Display Styles */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.1em;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Team Grid Layout - Optimized for two main groups */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 2rem 0;
    min-height: 200px;
    align-items: start;
}

/* Team Category Sections - Improved spacing */
.team-category {
    margin-bottom: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* First category (Coordination) takes less space */
.team-category:first-child {
    grid-column: 1;
}

/* Second category (Technical team) takes more space */
.team-category:last-child {
    grid-column: 2;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #dee2e6;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title .member-count {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6c757d;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #495057;
    border-radius: 1px;
}

/* Team Members Grid - Optimized for better space usage */
.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

/* Individual Team Member Cards - Optimized */
.team-member {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #6c757d;
}

.team-member:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #adb5bd;
}

.team-member strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.team-member .email {
    color: #4a5568;
    font-size: 0.95rem;
    margin: 0.5rem 0;
    word-break: break-word;
}

/* Social Links Styling */
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid;
}

.social-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* LinkedIn specific styling */
.linkedin-link {
    color: #0077b5;
    border-color: #0077b5;
}

.linkedin-link:hover {
    background: #0077b5;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.3);
}

/* Escavador specific styling */
.escavador-link {
    color: #2d5aa0;
    border-color: #2d5aa0;
}

.escavador-link:hover {
    background: #2d5aa0;
    color: white;
    box-shadow: 0 2px 8px rgba(45, 90, 160, 0.3);
}

/* Role Badge Styling */
.role-badge {
    display: inline-block;
    background: #495057;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0.75rem 0 0.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: none;
}

.role-badge:hover {
    background: #343a40;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Consistent styling for all team categories */
.team-category .team-member::before {
    background: #6c757d;
}

.team-category .role-badge {
    background: #495057;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.team-category .role-badge:hover {
    background: #343a40;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Loading Animation */
.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #6c757d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Compact layout for categories with many members */
.team-category.compact .team-members {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.team-category.compact .team-member {
    padding: 1.25rem;
    min-height: 120px;
}

.team-category.compact .team-member strong {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.team-category.compact .role-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    margin: 0.5rem 0 0.25rem 0;
}

/* Special styling for single-member categories */
.team-category.single-member .team-members {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

.team-category.single-member .team-member {
    text-align: center;
    padding: 2rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .team-category:first-child,
    .team-category:last-child {
        grid-column: 1;
    }
    
    .team-category {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .team-members {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .team-member {
        padding: 1.25rem;
        border-radius: 8px;
        min-height: auto;
    }
    
    .team-member strong {
        font-size: 1.1rem;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .role-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .team-member {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .team-member strong {
        font-size: 1rem;
    }
    
    .team-member .email {
        font-size: 0.9rem;
    }
    
    .category-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    .team-member {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    .role-badge {
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #ccc;
    }
}
