/* ============================================================
   category.css — kategori listing page
   Dark Gold Warm theme, mobile-first
   ============================================================ */

/* ---- LAYOUT ---- */
.category-main {
  padding: 40px 16px 80px;
  min-height: 70vh;
}
.category-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- BREADCRUMB (reuse article pattern) ---- */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 13px; color: #999; margin-bottom: 24px;
}
.breadcrumb a { color: #999; text-decoration: none; }
.breadcrumb a:hover { color: #d4af37; }
.breadcrumb [aria-current="page"] { color: #e8e8e8; }

/* ---- CATEGORY HEADER ---- */
.category-header { margin-bottom: 40px; }
.category-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; color: #f0e8d0;
  margin: 0 0 12px; letter-spacing: -0.02em; line-height: 1.2;
}
.category-desc {
  color: #999; font-size: 1rem; line-height: 1.7;
  margin: 0 0 12px; max-width: 640px;
}
.category-count {
  font-size: 13px; color: #555; margin: 0;
}

/* ---- EMPTY STATE ---- */
.category-empty {
  padding: 60px 0; text-align: center; color: #666;
}
.category-empty p { margin: 0 0 10px; font-size: 0.95rem; }
.category-empty a { color: #d4af37; text-underline-offset: 3px; }

/* ---- ARTICLE GRID ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

/* ---- CARD ---- */
.cat-card {
  display: flex; flex-direction: column;
  background: #111; border: 1px solid #222; border-radius: 14px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.cat-card:hover {
  border-color: #d4af37;
  transform: translateY(-2px);
}

/* COVER */
.cat-card-cover {
  aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  flex-shrink: 0;
}
.cat-card-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.3s ease;
}
.cat-card:hover .cat-card-cover img { transform: scale(1.03); }
.cat-card-cover-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.cat-card-cover-fallback span {
  font-size: 0.85rem; color: #555; text-align: center; line-height: 1.5;
}

/* BODY */
.cat-card-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; flex: 1;
}
.cat-card-title {
  font-size: 1rem; font-weight: 600; color: #e8dfc8;
  line-height: 1.45; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-card-desc {
  font-size: 0.875rem; color: #888; line-height: 1.6;
  margin: 0 0 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #555; margin-top: auto;
}
.cat-card-read {
  color: #8a6d1a; font-weight: 600;
}
.cat-card:hover .cat-card-read { color: #d4af37; }

/* ---- BOTTOM CTA ---- */
.category-bottom-cta {
  text-align: center; padding: 40px 24px;
  border-top: 1px solid #1e1e1e;
}
.category-bottom-cta p {
  color: #888; font-size: 0.95rem; margin: 0 0 16px;
}
.cat-cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, #d4af37, #b8962e);
  color: #0a0a0a; font-weight: 700;
  padding: 12px 28px; border-radius: 10px;
  text-decoration: none; font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.15s;
}
.cat-cta-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .category-main { padding: 24px 16px 60px; }
  .cat-grid { grid-template-columns: 1fr; gap: 16px; }
  .category-title { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cat-card { transition: border-color 0.2s; }
  .cat-card-cover img { transition: none; }
  .cat-cta-btn { transition: none; }
}
