/* =====================================================================
   MASUK PTN — Redesign v3 · Page CSS (materi.css)
   Learning materials listing. Page-specific polish only.
   Flat colors, zero gradients, diverse accents, glass on smart spots.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/*  Page header rhythm                                                 */
/* ------------------------------------------------------------------ */
.page-header { margin-bottom: 0 !important; }
.page-header .display-3 { letter-spacing: -.03em; }
.page-header nav p { margin-top: .9rem; }

/* ------------------------------------------------------------------ */
/*  Search bar (Cari materi) — glass/white pill                        */
/* ------------------------------------------------------------------ */
.materi-search-wrap {
  margin-top: 2.6rem;
  margin-bottom: .5rem;
}
.materi-search-wrap .position-relative {
  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);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .35s var(--ease), border-color .35s var(--ease),
              background-color .35s var(--ease);
}
.materi-search-wrap .position-relative:focus-within {
  background: var(--surface);
  border-color: var(--blue-400);
  box-shadow: 0 0 0 .25rem var(--blue-100), var(--shadow-sm);
}
.materi-search-wrap .form-control {
  border: none !important;
  background: transparent !important;
  border-radius: var(--r-pill) !important;
  font-size: var(--fs-base);
  box-shadow: none !important;
  padding-left: 1.4rem !important;
}
.materi-search-wrap .form-control:focus { box-shadow: none !important; }
.materi-search-wrap .form-control::placeholder { color: var(--muted-200); }
.materi-search-wrap .btn-primary {
  border-radius: var(--r-pill) !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  font-size: var(--fs-sm);
  letter-spacing: .06em;
}

/* ------------------------------------------------------------------ */
/*  Materi cards (.course-item) — flat, accent rotation per card       */
/* ------------------------------------------------------------------ */
.course-item {
  /* accent slot — default blue; rotated below via nth-of-type */
  --acc:      var(--blue);
  --acc-deep: var(--blue-600);
  --acc-line: var(--blue-200);

  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface) !important;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease);
}
/* Top accent bar — flat solid, sweeps in on hover */
.course-item::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--acc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
  z-index: 3;
}
.course-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--acc-line);
}
.course-item:hover::after { transform: scaleX(1); }

/* Accent rotation: blue → green → violet → rose, per card column
   (rose instead of amber: --amber-600 on white fails contrast for the
   hover title / badge icon; --rose-600 passes AA. Amber still shows on
   the page via the navbar CTA from base.css.) */
.row > div:nth-of-type(4n+2) .course-item {
  --acc: var(--green);  --acc-deep: var(--green-600);  --acc-line: var(--green-100);
}
.row > div:nth-of-type(4n+3) .course-item {
  --acc: var(--violet); --acc-deep: var(--violet-600); --acc-line: var(--violet-100);
}
.row > div:nth-of-type(4n+4) .course-item {
  --acc: var(--rose);   --acc-deep: var(--rose-600);   --acc-line: var(--rose-100);
}

/* Thumbnail — clean, no scrim */
.course-item .position-relative.overflow-hidden {
  height: 190px;
  border-radius: 0;
}
.course-item img.img-fluid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .6s var(--ease);
}
.course-item:hover img.img-fluid { transform: scale(1.06); }

/* Glass book badge over each thumb — icon tinted per card accent */
.course-item .position-relative.overflow-hidden::after {
  content: "\f02d"; /* fa book */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  top: 12px; left: 12px; z-index: 3;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  color: var(--acc-deep);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  backdrop-filter: blur(8px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-xs);
  transition: transform .4s var(--ease);
}
.course-item:hover .position-relative.overflow-hidden::after {
  transform: translateY(-2px);
}

/* Title block */
.course-item .text-center.p-4 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.3rem 1.25rem 1.45rem !important;
}
.course-item h6 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: var(--fs-base);
  line-height: 1.45;
  letter-spacing: -.01em;
}
.course-item h6 a {
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .3s var(--ease);
}
.course-item:hover h6 a { color: var(--acc-deep); }

/* Tighten vertical spacing of stacked sections */
.container-xxl.py-5 { padding-top: 2.5rem !important; }

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

/* ------------------------------------------------------------------ */
/*  Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 575.98px) {
  .course-item .position-relative.overflow-hidden { height: 168px; }
  .course-item h6 { font-size: var(--fs-sm); }
  .materi-search-wrap { margin-top: 1.8rem; }
}
