/* Latar belakang gelap di seluruh layar */
.img-modal {
    position: fixed;
    z-index: 99999; /* Sangat tinggi agar berada di atas navbar website */
    left: 0;
    top: -100%; /* Memindahkan modal ke atas luar layar saat tersembunyi */
    width: 100%;
    height: 100%;
    opacity: 0;
    background-color: rgba(0, 0, 0, 0.85); /* Menambahkan latar belakang hitam transparan */
    transition: top 0.5s ease-out, opacity 0.5s ease-out; /* Efek animasi halus */
    overflow: auto;
}

/* KELAS BARU: Untuk memunculkan modal dari atas ke bawah */
.img-modal.show-modal {
    top: 0; /* Menurunkan modal ke posisi normal */
    opacity: 1; /* Membuat modal terlihat */
}

/* Wadah konten di tengah */
.img-modal-content {
    position: relative;
    margin: 8% auto;
    padding: 0;
    width: 90%;
    max-width: 650px; /* Batas lebar maksimal gambar pengumuman */
}

/* Pengaturan Gambar agar Responsif */
.announcement-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 60px rgba(255, 255, 255, 0.5);
}

/* Tombol Tutup (X) berbentuk lingkaran di pojok kanan atas gambar */
.img-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  color: #fff;
  background-color: #ff3333;
  font-size: 24px;
  font-weight: bold;
  width: 35px;
  height: 35px;
  line-height: 33px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: background-color 0.2s;
}

.img-close-btn:hover {
  background-color: #cc0000;
}

/* Penyesuaian untuk layar HP kecil */
@media screen and (max-width: 480px) {
  .img-modal-content {
    margin: 15% auto;
  }
  .img-close-btn {
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    line-height: 26px;
    font-size: 20px;
  }
}
