/* Section: Petunjuk Pengisian Survei */
.form-instructions {
  background-color: #fff8e1;
  border: 2px solid #ffe082;
  padding: 40px 25px;
  margin: 3px auto;
  font-family: "Poppins", sans-serif;
  color: #8d6e63;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  animation: fadeInSlideUp 1s ease;
}

.form-instructions h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: #f4a931;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.form-instructions .divider {
  width: 100px;
  height: 3px;
  background: #c97e47;
  border-radius: 3px;
  margin: 0 auto 40px auto;
  animation: munculDikit 0.8s ease-in-out;
}

.form-instructions p {
  font-size: 1.3em;
  margin-bottom: 10px;
  line-height: 1.6;
}

.form-instructions ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 15px;
}

.form-instructions ul li {
  margin: 8px 0;
  padding-left: 30px;
  position: relative;
  font-size: 1.1em;
  color: #ab5145;
  transition: transform 0.3s ease;
}

.form-instructions ul li:hover {
  transform: translateX(5px);
}

.form-instructions ul li::before {
  content: "🌟";
  position: absolute;
  left: 0;
  top: 0;
}

/* Survei Form */
.survei-form {
  background-color: #fff8e1;
  border: 2px solid #ffe082;
  padding: 40px 30px;
  margin: 3px auto;
  box-shadow: 0 8px 16px rgba(255, 193, 7, 0.2);
  text-align: center;
}

.survei-form h3 {
  font-size: 2.2rem;
  color: #f57c00;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  animation: floatIcon 2s ease-in-out infinite;
}

/* Alert sukses */
.alert-success {
  background-color: #c8e6c9;
  color: #2e7d32;
  border-left: 6px solid #388e3c;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 10px;
  font-weight: 500;
}

/* Grid Form */
.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/* Form Group */
.form-group {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  position: relative;
  text-align: left;
}

/* Label pertanyaan */
.form-group > label {
  font-weight: bold;
  color: #5d4037;
  font-size: 1rem;
  padding-left: 25px;
  position: relative;
}

.form-group > label::before {
  content: "💡";
  position: absolute;
  left: 0;
  top: 0;
}

/* Radio Group */
.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding-left: 10px;
}

.radio-group label {
  display: flex;
  align-items: center;
  font-weight: normal;
  font-size: 1rem;
  gap: 4px;
  color: #5d4037;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  accent-color: #fbc02d;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* === RAPIHKAN BLOK PERTANYAAN === */
.form-group:has(.radio-group) {
  /* tampilan seperti kartu */
  background: #fffdf3; /* krem sangat muda */
  border: 1px solid #ffe8a1; /* garis lembut */
  border-radius: 15px;
  padding: 18px 20px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 18px; /* jarak antar pertanyaan */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* efek hover biar interaktif */
.form-group:has(.radio-group):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

/* label pertanyaan dalam kartu—sedikit lebih tebal & rata kiri */
.form-group:has(.radio-group) > label {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

/* rapikan baris radio (tetap fleksibel di layar kecil) */
.radio-group {
  gap: 1.2rem;
  flex-wrap: nowrap; /* tetap satu baris selama cukup lebar */
}

@media (max-width: 576px) {
  /* di HP: radio boleh turun baris jika sempit */
  .radio-group {
    flex-wrap: wrap;
    gap: 0.7rem;
  }
  /* teks pertanyaan sedikit diperkecil */
  .form-group:has(.radio-group) > label {
    font-size: 0.95rem;
  }
}
/* Default (mobile-first): 1 kolom aja */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  width: 100%;
}

/* Desktop: jadi 2 kolom */
@media (min-width: 768px) {
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .form-group {
    width: 100%;
  }

  .form-group.full-width {
    grid-column: span 2;
  }
}

.radio-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.9rem;
  color: #5d4037;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  margin-bottom: 4px;
  accent-color: #fbc02d;
  width: 18px;
  height: 18px;
}

.radio-option .angka {
  font-weight: bold;
  margin-bottom: 2px;
}

.radio-option .keterangan {
  font-size: 0.85rem;
  text-align: center;
}

/* Input dan Textarea */
input[type="text"],
textarea {
  padding: 10px 12px;
  border: 2px solid #ffe082;
  border-radius: 12px;
  background-color: #fffde7;
  font-size: 1rem;
  color: #5d4037;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #fbc02d;
  background-color: #fff9c4;
}

/* Tombol Submit */
.btn-submit {
  background-color: #ffca28;
  color: #5d4037;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-submit:hover {
  background-color: #fdd835;
  transform: scale(1.05);
}

/* Animasi */
@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .form-grid {
    flex-direction: column;
  }

  .form-group {
    flex: 1 1 100%;
  }

  .survei-form {
    padding: 25px 20px;
  }

  .btn-submit {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .form-instructions h2,
  .survei-form h3 {
    font-size: 1.5em;
  }

  .form-instructions ul li {
    font-size: 0.95em;
  }

  .radio-group {
    gap: 0.5rem;
  }

  .radio-group label {
    font-size: 0.9rem;
  }
}
