/* =========================
   Logo Perusahaan: Desktop vs Mobile
========================= */
.img-desktop {
  display: block;
}
.img-mobile {
  display: none;
}

@media (max-width: 768px) {
  .img-desktop {
    display: none;
  }
  .img-mobile {
    display: block;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
  }
}

/* =========================
   Variabel posisi & ukuran WA
========================= */
:root {
  --wa-size: 56px; /* diameter bulat */
  --wa-bottom: 20px; /* jarak dari bawah */
  --wa-right: 20px; /* jarak dari kanan */
  --wa-gap: 12px; /* jarak tombol WA ↔ chatbox */
}

/* =========================
   WhatsApp FAB (pill + bulat)
========================= */
.wa-fab {
  position: fixed !important;
  right: var(--wa-right) !important;
  bottom: var(--wa-bottom) !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 2147483647; /* di atas overlay lain */
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

/* Pill teks */
.wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 9999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  font-weight: 600;
  letter-spacing: 0.2px;
}
.wa-text {
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.wa-arrow {
  font-size: 1rem;
  opacity: 0.95;
}

/* Bulat hijau dengan ikon WA */
.wa-circle {
  width: var(--wa-size);
  height: var(--wa-size);
  border-radius: 50%;
  background: #25d366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.wa-circle i {
  color: #fff;
  font-size: 26px;
  line-height: 1;
}
.wa-fab:hover .wa-circle {
  transform: scale(1.06);
  background: #1ebe5d;
}

.wa-fab:focus-visible,
.wa-pill:focus-visible,
.wa-circle:focus-visible {
  outline: 2px solid #1ebe5d;
  outline-offset: 2px;
}

/* =========================
   Chatbox (muncul di atas FAB)
========================= */
.chatbox {
  position: fixed !important;
  right: var(--wa-right) !important;
  bottom: calc(var(--wa-bottom) + var(--wa-size) + var(--wa-gap)) !important;
  width: 320px;
  max-width: 92vw;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: none; /* dibuka via JS */
  flex-direction: column;
  z-index: 2147483646; /* tepat di bawah FAB */
  animation: fadeInUp 0.3s ease-in-out;
  font-family: "Segoe UI", sans-serif;
}

/* Header / Body / Footer */
.chatbox-header {
  background: #25d366;
  color: #fff;
  padding: 12px 15px;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.chatbox-header .close-chatbox {
  cursor: pointer;
  font-size: 20px;
}

.chatbox-body {
  padding: 15px;
  background: #f9f9f9;
  color: #333;
  font-size: 14px;
  max-height: 200px;
  overflow-y: auto;
}
.chatbox-footer {
  padding: 10px 15px;
  background: #fff;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.chatbox input {
  width: 100%;
  font-size: 14px;
  padding: 8px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  transition: border 0.2s ease;
}
.chatbox input:focus {
  border-color: #25d366;
}

/* Pesan */
.chat-message {
  margin-bottom: 10px;
  font-size: 14px;
}
.admin-message {
  background: #e2e3e5;
  padding: 10px 12px;
  border-radius: 10px;
  max-width: 85%;
  float: left;
  clear: both;
}
.user-message {
  background: #dcf8c6;
  padding: 10px 12px;
  border-radius: 10px;
  max-width: 85%;
  float: right;
  clear: both;
}

/* =========================
   Animasi
========================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
  :root {
    --wa-bottom: 15px;
    --wa-right: 15px;
  }
  .wa-fab {
    gap: 8px;
  }
  .wa-pill {
    padding: 9px 12px;
    font-size: 0.95rem;
  }
  .chatbox {
    right: var(--wa-right);
    width: 90%;
  }
  /* Sembunyikan panah di mobile */
  .wa-arrow {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .glightbox-clean .gslide-description {
    font-size: 14px;
    padding: 10px;
  }
  .glightbox-container {
    padding: 0 !important;
  }
}

@media (max-width: 480px) {
  :root {
    --wa-bottom: 14px;
    --wa-right: 14px;
  }
  .wa-fab {
    gap: 8px;
  }
  .wa-pill {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
}

@media (max-width: 400px) {
  .chatbox {
    width: 94%;
  }
  .glightbox-container {
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
  }
  .gslide-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }
}

/* =========================
   Hero Typography
========================= */
#hero h1,
#hero p {
  font-family: "Poppins", sans-serif !important;
}

@media (max-width: 768px) {
  #hero h1 {
    font-size: 1.4rem !important;
  }
  #hero p {
    font-size: 0.95rem !important;
  }
}
