.news-section {
    font-family: Arial, sans-serif;
    background-image: url(../images/BG.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    padding: 90px;
    margin-top: 20px;
}

.news-section h2 {
    font-size: 2em;
    color: navy;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.news-section p {
    text-align: center;
    font-size: 1em;
    color: #34495e;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* jumlah baris yang mau ditampilkan */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-item h3 {
    padding: 15px;
    font-size: 1.2em;
    color: #333;
}

.news-item p {
    padding: 0 15px 15px;
    color: #777;
}

.news-item .date {
    display: block;
    padding: 0 15px 15px;
    color: #e74c3c;
    font-weight: bold;
}

.news-item:hover {
    transform: scale(1.05);
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    display: flex;
    flex-direction: column; /* Susun vertikal */
    padding-bottom: 15px; /* beri jarak bawah */
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-item h3, 
.news-item p {
    padding: 0 15px;
}

.news-item a.btn {
    margin: 0 15px;
    margin-top: auto; /* Dorong tombol ke bawah */
}

/* Pagination Styling */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    margin: 0 5px;
    text-decoration: none;
    background-color: #f0f0f0;
    color: #333;
    border-radius: 4px;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #e74c3c;
    color: white;
}

.pagination a.active {
    background-color: #e74c3c;
    color: white;
}

.pagination a.prev, .pagination a.next {
    font-weight: bold;
}

.news-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* biar selalu penuh layar */
}

.news-container {
    flex: 1; /* isi area utama */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.pagination {
    margin-top: 30px;
    text-align: center;
}
