body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #eaf7f1, #c4e3db);
  margin: 0;
  padding-top: 70px;
  overflow-x: hidden;
}

/* Header */
header.navbar {
  padding: 6px 20px;
}

header .logo {
  height: 38px;
  width: auto;
  border-radius: 6px;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 0 5%;
  background: transparent; /* ubah dari #000 ke transparan */
}

/* ===== VIDEO BACKGROUND ===== */
.hero iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vw;
  height: 67.5vw;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 50, 0, 0.45);
  z-index: 1;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 0;
}


/* Konten hero tetap di atas overlay */
.hero-text,
.hero-image {
  position: relative;
  z-index: 2;
}

/* Hero Text */
.hero-text {
  flex: 1;
  max-width: 500px;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-text p {
  font-size: 1.2rem;
  color: #f0f0f0;
  margin-top: 10px;
}

/* Laptop mockup */
.hero-image {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
}

.laptop-frame {
  position: relative; /* kembali ke relative agar frame mengikuti flow */
  width: 56vw; /* ukuran lebih besar */
  max-width: 880px;
  min-width: 300px;
  overflow: hidden; /* pastikan konten yang diperbesar tidak menimbulkan ruang kosong di bawah */
  border-radius: 12px;
  transition: transform 0.35s ease;
  animation: popIn 640ms cubic-bezier(.22,.9,.35,1) both;
}

.laptop-frame img { display: block; width: 100%; height: auto; z-index: 1; border-radius: 12px; box-shadow: none; }
.laptop-screen { z-index: 2; }

.laptop-screen {
  position: absolute;
  /* tuned insets to match the visible bezel of the laptop image (symmetric top/bottom) */
  inset: 7% 9% 7% 9%; /* top right bottom left */
  overflow: hidden;
  border-radius: 8px;
  box-shadow: none; /* remove inset shadow to make screen/background cleaner */
}

.laptop-screen img {
  width: 99%;
  height: 99%;
  object-fit: contain; /* tampilkan seluruh konten tanpa terpotong */
  object-position: center center; /* pastikan area penting terlihat */
  display: block;
  transform: none;
  background: #000; /* isi area kosong dengan hitam agar serasi dengan layar */
}

/* ==============================
   #screen-demo markers (HASHTAGS)
   - Gunakan tag di bawah untuk cepat men-tweak tampilan screenshot
   - Contoh: ubah nilai di #width / #height / #object-fit / #object-position
   ============================== */
#screen-demo {
  /* #width: ubah lebar (persen atau px) */
  width: 87%;
  /* #height: ubah tinggi (persen atau px) */
  height: 82%;
  /* #object-fit: 'contain' atau 'cover' */
  object-fit: cover;
  /* #object-position: center, top, left center, dll */
  object-position: center center;

  /* #pos-x / #pos-y: atur posisi menggunakan variabel CSS
     - Nilai bisa menggunakan px, %, atau unit lain yang valid untuk translate()
     - Contoh cepat: --screen-x: -4px; --screen-y: 2%; */
    /* default: sedikit bergeser ke kanan dan ke bawah */
    --screen-x: 47px; /* #pos-x: geser ke kanan 6px */
    --screen-y: 25px; /* #pos-y: geser ke bawah 4px */

  /* #scale: atur zoom jika perlu */
  --screen-scale: 1; /* #scale */

  /* terapkan translate menggunakan variabel di atas */
  transform: translate(var(--screen-x), var(--screen-y)) scale(var(--screen-scale));

  /* #bg: warna background saat ada ruang kosong */
  background: #000;
  display: block;
}

/* Contoh cepat: jika ingin sedikit mengecilkan layar gunakan:
#screen-demo { width: 95%; height: 96%; }
*/
@media (max-width: 1200px) {
  .hero {
    padding: 0 3%;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  .laptop-frame {
    width: 52vw;
  }
  .laptop-screen {
    inset: 10% 9% 8% 9%;
  }
}

/* Medium desktops and laptops */
@media (max-width: 1024px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text p {
    font-size: 1.1rem;
  }

  .laptop-frame {
    width: 40vw;
  }
  .laptop-screen {
    inset: 7% 9% 8% 9%;
  }
}

/* Tablets */
@media (max-width: 800px) {
  body {
    padding-top: 60px;
  }

  header .logo {
    height: 32px;
  }

  .hero {
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
    gap: 20px;
  }

  .hero iframe {
    width: 150vw;
    height: 84vw;
  }

  .hero-text {
    max-width: none;
    margin-bottom: 2rem;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .laptop-frame {
    width: 280px;
  }
  .laptop-screen {
    /* pixel fallback on small screens: center and use percentages for consistent fit */
    inset: 8% 10% 8% 10%;
  }
  .laptop-screen img {
    transform: none; /* tampilkan penuh tanpa crop/shift */
  } 

  /* Charts section responsive */
  .row.g-4 {
    --bs-gutter-x: 1rem;
  }

  .col-lg-6 {
    margin-bottom: 2rem;
  }

  .card-body {
    padding: 1.5rem !important;
  }

  .chart-container {
    height: 35vh !important;
  }

  .table {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: 8px 10px;
  }
}

/* Mobile landscape */
@media (max-width: 640px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 0.95rem;
  }

  .laptop-frame {
    width: 250px;
  }
  .laptop-screen {
    inset: 8% 10% 8% 10%;
  } 

  .chart-container {
    height: 30vh !important;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  header.navbar {
    padding: 4px 15px;
  }

  header .logo {
    height: 28px;
  }

  .hero {
    padding: 1.5rem 1rem;
  }

  .hero iframe {
    width: 180vw;
    height: 101vw;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .btn-success {
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
  }

  .laptop-frame {
    width: 220px;
  }
  .laptop-screen {
    inset: 8% 10% 12% 10%;
  }

  /* Charts section mobile */
  .col-lg-6 {
    margin-bottom: 1.5rem;
  }

  .card-body {
    padding: 1rem !important;
  }

  .chart-container {
    height: 25vh !important;
  }

  .table {
    font-size: 0.75rem;
  }

  .table th,
  .table td {
    padding: 6px 8px;
  }

  footer {
    font-size: 0.8rem;
    padding: 1rem 0;
  }
}

/* Small mobile devices */
@media (max-width: 360px) {
  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-text p {
    font-size: 0.85rem;
  }

  .laptop-frame {
    width: 200px;
  }
  .laptop-screen {
    inset: 8% 10% 8% 10%;
  }
  .laptop-screen img {
    transform: none;
  }

  .chart-container {
    height: 20vh !important;
  }

  .table {
    font-size: 0.7rem;
  }

  .table th,
  .table td {
    padding: 4px 6px;
  }
}

/* Touch devices optimization */
@media (hover: none) and (pointer: coarse) {
  .btn-success:hover {
    transform: none;
  }

  .card:hover {
    transform: none;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero iframe {
    transform: translate(-50%, -50%) scale(1.1);
  }

  .laptop-frame img,
  .laptop-screen img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
