/* ==========================================
   CATEGORY — Halaman Arsip Kategori
   ========================================== */

/* Layout */
.cat-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* CAT HEADER */
.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  background: var(--putih);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  margin-bottom: 16px;
  border-left: 4px solid var(--merah);
}

.cat-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--biru-teks);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.cat-desc {
  font-size: 13px;
  color: var(--abu-teks);
  line-height: 1.5;
  max-width: 500px;
}

.cat-count {
  font-size: 12px;
  color: var(--abu-teks);
  background: var(--abu);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

/* SUBKATEGORI */
.subkategori {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.subkat-item {
  padding: 6px 14px;
  background: var(--putih);
  border: 1px solid var(--abu-gelap);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #555 !important;
  transition: all 0.2s;
}

.subkat-item:hover,
.subkat-item.active {
  background: var(--merah);
  color: var(--putih) !important;
  border-color: var(--merah);
}

/* ===== ARTICLE LIST ===== */
.article-list {
  display: grid;
  gap: 12px;
}

.al-item {
  background: var(--putih);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}

.al-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.al-item a {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.al-img {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #ccc;
}

.al-body {
  padding: 14px;
}

.al-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--biru-teks);
  margin: 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.al-excerpt {
  font-size: 13px;
  line-height: 1.5;
  color: #555;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.al-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--abu-teks);
}

.al-author {
  font-weight: 600;
  color: var(--biru);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
  padding: 16px 0;
}

.page-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #555 !important;
  background: var(--putih);
  border: 1px solid var(--abu-gelap);
  transition: all 0.15s;
}

.page-item:hover {
  background: var(--abu);
  color: var(--hitam) !important;
}

.page-item.active {
  background: var(--merah);
  color: var(--putih) !important;
  border-color: var(--merah);
}

.page-dots {
  font-size: 16px;
  color: var(--abu-teks);
  padding: 0 4px;
}

.page-next,
.page-last {
  font-size: 16px;
}

/* ===== SIDEBAR ===== */
.sidebar-widget {
  background: var(--putih);
  border-radius: 6px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}

.sidebar-ad .ad-placeholder {
  width: 100%;
  height: 200px;
  background: var(--abu);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  color: var(--abu-teks);
  font-weight: 600;
}

/* CATEGORY LIST SIDEBAR */
.cat-list {
  list-style: none;
}

.cat-list li {
  border-bottom: 1px solid var(--abu);
}

.cat-list li:last-child {
  border-bottom: none;
}

.cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  color: #444 !important;
  transition: all 0.2s;
}

.cat-list li a:hover,
.cat-list li a.active {
  color: var(--merah) !important;
}

.cat-list li a.active {
  font-weight: 700;
}

.cat-count-side {
  font-size: 11px;
  color: var(--abu-teks);
  background: var(--abu);
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.cat-list li a:hover .cat-count-side {
  background: var(--merah);
  color: var(--putih);
}

.sb-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--abu);
}

.sb-item:last-child {
  border-bottom: none;
}

.sb-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--merah);
  min-width: 26px;
  line-height: 1;
  margin-top: 2px;
}

.sb-body h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

/* ===== TABLET ===== */
@media (min-width: 600px) {
  .al-item a {
    flex-direction: row;
  }
  .al-img {
    width: 280px;
    height: auto;
    min-height: 170px;
    flex-shrink: 0;
  }
  .cat-title { font-size: 26px; }
}

/* ===== DESKTOP ===== */
@media (min-width: 900px) {
  .cat-layout {
    grid-template-columns: 1fr 300px;
  }
  .cat-title { font-size: 28px; }
  .al-img {
    width: 320px;
    min-height: 190px;
  }
  .al-title { font-size: 18px; }
}
