/* ========================================= */
/*       CACTI INDUSTRIES — TEAM PAGE        */
/*       FINAL POLISHED DROP-IN VERSION      */
/* ========================================= */

.team-page {
    padding-top: 50px;
    text-align: center;
    font-family: poppins, sans-serif;
    background: #101010;
    color: #ffffff;
    min-height: 100vh;
}

.team-page h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.team-subtitle {
    opacity: 0.75;
    font-size: 18px;
    margin-bottom: 55px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, auto));
    justify-content: center; /* centers the entire grid */
    justify-items: center;    /* centers items inside grid cells */
    align-items: start;
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 80px;
}


/* ========================================= */
/*               CARD STRUCTURE              */
/* ========================================= */

.team-card {
    width: 300px;
    height: 420px;
    perspective: 1200px;
    border-radius: 20px;
}

.team-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.65s ease;
    transform-style: preserve-3d;
}

.team-card.flipped .team-card-inner {
    transform: rotateY(180deg);
}

.team-card.flipped .team-card-front {
    pointer-events: none;
}

/* ========================================= */
/*                  CARD SIDES               */
/* ========================================= */

.team-card-front,
.team-card-back {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    background: #000;
    box-shadow:
        0 12px 25px rgba(0,0,0,0.35),
        0 30px 60px rgba(0,0,0,0.45);
}

/* PHOTO — FULL BLEED IMAGE */
.team-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
}

/* ========================================= */
/*             NAME OVERLAY AREA             */
/* ========================================= */

.team-info-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 18px 18px 22px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.25) 8%,
        rgba(0, 0, 0, 0.45) 15%,
        rgba(0, 0, 0, 0.65) 22%,
        rgba(0, 0, 0, 0.78) 32%,
        rgba(0, 0, 0, 0.88) 50%,
        rgba(0, 0, 0, 0.95) 70%,
        rgba(0, 0, 0, 1) 100%
    );
}

.team-info-overlay h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.team-info-overlay p {
    margin: 4px 0 14px;
    font-size: 15px;
    opacity: 0.9;
}

/* ========================================= */
/*                 BUTTONS                   */
/* ========================================= */

.team-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LINKEDIN BUTTON */
.linkedin-btn {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 8px;
    color: black;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    line-height: 36px;
    text-decoration: none;
    transition: 0.25s ease;
}

.linkedin-btn:hover {
    background: #dcdcdc;
}

/* BIO BUTTON */
.flip-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.25s ease;
}

.flip-btn:hover {
    background: rgba(255,255,255,0.28);
}

/* ========================================= */
/*                CARD BACK                  */
/* ========================================= */

.team-card-back {
    background: #1a1a1a;
    transform: rotateY(180deg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* SCROLLABLE BIO */
.bio-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

/* Scrollbar styling */
.bio-scroll::-webkit-scrollbar {
    width: 6px;
}

.bio-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
}

.bio-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

/* BACK BUTTON */
.flip-btn-back {
    margin-top: 12px;
    padding: 7px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    cursor: pointer;
    align-self: center;
}

.flip-btn-back:hover {
    background: rgba(255,255,255,0.28);
}

/* ========================================= */
/*                RESPONSIVE                 */
/* ========================================= */

@media (max-width: 600px) {
    .team-card {
        width: 88%;
        max-width: 350px;
        height: 450px;
    }

    .team-page h1 {
        font-size: 34px;
    }
}
/* ========================================= */
/*           FADE-IN ANIMATION EFFECT        */
/* ========================================= */

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(25px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply to each card */
.team-card {
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

/* Staggered timing for a premium effect */
.team-card:nth-child(1) { animation-delay: 0.1s; }
.team-card:nth-child(2) { animation-delay: 0.25s; }
.team-card:nth-child(3) { animation-delay: 0.4s; }
.team-card:nth-child(4) { animation-delay: 0.55s; }
.team-card:nth-child(5) { animation-delay: 0.7s; }
.team-card:nth-child(6) { animation-delay: 0.85s; }
.team-card:nth-child(7) { animation-delay: 1.0s; }
.team-card:nth-child(8) { animation-delay: 1.15s; }

/* Add more if more cards are added later */


