/* 1. CONTAINER GRID */
#postList2 {
  display: grid;
  width: 100%;
  box-sizing: border-box;
   /* Jarak antar kolom di HP agak dirapatkan */
  min-height: 600px;
  column-gap: 14px;
  row-gap: 14px;    /* Jarak antar baris */
  
  /* DEFAULT (UNTUK HP & TABLET): 2 KOLOM */
  grid-template-columns: repeat(2, 1fr);
}

/* DESKTOP: 3 KOLOM (Kembali ke standar, atau ubah jadi 2 jika mau sama rata) */
@media (min-width: 1024px) {
  #postList2 {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 14px; /* Jarak lebih lebar di desktop */
    min-height: 650px;
  }
}

/* 2. TAB BUTTONS (#filterButtons2) */
#filterButtons2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  margin-bottom: 10px;
}

#filterButtons2 button {
  font-family: inherit;
  font-size: 11px !important; /* Sedikit diperkecil agar muat di HP */
  font-weight: 600;
  text-transform: uppercase;
  background: #4A5568;
  border: 1px solid #e2e8f0;
  color: rgb(255,255,255);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#filterButtons2 button:hover,
#filterButtons2 button.active {
  background-color: #253A7C; /* Biru Brand */
  border-color: #253A7C;
  color: #fff;
}

/* =========================================
   3. ITEM POST (CARD STYLE UNTUK SEMUA)
   ========================================= */
/* Kita hapus pembeda mobile/desktop. 
   Semua device sekarang pakai gaya 'flex-direction: column' (Gambar Atas) */

.post-item {
  position: relative;
  display: flex;
  flex-direction: column; /* TEKS DI BAWAH GAMBAR */
  background: transparent;
  min-height: 180px;
  height: 100%; /* Agar tinggi kartu rata */
  transition: transform 0.2s ease;
}

/* Wrapper Gambar */
.post-thumb-wrapper {
  width: 100%;
  margin-right: 0;
  margin-bottom: 8px; /* Jarak Gambar ke Judul */
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16/9; /* Rasio Gambar Landscape */
}

/* Gambar */
.post-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #f0f0f0;
  transition: transform 0.3s ease;
}

/* Efek Zoom saat Hover (Opsional, matikan jika berat di HP) */
@media (hover: hover) {
  .post-item:hover .post-thumb-wrapper img {
    transform: scale(1.05);
  }
}

/* 4. AREA TEKS */
.post-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* JUDUL ARTIKEL */
.post-text h2 {
  font-family: var(--wp--preset--font-family--body) !important;
  font-size: 14px !important; /* Ukuran disesuaikan untuk 2 kolom HP */
  font-weight: 600; /* Sedikit ditebalkan agar terbaca */
  line-height: 1.5;
  margin: 0 0 4px 0;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* LINK JUDUL */
.post-text h2 a {
  text-decoration: none;
  color: inherit;
  font-family: var(--wp--preset--font-family--body) !important;
  
}
.post-item:hover h2 a {
  color: #253A7C;
}

/* TANGGAL */
.post-text small {
  display: block;
  color: #666;
  font-size: 12px !important;
  margin-top: auto !important;
  padding-top: 8px;
}

/* 5. TOMBOL ARSIP (#pager2) */
#pager2 {
  text-align: left;
  margin-top: 15px;
  clear: both;
}

.btn-archive-link {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  justify-content: center;
  font-size: 11px !important;
  color: #fff !important;
  background: #4A5568;
  border-radius: 4px;
  padding: 5px 12px;
  transition: all 0.2s ease;
  box-sizing: border-box;/* Di HP tombol full width agar mudah ditekan */
  font-weight: 600;
}

@media (min-width: 769px) {
  .btn-archive-link {
    width: auto; /* Di Tablet/Desktop ukurannya menyesuaikan teks */
  }
}

.btn-archive-link:hover {
  background-color: #253A7C;
}

/* UX: Klik seluruh kartu */
.post-text h2 a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}
/* ... Bagian atas tetap sama ... */

/* Wrapper Gambar */
.post-thumb-wrapper {
  width: 100%;
  margin-right: 0;
  margin-bottom: 8px;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16/9; 
  position: relative; /* Jaga-jaga */
  background: #f0f0f0;
}

/* Gambar */
.post-thumb-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* ... Bagian bawah tetap sama ... */