.flip-card {
    perspective: 1000px;
}
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Handle vertical alignment */
.flip-content {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    padding: 20px;
}

/* Adjust rotation for back */
.flip-card-back {
    transform: rotateY(180deg);
}

/* Ensure front overlay covers content */
.flip-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.5;
    z-index: 1;
}

/* Ensure text stays above overlay */
.flip-content * {
    position: relative;
    z-index: 2;
}