/* --- CSS VARIABLES & RESET --- */
:root {
  --primary-color: #0056b3;
  --secondary-color: #ffc107;
  --dark-color: #333;
  --light-color: #f4f4f4;
  --white: #fff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--light-color);
  color: var(--dark-color);
  overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
  display: flex;
  justify-content: space-between; /* Memisahkan Kiri (Menu) dan Kanan (Logo) */
  align-items: center;
  padding: 1rem 5%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.4s ease;
  background: transparent;
}

.navbar.scrolled {
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 0.8rem 5%;
}

/* Bagian Logo (Kanan) */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-align: left;
}

.navbar.scrolled .navbar-brand {
  color: var(--primary-color);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text .school-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-text .city {
  font-size: 0.8rem;
  font-weight: 300;
}

.navbar-logo {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

/* Bagian Menu (Kiri) */
.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
}

.navbar.scrolled .nav-links a {
  color: var(--dark-color);
}

.nav-links a:hover {
  color: var(--secondary-color);
}

/* Pastikan style ini juga berlaku untuk <button> */
.btn-login {
  background-color: var(--secondary-color);
  color: var(--dark-color) !important;
  padding: 8px 25px; /* Sesuaikan padding */
  border-radius: 20px;
  font-weight: 600 !important;
  transition: transform 0.3s ease !important;

  /* Tambahan untuk <button> */
  border: none;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
}
/* ... (lanjutkan style hover) */

.btn-login:hover {
  transform: scale(1.05);
  background-color: #e0a800;
}

/* Hamburger Menu (Awalnya Sembunyi di Desktop) */
.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--white);
}

.navbar.scrolled .bar {
  background-color: var(--dark-color);
}

/* --- HEADER / HERO --- */
header {
  height: 50vh; /* Tinggi separuh layar */
  width: 100%;
  position: relative;
  background: url("https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80")
    no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding-top: 60px;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 50, 100, 0.7); /* Overlay biru gelap */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.cta-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 30px;
  background: var(--secondary-color);
  color: var(--dark-color);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
}

.cta-button:hover {
  background: #fff;
}

/* --- CONTENT --- */
.main-content {
  padding: 3rem 5%;
}

.intro {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.intro h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.card:hover {
  transform: translateY(-10px);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* --- FOOTER --- */
footer {
  background-color: var(--dark-color);
  color: var(--white);
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

/* --- MEDIA QUERIES (RESPONSIVE) --- */
@media (max-width: 768px) {
  /* Navbar Mobile */
  .hamburger {
    display: block; /* Munculkan hamburger */
    z-index: 1002;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%; /* Sembunyikan menu ke kiri layar */
    top: 0;
    gap: 0;
    flex-direction: column;
    background-color: var(--primary-color); /* Background menu mobile */
    width: 70%; /* Lebar menu */
    height: 100vh;
    text-align: left;
    padding-top: 80px;
    transition: 0.3s;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    left: 0; /* Munculkan menu */
  }

  .nav-links li {
    width: 100%;
    margin: 15px 0;
    padding-left: 20px;
  }

  .nav-links a {
    font-size: 1.2rem;
    display: block;
  }

  .navbar-brand {
    font-size: 0.9rem;
  }

  .navbar-logo {
    max-height: 40px;
    width: auto;
  }

  header h1 {
    font-size: 1.8rem;
  }
}
/* --- Tambahkan kode ini di bagian paling bawah style.css --- */

/* Modal Pop-up */
.modal {
  display: none; /* Sembunyikan secara default */
  position: fixed;
  z-index: 2000; /* Pastikan di atas navbar */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4); /* Background gelap transparan */
}

.modal-content {
  background-color: var(--white);
  margin: 10% auto; /* Jarak atas-bawah (10%) dan ditengah secara horizontal (auto) */
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px; /* Ukuran maksimal modal */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalopen 0.4s;
}

@keyframes modalopen {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tombol Tutup */
.close-btn {
  color: var(--dark-color);
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
  color: var(--primary-color);
  text-decoration: none;
  cursor: pointer;
}

/* Form Styling */
.login-form-container h3 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

.btn-submit {
  width: 100%;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn-submit:hover {
  background-color: #004494;
}

.register-link {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
}

/* Password Toggle */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px !important; 
}

.toggle-password {
  position: absolute;
  right: 15px;
  cursor: pointer;
  color: #666;
  z-index: 10;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.toggle-password:hover {
  color: var(--primary-color);
}

/* Custom Radio & Checkbox Styling */
.key-option {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.key-option:hover {
    background-color: #e2e6ea;
    border-color: #adb5bd;
}

.key-option input[type="radio"],
.key-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    cursor: pointer;
}

.key-option label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
}

/* Custom Dropdown (Fake Select) */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    padding: 10px 15px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.dropdown-trigger:hover {
    border-color: #80bdff;
}

.dropdown-trigger .arrow {
    transition: transform 0.3s;
    font-size: 0.8rem;
    color: #666;
}

.custom-dropdown.active .dropdown-trigger {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.custom-dropdown.active .arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    display: none;
    position: absolute;
    top: 105%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    z-index: 1050;
    max-height: 250px;
    overflow-y: auto;
}

.custom-dropdown.active .dropdown-options {
    display: block;
    animation: fadeIn 0.2s;
}

.dropdown-option-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.dropdown-option-item:last-child {
    border-bottom: none;
}

.dropdown-option-item:hover {
    background-color: #f8f9fa;
}

/* Stop event propagation for checkbox */
.dropdown-option-item .custom-control {
    pointer-events: none; /* Let the parent div handle click */
    display: flex; /* Ensure input and label are side-by-side */
    align-items: center;
}
.dropdown-option-item .custom-control-input {
    pointer-events: none; 
    margin-right: 8px; /* Spacing between input and label */
}
.dropdown-option-item .custom-control-label {
    width: 100%;
    cursor: pointer;
    display: inline-block !important; /* Override .form-group label display: block */
    margin-bottom: 0 !important;
    font-weight: 400 !important;
}

