/* =========================================================
   CATEGORY BASE (shared for all category pages)
   File: public/css/category/_base.css
   ========================================================= */

:root{
  --rpText: #0f172a;
  --rpMuted:#64748b;
  --rpBorder:#e5e7eb;
  --rpCard:#ffffff;
  --rpBg:#f8fafc;

  /* Category theme (override per kategori: nasional.css, daerah.css, dll) */
  --catA:#0ea5e9;     /* gradient start */
  --catB:#1d4ed8;     /* gradient end */
  --catInk:#2563eb;   /* accent color */
}

/* page wrapper */
.cat-page{
  background: var(--rpBg);
  color: var(--rpText);
}

/* container */
.cat-wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 16px 28px;
}

/* grid: main + sidebar */
.cat-grid{
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px){
  .cat-grid{ grid-template-columns: 1fr; }
}

/* ===== HERO ===== */
.cat-hero{
  border-radius: 18px;
  padding: 22px 22px 18px;
  background: linear-gradient(135deg, var(--catA), var(--catB));
  color: #fff;
  overflow: hidden;
}
.cat-hero .cat-badge{
  display:inline-block;
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 800;
  background: rgba(255,255,255,.18);
  padding: 6px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.cat-hero h1{
  margin: 12px 0 6px;
  font-size: 44px;
  line-height: 1.08;
  font-weight: 900;
}
.cat-hero p{
  margin: 0;
  opacity: .92;
  font-size: 15px;
  line-height: 1.6;
  max-width: 72ch;
}
@media (max-width: 640px){
  .cat-hero h1{ font-size: 34px; }
}

/* ===== Ad slot placeholder box (kalau belum render iklan) ===== */
.cat-ad-box{
  border: 2px dashed var(--rpBorder);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  color: var(--rpMuted);
  margin: 14px 0;
}

/* ===== MAIN LIST (KIRI) =====
   Kamu bisa pakai class ini di _page.blade.php untuk list utama.
*/
.cat-list{
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

/* item utama: gambar kiri - judul kanan */
.cat-item{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--rpBorder);
  background: var(--rpCard);
  border-radius: 16px;
  overflow: hidden;
}
@media (max-width: 640px){
  .cat-item{ grid-template-columns: 1fr; }
}

.cat-thumb{
  width: 160px;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}
@media (max-width: 640px){
  .cat-thumb{ width: 100%; height: 190px; }
}
.cat-thumb img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: cover;      /* kunci biar gambar tidak pecah/menyusut */
  object-position:center;
}

/* konten utama */
.cat-body{
  min-width: 0;           /* kunci biar teks wrap normal di grid */
}
.cat-kicker{
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 800;
  color: var(--catInk);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cat-title{
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--rpText);
}
.cat-title a{
  color: inherit;
  text-decoration:none;
}
.cat-title a:hover{ text-decoration:underline; }
.cat-meta{
  font-size: 13px;
  color: var(--rpMuted);
  margin-bottom: 8px;
}
.cat-excerpt{
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  margin: 0;
  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

/* ===== SIDEBAR (KANAN) ===== */
.cat-side-card{
  border: 1px solid var(--rpBorder);
  background: var(--rpCard);
  border-radius: 16px;
  overflow:hidden;
}
.cat-side-head{
  padding: 12px 14px;
  border-bottom: 1px solid var(--rpBorder);
}
.cat-side-head .t{
  margin:0;
  font-weight: 900;
  letter-spacing:.08em;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--rpText);
}
.cat-side-body-wrap{
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

/* ===== INI PENTING: STYLE UNTUK _side-item.blade.php (punyamu) ===== */
.cat-side-item{
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border: 1px solid var(--rpBorder);
  border-radius: 14px;
  background: #fff;
}
.cat-side-item:hover{
  border-color: #cbd5e1;
  transform: translateY(-1px);
  transition: all .12s ease;
}

/* thumb */
.cat-side-thumb{
  width: 76px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  flex: none;
}
.cat-side-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
  object-position: center;
}
.cat-side-ph{
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

/* body */
.cat-side-body{
  min-width: 0;
}
.cat-side-kicker{
  font-size: 11px;
  letter-spacing: .10em;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--catInk);
  margin-bottom: 4px;
}
.cat-side-title{
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--rpText);
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.cat-side-meta{
  font-size: 12px;
  color: var(--rpMuted);
  margin-top: 6px;
}

/* ===== SAFETY: kalau ada gambar kecil/aneh dari CSS lain ===== */
.cat-page img{
  max-width: 100%;
  height: auto;
}