/* Card styling to fit full width and grow with content */
.card {
    width: 100% !important;
    min-height: 500px; /* Fixed min height for consistency */
    display: flex;
    border: 1px solid #798645; 
    flex-direction: column;
    transform-style: preserve-3d;
    transition: transform 0.5s;
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Front and back panels */
.front, .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    backface-visibility: hidden;
}

/* Ensure .front grows with content */
.front {
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%; /* Grows with content */
    padding-bottom: 20px;
}

/* Back panel flipped to 180deg */
.back {
    transform: rotateY(180deg);
    z-index: 1;
}

/* Cover image styling */
.card .cover {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

    .card .cover img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ensures image fills the area */
    }

/* User profile */
.card .user {
    border-radius: 50%;
    height: 120px;
    width: 120px;
    margin: -60px auto 10px;
    overflow: hidden;
    border: 3px solid #798645;
}

    .card .user img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ensures proper fit */
    }

/* Content area with auto height */
.card .content {
    flex-grow: 1; /* Ensures the content area fills space */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card .name {
    font-size: 22px;
    line-height: 28px;
    margin: 10px 0;
    text-align: center;
    text-transform: capitalize;
}

.card .profession {
    color: #777;
    text-align: center;
    margin-bottom: 10px;
}