/* ===============================
   GRID BERITA DESKTOP
================================ */

.berita-wrapper {
  margin-top: 100px;   /* jarak dari navbar */
  padding: 20px;
}

.berita-grid {
  display: grid;

  /* 4 kolom di desktop */
  grid-template-columns: repeat(4, 1fr);

  gap: 20px;
  margin-top: 30px;
}

/* Kartu berita */
.berita-card {
  background: #30497262;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgb(148, 163, 184);

  display: flex;
  flex-direction: column;

  transition: .3s ease;
}

.berita-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

/* Thumbnail */
.berita-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* Body */
.berita-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.berita-meta {
  font-size: 11px;
  color: #94a3b8;

  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.berita-judul {
  font-size: 15px;
  font-weight: 600;
  color: #e5e7eb;
}

.berita-deskripsi {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
}

/* ===============================
   RESPONSIVE
================================ */

/* Tablet → 2 kolom */
@media (max-width: 992px) {
  .berita-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* HP → 1 kolom */
@media (max-width: 640px) {

  .berita-wrapper {
    padding: 16px;
  }

  .berita-grid {
    grid-template-columns: 1fr;
    justify-items: center; /* ⭐ bikin card ke tengah */
  }

  .berita-card {
    width: 100%;
    max-width: 420px; /* ⭐ BATAS LEBAR CARD */
  }

  .berita-thumb img {
    height: 170px;
  }

}

.berita-card {
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}
