/* ============================================================
   OPX Theme — UNIDA Gontor Repository (EPrints frontend)
   Design language: OPAC Unida-Library (primary blue + amber,
   Inter, rounded-full search pill, soft cards).
   Namespace opx-*, distinct dari class lama. modern-theme.css (6480 baris)
   sudah dihapus 2026-10-01 -- semua elemen homepage dilayani file ini.
   Specificity flat, tanpa !important.
   ============================================================ */

:root {
  --opx-blue: #2563eb;
  --opx-blue-dark: #1d4ed8;
  --opx-blue-deep: #1e40af;
  --opx-navy: #1e3a8a;
  --opx-navy-dark: #172554;
  --opx-sky: #eff6ff;
  --opx-amber: #f59e0b;
  --opx-amber-light: #fbbf24;
  --opx-ink: #0f172a;
  --opx-muted: #64748b;
  --opx-line: #e2e8f0;
  --opx-card: #ffffff;
  --opx-radius: 16px;
  --opx-shadow: 0 10px 30px -12px rgba(30, 58, 138, 0.25);
  --opx-shadow-sm: 0 4px 14px -6px rgba(30, 58, 138, 0.18);
}

/* ---------- Topbar ---------- */
.opx-topbar {
  background: var(--opx-navy);
  color: #dbeafe;
  font-size: 0.8rem;
}
.opx-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.opx-topbar a {
  color: #dbeafe;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.opx-topbar a:hover { color: #fff; }
.opx-topbar-group {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.opx-topbar-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.08);
}
.opx-topbar-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- Header ---------- */
.opx-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--opx-blue) 0%, var(--opx-blue-deep) 100%);
  box-shadow: 0 4px 18px rgba(30, 58, 138, 0.35);
}
.opx-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.opx-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}
.opx-brand-logo {
  height: 44px;
  width: auto;
  background: #fff;
  border-radius: 10px;
  padding: 3px 6px;
}
.opx-brand-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}
.opx-brand-sub {
  color: #bfdbfe;
  font-size: 0.78rem;
  margin: 0;
}
.opx-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 5px;
}
.opx-nav a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
/* Penting: state link ditulis eksplisit.
   Kalau hanya `a { color }` tanpa :link/:visited/:active, Chromium
   bisa paint ulang pakai warna link bawaan (biru EPrints #0645ad
   atau merah-cokelat untuk :visited). getComputedStyle tetap melaporkan
   warna kita, tapi yang tampil berbeda. */
.opx-nav a:hover { background: rgba(255, 255, 255, 0.18); }
.opx-nav a:link,
.opx-nav a:visited,
.opx-nav a:active { color: rgba(255, 255, 255, 0.92); }
.opx-nav a.opx-active,
.opx-nav a.opx-active:link,
.opx-nav a.opx-active:visited { color: #ffffff; }
.opx-nav a.opx-active {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.opx-nav a.opx-login,
.opx-nav a.opx-login:link,
.opx-nav a.opx-login:visited {
  background: #ffffff;
  color: var(--opx-blue);
  font-weight: 700;
}
.opx-nav a.opx-login:hover { background: #e8effd; color: var(--opx-blue-dark); }
.opx-nav a.opx-login:active { background: #dbe7fb; }

/* Nav dropdown (Browse: Tahun/Subjek/Fakultas/Penulis) */
.opx-drop { position: relative; }
.opx-drop > a { cursor: pointer; }
.opx-drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  min-width: 210px;
  z-index: 60;
}
.opx-drop-menu-inner {
  background: #fff;
  border: 1px solid var(--opx-line);
  border-radius: 12px;
  box-shadow: var(--opx-shadow);
  padding: 6px;
}
.opx-nav .opx-drop-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--opx-ink);
  border-radius: 8px;
  padding: 10px 12px;
}
.opx-nav .opx-drop-menu a:hover { background: var(--opx-sky); }
.opx-nav .opx-drop-menu a i { color: var(--opx-blue); width: 16px; text-align: center; }
.opx-drop:hover .opx-drop-menu,
.opx-drop:focus-within .opx-drop-menu { display: block; }

/* Stat card as link */
a.opx-stat { text-decoration: none; }
a.opx-stat:hover { border-color: var(--opx-blue); box-shadow: var(--opx-shadow); }

/* Skip link (a11y) */
.opx-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--opx-amber);
  color: var(--opx-navy-dark);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 999;
}
.opx-skip:focus { left: 0; }

/* ---------- Mobile bottom nav ---------- */
.opx-mnav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: #fff;
  border-top: 1px solid var(--opx-line);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
}
.opx-mnav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.opx-mnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px calc(9px + env(safe-area-inset-bottom));
  color: var(--opx-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
}
.opx-mnav a i { font-size: 1.1rem; }
.opx-mnav a.opx-active { color: var(--opx-blue); }

/* ---------- Hero ---------- */
.opx-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #4338ca 100%);
  color: #fff;
  text-align: center;
  padding: 56px 20px 84px;
}
.opx-deco {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.opx-deco-a { width: 280px; height: 280px; top: -120px; right: -80px; }
.opx-deco-b { width: 200px; height: 200px; bottom: -90px; left: -60px; }
.opx-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}
.opx-hero h1 {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(15, 23, 42, 0.35);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.opx-hero-sub {
  color: #bfdbfe;
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 10px;
}
.opx-hero-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 26px;
}

/* Search pill (OPAC style) */
.opx-pill {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.opx-pill-glow {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #93c5fd, #fff, #93c5fd);
  opacity: 0.35;
  filter: blur(14px);
}
.opx-pill-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 18px 40px -12px rgba(15, 23, 42, 0.45);
  overflow: hidden;
  padding-left: 20px;
}
.opx-pill-box > i { color: #94a3b8; }
.opx-pill-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 15px 10px;
  font-size: 0.95rem;
  color: var(--opx-ink);
  font-family: inherit;
}
.opx-pill-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 5px;
  margin: 5px;
}
.opx-pill-go {
  border: 0;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--opx-blue), #4f46e5);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.6);
}
.opx-pill-go:hover { filter: brightness(1.07); }
.opx-pill-adv {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #64748b;
  text-decoration: none;
}
.opx-pill-adv:hover { color: var(--opx-blue); background: #fff; }
.opx-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #bfdbfe;
}
.opx-tags button {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.opx-tags button:hover { background: rgba(255, 255, 255, 0.25); }

/* ---------- Stats overlap ---------- */
.opx-stats {
  max-width: 1280px;
  margin: -38px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}
.opx-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.opx-stat {
  min-width: 0;
  background: var(--opx-card);
  border: 1px solid var(--opx-line);
  border-radius: var(--opx-radius);
  box-shadow: var(--opx-shadow-sm);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.opx-stat-ic {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.opx-stat-ic.blue { background: #dbeafe; color: var(--opx-blue); }
.opx-stat-ic.purple { background: #ede9fe; color: #7c3aed; }
.opx-stat-ic.green { background: #dcfce7; color: #16a34a; }
.opx-stat-ic.orange { background: #ffedd5; color: #ea580c; }
.opx-stat-num { font-size: 1.25rem; font-weight: 800; color: var(--opx-ink); margin: 0; }
.opx-stat-label { font-size: 0.78rem; color: var(--opx-muted); margin: 0; }

/* ---------- Sections ---------- */
.opx-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 20px 8px;
}
.opx-sec-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--opx-line);
}
.opx-sec-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--opx-navy);
  margin: 0;
}
.opx-sec-sub { color: var(--opx-muted); font-size: 0.9rem; margin: 4px 0 0; }
.opx-btn-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--opx-blue), #4f46e5);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--opx-shadow-sm);
  white-space: nowrap;
}
.opx-btn-all:hover { filter: brightness(1.08); }
.opx-btn-all:link,
.opx-btn-all:visited,
.opx-btn-all:active { color: #ffffff; }
.opx-sec-center { text-align: center; margin-bottom: 28px; }
.opx-sec-center .opx-sec-title { margin-bottom: 6px; }

/* Latest cards */
.opx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.opx-card {
  min-width: 0;
  background: var(--opx-card);
  border: 1px solid var(--opx-line);
  border-radius: var(--opx-radius);
  box-shadow: var(--opx-shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.opx-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--opx-shadow);
  border-color: var(--opx-blue);
}
.opx-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--opx-line);
}
.opx-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--opx-blue), #4f46e5);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.opx-year {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--opx-line);
  color: var(--opx-muted);
  font-size: 0.7rem;
  font-weight: 600;
}
.opx-card-body { padding: 18px 18px 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.opx-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--opx-navy);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.opx-card-auth {
  display: flex;
  gap: 7px;
  color: var(--opx-muted);
  font-size: 0.83rem;
  line-height: 1.5;
}
.opx-card-auth i { margin-top: 3px; }
.opx-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--opx-line);
  color: var(--opx-blue);
  font-size: 0.78rem;
  font-weight: 700;
}
.opx-skeleton {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 20px;
  color: var(--opx-muted);
}
.opx-skeleton i { font-size: 2.2rem; color: var(--opx-blue); }

/* Collections */
.opx-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.opx-col {
  min-width: 0;
  background: var(--opx-card);
  border: 1px solid var(--opx-line);
  border-radius: var(--opx-radius);
  box-shadow: var(--opx-shadow-sm);
  padding: 26px 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.opx-col:hover { transform: translateY(-5px); box-shadow: var(--opx-shadow); }
.opx-col-ic {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
  background: #dbeafe;
  color: var(--opx-blue);
}
.opx-col:nth-child(2) .opx-col-ic { background: #ede9fe; color: #7c3aed; }
.opx-col:nth-child(3) .opx-col-ic { background: #dcfce7; color: #16a34a; }
.opx-col:nth-child(4) .opx-col-ic { background: #ffedd5; color: #ea580c; }
.opx-col h3 { font-size: 1rem; font-weight: 700; color: var(--opx-ink); margin: 0 0 6px; }
.opx-col p { font-size: 0.84rem; color: var(--opx-muted); line-height: 1.55; margin: 0 0 12px; }
.opx-col span.opx-more { font-size: 0.82rem; font-weight: 700; color: var(--opx-blue); }

/* Features */
.opx-feats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.opx-feat {
  min-width: 0;
  background: var(--opx-card);
  border: 1px solid var(--opx-line);
  border-radius: var(--opx-radius);
  box-shadow: var(--opx-shadow-sm);
  padding: 24px 22px;
}
.opx-feat h3 { font-size: 0.98rem; font-weight: 700; color: var(--opx-ink); margin: 14px 0 6px; }
.opx-feat p { font-size: 0.84rem; color: var(--opx-muted); line-height: 1.6; margin: 0; }

/* ---------- Footer ---------- */
.opx-footer {
  margin-top: 56px;
  background: var(--opx-navy-dark);
  color: #cbd5e1;
}
.opx-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 20px 0;
}
.opx-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 32px;
}
.opx-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 14px;
}
.opx-footer p { font-size: 0.84rem; line-height: 1.65; margin: 0; }
.opx-footer-grid a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.84rem;
  padding: 4px 0;
}
.opx-footer-grid a:hover { color: #fff; }
/* Footer: link harus putih di semua state. Tanpa ini link "Tautan Cepat"
   tampil biru tua di atas footer biru tua (tidak terbaca). */
.opx-footer a,
.opx-footer a:link,
.opx-footer a:visited,
.opx-footer a:active { color: #c9d6f0; text-decoration: none; }
.opx-footer a:hover { color: #ffffff; text-decoration: underline; }

.opx-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0 calc(18px);
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
}
.opx-footer-bottom a { color: #e2e8f0; }

/* Focus visibility (a11y) */
.opx-pill-go:focus-visible,
.opx-btn-all:focus-visible,
.opx-nav a:focus-visible,
.opx-card:focus-visible {
  outline: 3px solid var(--opx-amber-light);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .opx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opx-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opx-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opx-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .opx-nav { display: none; }
  .opx-topbar-group.opx-hide-sm { display: none; }
}
@media (max-width: 640px) {
  .opx-hero { padding: 40px 16px 76px; }
  .opx-hero h1 { font-size: 1.55rem; }
  .opx-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opx-stat { padding: 12px 12px; gap: 10px; }
  .opx-stat-num { font-size: 1.05rem; }
  .opx-grid { grid-template-columns: minmax(0, 1fr); }
  .opx-cols { grid-template-columns: minmax(0, 1fr); }
  .opx-feats { grid-template-columns: minmax(0, 1fr); }
  .opx-sec-head { flex-direction: column; align-items: stretch; }
  .opx-pill-go span { display: none; }
  .opx-pill-go { padding: 10px 14px; }
  .opx-mnav { display: block; }
  body { padding-bottom: 64px; }
  .opx-footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .opx-card, .opx-col, .opx-pill-go, .opx-btn-all { transition: none; }
}
