
/* ==== Grid Section ==== */
.health-article-section {
  padding: 4rem 1rem; /* Lebih banyak padding vertikal */
  background: var(--bg-light);
}


/* ==== Article Grid ==== */
.health-article-grid {
  display: grid;
  /* Beri ruang lebih lebar agar card horizontal pas */
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 2rem; 
  justify-content: center;
  align-items: stretch;
}

/* ==== Article Card ==== */
.article-card {
  background: var(--card-bg);
  border-radius: 16px; /* Lebih bulat, lebih modern */
  overflow: hidden;
  border: 1px solid var(--border-color); /* Batas halus */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  display: flex;
  
  /* KUNCI: Layout horizontal di desktop */
  flex-direction: row;

  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Transisi spesifik */
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* Gambar artikel (Selector disesuaikan dengan Blade Anda: .article-image) */
.article-card .article-image {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;

  /* KUNCI: Ukuran gambar di layout horizontal */
  flex-basis: 190px;  /* Lebar gambar tetap, bisa disesuaikan */
  flex-shrink: 0;     /* Mencegah gambar menyusut */
}

.article-card .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.05);
}

/* Info artikel */
.article-info {
  flex: 1;
  padding: 1.5rem; /* Padding lebih banyak */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* PENTING: Mendorong 'read more' ke bawah */
}

/* Elemen baru untuk Kategori/Tanggal */
.article-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.article-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-dark);
  line-height: 1.4;
  /* Batasi judul agar tidak terlalu panjang */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  flex-grow: 1;
  line-height: 1.6;
  
  /* --- Awal Perubahan --- */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* <-- UBAH INI MENJADI 2 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* --- Akhir Perubahan --- */
}

.read-more {
  color: var(--primary-color);
  font-weight: 600; /* Lebih tegas */
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9rem;
  align-self: flex-start; /* Pastikan di kiri bawah */
}

.read-more:hover {
  color: var(--primary-hover);
}

/* ==== Detail Page ==== */
.article-detail-section {
  padding: 4rem 1rem; /* Padding konsisten */
  background: var(--bg-light);
}

.article-container {
  display: grid;
  grid-template-columns: 1fr; /* Default 1 kolom */
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Layout 2 kolom untuk layar besar */
@media (min-width: 992px) {
  .article-container {
    grid-template-columns: 1fr 320px; /* Sidebar sedikit lebih lebar */
  }
}

/* Header Artikel di Halaman Detail (Elemen Baru) */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 2.75rem; /* Judul yang 'impactful' */
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-meta-detail {
  color: var(--text-light);
  font-size: 0.9rem;
}

.article-meta-detail span {
  margin-right: 1rem;
}

.article-summary {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.6;
  font-style: italic; /* Ringkasan sering dibuat miring */
}

/* Badan Artikel */
.article-body {
  background: var(--card-bg);
  padding: 2.5rem; /* Ruang napas di dalam */
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.article-content {
  margin-top: 2rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8; /* Sangat penting untuk kenyamanan membaca */
  color: var(--text-dark);
  font-size: 1.05rem; /* Sedikit lebih besar dari default */
}

.article-content img {
  width: 100%;
  max-width: 100%; /* Buat gambar responsif penuh */
  display: block;
  margin: 2rem 0; /* Jarak atas-bawah */
  border-radius: 12px;
}

/* Link Dokumen */
.article-document {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.download-doc {
  display: inline-flex;
  align-items: center;
  background: var(--primary-color);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.download-doc:hover {
  background: var(--primary-hover);
}

/* ==== Sidebar ==== */
.article-sidebar {
  position: sticky; /* Membuat sidebar 'mengikuti' saat scroll */
  top: 2rem;
  align-self: start;
}

.article-sidebar h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-sidebar ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Jarak antar link */
}

.article-sidebar li {
  margin: 0; /* Dihapus, diganti gap */
}

.article-sidebar a {
  color: var(--text-dark);
  text-decoration: none;
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.article-sidebar a:hover {
  background: var(--card-bg);
  color: var(--primary-color);
  border-color: var(--border-color);
  text-decoration: none;
}


/* ==== BAGIAN RESPONSIVE ==== */

/* Untuk card artikel horizontal -> vertikal di mobile */
@media (max-width: 600px) {
  
  .health-article-grid {
    /* Kembalikan ke 1 kolom di mobile */
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .article-card {
    /* KUNCI: Kembalikan ke layout vertikal */
    flex-direction: column;
  }

  .article-card .article-image {
    /* KUNCI: Kembalikan style gambar vertikal */
    flex-basis: auto; /* Hapus lebar tetap */
    width: 100%;
    aspect-ratio: 16/10; /* Kembalikan aspect ratio */
  }
}

/* Untuk layout halaman detail (artikel & sidebar) */
@media (max-width: 991px) {
  .article-sidebar {
    position: static; /* Hapus sticky di mobile */
    top: auto;
  }
  .article-title {
    font-size: 2rem;
  }
  .article-body {
    padding: 1.5rem;
  }
}