.related-pages-widget {
    display: grid;
    grid-gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.related-pages-widget.one-column {
    grid-template-columns: 1fr;
}
.related-pages-widget.two-columns {
    grid-template-columns: repeat(2, 1fr);
}
.related-pages-widget.three-columns {
    grid-template-columns: repeat(3, 1fr);
}
.related-pages-widget.four-columns {
    grid-template-columns: repeat(4, 1fr);
}

.related-page-card {
    display: grid;
    transition: all 200ms cubic-bezier(0.250, 0.250, 0.750, 0.750);
    transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
    align-content: space-between;
    align-items: stretch;
    justify-items: stretch;
}

.related-page-card h2 {
    margin: 0 !important;
    flex-grow: 1 !important;
}

.related-page-card p {
    margin: 10px 0 0 !important;
}
.related-page-card .elementor-button-wrapper {
    display: flex;
    flex-direction: column;
    align-content: flex-start;
    justify-content: center;
    align-items: center; /* This will be overwritten by the Elementor control */
}
.related-page-card h2, .related-page-card p {
    margin-bottom: 20px !important;
    display: block !important;
    margin-top: 0px !important;
    padding: 0px !important;
}


@media only screen and (max-width:1024px){
    .related-pages-widget {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for medium screens */
    }
}
@media only screen and (max-width: 800px) {
    .related-pages-widget {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for medium screens */
    }
}

@media only screen and (max-width: 500px) {
    .related-pages-widget {
        grid-template-columns: repeat(1, 1fr); /* 1 column for small screens */
    }
}

@keyframes fadeInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.related-page-card {
    opacity: 0; /* Initially, set the cards to invisible */
    animation-name: fadeInFromBottom;
    animation-duration: 0.6s; /* Adjust this value if you want the animation to be faster or slower */
    animation-fill-mode: forwards; /* This ensures the end state of the animation remains */
}
