
:root {
    --card-height: 320px;
    --card-width: 280px; 
}


body {
    padding-top: 50px; 
}

/* --- Team Page Header --- */
.team-hero-unit {
    background: linear-gradient(rgba(11, 11, 11, 0.85), rgba(11, 11, 11, 0.85)), url('https://via.placeholder.com/1920x400.png?text=Team+Background') no-repeat center center;
    background-size: cover;
    padding: 100px 0;
    color: var(--white); 
}
.team-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--white) !important; 
    text-shadow: 0 2px 8px rgba(0,0,0,0.5); 
}
.team-hero-sub {
    font-size: 1.25rem;
    color: var(--light-gray);
    max-width: 700px;
    margin: 1rem auto 0;
    opacity: 0.9;
}
/* --- End of Header --- */


#mainNav {
    z-index: 1056;
}

#team {
    overflow-x: hidden;
    position: relative; 
}

/* Team Grid Layout */
.team-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    position: relative; 
    z-index: 2; 
    padding-left: 100px; 
}

.team-row-1, .team-row-2, .team-row-3 {
    display: grid;
    gap: 1.5rem;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, var(--card-width));
}

/* Team Card Flip Effect */
.team-card {
    background-color: transparent;
    width: var(--card-width); 
    height: var(--card-height);
    perspective: 1000px;
    
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    will-change: transform;
}

.team-card:hover .team-card-inner {
    transform: rotateY(180deg);
}

.team-card-front, .team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-shadow: none; /* Force remove it */
    -webkit-backface-visibility: hidden; /* Ensure this is set */
    backface-visibility: hidden;
}

.team-card-front {
    background-color: var(--white);
    border: 1px solid #eee;
}

.team-card-back {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url(/images/team\ card.jpg);
    background-size: cover;
    background-position: center;
    color: var(--white);
    transform: rotateY(180deg);
}

.team-img {
    width: 200px;
    height: 240px;
    border-radius: 40%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 4px solid var(--red);
    box-shadow: 0 0 0 5px rgba(225,27,27,0.1);
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--black);
    margin-bottom: 5px;
}

.team-card-back .team-name {
    color: var(--white);
}

.team-title {
    color: var(--muted);
    font-size: 0.9rem;
}

.team-batch {
    font-size: 1rem;
    margin-bottom: 15px;
}

.team-card-back .social-icons {
    display: flex;
    gap: 15px;
}

.team-card-back .social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.team-card-back .social-icons a:hover {
    color: var(--red);
    transform: translateY(-3px);
}

/* Vertical Wavy Thread Animation */
.vertical-thread-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1; 
}

.vertical-thread-svg {
    width: 100%;
    height: 100%;
}

.vertical-thread-svg path {
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    filter: drop-shadow(0 0 10px rgba(225, 27, 27, 0.3));
}

/* Responsive adjustments for mobile */
@media (max-width: 767px) {
    :root {
        --card-height: 280px; 
    }
    
    .team-grid {
        padding-left: 65px;
        padding-right: 15px; 
    }

    .team-row-1, .team-row-2, .team-row-3 {
        grid-template-columns: repeat(2, 1fr); 
        gap: 1rem; 
    }

    .team-card {
        width: 100%; 
        height: var(--card-height);
    }

    .team-img {
        width: 130px;
        height: 130px;
        margin-bottom: 10px;
    }

    .team-name {
        font-size: 1rem;
    }

    .team-title {
        font-size: 0.8rem;
    }

    .team-batch {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .team-card-back .social-icons a {
        font-size: 1.2rem;
    }
}