/*
 * Catrawarta – Category Archive
 * v5.5.5
 *
 * Owner visual untuk halaman kategori: heading system, load-more,
 * sidebar Populer + direktori kategori. Query utama tetap WordPress.
 */

body.category{
  --catra-category-navy:var(--catra-header-bg,var(--catra-footer-bg,#00293e));
  --catra-category-gold:#dfbb6f;
  --catra-category-ink:#0b0b0b;
  --catra-category-muted:rgba(0,41,62,.62);
  --catra-category-divider:rgba(0,41,62,.12);
  --catra-category-soft:rgba(0,41,62,.045);
  --catra-category-font:"Reddit Sans",Arial,Helvetica,sans-serif;
  --catra-category-heading-size:24px;
  --catra-category-ornament-size:88px;
  --catra-category-ornament-shift-y:-7px;
}

/* ===== Heading system ===== */
body.category .catra-category-section-title,
body.category .catra-category-popular,
body.category .catra-category-directory{
  position:relative;
}
body.category .catra-category-section-title h1.spanborder,
body.category .catra-category-popular h4.spanborder,
body.category .catra-category-sidebar-heading{
  display:flex;
  align-items:center;
  margin:0 0 18px!important;
  padding:0!important;
  border:0!important;
  background:none!important;
}
body.category .catra-category-heading-ornament{
  position:relative!important;
  isolation:isolate;
  display:inline-flex!important;
  align-items:center!important;
  min-height:46px!important;
  margin:0!important;
  padding:8px 10px 8px 12px!important;
  overflow:visible!important;
  border:0!important;
  background:none!important;
  color:var(--catra-category-navy)!important;
  font-family:var(--catra-category-font)!important;
  font-size:var(--catra-category-heading-size)!important;
  line-height:1.08!important;
  font-weight:750!important;
  letter-spacing:-.025em!important;
  text-transform:none!important;
}
body.category .catra-category-heading-ornament::before{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  left:0!important;
  top:calc(50% + var(--catra-category-ornament-shift-y))!important;
  display:block!important;
  width:var(--catra-category-ornament-size)!important;
  height:var(--catra-category-ornament-size)!important;
  margin:0!important;
  background-image:var(--catra-home-title-ornament,var(--catra-popular-ornament,var(--catra-section-icon,url("../img/catra-section-icon.webp"))))!important;
  background-repeat:no-repeat!important;
  background-position:left center!important;
  background-size:contain!important;
  pointer-events:none!important;
  transform:translateY(-50%)!important;
}
body.category .catra-category-heading-ornament > span{
  position:relative;
  z-index:1;
}
body.category .catra-category-section-title h1.spanborder::after,
body.category .catra-category-popular h4.spanborder::after,
body.category .catra-category-heading-ornament::after{
  display:none!important;
  content:none!important;
  border:0!important;
}

/* ===== Main archive ===== */
body.category .catra-category-layout{
  margin-bottom:68px;
}
body.category .catra-category-main,
body.category .catra-category-posts{
  min-width:0;
}

/* Category-only hover underline: use the same navy as the site header. */
body.category .catra-category-posts .postbox h2 a,
body.category .catra-category-posts .postbox h3 a,
body.category .catra-category-posts .card h2 a,
body.category .catra-category-posts .card h3 a{
  color:var(--catra-archive-article,var(--catra-category-ink))!important;
  background-image:linear-gradient(var(--catra-category-navy),var(--catra-category-navy))!important;
}
body.category .catra-category-posts .postbox h2 a:hover,
body.category .catra-category-posts .postbox h2 a:focus-visible,
body.category .catra-category-posts .postbox h3 a:hover,
body.category .catra-category-posts .postbox h3 a:focus-visible,
body.category .catra-category-posts .card h2 a:hover,
body.category .catra-category-posts .card h2 a:focus-visible,
body.category .catra-category-posts .card h3 a:hover,
body.category .catra-category-posts .card h3 a:focus-visible{
  color:var(--catra-archive-article,var(--catra-category-ink))!important;
}
body.category .catra-category-layout a:hover,
body.category .catra-category-layout a:focus-visible{
  text-decoration-color:var(--catra-category-navy)!important;
}

/* Author avatar lama: ganti ring biru/mint menjadi gold Catrawarta. */
body.category .catra-category-posts img.avatar,
body.category .catra-category-posts .avatar img,
body.category .catra-category-posts img.rounded-circle{
  border:2px solid var(--catra-category-gold)!important;
  box-shadow:0 0 0 2px rgba(223,187,111,.16)!important;
  background:#fff!important;
}

/* Tombol load more */
body.category .catra-category-more-wrap{
  display:flex;
  justify-content:center;
  margin:30px 0 0;
}
body.category .catra-category-more{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:142px;
  min-height:42px;
  padding:10px 20px;
  border:1px solid var(--catra-category-navy);
  border-radius:4px;
  background:var(--catra-category-navy);
  color:#fff;
  font-family:var(--catra-category-font);
  font-size:13px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;
}
body.category .catra-category-more:hover,
body.category .catra-category-more:focus-visible{
  background:var(--catra-category-navy);
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(0,41,62,.13);
}
body.category .catra-category-more.is-loading{
  opacity:.72;
  cursor:wait;
}
body.category .catra-category-more.has-error{
  opacity:1;
}

/* ===== Sidebar ===== */
body.category .catra-category-sidebar{min-width:0;}
body.category .catra-category-sticky-stack{margin-top:14px;}
@media(min-width:992px){
  body.category .catra-category-sticky-stack{
    position:sticky;
    top:calc(var(--catra-sticky-offset,82px) + 14px);
    align-self:flex-start;
  }
}

/* Populer: 5 item, angka tegas, hover underline gold. */
body.category .catra-category-popular{
  margin:0;
  padding:0;
}
body.category .catra-category-popular .list-featured{
  margin:0!important;
  padding-bottom:0!important;
}
body.category .catra-category-popular .list-featured .loved-item{
  margin-bottom:14px!important;
}
body.category .catra-category-popular .list-featured .loved-item:last-child{margin-bottom:0!important;}
body.category .catra-category-popular .list-featured .loved-item::before{
  color:var(--catra-category-gold)!important;
  opacity:.92!important;
  font-weight:500!important;
}
body.category .catra-category-popular h6{margin-bottom:4px!important;}
body.category .catra-category-popular h6 a{
  color:var(--catra-category-ink)!important;
  background-image:linear-gradient(var(--catra-category-navy),var(--catra-category-navy))!important;
  background-repeat:no-repeat!important;
  background-position:0 100%!important;
  background-size:0 2px!important;
  text-decoration:none!important;
  transition:background-size .2s ease!important;
}
body.category .catra-category-popular h6 a:hover,
body.category .catra-category-popular h6 a:focus-visible{
  color:var(--catra-category-ink)!important;
  background-size:100% 2px!important;
  text-decoration:none!important;
}
body.category .catra-category-popular .text-muted,
body.category .catra-category-popular .text-muted a{color:var(--catra-category-muted)!important;}

/* ===== Kategori sidebar: editorial directory minimal ===== */
body.category .catra-category-directory{
  margin-top:30px;
  padding-top:0;
}
body.category .catra-category-directory .catra-category-sidebar-heading{
  margin-bottom:8px!important;
  padding-bottom:10px!important;
  border-bottom:1px solid var(--catra-category-divider)!important;
}
body.category .catra-category-directory-grid{
  display:block;
  border-top:0;
}
body.category .catra-category-directory-link{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  min-height:46px;
  padding:10px 8px;
  border:0;
  border-bottom:1px solid var(--catra-category-divider);
  border-radius:0;
  background:transparent;
  color:var(--catra-category-navy)!important;
  text-decoration:none!important;
  transition:background-color .18s ease,padding-left .18s ease;
}
body.category .catra-category-directory-link:first-child{border-top:0;}
body.category .catra-category-directory-link:hover,
body.category .catra-category-directory-link:focus-visible{
  background:var(--catra-category-soft);
  padding-left:12px;
}
body.category .catra-category-directory-link.is-active{
  background:var(--catra-category-soft);
  padding-left:14px;
}
body.category .catra-category-directory-link.is-active::before{
  content:"";
  position:absolute;
  left:0;
  top:9px;
  bottom:9px;
  width:3px;
  border-radius:2px;
  background:var(--catra-category-gold);
}
body.category .catra-category-directory-name{
  min-width:0;
  overflow:hidden;
  color:var(--catra-category-navy);
  font-family:var(--catra-category-font);
  font-size:11.5px;
  line-height:1.2;
  font-weight:700;
  letter-spacing:.018em;
  text-transform:uppercase;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.category .catra-category-directory-count{
  flex:0 0 auto;
  color:var(--catra-category-muted);
  font-family:var(--catra-category-font);
  font-size:10px;
  line-height:1.2;
  font-weight:500;
  white-space:nowrap;
}

@media(max-width:991px){
  body.category .catra-category-layout{margin-bottom:50px;}
  body.category .catra-category-sticky-stack{
    position:static;
    top:auto;
    margin-top:28px;
  }
  body.category .catra-category-directory{margin-top:28px;}
}

@media(max-width:767px){
  body.category{
    --catra-category-heading-size:21px;
    --catra-category-ornament-size:74px;
    --catra-category-ornament-shift-y:-5px;
  }
  body.category .catra-category-section-title h1.spanborder,
  body.category .catra-category-popular h4.spanborder,
  body.category .catra-category-sidebar-heading{margin-bottom:15px!important;}
  body.category .catra-category-heading-ornament{
    min-height:40px!important;
    padding:7px 9px 7px 10px!important;
    line-height:1.1!important;
  }
  body.category .catra-category-more-wrap{margin-top:24px;}
  body.category .catra-category-more{
    width:100%;
    min-height:42px;
  }
  body.category .catra-category-layout{margin-bottom:44px;}
  body.category .catra-category-directory .catra-category-sidebar-heading{
    margin-bottom:6px!important;
    padding-bottom:9px!important;
  }
  body.category .catra-category-directory-link{
    min-height:44px;
    padding:9px 6px;
  }
  body.category .catra-category-directory-link:hover,
  body.category .catra-category-directory-link:focus-visible{padding-left:10px;}
  body.category .catra-category-directory-link.is-active{padding-left:12px;}
}

@media(max-width:420px){
  body.category .catra-category-directory-name{font-size:11px;}
  body.category .catra-category-directory-count{font-size:9.5px;}
}

@media(prefers-reduced-motion:reduce){
  body.category .catra-category-more,
  body.category .catra-category-directory-link,
  body.category .catra-category-popular h6 a{transition:none!important;}
}

/* v5.12.18 — mobile breathing room below the site header. */
@media(max-width:767px){
  body.category .catra-category-layout{
    padding-top:16px;
  }
}
