/* ====== RESET & DASAR ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ====== HEADER ====== */
header {
  background: #222;
  color: #fff;
  padding: 30px 0;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1rem;
  color: #ddd;
}

/* ====== LAYOUT UTAMA ====== */
main.container {
  display: grid;
  grid-template-columns: 2fr 1fr; /* konten : sidebar */
  gap: 30px;
  margin: 30px auto;
}

/* ====== FILTER ====== */
.filters {
  margin-bottom: 20px;
}

.custom-select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ====== DAFTAR POSTINGAN ====== */
#posts-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 🔑 HANYA 2 kolom */
  gap: 20px;
}

.post {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.post:hover {
  transform: translateY(-5px);
}

.post img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-content {
  padding: 15px;
}

.post-content h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.post-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 10px;
}

.read-more {
  display: inline-block;
  background: #0066cc;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-top: 5px;
}

.read-more:hover {
  background: #004999;
}

.meta {
  font-size: 0.8rem;
  color: #888;
  margin-top: 8px;
}

/* ====== SIDEBAR ====== */
#sidebar {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

#recent-posts li {
  margin-bottom: 10px;
}

#recent-posts a {
  color: #0066cc;
  font-size: 0.95rem;
}

/* ====== FOOTER ====== */
footer {
  background: #222;
  color: #ccc;
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 40px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 992px) {
  main.container {
    grid-template-columns: 1fr; /* Sidebar ke bawah */
  }

  #posts-container {
    grid-template-columns: 1fr; /* HP tetap 1 kolom */
  }
}
