/**
 * Image with CTA component styles for filterable components
 * Follows the JPK theme's design system
 */

.filterable-system {
    /* Image with CTA component styling */
    & .filterable-card[data-type="image-with-cta"] {
        position: relative;
        overflow: hidden;
        aspect-ratio: 1/1; /* Force square aspect ratio */
        
        & .card-content {
            padding: 0;
            height: 100%;
            width: 100%;
        }
        
        & .image-with-cta-content {
            position: relative;
            height: 100%;
            width: 100%;
            
            /* Image styling */
            & .cta-image {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                object-fit: cover;
                z-index: 1;
            }
            
            /* Button container at the bottom */
            & .cta-button-container {
                position: absolute;
                bottom: var(--spacing-md);
                left: 0;
                width: 100%;
                display: flex;
                justify-content: center;
                z-index: 2;
            }                
        }
    }
}

/* Responsive adjustments */
@media screen and (max-width: 576px) {
    .filterable-system {
        & .filterable-card[data-type="image-with-cta"] {
            /* Maintain square aspect ratio even on mobile */
            aspect-ratio: 1/1;
        }
    }
}
