#newsContainer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.newsItem {
    position: relative;
    width: 32%;
    margin-bottom: 20px;
}

.newsImage {
    width: 100%;
    height: 200px;
    object-fit: cover;
    padding: 2px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    line-height: 200px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.newsItem:hover .overlay {
    opacity: 1;
}

.textOverlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0; /* covers full width */
    background-color: rgba(51, 51, 51, 0.8); /* dark grey background */
    color: white; /* white text */
    padding: 10px;
    text-align: right;
}

.newsText h4,
.newsText p {
    margin: 0; /* remove default margins */
    color: white; /* white text */
    font-size: 14px; /* specified font size */
    line-height: 1.5; /* increased line spacing */
}

.newsText h4 {
    font-weight: 300; /* lighter font weight */
}

@media screen and (max-width: 600px) {
    .newsItem {
        width: 100%;
    }
}
