/* --- Octagon Insights - 3D Flip Effect for a8c/blog-posts block (Final Version) --- */

/* 1. Set up the 3D space on each individual post item */
.insights-hover-effect .wp-block-a8c-blog-posts__post {
    perspective: 1500px; /* Creates the 3D perspective */
}

/* 2. Target the inner 'article' element which will be our flipping card */
.insights-hover-effect .wp-block-a8c-blog-posts__post article {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

/* 3. The hover trigger: Flip the 'article' when hovering the post container */
.insights-hover-effect .wp-block-a8c-blog-posts__post:hover article {
    transform: rotateY(180deg);
}

/* 4. Style the "Front" face of the card (the default view) */
/* This div holds all the original, visible content */
.insights-hover-effect .wp-block-a8c-blog-posts__post .wp-block-a8c-blog-posts__post-details {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden; /* For Safari */
}

/* 5. Create and style the "Back" face of the card using a pseudo-element */
.insights-hover-effect .wp-block-a8c-blog-posts__post article::after {
    /* The content that appears on the back */
    content: 'Read This Post →'; 
    
    /* Positioning to cover the entire card */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    
    /* Styling for the back */
    background-color: white;
    color: #291756; /* Cosmic Cobalt */
    transform: rotateY(180deg); /* Start flipped around */
    
    /* Centering the text content */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    padding: 1.5rem;
    box-sizing: border-box;
    border-radius: inherit; /* Inherit the border radius from the parent */
    border