/* ========================================
   IKKM NEWS — Category Page Styles
   ======================================== */

/* ===== CATEGORY HERO ===== */
.cat-hero {
  position: relative;
  height: 240px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.cat-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4) saturate(0.8);
  transition: transform 6s ease;
}
.cat-hero-bg.loaded { transform: scale(1.03); }
.cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46,107,61,0.85) 0%, rgba(26,26,26,0.7) 100%);
}
.cat-hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 30px;
  color: white;
}
.cat-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}
.cat-breadcrumb a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.cat-breadcrumb a:hover { color: var(--gold); }
.cat-breadcrumb i { font-size: 0.6rem; }
.cat-breadcrumb span:last-child { color: var(--gold); font-weight: 600; }

.cat-hero-icon {
  width: 52px;
  height: 52px;
  background: var(--gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--black);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(200,155,60,0.4);
}
.cat-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.cat-hero-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  margin-bottom: 12px;
}
.cat-hero-stats {
  display: flex;
  gap: 20px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
}
.cat-hero-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cat-hero-stats i { color: var(--gold); }

/* ===== FEATURED ARTICLE ===== */
.cat-featured-section {
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  padding: 28px 0;
}
.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cat-section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-section-header h2 i { color: var(--gold); font-size: 1rem; }

.cat-featured {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}
.cat-featured-main {
  position: relative;
  height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.cat-featured-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.cat-featured-main:hover img { transform: scale(1.03); }
.cat-featured-main .feat-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%); }
.cat-featured-main .feat-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--gold); color: var(--black);
  font-size: 0.68rem; font-weight: 800;
  padding: 4px 11px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.cat-featured-main .feat-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px; color: white;
}
.cat-featured-main .feat-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 900;
  line-height: 1.3; margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.cat-featured-main .feat-excerpt {
  font-size: 0.82rem; opacity: 0.82;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 8px;
}
.cat-featured-main .feat-meta {
  font-size: 0.72rem; opacity: 0.7;
  display: flex; gap: 14px;
}
.cat-featured-main .feat-meta i { color: var(--gold); }

.cat-featured-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cat-feat-side-item {
  display: flex;
  gap: 12px;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius);
  transition: background 0.2s;
  background: var(--off-white);
  border: 1px solid var(--gray-light);
}
.cat-feat-side-item:hover { background: var(--gray-light); }
.cat-feat-side-item:hover .cfs-title { color: var(--green); }
.cfs-img { width: 84px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cfs-img img { width: 100%; height: 100%; object-fit: cover; }
.cfs-badge { font-size: 0.62rem; font-weight: 800; color: var(--gold); text-transform: uppercase; margin-bottom: 3px; }
.cfs-title { font-size: 0.84rem; font-weight: 700; line-height: 1.35; transition: color 0.2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cfs-meta { font-size: 0.68rem; color: var(--gray); margin-top: 4px; }

/* ===== MAIN LAYOUT ===== */
.cat-main { padding: 28px 0 56px; }
.cat-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

/* ===== CATEGORY SEARCH ===== */
.cat-search {
  display: flex;
  border: 1.5px solid var(--gray-light);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color 0.2s;
  max-width: 280px;
  flex-shrink: 0;
}
.cat-search:focus-within { border-color: var(--green); }
.cat-search input { border: none; outline: none; padding: 7px 14px; font-size: 0.82rem; flex: 1; background: white; }
.cat-search button { background: var(--green); border: none; color: white; padding: 7px 14px; cursor: pointer; transition: background 0.2s; }
.cat-search button:hover { background: var(--green-light); }

/* ===== ARTICLE GRID ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

/* Article card (reuse news-card styles from style.css) */
.cat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: var(--black);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-card-img { height: 170px; overflow: hidden; position: relative; }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.cat-card:hover .cat-card-img img { transform: scale(1.06); }
.cat-card-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--green); color: white;
  font-size: 0.65rem; font-weight: 800;
  padding: 3px 9px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.cat-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.cat-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem; font-weight: 700;
  line-height: 1.4; margin-bottom: 8px;
  color: var(--black); transition: color 0.2s;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cat-card:hover .cat-card-title { color: var(--green); }
.cat-card-excerpt {
  font-size: 0.79rem; color: var(--gray); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px; line-height: 1.6;
}
.cat-card-meta {
  font-size: 0.68rem; color: #9CA3AF;
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--gray-light); padding-top: 10px; margin-top: auto;
  flex-wrap: wrap; gap: 4px;
}
.cat-card-meta span { display: flex; align-items: center; gap: 3px; }
.cat-card-meta i { color: var(--gold); }

/* NO RESULT */
.cat-no-result {
  text-align: center; padding: 60px 20px; color: var(--gray);
}
.cat-no-result i { font-size: 3rem; display: block; margin-bottom: 12px; opacity: 0.2; color: var(--green); }
.cat-no-result p { margin-bottom: 14px; }
.cat-no-result button {
  background: var(--green); color: white; border: none;
  padding: 9px 22px; border-radius: var(--radius); font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.cat-no-result button:hover { background: var(--green-light); }

/* ===== PAGINATION ===== */
.cat-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--gray-light);
  color: var(--black);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0 8px;
  font-family: inherit;
}
.page-btn:hover { border-color: var(--green); color: var(--green); }
.page-btn.active { background: var(--green); color: white; border-color: var(--green); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { color: var(--gray); padding: 0 4px; line-height: 38px; }

/* ===== SIDEBAR ===== */
.cat-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 70px; }

.cat-nav-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--gray-light);
  cursor: pointer; font-size: 0.85rem; transition: color 0.2s;
}
.cat-nav-list li:last-child { border-bottom: none; }
.cat-nav-list li:hover { color: var(--green); }
.cat-nav-list li.current { color: var(--green); font-weight: 700; }
.cat-nav-list .cat-icon { width: 26px; height: 26px; border-radius: 5px; background: rgba(46,107,61,0.08); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 0.72rem; margin-right: 8px; flex-shrink: 0; }
.cat-nav-list .cat-label-wrap { display: flex; align-items: center; }
.cat-nav-list .cat-count { background: var(--gray-light); color: var(--gray); padding: 2px 8px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .cat-featured { grid-template-columns: 1fr; }
  .cat-featured-main { height: 260px; }
  .cat-featured-side { flex-direction: row; flex-wrap: wrap; }
  .cat-feat-side-item { flex: 1; min-width: 200px; }
}
@media (max-width: 620px) {
  .cat-hero { height: 190px; }
  .cat-hero-title { font-size: 1.4rem; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-sidebar { grid-template-columns: 1fr; }
  .cat-section-header { flex-direction: column; align-items: flex-start; }
  .cat-search { max-width: 100%; width: 100%; }
  .cat-feat-side-item { min-width: 100%; }
}

/* Ad page layout: inner grid jadi 1-kolom karena sidebar di luar */
.ad-page-center .cat-layout { grid-template-columns: 1fr; }

/* ===== PORTAL CATEGORY OVERRIDE ===== */
.cat-hero {
  height: auto;
  min-height: 0;
  background: transparent;
  display: block;
  max-width: 1280px;
  margin: 44px auto 0;
  padding: 0 18px;
}

.cat-hero-bg,
.cat-hero-overlay,
.cat-hero-icon,
.cat-hero-desc,
.cat-hero-stats,
.cat-featured-section {
  display: none;
}

.cat-hero-content {
  color: var(--black);
  padding: 0;
  background: var(--white);
  border: 1px solid #DDE1E7;
}

.cat-breadcrumb {
  color: var(--gray);
  margin: 0;
  padding: 18px 28px;
  border-bottom: 1px solid #EEF1F4;
}

.cat-breadcrumb a,
.cat-breadcrumb span:last-child {
  color: var(--gray);
}

.cat-hero-title {
  font-family: 'Inter', sans-serif;
  color: var(--black);
  font-size: 1.85rem;
  text-shadow: none;
  text-transform: uppercase;
  border-bottom: 4px solid var(--gold);
  padding: 18px 28px 16px;
  margin: 0;
}

.cat-main {
  padding: 0 0 28px;
}

.cat-main .container {
  padding: 0;
}

.cat-articles {
  background: var(--white);
}

.cat-section-header {
  padding: 18px 28px;
  margin: 0;
  border-bottom: 1px solid #DDE1E7;
}

.cat-section-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 1.18rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cat-search {
  border-radius: 0;
}

.cat-grid {
  display: block;
  margin: 0;
}

.cat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  position: relative;
  border: 0;
  border-bottom: 1px solid #DDE1E7;
  border-radius: 0;
  box-shadow: none;
  padding: 22px 28px;
  color: var(--black);
}

.cat-card:hover {
  transform: none;
  box-shadow: none;
  background: #FAFBFC;
}

.cat-card-img {
  height: 112px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 0;
}

.cat-card-badge {
  position: static;
  display: inline-flex;
  background: transparent;
  color: var(--gold-dark);
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 900;
}

.cat-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.36rem;
  line-height: 1.22;
  font-weight: 900;
  margin: 4px 0 9px;
  -webkit-line-clamp: 3;
}

.cat-card:hover {
  background: #FAFBFC;
}

.cat-card-title a:hover {
  color: var(--green);
}

.cat-card-body {
  padding: 0;
  min-width: 0;
}

.cat-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.58;
  color: #4E555D;
  -webkit-line-clamp: 3;
}

.cat-card-meta {
  justify-content: flex-start;
  border-top: 0;
  padding-top: 0;
  margin-top: 9px;
  gap: 12px;
  color: #9299A2;
  font-size: 0.78rem;
  font-weight: 700;
}

.cat-inline-ad {
  grid-column: 1 / -1;
  margin: 0;
}

.cat-pagination {
  padding: 24px;
}

.page-btn {
  border-radius: 0;
}

.cat-sidebar .widget-title h3 {
  color: var(--gold-dark);
}

@media (max-width: 760px) {
  .cat-hero {
    margin-top: 20px;
    padding: 0 18px;
  }

  .cat-hero-content {
    padding: 0;
  }

  .cat-hero-title {
    font-size: 1.45rem;
    padding: 16px 18px;
  }

  .cat-breadcrumb {
    padding: 14px 18px;
  }

  .cat-section-header {
    padding: 16px 18px;
  }

  .cat-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 18px;
  }

  .cat-card-img {
    order: -1;
    height: 180px;
  }
}
