/* ===== Tampilan Umum ===== */

/* ===== Wrapper ===== */
.berita-wrapper,
.detail-wrapper {
  background-color: #ffffff;
  margin: 30px auto;
  max-width: 1200px;
  padding: 30px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ===== Judul Halaman ===== */
.judul-halaman {
  text-align: center;
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 30px;
  color: #800000;
}

/* ===== Grid Berita ===== */
.berita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* ===== Kartu Berita ===== */
.berita-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.berita-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.berita-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background-color: #f8f9fa; /* biar tidak bolong kalau rasio beda */
  padding: 5px;
}

/* ===== Body Berita ===== */
.berita-body {
  padding: 18px;
  flex-grow: 1;
}

.berita-badge {
  background: #d4af37;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
  display: inline-block;
  font-weight: 600;
}

.berita-title {
  font-size: 18px;
  font-weight: bold;
  margin: 8px 0;
}

.berita-date {
  color: #555;
  font-size: 13px;
  margin-bottom: 10px;
}

.berita-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* ===== Footer Kartu ===== */
.berita-footer {
  padding: 15px 18px;
  border-top: 1px solid #eee;
  text-align: right;
}

.btn-baca {
  background: #8B0000;
  color: white;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn-baca:hover {
  background: #a30000;
}

/* ===== Halaman Detail ===== */
.detail-title {
  font-size: 26px;
  font-weight: bold;
  color: #800000;
  margin-bottom: 10px;
}

.detail-date {
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
}
.detail-img {
  width: 100%;
  height: auto;
  max-height: 600px; /* batas tinggi agar tidak terlalu panjang */
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 20px auto;
  border-radius: 10px;
  background-color: #fff;
  padding: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}



.detail-content {
  font-size: 16px;
  color: #444;
  line-height: 1.7;
}

.btn-kembali {
  background: #6c757d;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
}

.btn-kembali:hover {
  background: #5a6268;
}

/* ===== Tabel Admin & Form ===== */
.table th {
  text-transform: uppercase;
  font-size: 13px;
  background: #8B0000;
  color: white;
}

.table td img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: auto;
}

.edit-foto-preview {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: block;
  margin-bottom: 10px;
}

/* ===== Form Style ===== */
input.form-control, textarea.form-control {
  border-radius: 10px;
  border: 1px solid #ccc;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input.form-control:focus, textarea.form-control:focus {
  border-color: #8B0000;
  box-shadow: 0 0 10px rgba(139, 0, 0, 0.15);
}

.form-label {
  font-weight: 600;
  margin-bottom: 5px;
}

/* ===== Tombol Simpan & Batal ===== */
.btn-success {
  background-color: #28a745;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-success:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #6c757d;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #5a6268;
  transform: translateY(-2px);
}

/* ===== Responsive Fixes ===== */
@media (max-width: 768px) {
  .card-body h3 {
    font-size: 1.5rem;
  }

  input.form-control, textarea.form-control {
    font-size: 0.9rem;
  }

  .d-flex.justify-content-center {
    flex-direction: column;
    gap: 10px;
  }
}
