/* =====================================================================
   MASUK PTN — Redesign v3 · Article-by-category listing (artikel-kategori.css)
   Page-specific polish only — flat colors, ZERO gradients, glass on the
   date chips. Reuses base.css v3 tokens; mirrors artikel.css treatment.
   Skins: .page-header rhythm, .editors-news .title (category pill),
          .popular-news paired rows (.col-sm-4 thumb + .col-sm-8 text),
          .thumb-title meta/excerpt, .pagination.
   Accent scheme: rose = category identity; article rows rotate
   rose → violet → blue; read-more cue + pagination active = blue-600.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/*  Page header rhythm (base.css supplies flat navy overlay + glass    */
/*  breadcrumb pill)                                                   */
/* ------------------------------------------------------------------ */
.page-header p {
  max-width: 40rem;
  margin: .85rem auto 0;
  font-size: var(--fs-base);
}

.container[style*="min-height"] { position: relative; z-index: 2; }

/* ---- Page rhythm ---------------------------------------------------- */
.popular-news { margin-top: 2.25rem !important; }

/* ------------------------------------------------------------------ */
/*  Category title (.editors-news .title) — flat rose pill             */
/* ------------------------------------------------------------------ */
.editors-news .title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  padding: .5rem 1.3rem .5rem 1.05rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: var(--fs-md);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--rose-600);
  background: var(--rose-50);
  border: 1px solid var(--rose-100);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-xs);
}
.editors-news .title::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 4px var(--rose-100);
}

/* ------------------------------------------------------------------ */
/*  Article rows — pair each .col-sm-4 (thumb) + .col-sm-8 (text)      */
/* ------------------------------------------------------------------ */

/* Thumbnail frame */
.popular-news .image-hover {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  aspect-ratio: 16 / 11;
  isolation: isolate;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease),
              border-color .45s var(--ease);
}
.popular-news .image-hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: inherit;
  transition: transform .65s var(--ease);
}

/* Flat single-tone hover veil (no gradient) */
.popular-news .image-hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(13, 40, 54, .14);
  opacity: 0;
  transition: opacity .45s var(--ease);
  z-index: 1;
  pointer-events: none;
}

/* Hover choreography — hovering the text column also animates its own
   preceding thumbnail via :has(+ .col-sm-8:hover). */
.popular-news .image-hover:hover,
.popular-news .col-sm-4:has(+ .col-sm-8:hover) .image-hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--blue-200);
}
.popular-news .image-hover:hover img,
.popular-news .col-sm-4:has(+ .col-sm-8:hover) .image-hover img { transform: scale(1.06); }
.popular-news .image-hover:hover::after,
.popular-news .col-sm-4:has(+ .col-sm-8:hover) .image-hover::after { opacity: 1; }

.popular-news .col-sm-4 { display: flex; }
.popular-news .col-sm-4 > .image-hover { width: 100%; align-self: flex-start; }

/* Text column */
.popular-news .col-sm-8 {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 1.35rem;
}

/* Flat hairline separator so rows read as distinct entries */
.popular-news .col-sm-8::after {
  content: "";
  position: absolute;
  left: 0;
  right: 8%;
  bottom: .3rem;
  height: 1px;
  background: var(--line-soft);
}

/* ------------------------------------------------------------------ */
/*  Date chip (1st .thumb-title) — GLASS pill with clock icon          */
/* ------------------------------------------------------------------ */
.popular-news .thumb-title { font-family: "Plus Jakarta Sans", sans-serif; }

.popular-news .col-sm-8 > .thumb-title:first-of-type {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  align-self: flex-start;
  margin: 0 0 .55rem 0 !important;
  padding: .28rem .78rem;
  border-radius: var(--r-pill);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  color: var(--navy);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.popular-news .col-sm-8 > .thumb-title:first-of-type::before {
  content: "\f017"; /* fa clock */
  font-family: "Font Awesome 5 Free";
  font-weight: 400;
  font-size: var(--fs-xs);
  color: var(--rose-600);
}

/* ------------------------------------------------------------------ */
/*  Headline + read-more affordance                                    */
/* ------------------------------------------------------------------ */
.popular-news .col-sm-8 a.text-black {
  display: block;
  color: var(--navy) !important;
}
.popular-news .col-sm-8 a.text-black h5 {
  margin: 0 0 .5rem 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: var(--fs-md);
  line-height: 1.4;
  letter-spacing: -.015em;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .3s var(--ease);
}
.popular-news .col-sm-8 a.text-black:hover h5 { color: var(--blue-600); }

/* "Baca selengkapnya" cue — generated, no new DOM (matches artikel.css) */
.popular-news .col-sm-8 a.text-black::after {
  content: "Baca selengkapnya \00a0\f061";
  font-family: "Plus Jakarta Sans", "Font Awesome 5 Free", sans-serif;
  display: inline-flex;
  align-items: center;
  margin-bottom: .4rem;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--blue-600);
  opacity: .85;
  transition: color .3s var(--ease), transform .3s var(--ease), opacity .3s var(--ease);
}
.popular-news .col-sm-8 a.text-black:hover::after {
  color: var(--blue-700);
  opacity: 1;
  transform: translateX(3px);
}

/* Excerpt (last .thumb-title) */
.popular-news .col-sm-8 > .thumb-title:last-of-type {
  margin: 0 !important;
  font-family: "Inter", sans-serif;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------------------------------------------------------------------ */
/*  Accent rotation per row — rose → violet → blue (diverse, flat)     */
/*  Pairs are strict div siblings: thumb at 6n+1/6n+3/6n+5, text at    */
/*  6n+2/6n+4/6n+6.                                                    */
/* ------------------------------------------------------------------ */
/* Row 1, 4, 7 … rose */
.popular-news .row .row > .col-sm-8:nth-child(6n+2) > .thumb-title:first-of-type::before { color: var(--rose-600); }
.popular-news .row .row > .col-sm-8:nth-child(6n+2) a.text-black:hover h5 { color: var(--rose-600); }
.popular-news .row .row > .col-sm-4:nth-child(6n+1) .image-hover:hover,
.popular-news .row .row > .col-sm-4:nth-child(6n+1):has(+ .col-sm-8:hover) .image-hover { border-color: var(--rose-100); }
/* Row 2, 5, 8 … violet */
.popular-news .row .row > .col-sm-8:nth-child(6n+4) > .thumb-title:first-of-type::before { color: var(--violet-600); }
.popular-news .row .row > .col-sm-8:nth-child(6n+4) a.text-black:hover h5 { color: var(--violet-600); }
.popular-news .row .row > .col-sm-4:nth-child(6n+3) .image-hover:hover,
.popular-news .row .row > .col-sm-4:nth-child(6n+3):has(+ .col-sm-8:hover) .image-hover { border-color: var(--violet-100); }
/* Row 3, 6, 9 … blue */
.popular-news .row .row > .col-sm-8:nth-child(6n+6) > .thumb-title:first-of-type::before { color: var(--blue-600); }
.popular-news .row .row > .col-sm-8:nth-child(6n+6) a.text-black:hover h5 { color: var(--blue-600); }
.popular-news .row .row > .col-sm-4:nth-child(6n+5) .image-hover:hover,
.popular-news .row .row > .col-sm-4:nth-child(6n+5):has(+ .col-sm-8:hover) .image-hover { border-color: var(--blue-200); }

/* ------------------------------------------------------------------ */
/*  Pagination — flat pills, active = solid blue-600                   */
/* ------------------------------------------------------------------ */
.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  padding: .55rem .7rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}
.pagination .page-item { margin: 0; }
.pagination .page-link {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 .65rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill) !important;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  background: transparent;
  transition: transform .3s var(--ease), background-color .3s var(--ease),
              color .3s var(--ease), box-shadow .3s var(--ease);
}
.pagination .page-link:hover {
  background: var(--blue-50);
  color: var(--blue-600);
  border-color: var(--blue-100);
  transform: translateY(-2px);
}
.pagination .page-item.active .page-link {
  background: var(--blue-600);
  color: #fff;
  border-color: var(--blue-600);
  box-shadow: var(--shadow-brand);
}
.pagination .page-item.disabled .page-link {
  color: var(--muted-200);
  background: transparent;
  box-shadow: none;
  cursor: default;
  transform: none;
}
.pagination .page-link:focus {
  box-shadow: 0 0 0 .25rem var(--blue-100);
  outline: none;
}

/* ------------------------------------------------------------------ */
/*  Responsive niceties                                                */
/* ------------------------------------------------------------------ */
@media (max-width: 575.98px) {
  .popular-news .image-hover { aspect-ratio: 16 / 9; margin-bottom: .5rem; }
  .popular-news .col-sm-8::after { right: 0; }
  .popular-news .col-sm-8 a.text-black h5 { font-size: var(--fs-base); }
  .editors-news .title { font-size: var(--fs-base); }
  .pagination .page-link { min-width: 36px; height: 36px; font-size: var(--fs-xs); }
}
