/* GRID DESKTOP - 5 COLUMNS */
.elementor-element-container_zs32sqixs.e-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 24px !important;
    align-items: stretch !important;
}

/* ALL CARDS (The flexbox containers) */
.elementor-element-container_zs32sqixs > .e-flexbox {
    min-width: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
}

/* IMAGE WIDGET WRAPPER (First child in the flexbox) */
.elementor-element-container_zs32sqixs > .e-flexbox > :first-child {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    margin-bottom: 20px !important; /* Space between image and title area */
}

/* THE IMAGE ITSELF - FIXED ASPECT RATIO */
.elementor-element-container_zs32sqixs > .e-flexbox > :first-child img {
    display: block !important;
    width: 100% !important;
    height: 105px !important; /* Explicitly requested height */
    object-fit: cover !important;
    object-position: center center !important;
}

/* HEADING AND PARAGRAPH AREA WRAPPERS (if nested) or direct children adjustments */
/* Target the heading */
.elementor-element-container_zs32sqixs > .e-flexbox .e-heading {
    margin: 0 0 10px 0 !important;
    min-height: 2.5em !important; /* Forces all titles to take up the same vertical space */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

/* Target the paragraph */
.elementor-element-container_zs32sqixs > .e-flexbox .e-paragraph {
    margin: 0 !important;
    flex-grow: 1 !important; /* Pushes the paragraph to fill remaining space if needed */
}

/* TABLET */
@media (max-width: 1024px) {
    .elementor-element-container_zs32sqixs.e-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* MOBILE */
@media (max-width: 767px) {
    .elementor-element-container_zs32sqixs.e-grid {
        grid-template-columns: 1fr !important;
    }
}
