/* =============================== */
/* STICKY FOOTER          */
/* =============================== */
html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  background-color: #f8f9fa;
  overflow-x: hidden;
}

footer {
  margin-top: auto;
}

/* ========================================= */
/* CSS UMUM UNTUK WEBSITE DONGHUA CHINA    */
/* ========================================= */

/* Biar gambar tidak bisa di-drag sembarangan */
img {
  user-select: none;
  max-width: 100%; 
}

/* Bagian navbar biar lebih rapi dan ada efek hover */
.navbar {
  transition: 0.3s;
}

.navbar .nav-link {
  font-weight: 500;
  padding: 10px 16px;
  transition: 0.3s;
}

/* Warna link saat aktif dan saat diarahkan mouse */
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #ffffff !important;
  background-color: #0d6efd;
  border-radius: 6px;
}

/* Bagian hero di halaman home */
.hero {
  height: 60vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Style untuk card donghua di home & rekomendasi */
.donghua-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.donghua-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 10px 20px rgba(0,0,0,0.2);
}

/* Biar gambar card tidak melar */
.card-img-wrapper {
  height: 220px;
  overflow: hidden;
}

.card-img-wrapper img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}



/* Grid container */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Card utama untuk gambar galeri */
.gallery-card {
  width: 100%;
  /* Teknik Aspect Ratio menggunakan padding-top untuk konsistensi tinggi 3:4 */
  padding-top: 133.33%; /* (4 / 3) * 100% = 133.33% */
  height: 0; /* Tinggi diatur oleh padding-top */
  position: relative; /* Penting untuk posisi absolut gambar */

  overflow: hidden;
  border-radius: 12px;
  background: #111;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Efek zoom saat hover */
.gallery-card:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 24px rgba(0,0,0,0.3);
  z-index: 2;
}

/* Gambar otomatis memenuhi kotak */
.gallery-img {
  position: absolute; /* Gambar di-posisi absolut di dalam card */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Memenuhi tinggi yang dibuat oleh padding-top */
  object-fit: cover;
  transition: transform 0.4s ease;
  border-radius: 12px;
}

/* Styling Judul di bawah gambar */
.gallery-title {
  font-weight: 600;
  margin-top: 12px;
  font-size: 1rem;
  color: #333;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================= */
/* POP-UP (MODAL) STYLING  */
/* ========================= */

.modal-body img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-backdrop.show {
  opacity: 0.85; 
}

/* ========================= */
/* FORM & KOMPONEN LAIN  */
/* ========================= */

.list-group-item {
  border: none;
  background-color: #fff;
  border-bottom: 1px solid #e9ecef;
}

form .form-control,
form .form-select {
  border-radius: 10px;
}

.card {
  border-radius: 15px;
}

form textarea {
  resize: none;
}

/* ========================= */
/* FOOTER          */
/* ========================= */
footer {
  padding: 20px 0;
  background-color: #212529;
  color: #fff;
  text-align: center;
  margin-top: 50px;
}

/* Tombol kembali ke atas */
#btnTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
  transition: 0.3s;
}

/* ========================= */
/* RESPONSIVE        */
/* ========================= */
@media (max-width: 768px) {

  /* Tinggi hero di HP */
  .hero {
    height: 40vh;
  }

  /* Gambar card donghua lebih kecil */
  .card-img-wrapper {
    height: 180px;
  }

  /* Galeri jadi kotak (Square) di HP agar tidak kepanjangan */
  .gallery-card {
    padding-top: 100%; /* Rasio 1:1 untuk mobile */
  }
}