/* ===============================
   MODAL LAINNYA (FINAL SERAGAM)
   =============================== */

.modal-lainnya {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

/* Konten utama */
.modal-lainnya .modal-content {
  background: #ffffff;
  margin: 100px auto;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 880px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeInUp 0.3s ease;
}

/* Branding kiri atas */
.modal-lainnya .modal-content .branding {
  display: flex;
  align-items: center;
  position: absolute;
  top: 20px;
  left: 30px;
  cursor: pointer;
}

.modal-lainnya .modal-content .branding img {
  height: 26px;
  margin-right: 8px;
}

.modal-lainnya .modal-content .branding span {
  font-weight: bold;
  font-size: 20px;
  color: #333;
}

/* Judul */
.modal-lainnya .modal-content h3 {
  text-align: center;
  font-size: 22px;
  margin-top: 60px;
  margin-bottom: 30px;
  font-weight: bold;
  color: #333;
}

/* Tombol Close */
.modal-lainnya .close-btn {
  color: #333;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 30px;
  transition: color 0.2s;
}

.modal-lainnya .close-btn:hover {
  color: #ff0000;
}

/* Grid isi modal */
.modal-lainnya .modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 40px 40px;
  padding-bottom: 20px;
}

.modal-lainnya .modal-grid a {
  text-align: center;
  padding: 24px 12px;
  border-radius: 18px;
  color: #004d40;
  text-decoration: none;
  font-weight: 600;
  background: #e3f2fd;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.modal-lainnya .modal-grid a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.modal-lainnya .modal-grid i {
  display: block;
  font-size: 28px;
  margin-bottom: 10px;
}

/* ===== VARIASI WARNA PASTEL ===== */
.modal-lainnya .modal-grid a:nth-child(1)  { background: #fff9c4; } /* SP4N Lapor */
.modal-lainnya .modal-grid a:nth-child(2)  { background: #c8e6c9; } /* MyASN */
.modal-lainnya .modal-grid a:nth-child(3)  { background: #b3e5fc; } /* Srikandi */
.modal-lainnya .modal-grid a:nth-child(4)  { background: #f8bbd0; } /* PPID */
.modal-lainnya .modal-grid a:nth-child(5)  { background: #d7ccc8; } /* JDIH */
.modal-lainnya .modal-grid a:nth-child(6)  { background: #f0f4c3; } /* SIMBG */
.modal-lainnya .modal-grid a:nth-child(7)  { background: #d1c4e9; } /* Perizinan */
.modal-lainnya .modal-grid a:nth-child(8)  { background: #ffe082; } /* Berita */
.modal-lainnya .modal-grid a:nth-child(9)  { background: #bbdefb; } /* Pengumuman */
.modal-lainnya .modal-grid a:nth-child(10) { background: #e1bee7; } /* JDIH DPRD */
.modal-lainnya .modal-grid a:nth-child(11) { background: #ffe0b2; } /* Dokumen */

/* ===== ANIMASI ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
  .modal-lainnya .modal-content {
    margin: auto;
    width: 95%;
    padding: 10px 10px;
    border-radius: 14px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }

  .modal-lainnya .modal-content .branding {
    display: none;
  }

  .modal-lainnya .modal-content h3 {
    font-size: 17px;
    margin-top: 60px;
    margin-bottom: 20px;
  }

  .modal-lainnya .modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-bottom: 20px;
  }

  .modal-lainnya .modal-grid a {
    padding: 14px 10px;
    border-radius: 12px;
    font-size: 13px;
  }

  .modal-lainnya .modal-grid i {
    font-size: 22px;
    margin-bottom: 6px;
  }

  .modal-lainnya .close-btn {
    font-size: 20px;
    top: 14px;
    right: 16px;
  }
}
