.wp-card-grid {
    gap: 10px;
    padding: 6px;
}

/* Card container */
.wp-card-container {
    perspective: 1000px;
    width: 100%;
    height: 330px;
    overflow: hidden; /* Ensure content stays within the container */
}

/* Flip card styling */
.wp-card-flip {
    width: 100%;
    height: 100%;
    position: relative;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

/* Display the back side on hover with fade effect */
.wp-card-container:hover .wp-card-front {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.wp-card-container:hover .wp-card-back {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

/* Card front and back */
.wp-card-front, .wp-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    transition: opacity 0.6s ease-in-out;
}

/* Front side styling */
.wp-card-front {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
}

/* Back side styling */
.wp-card-back {
    background-color: #17153b;
    color: #fff;
    display: flex;
    flex-direction: column; /* Ensure vertical alignment */
    justify-content: start;
    align-items: start;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
}

/* Image on the front of the card */
.wp-card-front img {
    /* width:auto; */
    height: 70%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* Title styling */
.wp-card-front .wp-card-title {
    margin-top: 20px;
    font-size: 20px;
    text-align: start;
    color: #17153b;
    padding-left: 30px;
    padding-right: 30px;
}

/* Back side text styling */
.wp-card-back p {
    margin: 0;
    padding-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
    text-align: start;
}

.wp-card-back .back-heading {
    color: #f94f00;
    font-size: 18px;
    font-weight: bold;
}

/* Read more link styling */
.wp-flip-card-read-more-link {
    padding-left: 10px;
    padding-right: 10px;
    color: #f94f00;
    text-decoration: underline;
    display: block; 
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .wp-card-grid {
        gap: 10px;
        padding: 4px;
    }
    .wp-card-container {
        height: 330px;
    }

    .wp-card-front .wp-card-title {
        font-size: 18px;
    }
}
