/* General Section Styling */
#latest-news {
    margin: 20px auto;
    padding: 20px;
    max-width: 1200px; /* Reduced the maximum width for a smaller section */
}

#latest-news h1 {
    text-align: center;
    font-size: 28px; /* Slightly smaller title */
    color: #333;
    margin-bottom: 20px;
}

/* News Grid Styling */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Reduced min width for smaller cards */
    gap: 15px;
    justify-content: center;
    align-items: stretch;
}

/* News Card Styling */
.news-card {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px; /* Slightly smaller border radius */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 400px; /* Restrict card width */
    margin: auto; /* Center-align the cards */
    display: flex;        
    flex-direction: column; 
    height: 100%;   
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 10px;
    text-align: center;
}

.news-card:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

/* Image Styling */
.news-card img {
    width: 100%;
    height: 250px; /* Fixed height for smaller images */
    object-fit: cover; /* Ensures images are cropped appropriately */
    border-bottom: 1px solid #ddd;
}

/* Title Styling */
.news-card h2 {
    font-size: 18px; /* Reduced title size */
    margin: 10px 0;
    color: #333;
}

/* Description Styling */
.news-card p {
    font-size: 14px; /* Reduced description font size */
    color: #555;
    margin: 10px 0;
}

.news-card .date {
    font-size: 12px; /* Reduced date font size */
    color: #999;
    margin-top: 5px;
}


/* Responsive Design */
@media screen and (max-width: 768px) {
    #latest-news h1 {
        font-size: 24px;
    }

    .news-card h2 {
        font-size: 16px;
    }

    .news-card p {
        font-size: 13px;
    }

    .news-card .date {
        font-size: 11px;
    }
}
