/* css/team.css */
/* Team Page Specific Styles with Advanced Animations */

/* Page Header with Particle Background */
.team-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 6rem 0 4rem;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.team-header .page-header-content {
    position: relative;
    z-index: 2;
}

/* Animated Particles */
.header-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatParticle 8s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 10px;
    height: 10px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 15px;
    height: 15px;
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    width: 8px;
    height: 8px;
    bottom: 30%;
    left: 20%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    width: 12px;
    height: 12px;
    top: 40%;
    right: 25%;
    animation-delay: 3s;
}

.particle:nth-child(5) {
    width: 6px;
    height: 6px;
    bottom: 20%;
    right: 10%;
    animation-delay: 4s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-10px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(10px) translateX(15px) rotate(270deg);
        opacity: 0.5;
    }
}

/* Team Navigation */
.team-nav {
    background: var(--light);
    padding: 2rem 0;
    position: sticky;
    top: 70px;
    z-index: 90;
    backdrop-filter: blur(10px);
}

.team-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.4s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--white);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(13, 71, 161, 0.3);
}

/* Team Statistics */
.team-stats {
    padding: 4rem 0;
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.stat-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 30px rgba(13, 71, 161, 0.4);
}

.stat-icon i {
    font-size: 2rem;
    color: var(--white);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.stat-card:hover h3 {
    color: var(--secondary);
}

.stat-card p {
    color: var(--gray);
    font-weight: 500;
    font-size: 1.1rem;
}

/* Main Team Grid */
.team-main {
    padding: 5rem 0;
    background: var(--light);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.team-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    animation: teamCardAppear 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; }
.team-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes teamCardAppear {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.team-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.card-inner {
    position: relative;
    z-index: 2;
}

.card-front {
    position: relative;
}

.team-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover .image-overlay {
    opacity: 1;
}

.team-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.team-info {
    padding: 2rem;
}

.team-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    transition: color 0.3s ease;
}

.team-card:hover .team-info h3 {
    color: var(--primary);
}

.specialty {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.experience {
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.team-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.team-skills span {
    background: rgba(13, 71, 161, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.team-card:hover .team-skills span {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.team-actions {
    padding: 0 2rem 2rem;
}

.view-profile {
    width: 100%;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.view-profile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.4s ease;
    z-index: -1;
}

.view-profile:hover::before {
    left: 0;
}

.view-profile:hover {
    color: var(--white);
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(13, 71, 161, 0.3);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
    z-index: 1;
}

.team-card:hover .card-glow {
    opacity: 0.05;
}

/* Team Member Modal */
.team-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    animation: modalAppear 0.3s ease;
}

.team-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: 25px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--danger);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 1.2rem;
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: #c82333;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.modal-body {
    padding: 3rem;
}

/* Team Values Section */
.team-values {
    padding: 5rem 0;
    background: var(--white);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-item {
    background: var(--light);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    transition: left 0.4s ease;
    z-index: 1;
}

.value-item:hover::before {
    left: 0;
}

.value-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.value-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.value-item:hover .value-icon {
    transform: scale(1.1) rotate(10deg);
    background: var(--white);
}

.value-icon i {
    font-size: 2rem;
    color: var(--white);
    transition: color 0.3s ease;
}

.value-item:hover .value-icon i {
    color: var(--primary);
}

.value-item h3 {
    margin-bottom: 1rem;
    color: var(--dark);
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.value-item:hover h3 {
    color: var(--white);
}

.value-item p {
    color: var(--gray);
    line-height: 1.6;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.value-item:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* Filter Animation */
.team-card.hide {
    animation: cardDisappear 0.4s ease forwards;
}

@keyframes cardDisappear {
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
}

.team-card.show {
    animation: cardReappear 0.4s ease forwards;
}

@keyframes cardReappear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading Animation */
.modal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .team-header {
        padding: 5rem 0 3rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-filter {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .team-info {
        padding: 1.5rem;
    }
    
    .team-actions {
        padding: 0 1.5rem 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 2rem 1.5rem;
    }
}

/* 3D Card Flip Animation (Optional Enhancement) */
.team-card.flip .card-inner {
    transform: rotateY(180deg);
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    color: var(--white);
    padding: 2rem;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Focus States for Accessibility */
.filter-btn:focus,
.view-profile:focus,
.modal-close:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* Smooth Scrolling for Team Section */
.team-main {
    scroll-margin-top: 100px;
}