/* Reset dasar */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    padding: 0;
    background-color: #f4f4f4;
}

h2 {
    text-align: center;
    color: #333;
}

/* Form styling */
form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

label {
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

input[type="text"],
input[type="file"],
textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    margin-top: 15px;
    padding: 10px;
    width: 100%;
    background-color: #28a745;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #218838;
}

/* Daftar berita */
ul {
    list-style-type: none;
    padding: 0;
}

li {
    background: white;
    margin: 15px auto;
    padding: 15px;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

h3 {
    margin: 0;
    color: #333;
}

p {
    color: #555;
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
}

/* Style untuk tombol */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
}

/* Tombol Edit */
.btn-edit {
    background-color: #007bff;
    color: white;
    border: none;
    transition: 0.3s;
}
.btn-edit:hover {
    background-color: #0056b3;
}

/* Tombol Hapus */
.btn-delete {
    background-color: #dc3545;
    color: white;
    border: none;
    transition: 0.3s;
}
.btn-delete:hover {
    background-color: #c82333;
}

/* Style untuk Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Style untuk Card Berita */
.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribusi elemen */
    align-items: center;
    height: 400px; /* Pastikan semua card memiliki tinggi yang sama */
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card img {
    max-width: 100%;
    max-height: 50%;
    height: auto;
    border-radius: 8px;
}

.card h3 {
    margin: 10px 0;
    font-size: 18px;
}

.card p {
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Batasi ke 3 baris */
    -webkit-box-orient: vertical;
}

.card .btn-container {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
