/* ================================================================
   MASRI.CLOUD — STYLE FIXES PATCH
   Tempel di index.html SETELAH <link rel="stylesheet" href="style.css">
   ================================================================ */

/* ── FIX 1: HAMBURGER MERAH (debug artefak) ────────────────────── */
.nav__hamburger {
  background: var(--surface) !important;   /* hapus background: red */
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ── FIX 2: STATS-BAR — hapus definisi ganda, pake satu yg bersih ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  z-index: 1;
  /* override flex dari definisi ke-2 yg bikin konflik */
  justify-content: unset;
  align-items: unset;
  padding: unset;
  box-shadow: none;
  backdrop-filter: none;
}

/* Responsive stats-bar */
@media (max-width: 1024px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ── FIX 3: STATS-WRAPPER — tambah position:relative supaya
         .mitra-spiral (position:absolute) tidak kabur keluar ──── */
.stats-wrapper {
  position: relative;
  overflow: visible;
}

/* ── FIX 4 & 5: FEATURE PANEL — tampilkan hanya satu panel aktif,
         ganti flex-direction jadi column ──────────────────────── */
.feature-panel {
  flex-direction: column;   /* fix: konten tidak tumpang tindih horisontal */
  position: relative;
}

/* Sembunyikan semua feature-panel-content */
.feature-panel-content {
  display: none;
  width: 100%;
}

/* Tampilkan hanya yang pertama sebagai default */
.feature-panel-content:first-of-type {
  display: block;
}

/* Tampilkan yang punya class .active (diatur via JS) */
.feature-panel-content.active {
  display: block;
}

/* ── FIX 6: Pastikan .feature-item hover/active terhubung ke panel ─ */
/* (JS di main.js seharusnya toggle class .active di .feature-item
   dan .feature-panel-content secara bersamaan) */

/* ── FIX 7: MITRA-BTN — hapus duplikat, normalkan satu definisi ── */
/* Sudah di-override di sini dengan versi tunggal yang bersih */
.mitra-btn {
  position: fixed;
  bottom: 62px;
  left: 20px;
  z-index: 8001;
  padding: 10px 16px;
  border-radius: 20px;
  background: #0a0f1e;
  color: #67e8f9;
  border: 1px solid rgba(103, 232, 249, 0.5);
  cursor: pointer;
  font-family: var(--font-body, sans-serif);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.mitra-btn:hover {
  background: rgba(103, 232, 249, 0.08);
  border-color: #67e8f9;
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.25);
  transform: translateY(-1px);
}

.mitra-btn--active {
  background: rgba(103, 232, 249, 0.1);
  color: #fff;
  animation: mitraPulse 2.5s ease-in-out infinite;
}

@keyframes mitraPulse {
  0%,  100% { box-shadow: 0 0 12px rgba(103, 232, 249, 0.2); }
  50%        { box-shadow: 0 0 24px rgba(103, 232, 249, 0.5); }
}

@media (max-width: 768px) {
  #mitraToggle { display: none !important; }
  .mitra-btn   { bottom: 80px; left: 12px; }
}

/* ── FIX 8: Z-INDEX LAYER HIERARCHY ────────────────────────────────
   Problem: #dragonCanvas and #mitraSvg are position:fixed z-index:1.
   Content sections also have z-index:1 — same level, so dragon/mitra
   (appearing later in DOM) paint ON TOP of content sections.
   Fix: bump content sections to z-index:2 so they always render above
   decorative fixed layers. Only positions that already have z-index
   or position:relative are affected — no visual design change.
   ────────────────────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 2;
}

/* ── FIX 9: PARTICLE CANVAS CSS FALLBACK ────────────────────────────
   <canvas id="particle"> is inside .hero (a flex container).
   JS sets position:fixed after load. If JS fails/delays, the canvas
   sits as a flex item and disrupts the hero layout.
   This rule ensures it is always a fixed background layer.
   ────────────────────────────────────────────────────────────────── */
#particle {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100vh !important;
  z-index: -1 !important;
  pointer-events: none;
}

/* ── FIX 10: HERO SCROLL / OVERLAP ──────────────────────────────────
   .hero has overflow:hidden (clips x+y). Change to clip only x-axis
   so hero boundary never interferes with the document scroll flow.
   overflow-x:hidden + overflow-y:clip = clip both but no scroll
   container created, avoiding any scroll-blocking side-effects.
   ────────────────────────────────────────────────────────────────── */
.hero {
  overflow-x: hidden;
  overflow-y: clip;
}
