.team-section {
    padding: 6rem 0;
    margin: 2rem 0;
    position: relative;
    z-index: 1;
}

.team-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.team-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.team-title h2 {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
    letter-spacing: 1px;
}

.team-subtitle {
    text-align: center;
    color: #cbd5e1;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.6;
    opacity: 0.9;
}

.team-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.team-tab-btn {
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
    min-width: 200px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    flex: 1 1 0;
    text-align: center;
}

.team-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    transition: left 0.6s ease;
    z-index: -1;
}

.team-tab-btn.active {
    color: white;
    border-color: transparent;
}

.team-tab-btn.active::before {
    left: 0;
}

.team-tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.team-tab-content {
    display: none;
    animation: fadeIn 0.6s ease;
}

.team-tab-content.active {
    display: block;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.team-member-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.team-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease;
}

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

.team-member-card:hover {
    transform: translateY(-10px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(124, 58, 237, 0.3);
}

.team-member-img {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.team-member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
}

.team-member-card:hover .team-member-img img {
    transform: scale(1.1);
}

.team-member-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(10, 14, 35, 0.8));
    pointer-events: none;
}

.team-member-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: rgba(10, 14, 35, 0.5);
}

.team-member-content h3 {
    margin-bottom: 1rem;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

.team-member-content h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    border-radius: 2px;
}

.team-member-role {
    color: #06b6d4;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-member-role i {
    font-size: 1.2rem;
}

.team-member-description {
    margin-bottom: 1.5rem;
    color: #cbd5e1;
    line-height: 1.7;
    flex-grow: 1;
    opacity: 0.9;
    font-size: 1rem;
}

.team-member-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
}

.team-member-skills span {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.team-member-skills span:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.team-department {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.team-department h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.team-department p {
    color: #cbd5e1;
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
}

.team-department--front p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.team-member-card:nth-child(odd) {
    animation: slideInFromLeft 0.6s ease forwards;
}

.team-member-card:nth-child(even) {
    animation: slideInFromRight 0.6s ease forwards;
}

@media (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .team-title h2 {
        font-size: 2.5rem;
    }
    .team-tabs {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .team-tab-btn {
        width: 100%;
        max-width: 300px;
    }
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .team-member-img {
        height: 250px;
    }
}

@media (max-width: 600px) {
    .team-section {
        padding: 4rem 0;
        margin: 1rem 0;
    }
    .team-container {
        padding: 0 1rem;
    }
    .team-tabs {
        padding: 1rem;
        border-radius: 20px;
    }
    .team-tab-btn {
        padding: 0.85rem 1.2rem;
        font-size: 0.95rem;
        min-width: 0;
    }
    .team-member-content {
        padding: 1.5rem;
    }
    .team-member-role {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .team-title h2 {
        font-size: 2rem;
    }
    .team-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    .team-member-content h3 {
        font-size: 1.5rem;
    }
    .team-member-img {
        height: 220px;
    }
    .team-member-description {
        font-size: 0.95rem;
    }
    .team-member-skills {
        gap: 0.6rem;
    }
    .team-member-skills span {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    .team-department {
        padding: 1.2rem;
    }
    .team-department h3 {
        font-size: 1.6rem;
    }
    .team-department p {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .team-title h2 {
        font-size: 1.7rem;
    }
    .team-member-content {
        padding: 1.2rem;
    }
    .team-member-role {
        font-size: 0.95rem;
    }
}
