/* Team Section Styles */
.team {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.team-header {
    text-align: center;
    margin-bottom: 60px;
}

.team-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    position: relative;
}

.team-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-purple);
}

.team-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.team-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(106, 13, 173, 0.15);
}

.team-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Team Image Link */
.team-image-link {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.team-image-link:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* Team Image */
.team-image {
    position: relative;


    background: linear-gradient(135deg, var(--primary-purple), #8B5FBF);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-image-link:hover .team-image {
    transform: scale(1.05);
}

/* Image Container */
.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Team Member Image */
.team-member-img {
    width: 100%;
    height: 100%;
        border-radius: 10px;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
}

.team-image-link:hover .team-member-img {
    transform: scale(1.1);
}

/* Fallback Image Placeholder */
.image-placeholder {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.team-image-link:hover .image-placeholder {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.image-placeholder svg {
    width: 80px;
    height: 80px;
    transition: all 0.3s ease;
}

.team-image-link:hover .image-placeholder svg {
    transform: scale(1.1);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(106, 13, 173, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.team-image-link:hover .image-overlay {
    opacity: 1;
    transform: translateY(0);
}

.image-overlay span {
    font-size: 1.1rem;
    text-align: center;
    padding: 0 20px;
}

/* Team Content */
.team-content {
    padding: 30px;
    text-align: center;
}

.team-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.team-position {
    font-size: 1rem;
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Team Social */
.team-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-icon:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(106, 13, 173, 0.3);
}

.social-icon:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* Staggered Animation Delays */
.team-card:nth-child(1) { transition-delay: 0.1s; }
.team-card:nth-child(2) { transition-delay: 0.2s; }
.team-card:nth-child(3) { transition-delay: 0.3s; }

/* Card Hover Effects Enhancement */
.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-purple), #8B5FBF);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 2;
}

.team-card:hover::before {
    transform: scaleX(1);
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
}

@media screen and (max-width: 768px) {
    .team {
        padding: 80px 0;
    }
    
    .team-title {
        font-size: 2rem;
    }
    
    .team-subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
    
    .team-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .team-content {
        padding: 25px;
    }
    
    .team-name {
        font-size: 1.3rem;
    }
    
    .team-image {
        height: 250px;
    }
    
    .image-overlay span {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .team {
        padding: 60px 0;
    }
    
    .team-title {
        font-size: 1.8rem;
    }
    
    .team-content {
        padding: 20px;
    }
    
    .team-image {
        height: 220px;
    }
    
    .team-name {
        font-size: 1.2rem;
    }
    
    .team-position {
        font-size: 0.9rem;
    }
    
    .team-description {
        font-size: 0.9rem;
    }
    
    .social-icon {
        width: 36px;
        height: 36px;
    }
    
    .social-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .image-overlay span {
        font-size: 0.9rem;
        padding: 0 15px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .team-card {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .team-card:hover {
        transform: none;
    }
    
    .social-icon:hover {
        transform: none;
    }
    
    .team-image-link:hover .team-image,
    .team-image-link:hover .team-member-img,
    .team-image-link:hover .image-placeholder,
    .team-image-link:hover .image-placeholder svg {
        transform: none;
    }
    
    .image-overlay {
        transition: none;
    }
}