.flippy {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;

    &:hover {
        cursor: alias;
    }
}

.flip-container {
    perspective: 1000px;
    height: 100%;
}

.flipper {
    position: relative;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.4s;
    transform-origin: center;
}

.flip-container:hover .flipper {
    transform: rotateY(180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.front img, .back img {
    border-radius: 0.375rem;
    height: auto;
    max-width: 100%;
}

.back {
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.back img {
    transform: scaleX(-1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.95;
    border-radius: 0.375rem;
    z-index: 1;
}

.back-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Ensure the back-content fills its parent */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space between items */
    align-items: center;
    text-align: center;
    color: white;
    z-index: 2; /* Ensure the text content is on top of the overlay */
}

.back-content::not(a) {
    pointer-events: none; /* Ensure the content does not interfere with hover */
}

.back-content-bottom a {
    text-decoration: none;
    color: inherit;
}

.back-content .back-content-bottom a:hover {
    cursor: pointer;
}