/* ==============================================
   TEAM PAGE SPECIFIC STYLES
   ============================================== */

/* Team line animation */
.team-line {
    transform: scaleX(0);
    transform-origin: center;
    animation: growFromCenter 1.5s ease-out forwards;
    animation-delay: 0.5s; /* Delay to let the heading appear first */
}

@keyframes growFromCenter {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Team heading animation */
.team-heading {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Team member cards styling */
.team-card {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(36, 50, 75, 0.15);
}

/* Team member profile images */
.team-avatar {
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background-color: #f3f4f6;
}

.team-card:hover .team-avatar {
    border-color: var(--accent-brown);
    transform: scale(1.05);
}

/* Team member info styling */
.team-name {
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

.team-card:hover .team-name {
    color: var(--accent-brown);
}

.team-designation {
    color: var(--grey-text);
    transition: all 0.3s ease;
}

.team-card:hover .team-designation {
    color: var(--dark-text);
}

/* Email icon styling */
.team-email-icon {
    color: var(--accent-brown);
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.team-email-icon:hover {
    color: var(--primary-blue);
    transform: scale(1.2);
}

/* Section headings for team categories */
.team-section-heading {
    color: var(--primary-blue);
    position: relative;
    display: inline-block;
}

.team-section-heading::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--accent-brown);
    border-radius: 2px;
}

/* Team line styling */
.team-line-bg {
    background-color: var(--accent-brown);
}

/* Team heading color */
.team-heading-color {
    color: var(--primary-blue);
}

/* Team grid layout enhancements */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/* Staggered animation for team cards */
.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; }

/* Card entrance animation */
.team-card-enter {
    opacity: 0;
    transform: translateY(30px);
    animation: teamCardEnter 0.8s ease-out forwards;
}

@keyframes teamCardEnter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Team page background elements */
.team-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(36, 50, 75, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(183, 127, 88, 0.03) 0%, transparent 50%);
    z-index: -1;
}

/* Team member count badges */
.team-count-badge {
    display: inline-block;
    background: var(--accent-brown);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Responsive team grid */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }
    
    .team-line {
        height: 2px; /* Thinner line on mobile */
    }
    
    .team-heading {
        font-size: 2.5rem; /* Smaller heading on mobile */
    }
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .team-card {
        max-width: 100%;
    }
}

/* Team page specific loading states */
.team-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.team-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-grey);
    border-top: 4px solid var(--accent-brown);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Team member interaction states */
.team-card:focus-within {
    outline: 2px solid var(--accent-brown);
    outline-offset: 2px;
}

.team-card:focus-within .team-avatar {
    border-color: var(--accent-brown);
}

/* Additional hover effects for team cards */
.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(36, 50, 75, 0.05) 0%, 
        rgba(183, 127, 88, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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