html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  color: #333;
  background-color: #f5f7ff;
  overflow-x: hidden;
  /* Sticky Footer with Flexbox */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1; /* Allow main content to grow and push footer down */
}

/* HEADER */
header {
  background: #2766A7;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  flex-wrap: wrap;
}

header .logo {
  font-size: 1.5em;
  font-weight: bold;
}

header .logo img {
  height: 40px;
  vertical-align: middle;
}

header .logo a {
  /* Mencegah garis bawah atau spasi tambahan pada link gambar */
  line-height: 0;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 15px; /* Mengurangi jarak antar menu di desktop */
}

nav ul li {
  /* Menambahkan kotak di setiap item menu */
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

nav ul li:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

nav ul li a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 8px 15px; /* Padding untuk bentuk tombol */
}

/* HAMBURGER MENU */
.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  margin: 5px 0;
  background: white;
  transition: all 0.3s ease-in-out;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.close-menu-btn {
  display: none; /* Sembunyikan di desktop */
}


/* SLIDER */
.slider {
  position: relative;
  height: 70vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

.slide-1 {
  background-image: url('images/slide1.jpg');
}

.slide-2 {
  background-image: url('images/slide2.jpg');
}

.slide-3 {
  background-image: url('images/slide3.jpg');
}

.slide .overlay {
  background: rgba(0,0,0,0.4);
  color: white;
  position: absolute;
  bottom: 20%;
  left: 10%;
  padding: 20px 30px;
  border-radius: 10px;
}

/* FILTER */
.filter-section {
  padding: 40px 10%;
  text-align: center;
  background: #eef1ff;
}

.filter-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.filter-box input, .filter-box select {
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-width: 200px;
}

/* WELCOME SECTION */
.welcome-section {
  padding: 60px 10%;
  text-align: center;
  background: #eef1ff;
}
.title-welcome {
  color: #484E62;
  margin-bottom: 20px;
}
.welcome-section p {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1em;
  line-height: 1.7;
  color: #555;
}

/* PROPERTI */
.properti {
  padding: 60px 10%;
  text-align: center;
  background: #e24d4d;
}

.properti-rumah {
  padding: 40px 10%;
  text-align: center;
  background: #b2d7e8;
}

.properti-tanah {
  padding: 40px 10%;
  text-align: center;
  background: #e1e8b2;
}

h2.title  {
  color: rgb(34, 33, 33);
  margin-bottom: 40px;
  text-align: center;
}

h2.title-rumah {
  color: #2D738F;
  margin-bottom: 40px;
  text-align: center;
}

h2.title-tanah {
  color: #AB9052;
  margin-bottom: 40px;
  text-align: center;
}

h2.title-dokumen {
  color: #46895B;
  margin-bottom: 40px;
  text-align: center;
}

h2.title-cari {
  color: #484E62;
  text-align: center;
}

h2.title-pelanggan {
  color: #484E62;
  margin-bottom: 40px;
  text-align: center;
}

.title-kontak {
  color: #484E62;
  margin-bottom: 40px;
  text-align: center;
}

.contact-section {
  padding: 60px 10%;
}

.contact-wrapper {
  display: flex;
  align-items: center;
  gap: 50px;
}

.cs-image-container {
  flex-basis: 300px;
  flex-shrink: 0;
}

.cs-image-container img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.contact-info {
  flex-grow: 1;
}

.contact-section p {
  max-width: 700px;
  margin: 0 0 30px 0;
  font-size: 1.1em;
  line-height: 1.6;
  color: #555;
}

.contact-details {
  display: flex;
  justify-content: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center; /* Menengahkan konten di dalam tombol */
  min-width: 240px;      /* Menetapkan lebar minimum yang sama */
  gap: 12px;
  padding: 15px 30px;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  font-size: 1.1em;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-contact:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.btn-contact img {
  height: 28px;
}

.btn-email {
  background-color: #D44638; /* Warna khas email/Google */
}
.btn-email:hover {
  background-color: #e55d50;
}

.btn-whatsapp-contact {
  background-color: #128C7E; /* Warna khas WhatsApp */
}
.btn-whatsapp-contact:hover {
  background-color: #1AD08F;
}

.properti h2 {
  color: #557FFF;
  margin-bottom: 30px;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

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

.card-content {
  padding: 15px;
}

.card-content h3 {
  color: #333;
  margin-bottom: 5px;
}

.harga {
  color: #557FFF;
  font-weight: bold;
}

.card-large img { height: 250px; }
.card-small img { height: 160px; }

/* PENGURUSAN DOKUMEN */
.dokumen-section {
  padding: 60px 10%;
  text-align: center;
  background-color: #b2e8b6;
}

.dokumen-section p {
  max-width: 600px;
  margin: 0 auto 30px auto;
  font-size: 1.1em;
}

.dokumen-list {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dokumen-item {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 280px;
}

.dokumen-item .icon {
  font-size: 2.5em;
  display: block;
  margin-bottom: 10px;
}

.dokumen-item p {
  font-size: 0.9em;
  color: #666;
  margin-top: 10px;
  line-height: 1.5;
}

/* TESTIMONI */
.testimoni {
  background: #eef1ff;
  padding: 60px 10%;
  text-align: center;
}

.testimoni h2 {
  color: #484E62;
  margin-bottom: 30px;
}

.testi-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.testi-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 300px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.testi-card p {
  font-style: italic;
  margin-bottom: 10px;
}

/* MAPS SECTION */
.map-section {
  padding: 60px 10%; /* Memberikan padding atas, bawah, dan samping */
  text-align: center;
  background-color: #DCDCDC;
}

.map-section h2 {
  color: #484E62;
  margin-bottom: 15px;
}

.map-address {
  margin-bottom: 30px;
  color: #555;
}

.map-container {
  position: relative;
  padding-bottom: 40%; /* Warna ungu halus yang konsisten dengan section lain */
}

.map-container {
  position: relative;
  padding-bottom: 40%; /* Aspect ratio untuk peta */
  height: 0;
  overflow: hidden;
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* FOOTER */
footer {
  background: #2766A7;
  color: white;
  text-align: center;
  padding: 20px;
  font-weight: 300;
  font-size: 14px;
}

footer a {
  color: inherit; /* Mengambil warna dari elemen induk (footer) */
  text-decoration: none; /* Menghilangkan garis bawah */
}

/* PAGE OVERLAY */
.page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999; /* Di bawah menu (1000), di atas konten lain */
  opacity: 0;
  pointer-events: none; /* Tidak bisa diklik saat tidak aktif */
  transition: opacity 0.4s ease-in-out;
}
.page-overlay.active {
  opacity: 1;
  pointer-events: auto; /* Bisa diklik saat aktif */
}

/* BUTTONS */
.btn {
  display: inline-block;
  background-color: #557FFF;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 40px;
  transition: background-color 0.3s ease;
}
.btn:hover {
  background-color: #4466cc;
}

.btn-rumah {
  display: inline-block;
  background-color: #71b1ce;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 40px;
  transition: background-color 0.3s ease;
}
.btn-rumah:hover {
  background-color: #8bc7e2;
}

.btn-tanah {
  display: inline-block;
  background-color: #d9c581;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 40px;
  transition: background-color 0.3s ease;
}
.btn-tanah:hover {
  background-color: #d5e183;
}

.btn-properti {
  display: inline-block;
  background-color: #75d07c;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 40px;
  transition: background-color 0.3s ease;
}
.btn-properti:hover {
  background-color: #9edca2;
}

.btn-konsultasi {
  display: inline-block;
  background-color: #484E62; /* Warna dari judul testimoni */
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 40px;
  transition: background-color 0.3s ease;
}
.btn-konsultasi:hover {
  background-color: #5a6179; /* Warna hover yang sedikit lebih terang */
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #128C7E;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 40px;
  transition: background-color 0.3s ease;
}
.btn-whatsapp img {
  height: 24px;
}
.btn-whatsapp:hover {
  background-color: #075E54;
}

/* TO-TOP BUTTON */
.to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: #2766A7;
  color: white;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  text-decoration: none;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}
.to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ANIMASI FADE IN */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Promo Popup */
.promo-popup {
    /* Posisi diatur oleh container */
    position: absolute;
    bottom: 0;
    right: 0;
    background: #203D43;
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 320px;
    width: calc(100vw - 40px); /* Lebar popup di mobile */
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.promo-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.promo-popup p {
    margin-bottom: 1rem;
    line-height: 1.4;
}

#closePromo {
    background: #DC4E4E;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#closePromo:hover {
    background: #c74242; /* A slightly darker shade of primary */
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.popup-link {
    color: #F8C674;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.popup-link:hover {
    color: white;
    text-decoration: underline;
}

/* Sembunyikan tombol ke atas saat popup promo muncul */
.promo-popup.show + #toTopBtn.show {
    opacity: 0;
    pointer-events: none;
}

.promo-popup p {
    font-size: 14px;
    text-align: center;
}

/* Wadah untuk elemen fixed */
.fixed-elements-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    /* Hapus flex-direction dan text-align agar logo kembali ke kiri */
    padding: 15px 20px; /* Sesuaikan padding untuk mobile */
    text-align: center;
  }
  
  .hamburger {
    display: block;
    position: absolute;
    right: 20px;
    top: 25px;
  }

  nav {
    position: fixed;
    top: 0; /* Mulai dari paling atas */
    right: -280px; /* Sesuaikan dengan lebar menu */
    width: 280px; /* Perkecil lebar menu */
    height: 100vh; /* Penuh setinggi layar */
    background: rgba(39, 102, 167, 0.95);
    transition: right 0.4s ease-in-out;
    padding-top: 100px; /* Beri jarak dari atas agar menu tidak terlalu ke atas */
    z-index: 1000; /* Pastikan menu di atas elemen lain */
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 20px;
    /* Menyesuaikan padding & margin untuk mobile */
    margin: 0 20px;
  }

  .close-menu-btn {
    display: block;
    /* Pindahkan dari posisi absolut ke flow normal */
    margin: 50px auto 0; /* 50px jarak dari atas, dan auto untuk tengah horizontal */
    width: 50px;
    height: 50px;
    border: 1px solid white;
    border-radius: 50%;
    color: white;
    font-size: 36px;
    line-height: 48px;
    text-align: center;
    font-weight: 300; /* Membuat 'X' lebih tipis */
    cursor: pointer;
  }
  .slide .overlay {
    left: 5%;
    right: 5%;
    bottom: 10%;
    text-align: center;
  }
  .contact-wrapper {
    flex-direction: column;
    text-align: center;
  }
  .contact-details {
    justify-content: center;
  }
  .testi-slider {
    max-width: 300px; /* Hanya menampilkan 1 kartu di mobile */
  }
  .testi-nav { display: none; } /* Sembunyikan tombol nav di mobile, bisa diganti dengan swipe */
}
