div.post-featured-image a.timeline-content {
    position: relative;
    display: block;
    margin: 0px !important;
}


/* Common styles for the list items */
.multisite-recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.multisite-recent-posts li {
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-sizing: content-box !important;
}

.multisite-recent-posts li .post-featured-image img {
    display: block;
    height: auto !important;
    background: #efefef;
	margin: -1rem -1rem 1rem -1rem;
	border-radius: .41rem .41rem 0px 0px;
	width: calc(100% +  2rem) !important;
    max-width: none;
}

.multisite-recent-posts > .wrap {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0px !important;
}

.multisite-recent-posts li a {
    text-decoration: none;
}


.multisite-recent-posts li h2 {
    display: block;
    margin: 0px;
    padding: 0px;
    font-size: 2rem;
    line-height: 1.2;
    transition: .25s linear all;
    font-weight: bold;
}



.multisite-recent-posts li a:hover h2 {
    color: var(--wp--preset--color--secondary);
}

.multisite-recent-posts li h2:after {
    display: none;
}


.multisite-recent-posts li .wp-block-button {
    margin-top: 1rem;
}

.multisite-recent-posts li .wp-block-button a {
    display: inline-block;
    border-radius: .5rem;
    text-align: left;
    padding-left: calc(50px + .5rem);
    position: relative;
    padding-right: .75rem;
    font-size: .8rem;
    font-weight: bold;
    vertical-align: top;
    transition: .25s linear all;
    width: auto;
}

.multisite-recent-posts li .wp-block-button a:before {
    display: block;
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 1px;
    content: '';
    background: rgba(0,0,0,.25);
    z-index: 1;
    width: 50px;
    border-radius: .45rem 0px 0px .45rem;
}


.multisite-recent-posts li .wp-block-button a img {
    display: inline-block;
    border-radius: .5rem;
    width: auto;
    height: 32px;
    margin: 0px 0px .5rem 0px;
    position: absolute;
    top: 50%;
    left: .6rem;
    transform: translateY(-50%);
    z-index: 2;
}

.multisite-recent-posts li .timeline-author {
    padding: .5rem .5rem;
    border-radius: 1rem;
    background: rgba(0,0,0,.15);
    color: black;
    line-height: 1;
    display: block;
    margin: 0px 0px 0px .5rem;
    font-weight: normal;
    font-style: italic;
    position: absolute;
    left: calc(100% + .5rem);
    transition: .25s linear all;
    top: 50%;
    pointer-events: none;
    white-space: nowrap;
    font-size: .8rem;
    transform: translateY(-50%);
}

.multisite-recent-posts li .wp-block-button a:hover {
    background-color: var(--wp--preset--color--tertiary);
}

.multisite-recent-posts li .wp-block-button a:hover .timeline-author {
    background: rgba(0,0,0,.2);
}

.multisite-recent-posts li .timeline-author strong {
    font-style: normal;
}

.timeline .timeline-item {
	padding: 1rem;
	border-radius: .5rem;
	background: #FFFFFF;
}

.multisite-recent-posts li.gutter-sizer {
    width: 1.5rem !important;
    margin: 0px !important;
    padding: 0px !important;
}

.multisite-recent-posts li .post-excerpt {
    margin: 1rem 0px;
    font-size: 1rem;
    line-height: 1.4;
}

.multisite-recent-posts li .timeline-type {
    margin: .5rem 0 .75rem;
}

.multisite-recent-posts li .timeline-type-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #888;
    background: rgba(0, 0, 0, .05);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 2rem;
    padding: .2rem .6rem;
    line-height: 1;
}


/* Desktop view (3 columns) */
@media (min-width: 768px) {
    .multisite-recent-posts ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between; /* Distribute items evenly across the container */
    }
    .multisite-recent-posts ul li {
        width: calc(33.33% - 3rem); /* Adjust the width based on the number of columns and column-gap */
    }
}

/* Mobile view (1 column) */
@media (max-width: 767px) {
    .multisite-recent-posts ul {
        column-count: 1; /* Display as a single column on mobile */
        column-gap: 0; /* Remove the gap between columns */
    }
}

/* The "via <site>" badge only fits beside the button on the single wide card of a tablet. On a
   phone and in the three desktop columns it spilled out of the card, over the gutter and past the
   page edge (a 481px layout on a 412px phone, a sideways scroll on desktop), so there it sits under
   the button, trimmed with an ellipsis if a site name is very long. (Not a container query: the
   cards are absolutely positioned by Masonry and size containment collapses them.) */
@media (max-width: 640px), (min-width: 768px) {
    .multisite-recent-posts li .wp-block-button {
        margin-bottom: 2.4rem;
    }
    .multisite-recent-posts li .timeline-author {
        left: 0;
        top: calc(100% + .5rem);
        transform: none;
        margin: 0;
        max-width: calc(100vw - 4rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
