/* Team Section Styles */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: start;
}

@media (min-width: 640px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.team-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background-color: white;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.team-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f3f4f6;
}

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.team-card:hover .team-image {
    transform: scale(1.05);
}

.team-info {
    margin-top: 12px;
    padding: 0 4px;
}

.team-name {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #111827;
}

.team-role {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Loading states for images */
.team-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.team-image-container img {
    position: relative;
    z-index: 2;
}

.team-image-container img.loaded::before {
    display: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-grid {
        gap: 16px;
    }
    
    .team-card {
        padding: 8px;
    }
    
    .team-info {
        margin-top: 8px;
    }
    
    .team-name {
        font-size: 15px;
    }
    
    .team-role {
        font-size: 13px;
    }
}

/* Focus states for accessibility */
.team-card:focus-within {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Animation for staggered loading */
.team-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.team-card:nth-child(1) { animation-delay: 0.1s; }
.team-card:nth-child(2) { animation-delay: 0.2s; }
.team-card:nth-child(3) { animation-delay: 0.3s; }
.team-card:nth-child(4) { animation-delay: 0.4s; }
.team-card:nth-child(5) { animation-delay: 0.5s; }
.team-card:nth-child(6) { animation-delay: 0.6s; }
.team-card:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .team-card {
        animation: none;
        opacity: 1;
    }
    
    .team-card,
    .team-image {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .team-card {
        border-width: 2px;
        border-color: #000;
    }
    
    .team-name {
        color: #000;
    }
    
    .team-role {
        color: #333;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .team-card {
        background-color: #1f2937;
        border-color: #374151;
    }
    
    .team-name {
        color: #f9fafb;
    }
    
    .team-role {
        color: #d1d5db;
    }
    
    .team-image-container {
        background-color: #374151;
    }
}