/* ==========================================
   PRESTASI.CSS
   ========================================== */

/* ── Hero (sama gaya fasilitas/profil) ── */
.ps-hero {
  background: var(--bg-soft);
  padding: 64px 0;
  overflow: hidden;
}
.ps-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
}
.ps-hero-img {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 380px;
}
.ps-hero-img img {
  max-width: 100%; max-height: 360px;
  width: auto; height: auto;
  object-fit: contain; display: block;
}
.ps-hero-body {
  padding: 0 0 0 48px;
  display: flex; flex-direction: column; justify-content: center;
}
.ps-hero-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 20px;
}
.ps-hero-breadcrumb a { color: var(--ink-soft); }
.ps-hero-breadcrumb a:hover { color: var(--primary); }
.ps-hero-breadcrumb svg { width: 13px; height: 13px; }
.ps-hero-breadcrumb .current { color: var(--ink); font-weight: 600; }
.ps-hero-body h1 {
  font-size: 3rem; font-weight: 800;
  line-height: 1.1; margin: 0 0 20px; color: var(--ink);
}
.ps-hero-body h1 .red { color: var(--primary); }
.ps-hero-body p {
  font-size: 1rem; color: var(--ink-soft);
  line-height: 1.75; margin: 0 0 32px; max-width: 480px;
}
.ps-hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--primary); color: #fff;
  font-size: 0.95rem; font-weight: 700;
  padding: 13px 28px; border-radius: 8px;
  transition: background .15s ease, transform .15s ease;
  width: fit-content;
}
.ps-hero-cta:hover { background: var(--primary-dark); transform: translateY(-2px); }
.ps-hero-cta svg { width: 16px; height: 16px; }

/* ── Stats bar ── */
.pres-stats {
  background: var(--primary); padding: 32px 0;
}
.pres-stats-row {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 24px; text-align: center;
}
.pres-stats-row .num { font-size: 2rem; font-weight: 800; color: #fff; }
.pres-stats-row .lbl { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.75); letter-spacing: .05em; }

/* ── Diagram Chart.js ── */
.pres-chart-section {
  padding: 72px 0;
  background: #fff;
}
.pres-chart-title {
  font-size: 1.8rem; font-weight: 800; margin: 0 0 8px; text-align: center;
}
.pres-chart-sub { color: var(--ink-soft); margin: 0 0 40px; text-align: center; }
.pres-chart-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 32px 32px 24px;
}

/* ── Grid Prestasi ── */
.pres-main { padding: 64px 0 80px; }

.berita-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.berita-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.berita-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.berita-card-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-soft-2);
  overflow: hidden;
}
.berita-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.berita-card-body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.berita-card-body h3 {
  font-size: 0.97rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.berita-card-cat  { font-size: 0.78rem; font-weight: 700; color: var(--primary); }
.berita-card-date { font-size: 0.78rem; color: var(--ink-soft); margin-top: auto; }

/* Paginasi */
.pres-pagination {
  display: flex; align-items: center;
  justify-content: center; gap: 8px; flex-wrap: wrap;
}
.ppag-btn {
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: #fff; font-size: 0.88rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease; font-family: inherit;
}
.ppag-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.ppag-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ppag-btn:disabled { opacity: .35; cursor: default; }
.ppag-btn svg { width: 16px; height: 16px; }

/* ── Responsive ── */
@media (max-width: 991px) {
  .ps-hero .container { grid-template-columns: 1fr; min-height: auto; }
  .ps-hero-img { order: 2; padding: 40px 0 0; }
  .ps-hero-body { order: 1; padding: 0 0 32px; }
  .ps-hero-body h1 { font-size: 2.2rem; }
  .pres-stats-row { grid-template-columns: repeat(2,1fr); }
  .berita-grid { grid-template-columns: repeat(2,1fr); }
  .pres-chart-card { padding: 20px 16px 16px; }
}
@media (max-width: 640px) {
  .ps-hero-body h1 { font-size: 1.8rem; }
  .berita-grid { grid-template-columns: repeat(2,1fr); }
  .pres-chart-card { padding: 16px 10px 12px; }
}

.pres-section-head { text-align: center; margin-bottom: 36px; }
.pres-section-head h2 { font-size: 1.8rem; font-weight: 800; margin: 0 0 4px; }
.pres-section-head .red { font-size: 1rem; font-weight: 700; margin: 0; display: block; color: var(--primary); }

/* ── Detail Prestasi ── */
.pd-badge {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; letter-spacing: .05em;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 14px;
  text-transform: uppercase;
}
.pd-badge--internasional { background: #FEF3C7; color: #92400E; }
.pd-badge--nasional      { background: #FBEAEA; color: var(--primary); }
.pd-badge--provinsi      { background: #EDE9FE; color: #5B21B6; }
.pd-badge--kabupaten     { background: #DCFCE7; color: #166534; }

.pd-meta {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-bottom: 20px;
}
.pd-meta span {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.88rem; color: var(--ink-soft); font-weight: 600;
}
.pd-meta svg { width: 15px; height: 15px; flex-shrink: 0; }

.pd-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary); font-weight: 700; font-size: 0.9rem;
  margin-top: 24px; transition: gap .15s ease;
}
.pd-back-btn:hover { gap: 12px; }
.pd-back-btn svg { width: 16px; height: 16px; }

/* ── Siswa Grid ── */
.pd-siswa-section { padding: 64px 0; background: var(--bg-soft); }

.pd-siswa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.pd-siswa-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.pd-siswa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.pd-siswa-photo {
  width: 100%; aspect-ratio: 1/1;
  background: var(--bg-soft-2); overflow: hidden;
}
.pd-siswa-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pd-siswa-body { padding: 16px 18px 20px; }
.pd-siswa-body h3 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.pd-siswa-kelas {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  color: var(--primary); margin-bottom: 8px;
}
.pd-siswa-body p { font-size: 0.85rem; color: var(--ink-soft); margin: 0; line-height: 1.6; }

@media (max-width: 991px) {
  .pd-siswa-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .pd-siswa-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-meta { gap: 10px; }
}
