/* Section Statistik */
.statistik-wrapper {
  margin-top: 120px;               /* jarak awal di desktop */
  background-color: var(--third-color);
  padding: 60px 0;
} /* :contentReference[oaicite:0]{index=0} */

/* Container flex */
.statistik {
  display: flex;
  justify-content: center;
  align-items: flex-start;        /* ikon rata atas */  
  gap: 20px;
  overflow-x: auto;               /* scroll jika sempit */  
} /* :contentReference[oaicite:1]{index=1} */

/* Item: ikon kiri, teks kanan */
.statistik-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  width: auto;
  height: 100px;
  border-radius: 8px;
  padding: 12px;
  box-sizing: border-box;
} /* :contentReference[oaicite:2]{index=2} */

/* Wrapper ikon: lingkaran hijau + border putih */
.icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #FFFFFF;
  box-sizing: border-box;
} /* :contentReference[oaicite:3]{index=3} */

/* Outer ring hijau */
.icon-wrapper::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border-radius: 50%;
  border: 2px solid var(--primary-color);
} /* :contentReference[oaicite:4]{index=4} */

/* Ikon di dalam: 32px, putih */
.icon-wrapper .icon {
  font-size: 32px;
  color: #FFFFFF;
} /* :contentReference[oaicite:5]{index=5} */

/* Teks: angka + label */
.statistik-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
} /* :contentReference[oaicite:6]{index=6} */

/* Angka: 36px, bold, hijau */
.number {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  line-height: 1;
} /* :contentReference[oaicite:7]{index=7} */

/* Label: 16px, teks default */
.label {
  font-size: 16px;
  color: var(--text-color);
  line-height: 1.2;
} /* :contentReference[oaicite:8]{index=8} */

/* MEDIA QUERY: tablet ke bawah */
@media (max-width: 768px) {
  /* Container statistik jadi scrollable row */
  .statistik {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 1px;                   /* rapatkan sedikit */  
  } /* :contentReference[oaicite:9]{index=9} */

  /* Item diubah jadi kolom, center */
  .statistik-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: auto;
    max-width: none;
    height: auto;
    gap: 8px;
  }

  /* **Override jarak**: statistik langsung nempel di bawah overlay cards */
  .statistik-wrapper {
    margin-top: 0;
    padding-top: 2rem;
  }
}

/* MEDIA QUERY: HP kecil */
@media (max-width: 480px) {
  .statistik {
    gap: 2px;
  }
  .statistik-item {
    gap: 12px;
  }
}


/* public/css/statistik.css */

/* pastikan ada transition untuk wrapper dan outer ring */
.icon-wrapper {
  transition: background-color 0.3s ease;
}


/* hover hanya untuk icon-wrapper dan outer ring */
.statistik-item:hover .icon-wrapper {
  background-color: var(--hover-color);
}

/* keyframes untuk ring yang tumbuh dari dalam */
@keyframes expand-ring {
  0% {
    transform: scale(0.8);
    border-color: var(--primary-color);
  }
  100% {
    transform: scale(1);
    border-color: var(--hover-color);
  }
}

/* siapkan pseudo-element tanpa transition */
.icon-wrapper::after {
  /* pastikan ini sudah ada, tapi overriden agar siap animasi */
  transition: none !important;
  transform-origin: center;
}

/* Animasi muncul dari bawah & transparan */
.statistik-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(.4,1.2,.7,1) , transform 1.8s cubic-bezier(.4,1.2,.7,1);
}

/* Saat aktif, item jadi tampak dan posisi normal */
.statistik-fade.show {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay */
.statistik-fade:nth-child(1) { transition-delay: 0.1s;}
.statistik-fade:nth-child(2) { transition-delay: 0.35s;}
.statistik-fade:nth-child(3) { transition-delay: 0.6s;}

/* 1. Hilangkan overflow pada container */
.statistik-wrapper, 
.statistik, 
.container.statistik {
  overflow: visible !important;
  height: auto !important;
}

/* 2. Pastikan tidak ada height: 100%/vh pada child */
.statistik-wrapper,
.statistik {
  max-height: none !important;
}

/* 3. Jika ada: overflow-y: scroll; ganti jadi overflow-y: visible; */
.statistik-wrapper, 
.statistik {
  overflow-y: visible !important;
}

/* saat hover, jalankan animasi sekali dan tahan di akhir */
.statistik-item:hover .icon-wrapper::after {
  animation: expand-ring 0.6s ease-out forwards;
}

.menu-fade {
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.7s cubic-bezier(.42,2,.65,.97), transform 2.7s cubic-bezier(.42,2,.65,.97);
}
.menu-fade.show {
  opacity: 1;
  transform: scale(1);
}
.menu-fade:nth-child(1) { transition-delay: 0.35s;}
.menu-fade:nth-child(2) { transition-delay: 0.53s;}
.menu-fade:nth-child(3) { transition-delay: 0.71s;}
.menu-fade:nth-child(4) { transition-delay: 0.89s;}
