/* ===================================
   TEAM SECTION - PREMIUM DESIGN
   =================================== */

.team-section {
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 50%, var(--bg-white) 100%);
    position: relative;
}

.team-section .section-header {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-xxl);
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-top: var(--spacing-md);
    margin-bottom: 0;
}

/* ===================================
   TEAM GRID
   =================================== */

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* ===================================
   TEAM CARD - PREMIUM DESIGN
   =================================== */

.team-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-slow);
    position: relative;
    display: flex;
    flex-direction: column;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hard);
}

.team-card:hover::before {
    transform: scaleX(1);
}

/* ===================================
   TEAM IMAGE WITH OVERLAY
   =================================== */

.team-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--primary-dark-grey);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    filter: grayscale(20%);
}

.team-card:hover .team-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* Elegant overlay on hover */
.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 26, 26, 0.7) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--spacing-md);
}

.team-card:hover .team-overlay {
    opacity: 1;
}

/* Social icons in overlay */
.team-social {
    display: flex;
    gap: 12px;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.team-card:hover .team-social {
    transform: translateY(0);
}

.team-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: var(--primary-gold);
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.team-social a:hover {
    background: var(--gold-gradient);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(217, 180, 95, 0.4);
}

/* ===================================
   TEAM INFO
   =================================== */

.team-info {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex: 1;
}

.team-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}

.team-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    line-height: 1.4;
}

.team-bio {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin: var(--spacing-xs) 0;
    flex: 1;
}

/* ===================================
   TEAM CREDENTIALS
   =================================== */

.team-credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: var(--spacing-sm);
    border-top: 1px solid rgba(217, 180, 95, 0.1);
}

.credential {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(217, 180, 95, 0.08);
    color: var(--text-medium);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid rgba(217, 180, 95, 0.2);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.team-card:hover .credential {
    background: rgba(217, 180, 95, 0.12);
    border-color: rgba(217, 180, 95, 0.3);
    transform: translateY(-2px);
}

/* ===================================
   RESPONSIVE GRID
   =================================== */

@media (min-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-xl);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (max-width: 767px) {
    .team-section {
        padding: var(--spacing-xl) 0;
    }
    
    .team-section .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        max-width: 500px;
        margin: 0 auto;
    }
    
    .section-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .team-section {
        padding: var(--spacing-lg) 0;
    }
    
    .team-grid {
        gap: var(--spacing-md);
    }
    
    .team-info {
        padding: var(--spacing-md);
    }
    
    .team-name {
        font-size: 1.25rem;
    }
    
    .team-title {
        font-size: 0.9rem;
    }
    
    .team-bio {
        font-size: 0.9rem;
    }
}

/* ===================================
   STAGGERED ANIMATIONS
   =================================== */

.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; }

/* Reset animation on mobile for better performance */
@media (max-width: 767px) {
    .team-card {
        animation-delay: 0s !important;
    }
    
    .team-card:nth-child(n+3) {
        animation-delay: 0.1s !important;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .team-card,
    .team-image img,
    .team-social,
    .credential {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
    }
    
    .team-card:hover,
    .team-social a:hover,
    .team-card:hover .credential {
        transform: none !important;
    }
}

/* Focus states for keyboard navigation */
.team-social a:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}
