/* Styles for the News New Template */

.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* All items in a 3-column grid */
    gap: 20px;
    margin-top: 30px;
}

.news-item {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease-in-out;
}

.news-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.news-item h3 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-item h3 a {
    color: #1F387A;
    text-decoration: none;
    font-weight: bold;
}

.news-item h3 a:hover {
    text-decoration: underline;
}

.news-date {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.news-item p {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.news-item .read-more {
    display: inline-block;
    color: #0074C7;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.2s ease-in-out;
}

.news-item .read-more:hover {
    color: #0F2662;
}

/* Style for the empty slot */
.news-empty-slot {
    background-color: transparent;
    border: none;
    box-shadow: none;
    pointer-events: none; /* Make sure it doesn't interfere with clicks */
}


/* Load More Button Styles */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

#load-more-news {
    background-color: #0074C7;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#load-more-news:hover {
    background-color: #0F2662;
}

#load-more-news.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .news-list {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
    }
    .news-empty-slot {
        /* On smaller screens, if there are only 2 items per row, the empty slot won't be needed */
        /* Since the first row now also has 2 items, the empty slot will be needed if we want to fill the remaining space */
        display: none; 
    }
}

@media (max-width: 768px) {
    .news-list {
        grid-template-columns: 1fr; /* 1 card per row */
    }
    .news-empty-slot {
        display: none;
    }
}
