I have an image that I would like to stretch itself out so there is no whitespace on the right whilst maintaining its aspect ratio and just cutting some of the image out of view. I also want to have the image the same size as the blue container.
I tried some solutions on here such as setting the max width of the image to 100% and using object-fit: cover I but haven't figured it out yet.

* {
margin: 0px;
padding: 0px;
}
.see-bike-rides-card {
display: flex;
max-height:400px;
}
.home-card-text {
background: #80D0E5;
padding: 1rem;
}
.see-bike-rides-card {
max-height: 400px;
width: 1000px;
}
.see-bike-rides-card img {
width: fit-content;
max-height:400px;
object-fit: cover;
}
<article class="see-bike-rides-card">
<section class="home-card-text">
<h2>Coolest Bike Rides in Brisbane</h2>
<p>Check out our favourite spots
to ride your bike in Brissy.</p>
<div>
<a href="#" class="button">See Bike Trails</a>
</div>
</section>
<section>
<figure>
<img src="https://images.unsplash.com/photo-1515722265856-49cdff079949?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8" alt="">
</figure>
</section>
</article>
object-fit: fillmeet your demand?