/* --- General Styling --- */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* --- Form Container --- */
.form-container {
  background-color: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.form-container h1 {
  color: #333;
  margin-bottom: 30px;
  font-weight: 600;
}

/* --- Input Fields --- */
.input-group {
  position: relative;
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-size: 14px;
}

.input-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-sizing: border-box; /* Penting */
  font-size: 16px;
}

.input-group input:focus {
  outline: none;
  border-color: #667eea;
}

/* --- Password Toggle Icon --- */
.toggle-password {
  position: absolute;
  right: 10px;
  top: 38px; /* Sesuaikan dengan tinggi label + padding */
  cursor: pointer;
  color: #888;
}

/* --- Button --- */
.btn-daftar {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  border: none;
  border-radius: 5px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-daftar:hover {
  background-color: #0056b3;
}

/* --- Alert Messages --- */
.alert {
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 5px;
  text-align: left;
}
.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.alert a {
  font-weight: bold;
  color: inherit;
}

/* ==========================================================================
   STYLE KHUSUS UNTUK HALAMAN INDEX / DASHBOARD
   ========================================================================== */

/* 1. Atur Body sebagai Kontainer Flex */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f0f0;

  display: flex; /* Gunakan Flexbox */
  flex-direction: column; /* Susun item secara vertikal (atas-bawah) */
  height: 100vh; /* Pastikan body mengisi seluruh tinggi layar */
  overflow: hidden; /* Sembunyikan scrollbar utama browser */
}

/* 2. Atur Header dan Navigasi Bawah */
.main-header,
.bottom-nav {
  flex-shrink: 0; /* Mencegah elemen ini mengecil/tertimpa */
}

.main-header {
  width: 100%; /* Tambahkan ini */
  background-color: #007bff;
  color: white;
  padding: 15px 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.main-header .brand {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}
.main-header .welcome {
  font-size: 14px;
  margin-top: 5px;
}

/* ... (CSS untuk .main-header tidak berubah) ... */

.bottom-nav {
  width: 100%; /* 1. Pastikan footer full-width */
  background-color: white;
  display: flex;
  justify-content: space-around; /* 2. Sebarkan merata */
  padding: 8px 0; /* 3. Kurangi padding sedikit di mobile */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.bottom-nav a {
  color: #888;
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  transition: color 0.3s;

  /* 4. Ini adalah kunci untuk mencegah tubrukan di mobile */
  flex: 1; /* Buat setiap link mengambil ruang yang sama rata */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0; /* Izinkan item untuk mengecil jika perlu */
}

.bottom-nav a.active {
  color: #007bff;
}

.bottom-nav i {
  display: block;
  font-size: 20px;
  margin-bottom: 4px; /* Kurangi jarak sedikit */
}

/* 3. Atur Konten Utama yang Bisa Di-Scroll */
.main-content {
  flex-grow: 1; /* Ini kuncinya: buat konten mengisi semua ruang tersisa */
  padding: 20px;
  overflow-y: auto; /* Hanya area ini yang bisa di-scroll */

  /* --- Trik untuk Menyembunyikan Scrollbar --- */
  scrollbar-width: none; /* Untuk Firefox */
  -ms-overflow-style: none; /* Untuk Internet Explorer dan Edge */
}

/* Untuk Chrome, Safari, dan Opera */
.main-content::-webkit-scrollbar {
  display: none;
}

/* 4. Style untuk Isi Konten */
.slideshow-placeholder {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px; /* Ini penting untuk memberi jarak antar kotak */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.slideshow-placeholder img {
  width: 100%; /* Gunakan width 100% */
  height: 300px; /* Tambahkan tinggi fixed */
  object-fit: cover; /* Agar gambar tidak terdistorsi dan memenuhi area */
  border-radius: 5px;
}

/* ... (CSS untuk .slideshow-placeholder tidak berubah) ... */

/* 4. Style untuk Kotak Pembungkus (Baru) */
.feature-container {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ... (CSS untuk .feature-container tidak berubah) ... */
.info-container {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

/* 5. Style untuk Grid Menu (Versi Medium dengan Ikon) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(120px, 1fr)
  ); /* Kotak lebih kecil dari aslinya */
  gap: 12px; /* Jarak yang rapat */
}

.feature-item {
  background-color: #28a745;
  color: white;
  padding: 15px 10px; /* Padding lebih kecil */
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 12px; /* Font size kecil */
  transition: background-color 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90px; /* Tinggi minimal lebih kecil */
}
.feature-item:hover {
  background-color: #218838;
  transform: translateY(-3px); /* Efek hover lebih halus */
}
.feature-item i {
  font-size: 22px; /* Ikon lebih kecil dari aslinya */
  margin-bottom: 8px;
}

/* ==========================================================================
   STYLE KHUSUS UNTUK SLIDESHOW (VERSI SLIDE/EFEK GESER)
   ========================================================================== */

.slideshow-section {
  background-color: white;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden; /* Sembunyikan slide yang berada di luar area */
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 400px;

  /* --- INI ADALAH KUNCI UNTUK EFEK SLIDE --- */
  display: flex; /* Menyusun slide secara horizontal */
  transition: transform 0.5s ease-in-out; /* Animasi pergeseran */
}

.slide {
  position: relative; /* <-- TAMBAHKAN BARIS INI! INI KUNCI-NYA */
  min-width: 100%; /* Setiap slide mengambil lebar penuh container */
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 15px 20px;
  box-sizing: border-box;
}

.slide-title h3 {
  margin: 0;
  font-size: 22px;
}

.slide-title a {
  color: white;
  text-decoration: none; /* Hapus garis bawah */
  transition: text-decoration 0.3s; /* Animasi hover */
}

.slide-title a:hover {
  text-decoration: underline; /* Tampilkan garis bawah saat hover */
}

.slideshow-note {
  text-align: center;
  padding: 10px;
  margin: 0;
  font-size: 12px;
  color: #888;
  background-color: #f9f9f9;
}
