/* ============================================================
   WIKI.CSS — Sinkron dengan index.css / Pancasila App
   ============================================================ */

/* ─── HERO ────────────────────────────────────────────────── */
.wiki-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 60px;
  overflow: hidden;
  text-align: center;
}

.wiki-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.wiki-hero-bg .hero-flag-stripe.red {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 60%, #c62828 100%);
}

.wiki-hero-bg .hero-flag-stripe.white {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.wiki-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.wiki-hero-title {
  display: flex;
  flex-direction: column;
  margin: 1rem 0;
}

.wiki-hero-title .hero-title-top,
.wiki-hero-title .hero-title-bottom {
  font-family: 'Lora', serif;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.9);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.wiki-hero-title .hero-title-main {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 5px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
  line-height: 1;
}

.wiki-hero-desc {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: rgba(0,0,0,0.6);
  max-width: 560px;
  margin: 0.5rem auto 1.5rem;
  line-height: 1.7;
}

.wiki-hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  background: white;
  border-radius: 50px;
  padding: 14px 32px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  max-width: 320px;
  margin: 0 auto;
}

.wiki-hero-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wiki-hero-stats .stat strong {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #d32f2f;
}

.wiki-hero-stats .stat span {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wiki-hero-stats .stat-divider {
  width: 1px;
  height: 36px;
  background: #e0e0e0;
}

/* ─── SEARCH ──────────────────────────────────────────────── */
.wiki-search-section {
  display: flex;
  justify-content: center;
  padding: 28px 2rem 0;
  position: relative;
  z-index: 5;
}

.wiki-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 50px;
  padding: 12px 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 520px;
}

.search-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.wiki-search {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  background: transparent;
}

.wiki-search::placeholder {
  color: #bbb;
  font-weight: 400;
}

/* ─── SECTION ─────────────────────────────────────────────── */
.wiki-section {
  padding: 60px 2rem 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─── GRID — dua kolom ────────────────────────────────────── */
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  margin-top: 48px;
}

/* ─── ARTICLE CARD ────────────────────────────────────────── */
.wiki-article {
  background: white;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.35s ease;
  cursor: pointer;
}

.wiki-article:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 24px 56px rgba(0,0,0,0.14);
}

/* full-width card (artikel 9) */
.wa-full {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

/* color accent border per tema */
.wa-merah { border-top: 5px solid #c0392b; }
.wa-emas   { border-top: 5px solid #d4ac0d; }
.wa-hijau  { border-top: 5px solid #27ae60; }
.wa-ungu   { border-top: 5px solid #8e44ad; }
.wa-biru   { border-top: 5px solid #2980b9; }

/* nomor ghost */
.wa-number {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  font-weight: 900;
  color: rgba(0,0,0,0.045);
  line-height: 1;
  user-select: none;
}

/* top row: emoji + kategori */
.wa-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 22px 8px;
}

.wa-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.wa-cat {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  padding: 3px 12px;
  border-radius: 20px;
  background: #c0392b;
}

.wa-merah .wa-cat { background: #c0392b; }
.wa-emas  .wa-cat { background: #b7950b; }
.wa-hijau .wa-cat { background: #1e8449; }
.wa-ungu  .wa-cat { background: #76448a; }
.wa-biru  .wa-cat { background: #1f618d; }

/* title */
.wa-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
  padding: 4px 22px 8px;
  line-height: 1.4;
}

/* desc */
.wa-desc {
  font-family: 'Lora', serif;
  font-size: 0.87rem;
  color: #666;
  line-height: 1.75;
  margin: 0;
  padding: 0 22px 14px;
  flex: 1;
}

/* footer row */
.wa-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 22px 18px;
  border-top: 1px solid #f0f0f0;
}

.wa-tag {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f5f5f5;
  color: #666;
}

.wa-merah .wa-tag { background: #fdecea; color: #c0392b; }
.wa-emas  .wa-tag { background: #fef9e7; color: #b7950b; }
.wa-hijau .wa-tag { background: #e9f7ef; color: #1e8449; }
.wa-ungu  .wa-tag { background: #f5eef8; color: #76448a; }
.wa-biru  .wa-tag { background: #eaf4fc; color: #1f618d; }

.wa-cta {
  margin-left: auto;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #d32f2f;
  transition: letter-spacing 0.2s;
  white-space: nowrap;
}

.wiki-article:hover .wa-cta {
  letter-spacing: 0.5px;
}

/* full-width card overrides */
.wa-full .wa-top    { padding-top: 28px; }
.wa-full .wa-title  { font-size: 1.2rem; }
.wa-full .wa-desc   { font-size: 0.9rem; }
.wa-full .wa-cta    { font-size: 0.9rem; color: #1f618d; }

/* hover shimmer overlay */
.wiki-article::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.06));
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: 22px;
}

.wiki-article:hover::after {
  opacity: 1;
}

/* ─── BACK BUTTON ─────────────────────────────────────────── */
.wiki-back {
  display: flex;
  justify-content: center;
  margin-top: 52px;
}

.btn-back {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #d32f2f;
  text-decoration: none;
  border: 2px solid #d32f2f;
  padding: 12px 28px;
  border-radius: 50px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-back:hover {
  background: #d32f2f;
  color: white;
  transform: translateX(-4px);
  box-shadow: 0 6px 20px rgba(211,47,47,0.3);
}

/* ─── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* stagger */
.wiki-grid .wiki-article:nth-child(1)  { transition-delay: 0.05s; }
.wiki-grid .wiki-article:nth-child(2)  { transition-delay: 0.12s; }
.wiki-grid .wiki-article:nth-child(3)  { transition-delay: 0.19s; }
.wiki-grid .wiki-article:nth-child(4)  { transition-delay: 0.26s; }
.wiki-grid .wiki-article:nth-child(5)  { transition-delay: 0.33s; }
.wiki-grid .wiki-article:nth-child(6)  { transition-delay: 0.40s; }
.wiki-grid .wiki-article:nth-child(7)  { transition-delay: 0.47s; }
.wiki-grid .wiki-article:nth-child(8)  { transition-delay: 0.54s; }
.wiki-grid .wiki-article:nth-child(9)  { transition-delay: 0.61s; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .wiki-hero {
    padding: 100px 1.2rem 50px;
  }

  .wiki-grid {
    grid-template-columns: 1fr;
  }

  .wa-full {
    flex-direction: column;
    grid-column: auto;
  }

  .wiki-hero-stats {
    gap: 16px;
    padding: 12px 22px;
  }
}