/* =========================
   RESET & CSS VARIABLE
========================= */
* {
  box-sizing: border-box;
}

:root {
  --font-size: 16pt;
  --font-family: "Segoe UI", Arial, sans-serif;
  --font-color: #333333;
}

/* =========================
   BASE
========================= */
body {
  margin: 0;
  padding: 16px;
  font-family: var(--font-family);
  font-size: var(--font-size);
  color: var(--font-color);
  background: #f4f6f9;
}

/* =========================
   CONTAINER
========================= */
.header-latihan,
.box-soal,
.box-pembahasan,
.nav-soal {
  max-width: 95%;
  margin: auto;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 16px;
}

/* =========================
   HEADER
========================= */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-latihan h2 {
  margin: 0;
  font-size: 20px;
}

.progress {
  font-size: 14px;
  color: #666;
  margin-top: 6px;
}

/* =========================
   MENU 3 TITIK
========================= */
.menu-wrapper {
  position: relative;
}

/* Tooltip sederhana */
.menu-btn {

}

/* tooltip text */
.menu-btn::after {
  content: attr(data-hint); /* ambil dari data-hint */
  position: absolute;
  bottom: 120%; /* di atas tombol */
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* muncul saat hover */
.menu-btn:hover::after {
  opacity: 1;
}

.menu-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 10px;
  line-height: 1;
    position: relative;
}

.menu-btn:hover {
  background: #f1f3f4;
  border-radius: 8px;
}

/* Dropdown */
.menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 34px;
  width: 220px;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  z-index: 999;
}

.menu-group {
  margin-bottom: 10px;
}

.menu-group:last-child {
  margin-bottom: 0;
}

.menu-group label {
  font-size: 12px;
  color: #555;
  display: block;
  margin-bottom: 4px;
}

.menu-group select,
.menu-group input {
  width: 100%;
  padding: 6px;
  font-size: 14px;
}

/* =========================
   SOAL
========================= */
.box-soal {
  font-size: var(--font-size);
}

.pertanyaan {
  font-size: var(--font-size);
  line-height: 1.7;
  margin-bottom: 16px;
}

.opsi {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.2s;
  font-size: var(--font-size);
}

.opsi:hover {
  background: #f0f7ff;
}

.opsi input {
  margin-top: 4px;
}

.opsi input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

.opsi input[type="radio"]:checked::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #000;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
}


/* =========================
   BUTTON
========================= */
.btn-jawab {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

.btn-jawab:hover {
  background: #155ec2;
}

/* =========================
   PEMBAHASAN
========================= */
.box-pembahasan h4 {
  margin-top: 0;
}

/* =========================
   NAVIGASI
========================= */
.nav-soal {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.btn-nav {
  flex: 1;
  text-align: center;
  padding: 12px;
  background: #e9ecef;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
}

.btn-nav:hover {
  background: #dcdfe3;
}


/* =========================
   FLOAT NAVIGATION < >
========================= */
.soal-wrapper {
  position: relative;
}

.soal-content {
  padding: 0 40px; /* ruang kiri & kanan */
}

.nav-float {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e9ecef;
  color: #333;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  line-height: 38px;
  text-decoration: none;
  cursor: pointer;
  z-index: 10;
}

.nav-float:hover {
  background: #d0d4da;
}

/* kiri */
.nav-prev {
  left: 5px;
}

/* kanan */
.nav-next {
  right: 5px;
}

/* =========================
   DUA KOLOM SOAL + OPSI
========================= */
.dua-kolom {
  display: flex;
  gap: 20px;          /* jarak antar kolom */
  flex-wrap: wrap;     /* agar turun di mobile */
}

.dua-kolom .kolom {
  flex: 1;             /* masing-masing kolom sama lebar */
  min-width: 300px;    /* minimal lebar supaya tidak terlalu sempit */
}

.dua-kolom .pertanyaan {
  font-weight: 500;
  line-height: 1.7;
}

.dua-kolom .opsi-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* =========================
   TABLET (≤ 768px)
========================= */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .header-latihan h2 {
    font-size: 18px;
  }

  .btn-jawab {
    width: 100%;
  }
  .dua-kolom {
    flex-direction: column; /* kolom jawaban turun di bawah soal */
  }
}

/* =========================
   MOBILE (≤ 480px)
========================= */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .header-latihan,
  .box-soal,
  .box-pembahasan,
  .nav-soal {
    padding: 8px;
    border-radius: 6px;
    max-width: 95%;
  }

  .header-latihan h2 {
    font-size: 16px;
  }

  .progress {
    font-size: 16px;
  }

  .opsi {
    padding: 8px;
  }

  .nav-soal {
    flex-direction: row;
  }

  .btn-nav {
    width: 48%;
  }
}
