/* ============================================================
   MATERI.CSS — Sinkron dengan index.css / Pancasila App
   ============================================================ */

/* ─── NAV ACTIVE STATE ────────────────────────────────────── */
.nav-link.active {
  background: rgba(255, 255, 255, 0.25);
  font-weight: 800;
  border-bottom: 2px solid #fff;
}

/* ─── MATERI HERO ─────────────────────────────────────────── */
.materi-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 2rem 60px;
  overflow: hidden;
  text-align: center;
}

.materi-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.materi-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%);
}

.materi-hero-bg .hero-flag-stripe.white {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.materi-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.materi-hero-title {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1rem 0;
}

.materi-hero-title .hero-title-top,
.materi-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;
}

.materi-hero-title .hero-title-main {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 6px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
  line-height: 1;
}

.materi-hero-desc {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: rgba(0,0,0,0.65);
  max-width: 560px;
  margin: 0.5rem auto 1.5rem;
  line-height: 1.7;
}

/* ─── PROGRESS BAR ────────────────────────────────────────── */
.materi-progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 50px;
  padding: 10px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  max-width: 360px;
  margin: 0 auto;
}

.progress-label {
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #888;
  white-space: nowrap;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: #f0f0f0;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d32f2f, #e53935);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-text {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #d32f2f;
  white-space: nowrap;
}

/* ─── TABS ────────────────────────────────────────────────── */
.materi-tabs-section {
  padding: 0 2rem;
  margin-top: -10px;
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.materi-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: white;
  border-radius: 60px;
  padding: 8px 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  justify-content: center;
}

.materi-tab {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #777;
  padding: 8px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.materi-tab:hover {
  background: #fdecea;
  color: #d32f2f;
}

.materi-tab.active {
  background: #d32f2f;
  color: white;
  box-shadow: 0 4px 14px rgba(211,47,47,0.35);
}

/* ─── MATERI SECTION ──────────────────────────────────────── */
.materi-section {
  padding: 60px 2rem 80px;
  max-width: 1300px;
  margin: 0 auto;
}

/* ─── MATERI GRID ─────────────────────────────────────────── */
.materi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

/* ─── MATERI CARD ─────────────────────────────────────────── */
.materi-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.materi-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

/* Color accents per sila */
.mc-1 { border-top: 5px solid #c0392b; }
.mc-2 { border-top: 5px solid #e67e22; }
.mc-3 { border-top: 5px solid #27ae60; }
.mc-4 { border-top: 5px solid #2980b9; }
.mc-5 { border-top: 5px solid #8e44ad; }

.mc-number {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: 'Cinzel', serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(0,0,0,0.05);
  line-height: 1;
  user-select: none;
}

.mc-symbol-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 20px 10px;
}

.mc-symbol {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
  transition: transform 0.4s ease;
}

.materi-card:hover .mc-symbol {
  transform: scale(1.12) rotate(-3deg);
}

.mc-emoji-fb {
  font-size: 64px;
}

.mc-body {
  padding: 0 22px 10px;
  flex: 1;
}

.mc-body h3 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
  line-height: 1.4;
}

.mc-short {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: #777;
  margin: 0 0 14px;
}

.mc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mc-tag {
  font-family: 'Nunito', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f5f5f5;
  color: #555;
  padding: 3px 10px;
  border-radius: 20px;
}

.mc-1 .mc-tag { background: #fdecea; color: #c0392b; }
.mc-2 .mc-tag { background: #fef3e2; color: #e67e22; }
.mc-3 .mc-tag { background: #e8f8f0; color: #27ae60; }
.mc-4 .mc-tag { background: #e8f4fd; color: #2980b9; }
.mc-5 .mc-tag { background: #f5eef8; color: #8e44ad; }

.mc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 18px;
  border-top: 1px solid #f0f0f0;
  margin-top: 10px;
}

.mc-cta {
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #d32f2f;
}

.mc-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: transparent;
  transition: all 0.4s ease;
}

.mc-check.done {
  background: #27ae60;
  border-color: #27ae60;
  color: white;
  box-shadow: 0 4px 12px rgba(39,174,96,0.35);
}

/* ─── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children of grid */
.materi-grid .materi-card-wrap:nth-child(1) { transition-delay: 0.05s; }
.materi-grid .materi-card-wrap:nth-child(2) { transition-delay: 0.13s; }
.materi-grid .materi-card-wrap:nth-child(3) { transition-delay: 0.21s; }
.materi-grid .materi-card-wrap:nth-child(4) { transition-delay: 0.29s; }
.materi-grid .materi-card-wrap:nth-child(5) { transition-delay: 0.37s; }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: white;
  border-radius: 24px;
  max-width: 620px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.08);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: rgba(0,0,0,0.16);
}

.modal-header {
  padding: 36px 32px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--modal-color, #d32f2f) 0%, color-mix(in srgb, var(--modal-color, #d32f2f) 70%, black) 100%);
  border-radius: 24px 24px 0 0;
}

.modal-symbol-wrap {
  flex-shrink: 0;
}

.modal-symbol {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.modal-title-wrap {
  flex: 1;
}

.modal-nomor {
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 4px;
}

.modal-judul {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin: 0;
  line-height: 1.4;
}

.modal-body {
  padding: 28px 32px 36px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  color: #333;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-section p {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

.modal-section ul {
  margin: 0;
  padding: 0 0 0 18px;
}

.modal-section ul li {
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 4px;
}

.modal-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-example-item {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.4;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .materi-hero {
    padding: 100px 1.2rem 50px;
  }

  .materi-grid {
    grid-template-columns: 1fr;
  }

  .materi-tabs {
    gap: 6px;
    padding: 6px 8px;
  }

  .materi-tab {
    font-size: 0.78rem;
    padding: 7px 13px;
  }

  .modal-header {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px 18px;
  }

  .modal-body {
    padding: 20px 22px 28px;
  }

  .modal-examples {
    grid-template-columns: 1fr;
  }

  .materi-progress-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
}