/* ==========================================================================
   POR — mode "Selesai": podium Juara Umum (#juara) dan hero "telah usai"
   Dipakai di por.php. Palet: #003366 / #f57c00 / emas #ffd700; tanpa gradien pelangi.
   ========================================================================== */

#juara[hidden], .por-stat[hidden] { display: none !important; }
#juara { overflow-x: clip; }

/* Hero: kotak statistik ketiga ("8 / 8 Nomor selesai") */
#statGrid.pj-stat3 { max-width: 38rem; }
#statGrid.pj-stat3 #statSelesaiBox { grid-column: span 2; }
@media (min-width: 480px) {
  #statGrid.pj-stat3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #statGrid.pj-stat3 #statSelesaiBox { grid-column: auto; }
}

/* ---------- Kepala section ---------- */
.pj-head { text-align: center; margin-bottom: 2.5rem; }
.pj-eyebrow { display: inline-block; color: #f57c00; font-weight: 800; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: .75rem; }
.pj-judul { color: #003366; font-size: clamp(2.2rem, 8.5vw, 3.75rem); line-height: 1; overflow-wrap: anywhere; }
.pj-judul::after { content: ""; display: block; width: 84px; height: 6px; background: #ffd700; margin: 1rem auto 0; transform: skewX(-20deg); }
.pj-sub { margin-top: 1rem; color: #4b5563; font-size: 1rem; font-weight: 600; }

/* ---------- Podium 2 - 1 - 3 (desktop dan HP) ---------- */
.pj-podium { display: grid; align-items: end; gap: 8px; max-width: 46rem; margin: 0 auto; }
.pj-podium.pj-n3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr) minmax(0, 1fr); }
.pj-podium.pj-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 32rem; }
.pj-podium.pj-n1 { grid-template-columns: minmax(0, 15rem); justify-content: center; }
@media (min-width: 640px) { .pj-podium { gap: 18px; } }

.pj-col { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; text-align: center; }
.pj-info { padding: 0 2px 12px; min-width: 0; }

.pj-trofi { width: 48px; height: 48px; margin: 0 auto 8px; background: #003366; color: #ffd700; display: flex; align-items: center; justify-content: center; transform: skewX(-8deg); box-shadow: 0 8px 18px -8px rgba(0, 51, 102, .6); }
.pj-trofi-ic { width: 28px; height: 28px; display: block; transform: skewX(8deg); }
.pj-trofi-ic svg { width: 100%; height: 100%; }
.pj-label { display: inline-block; background: #ffd700; color: #003366; font-size: .8rem; padding: 3px 12px; margin-bottom: 8px; letter-spacing: .06em; text-transform: uppercase; }
.pj-bersama { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: #f57c00; padding: 2px 8px; margin-bottom: 6px; transform: skewX(-12deg); }
.pj-pre { font-size: 10.5px; font-weight: 700; color: #6b7280; line-height: 1.2; letter-spacing: .02em; }
.pj-nama { color: #003366; font-size: 1.15rem; line-height: 1.05; margin-top: 2px; overflow-wrap: anywhere; }
.pj-kode { margin-top: 4px; font-size: 11px; font-weight: 700; color: #6b7280; letter-spacing: .08em; }
.pj-chips { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.pj-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 24px; }
.pj-chip .por-medal { width: 24px; height: 24px; font-size: 11px; }
.pj-chip-n { color: #1f2937; font-size: 1.05rem; line-height: 1; }
.pj-chip.zero { opacity: .4; }
.pj-total { margin-top: 8px; font-size: 11px; font-weight: 800; color: #4b5563; text-transform: uppercase; letter-spacing: .08em; }

.is-juara .pj-nama { font-size: 1.45rem; }
.is-juara .pj-info { padding-bottom: 14px; }

/* Tiang podium: tinggi 1 > 2 > 3, tepi atas miring */
.pj-tiang { position: relative; display: flex; align-items: center; justify-content: center; background: #003366; color: #fff; clip-path: polygon(0 10px, 100% 0, 100% 100%, 0 100%); transform-origin: bottom; }
.pj-tiang::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--pj-aksen, #94a3b8); }
.pj-rank { font-size: 3rem; line-height: 1; padding-top: 8px; }
.pj-p1 .pj-tiang { height: 8.5rem; background: #ffd700; color: #003366; --pj-aksen: #f57c00; }
.pj-p1 .pj-rank { font-size: 5rem; }
.pj-p2 .pj-tiang { height: 6rem; --pj-aksen: #cbd5e1; }
.pj-p3 .pj-tiang { height: 4.25rem; --pj-aksen: #c98a4b; }
.pj-p3 .pj-rank { font-size: 2.4rem; }

@media (min-width: 640px) {
  .pj-nama { font-size: 1.6rem; }
  .is-juara .pj-nama { font-size: 2rem; }
  .pj-pre { font-size: 12px; }
  .pj-trofi { width: 60px; height: 60px; }
  .pj-trofi-ic { width: 34px; height: 34px; }
  .pj-chips { gap: 12px; }
  .pj-chip .por-medal { width: 30px; height: 30px; font-size: 13px; }
  .pj-p1 .pj-tiang { height: 11rem; }
  .pj-p2 .pj-tiang { height: 7.75rem; }
  .pj-p3 .pj-tiang { height: 5.5rem; }
  .pj-p1 .pj-rank { font-size: 6.5rem; }
  .pj-rank { font-size: 3.6rem; }
}

/* ---------- Ucapan ---------- */
.pj-ucapan { text-align: center; margin: 2.25rem auto 0; max-width: 34rem; color: #374151; font-size: 1.05rem; line-height: 1.6; }
.pj-ucapan b { color: #003366; }
.pj-link { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin: .5rem auto 0; width: fit-content; padding: 0 8px; color: #f57c00; font-weight: 800; font-size: .95rem; text-decoration: underline; text-underline-offset: 4px; }
.pj-link:hover { color: #d86d00; }

/* ---------- Animasi naik saat terlihat ---------- */
.pj-pre .pj-tiang { transform: scaleY(0); }
.pj-pre .pj-info { opacity: 0; transform: translateY(26px); }
.pj-pre.pj-in .pj-tiang { transform: none; transition: transform .75s cubic-bezier(.2, .8, .2, 1); }
.pj-pre.pj-in .pj-info { opacity: 1; transform: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.pj-pre.pj-in .pj-d2 .pj-tiang { transition-delay: 0s; }
.pj-pre.pj-in .pj-d1 .pj-tiang { transition-delay: .2s; }
.pj-pre.pj-in .pj-d0 .pj-tiang { transition-delay: .4s; }
.pj-pre.pj-in .pj-d2 .pj-info { transition-delay: .45s; }
.pj-pre.pj-in .pj-d1 .pj-info { transition-delay: .65s; }
.pj-pre.pj-in .pj-d0 .pj-info { transition-delay: .85s; }

@media (prefers-reduced-motion: reduce) {
  .pj-pre .pj-tiang, .pj-pre .pj-info { transform: none; opacity: 1; transition: none; }
}
