.card-container {
    width: 65%;
    margin: 0 auto;
    perspective: 1000px;
}


.card-container .row {
    margin-bottom: 30px;
}

.card {
    height: 40vh;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

/* .card-shorter {
    height: 35vh;
} */

@media (max-width: 768px) {
    .card-container {
        width: 95%;
        /* Full width on smaller screens */
    }

    .card {
        /* add space between cards */
        margin-bottom: 30px;
        height: 45vh;
    }

    .card-shorter {
        height: 40vh;
    }

    .card-container .row {
        margin-bottom: 0;
    }
}

/* Inner Card Style (for flipping effect) */
.card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    transform-origin: center;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    padding: 10px 15px;
    flex-direction: column;
    /* Keeps items in a vertical stack */
    justify-content: flex-start;
    /* Aligns items to the start of the flex container (top) */
    align-items: center;
    /* Centers items horizontally */
}

.card-title {
    width: 100%;
    /* Ensures the title spans the full width of the card */
    font-weight: bold;
    font-size: 26px;
    text-align: center;
    /* Keeps the title text centered */
}

.card-bio {
    width: 100%;
    /* Ensures the bio spans the full width of the card */
    padding: 0;
    font-size: 18px;
    text-align: center;
    /* Keeps the bio text centered */
}

.card:hover,
.card:active {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.card-back {
    transform: rotateY(180deg);
    align-items: normal;
    text-wrap: normal;
    overflow-y: auto;
}


@media screen and (max-width: 768px) {
    .card-flipped .card-inner {
        transform: rotateY(180deg);
    }

}

@media screen and (min-width: 768px) {

    .card:hover .card-inner,
    .card:active .card-inner {
        transform: rotateY(180deg);
    }

}

@-moz-document url-prefix() {

    .card:hover .card-front,
    .card:active .card-front {
        opacity: 0;
    }

    .card-back {
        opacity: 0;
    }

    .card-front,
    .card-back {
        transition: transform 0.6s, opacity 0.2s ease-in;
        opacity: 1;
        /* Ensure the opacity is fully opaque when visible */
    }

    .card-front {
        transition: transform 0.6s, opacity 0.2s ease-in;
        opacity: 1;
        /* This ensures the card front becomes visible again */
    }
}


.card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Adjusts to ensure the whole image is visible */
    border-radius: 8px;
}