/* Trending News */
.trending-news {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trending-news h2 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 5px;
    text-align: left;
    font-weight: bold;
}

.news-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding: 10px 0;
    scroll-behavior: smooth;
    align-items: stretch; /* Align all cards properly */
    flex-wrap: nowrap; /* Ensure all cards are in one row */
    min-height: 300px;
}



.news-item {
    flex: 0 0 auto;
    width: 70%; /* Matches size with other cards */
    max-width: 200px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-item:hover {
    transform: scale(1.03);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.news-item img {
    width: 100%;
    height: 100px; /* Consistent image height */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.news-item h3 {
    font-size: 0.85rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 8px;
    word-wrap: break-word; /* Ensure long words wrap */
}

.news-item p {
    font-size: 0.75rem;
    color: #555;
    text-align: justify;
    margin-bottom: 10px;
}


/* Responsive Design for Larger Screens */
@media (min-width: 768px) {
    .news-carousel {
        gap: 20px; /* Add more space for desktop view */
    }

    .news-item {
        width: 20%; /* Equal width for all cards */
        max-width: 220px;
    }
    
}
