/* ==========================================================================
   LINK BERKAH – Halaman Program (daftar & detail)
   Warna per program dikirim lewat variabel --aksen dan --lembut.
   ========================================================================== */

/* ---------- Header halaman ---------- */
.pg-hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-bottom: 18px; padding: 22px 20px;
  color: #fff; border-radius: var(--radius-card);
  background: linear-gradient(125deg, #047857 0%, #059669 45%, #0d9488 100%);
  box-shadow: 0 18px 32px -20px rgba(4, 120, 87, .85);
}
.pg-hero::before, .pg-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.pg-hero::before { width: 220px; height: 220px; right: -70px; top: -100px; background: radial-gradient(circle, rgba(255, 255, 255, .24), transparent 68%); }
.pg-hero::after { width: 190px; height: 190px; right: 12%; bottom: -150px; border: 26px solid rgba(245, 179, 1, .2); }
.pg-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; padding: 5px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, .16);
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.pg-eyebrow i { color: #fcd34d; }
.pg-hero h1 { margin: 0; font-size: 1.55rem; font-weight: 800; line-height: 1.2; }
.pg-hero p { margin: 8px 0 0; max-width: 560px; font-size: .86rem; line-height: 1.6; color: #d1fae5; }

/* ---------- Pintasan bidang ---------- */
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pg-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .12);
  color: #fff; font-size: .76rem; font-weight: 600; text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.pg-chip:hover, .pg-chip:focus-visible { background: #fff; color: var(--em-700); }

/* ---------- Daftar kartu ---------- */
.pg-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 0; padding: 0; list-style: none; }
.pg-item { display: flex; width: 100%; }
.pg-card {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); color: inherit; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pg-card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -22px rgba(5, 150, 105, .5); }
.pg-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pg-card:active { transform: scale(.99); }
.pg-figure { aspect-ratio: 16 / 10; overflow: hidden; background: var(--lembut); }
.pg-figure img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.pg-card:hover .pg-figure img { transform: scale(1.045); }
.pg-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 16px 18px 18px; }
.pg-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  background: var(--lembut); color: var(--aksen);
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
}
.pg-body h2 { margin: 10px 0 6px; font-size: 1.1rem; font-weight: 800; line-height: 1.3; color: var(--ink); }
.pg-body p { flex: 1; margin: 0; font-size: .85rem; line-height: 1.65; color: #475569; }
.pg-more { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; font-size: .82rem; font-weight: 700; color: var(--aksen); }
.pg-more i {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--lembut); font-size: .72rem; transition: transform .25s var(--ease);
}
.pg-card:hover .pg-more i { transform: translateX(4px); }

.pg-split {
  display: flex; flex-direction: column; width: 100%; gap: 12px; background: transparent;
}
.pg-split a {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px; flex: 1; min-height: 148px; padding: 22px 18px 22px 20px;
  border-radius: 22px; color: #fff; text-decoration: none;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 18px 32px -20px rgba(4, 120, 87, .8);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.pg-split a::before, .pg-split a::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
}
.pg-split a::before {
  width: 180px; height: 180px; right: -50px; top: -80px;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 68%);
}
.pg-split a::after {
  width: 90px; height: 90px; left: -28px; bottom: -40px;
  border: 16px solid rgba(255, 255, 255, .1);
}
.pg-split a > i {
  display: grid; place-items: center; width: 54px; height: 54px; flex: none;
  border-radius: 18px; background: rgba(255, 255, 255, .2); font-size: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 16px -12px rgba(0, 0, 0, .4);
}
.pg-split a span { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.pg-split a b { font-size: 1.08rem; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.pg-split a small { font-size: .78rem; line-height: 1.4; opacity: .9; }
.pg-split a em {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: .72rem; font-style: normal;
  transition: transform .25s var(--ease), background .2s var(--ease);
}
.pg-split-top {
  background: radial-gradient(140px 80px at 100% 0%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(145deg, #047857, #0d9488);
}
.pg-split-bot {
  color: #422006;
  background: radial-gradient(140px 80px at 100% 0%, rgba(255, 255, 255, .45), transparent 60%), linear-gradient(145deg, #ea8c00, #f5b301);
  box-shadow: 0 18px 32px -20px rgba(180, 120, 0, .85);
}
.pg-split-bot > i, .pg-split-bot em { background: rgba(66, 32, 6, .14); color: #422006; }
.pg-split-bot::after { border-color: rgba(66, 32, 6, .1); }
.pg-split a:hover { transform: translateY(-3px); }
.pg-split-top:hover { box-shadow: 0 22px 36px -18px rgba(4, 120, 87, .95); }
.pg-split-bot:hover { box-shadow: 0 22px 36px -18px rgba(180, 120, 0, .95); }
.pg-split a:hover em { transform: translateX(4px); background: rgba(255, 255, 255, .32); }
.pg-split a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.pg-empty { padding: 36px 20px; text-align: center; background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.pg-empty img { width: 100%; max-width: 300px; margin: 0 auto 14px; border-radius: 16px; }
.pg-empty p { margin: 0; font-weight: 600; color: var(--muted); }

/* ---------- Ajakan ---------- */
.pg-cta {
  margin-top: 22px; padding: 22px 20px; text-align: center;
  background: linear-gradient(135deg, var(--gold-soft), #ecfdf5);
  border: 1px solid rgba(245, 179, 1, .3); border-radius: var(--radius-card);
}
.pg-cta h2 { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.pg-cta p { margin: 6px 0 0; font-size: .83rem; line-height: 1.6; color: #475569; }
.pg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.pg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 100%;
  min-height: 46px; padding: 0 20px; border-radius: 14px; font-size: .86rem; font-weight: 700; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.pg-btn:hover { transform: translateY(-2px); }
.pg-btn.is-gold { background: var(--gold); color: #422006; box-shadow: 0 10px 20px -12px rgba(180, 120, 0, .9); }
.pg-btn.is-green { background: var(--em-600); color: #fff; box-shadow: var(--shadow-glow); }
.pg-btn.is-line { background: #fff; color: var(--em-700); border: 1px solid var(--em-200); }

/* ---------- Halaman detail ---------- */
.pg-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-bottom: 10px; font-size: .82rem; font-weight: 700; color: var(--em-700); text-decoration: none; }
.pg-detail { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.pg-detail .pg-figure img { transition: none; }
.pg-detail-body { padding: 18px 20px 22px; }
.pg-detail-body h1 { margin: 12px 0 10px; font-size: 1.45rem; font-weight: 800; line-height: 1.25; color: var(--ink); }
.pg-detail-body .prose p { margin-bottom: 1rem; }
.pg-detail-body .prose img { margin: 1rem 0; border-radius: .75rem; }
.pg-detail-body .prose :is(h2, h3, h4) { margin: 1.5rem 0 1rem; font-weight: 700; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .pg-item { width: calc(50% - 8px); }
  .pg-btn { flex: 0 0 auto; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .pg-hero { padding: 36px 40px; margin-bottom: 28px; }
  .pg-hero h1 { font-size: 2.1rem; }
  .pg-hero p { font-size: .95rem; }
  .pg-grid { gap: 24px; }
  .pg-item { width: calc((100% - 48px) / 3); }
  .pg-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 32px; padding: 26px 32px; text-align: left; }
  .pg-cta .pg-actions { flex-wrap: nowrap; margin-top: 0; }
  .pg-btn { white-space: nowrap; }
  .pg-detail { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 4px; }
  .pg-detail .pg-figure { margin: 16px 0 16px 16px; border-radius: 16px; }
  .pg-detail-body { padding: 28px 30px; }
  .pg-detail-body h1 { font-size: 1.9rem; }
  .pg-detail-body .pg-actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-card, .pg-figure img, .pg-more i, .pg-btn, .pg-chip, .pg-split a, .pg-split a em { transition: none; }
}
