/* Debug - bisa dihapus */
body::before {
  content: "rangkuman.css loaded!";
  background: yellow;
  display: block;
  padding: 5px;
  text-align: center;
}



/* General Reset */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #f0f2f5;
  color: #222;
  overflow-x: hidden; /* Hindari scroll horizontal */
}

/* Layout container */
.materi-latihan-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Materi utama */
.materi-container {
  flex: 1;
  max-width: 80%;
  min-height: 400px;
  max-height: 3000px;
}

.materi-container .card-body {
  min-height: 400px;
  max-height: 3000px;
  overflow-y: auto;
  padding: 0.5rem;
  font-size: 13px;
}

/* Latihan soal */
.latihan-container {
  flex: 0 0 20%;
  max-width: 20%;
  max-height: 1200px;
  min-height: 400px;
  overflow-y: auto;
  font-size: 15px;
}

.latihan-container .card-body {
  min-height: 400px;
  max-height: 1200px;
  overflow-y: auto;
  padding: 0.5rem;
  font-size: 13px;
}

/* Kartu materi */
.materi-item {
  background-color: #eaf2f8;
  padding: 15px 20px;
  margin-bottom: 12px;
  border-radius: 8px;
  user-select: none;
  transition: background-color 0.3s;
  font-size: 14px;
  line-height: 1.6;
  color: #222;
}

.materi-item:hover {
  background-color: #d0e4f7;
}
.materi-item.active {
  background-color: #c0d8f2;
  font-weight: 600;
}
.materi-item.active .sub-materi {
  display: block;
}

.materi-item h5 {
  position: relative;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #000;
  padding-right: 1.5rem;
}

.materi-item h5::after {
  content: "Klik untuk melihat materi";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #000;
  font-weight: normal;
  line-height: 1;
}

/* Sub materi */
.sub-materi {
  display: none;
  margin-top: 10px;
  padding: 15px 20px;
  padding-left: 25px;
  background-color: #f5f9fc;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: justify;
  color: #222;
  font-family: Arial, sans-serif;
}

.sub-materi ul li {
  margin-bottom: 8px;
}

.sub-materi details {
  background-color: #e6f9e6;
  padding: 10px;
  border-left: 4px solid #4CAF50;
  border-radius: 4px;
  margin-top: 10px;
}

/* ✅ RESPONSIVE - Tampilan HP */
@media (max-width: 768px) {
  .materi-latihan-row {
    flex-direction: column;
  }

  .materi-container,
  .latihan-container {
    flex: 1 0 100%;
    max-width: 100%;
  }
  
   .materi-item h5::after {
    top: 70%;                /* posisikan tepat di bawah h5 */
    transform: translateY(5px); /* beri jarak ke bawah */
    font-size: 0.7rem;        /* opsional: perkecil font */
  }

  .latihan-container {
    overflow-x: visible; /* Hindari scroll horizontal */
  }

  .materi-container .card-body,
  .latihan-container .card-body {
    padding: 1rem; /* Tambah ruang agar nyaman dibaca */
    font-size: 14px;
  }

  .materi-item h5::after {
    font-size: 0.65rem;
  }
}
