.card {
    perspective: 1000px;
}

.card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card:hover .card-inner {
    transform: rotateY(180deg);
    background-color: #C3A38B;
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: relative;
    backface-visibility: hidden;
}

.card-front {
    z-index: 2;
}

.card-back {
    z-index: 1; /* Ensure back face appears behind front face */
    transform: rotateY(180deg);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center; /* Align vertically */
}

.card-body {
    padding: 1.25rem;
}

.image-container {
    position: relative;
    text-align: center;
}

.image-container p {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.card-title {
    font-size: 25px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-height: 60px; /* Establece la altura máxima para dos líneas */
    overflow: hidden; /* Oculta cualquier exceso de texto */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita a dos líneas */
    -webkit-box-orient: vertical;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-left {
    animation: slideInLeft 1s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 1s ease forwards;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade {
    animation: fadeIn 3s ease forwards;
}