/* Import Font dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Reset CSS Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Poppins', sans-serif;
    height: 100%;
    overflow: hidden; /* Mencegah scroll di halaman utama */
    color: #fff;
}

/* Latar Belakang Video */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Memastikan video menutupi seluruh layar */
}

/* Overlay Gelap untuk membuat teks lebih mudah dibaca */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 60, 90, 0.5); /* Warna biru gelap transparan */
    z-index: -1;
}

/* Kontainer Utama */
.main-container {
    height: 100vh; /* Setinggi layar viewport */
    display: flex;
    flex-direction: column;
    justify-content: top; /* top secara vertikal */
    align-items: center; /* Tengah secara horizontal */
    padding: 20px;
    text-align: center;
}

.main-header {
    margin-bottom: 40px;
}

.main-header h1 {
    font-size: 3rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.main-header p {
    font-size: 1.2rem;
    font-weight: 300;
}

/* Kontainer Kartu */
.card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; /* Kartu akan turun ke bawah jika layar terlalu kecil */
}

/* Styling Kartu */
.card {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1); /* Latar belakang transparan */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px); /* Efek Kaca (Glassmorphism) */
    -webkit-backdrop-filter: blur(10px);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;

    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px); /* Efek mengangkat saat di-hover */
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.card i {
    font-size: 3rem; /* Ukuran ikon */
}

/* Carousel/Slider Gambar - BAGIAN YANG DIPERBARUI */
.carousel-container {
    position: absolute;
    bottom: 5%; /* Posisi di 5% dari bawah layar */
    width: 90%;
    max-width: 800px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    height: 180px; /* PERUBAHAN: Menetapkan tinggi carousel agar tidak terlalu besar */
    background: rgba(0,0,0,0.2); /* Tambahan: Latar belakang jika gambar lambat dimuat */
}

.carousel-slider {
    display: flex;
    width: 300%; /* 100% per gambar, total 3 gambar */
    height: 100%; /* PERUBAHAN: Memastikan slider mengisi tinggi kontainer */
    animation: slide 15s infinite ease-in-out; /* Animasi slider */
}

.slide {
    width: 33.333%; /* Lebar setiap slide */
    height: 100%; /* PERUBAHAN: Memastikan setiap slide mengisi tinggi slider */
}

.slide img {
    width: 100%;
    height: 100%; /* PERUBAHAN: Membuat gambar mengisi tinggi kontainer slide */
    display: block;
    object-fit: cover; /* PERUBAHAN PENTING: Efek "Fit-Crop" */
    object-position: center; /* PERUBAHAN: Memastikan crop fokus di tengah */
}

/* Animasi untuk Carousel (CSS Only) */
@keyframes slide {
    0%, 25% { transform: translateX(0%); } /* Tahan di gambar 1 */
    33%, 58% { transform: translateX(-33.333%); } /* Pindah dan tahan di gambar 2 */
    66%, 91% { transform: translateX(-66.666%); } /* Pindah dan tahan di gambar 3 */
    100% { transform: translateX(0%); } /* Kembali ke gambar 1 */
}

/* Desain Responsif untuk Layar Kecil (Mobile) */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto; /* Izinkan scroll di mobile jika konten tidak muat */
    }

    .main-container {
        height: auto;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 80px;
    }

    .main-header h1 {
        font-size: 2rem;
    }

    .main-header p {
        font-size: 1rem;
    }

    .card-container {
        gap: 15px;
    }

    .card {
        width: 120px;
        height: 120px;
    }

    .card i {
        font-size: 2.5rem;
    }
    .card span {
        font-size: 0.8rem;
    }

    .carousel-container {
        position: relative; /* Ubah dari absolute ke relative */
        margin-top: 40px; /* Beri jarak dari kartu */
        bottom: auto;
        width: 100%;
        height: 150px; /* PERUBAHAN: Sesuaikan tinggi carousel untuk mobile juga */
    }
}

/* infinite scroll */
.infinite-scroll-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px 0;
}

.infinite-scroll-track {
  display: flex;
  gap: 20px;
  animation: scroll-cards 20s linear infinite;
  padding: 0 20px;
}

.infinite-scroll-card {
  flex: 0 0 250px;
  height: 200px;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.card-content {
  height: 100%;
  padding: 20px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.card-content i {
  font-size: 32px;
  margin-bottom: 15px;
}

.card-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.card-content p {
  font-size: 14px;
  opacity: 0.9;
}

@keyframes scroll-cards {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-250px * 3 - 60px));
  }
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  .infinite-scroll-card {
    background: linear-gradient(135deg, #8a3eff, #3a7bd5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .infinite-scroll-container {
    max-width: 100%;
    padding: 15px 0;
  }
  
  .infinite-scroll-card {
    flex: 0 0 200px;
    height: 160px;
  }
  
  .card-content i {
    font-size: 24px;
    margin-bottom: 10px;
  }
  
  .card-content h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .card-content p {
    font-size: 12px;
  }
  
  @keyframes scroll-cards {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(calc(-200px * 3 - 60px));
    }
  }
}