/* =====================================================
   IMAGE LOADER WITH SPINNER
===================================================== */

/* Container utama */
.image-loader {
  position: relative;
  display: inline-block;
  width: 100%;
  text-align: center;
  overflow: hidden;
}

.image-loader img {
  width: 100%;
  height: auto;
  display: block;
}

.image-loader:not(.loaded) img {
  visibility: hidden;
}

.image-loader.loaded img {
  visibility: visible;
}

/* Spinner */
.image-loader .spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 45px;
  height: 45px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid #00d9ff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 1s linear infinite;
  z-index: 10;
}

/* Sembunyikan spinner setelah gambar selesai dimuat */
.image-loader.loaded .spinner {
  display: none;
}

/* Animasi spinner */
@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* =====================================================
     HERO SECTION IMAGE
  ===================================================== */
/* =====================================================
   HERO IMAGE SIZE ADJUSTMENT
===================================================== */
.hero .image-loader {
  max-width: 750px; /* Sebelumnya 600px */
  width: 100%;
  margin: 0 auto;
}

.hero .hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* =====================================================
     MAMBIS SECTION IMAGE
  ===================================================== */
.mambis-hero-image {
  max-width: 320px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* =====================================================
     RESPONSIVE SETTINGS
  ===================================================== */

/* Tablet */
@media (max-width: 992px) {
  .hero .image-loader {
    max-width: 500px;
  }

  .mambis-hero-image {
    max-width: 260px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .hero .image-loader {
    max-width: 100%;
  }

  .mambis-hero-image {
    max-width: 220px;
  }
}

/* Mobile kecil */
@media (max-width: 576px) {
  .mambis-hero-image {
    max-width: 180px;
  }

  .image-loader .spinner {
    width: 35px;
    height: 35px;
    border-width: 3px;
  }
}
