/* Reset Dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: #ffffff;
  color: #333;
}

/* Variabel Warna untuk Konsistensi */
:root {
  --primary-color: #0066a2; /* Biru Utama */
  --hover-color: #004f7a; /* Biru Gelap untuk Hover */
  --border-color: #0066a2;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --hero-highlight-color: #ffd700; /* Emas dari inline style */
  --hero-bg-url: url("../image/background.jpg"); /* URL Background */
}

a {
  text-decoration: none;
}

/* === Styling untuk Hamburger Button === */
.hamburger {
  display: none; /* Sembunyikan secara default */
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: var(--primary-color);
}
/* === End Hamburger Styling === */

/* === NAVBAR === */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 15px 60px;
  border-bottom: 3px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 40px;
  height: auto;
}

.logo-text {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
  flex-grow: 1;
  justify-content: center;
  transition: all 0.3s ease;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.login-btn {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 20px;
  text-decoration: none;
  transition: 0.3s;
  flex-shrink: 0;
}

.login-btn:hover {
  background: var(--primary-color);
  color: #fff;
}
/* --- End Navbar --- */

/* === HERO (STYLE PINDAHAN DARI HTML) === */
.hero-custom {
  position: relative;
  text-align: center;
  padding: 75px 20px;
  color: #fff;
  background-image: var(--hero-bg-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Overlay gelap */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.8em;
  font-weight: 800;
  margin-bottom: 25px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-highlight {
  color: var(--hero-highlight-color);
}

.hero-tagline {
  font-size: 1.25em;
  line-height: 1.8;
  font-weight: 400;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7);
}
/* --- End Hero Custom --- */

/* === ABOUT === */
.about {
  text-align: center;
  padding: 50px 20px;
  max-width: 800px;
  margin: auto;
}

.about h2 {
  margin-bottom: 15px;
  font-weight: 600;
  color: var(--primary-color);
}

/* === CANDIDATE SECTION === */
.candidates-section {
  text-align: center;
  padding: 40px 20px;
}

.candidates-section h2 {
  font-weight: 600;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-bottom: 25px;
}

.center-row {
  justify-content: center;
}

.candidate-card {
  background: #fff;
  width: 250px;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 102, 162, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  flex-grow: 1;
  max-width: 280px;
}

.candidate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 102, 162, 0.3);
}

.candidate-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.candidate-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.candidate-card p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 15px;
}

.detail-link {
  /* Hapus inline style: style="text-decoration: none" */
  text-decoration: none;
}

.detail-btn {
  display: block;
  margin: auto;
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.detail-btn:hover {
  background: var(--hover-color);
}

/* === VOTING SECTION === */
.voting-section {
  background: var(--light-bg);
  padding: 60px 20px;
}

.voting-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.slideshow-card {
  width: 350px;
  height: 250px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.slideshow-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.form-card {
  background: #fff;
  width: 350px;
  text-align: center;
  border-radius: 15px;
  padding: 30px 20px;
  box-shadow: 0 3px 10px rgba(0, 102, 162, 0.2);
  flex-shrink: 0;
}

.form-card h3 {
  color: var(--primary-color);
}

.vote-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 25px;
  border-radius: 8px;
  background: var(--primary-color);
  color: #fff;
  text-decoration: none;
  transition: background 0.3s;
}

.vote-btn:hover {
  background: var(--hover-color);
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 20px;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.9rem;
  position: relative;
}

.footer-logo {
  width: 50px;
  position: absolute;
  right: 40px;
  bottom: 10px;
}

/* =================================================== */
/* === MEDIA QUERIES (Responsif/Mobile Friendly) === */
/* =================================================== */

/* Untuk tablet dan layar kecil (maksimal 992px) */
@media (max-width: 992px) {
  .navbar {
    padding: 15px 30px;
  }

  .nav-links {
    gap: 15px;
  }

  .candidate-card {
    width: calc(33.33% - 20px);
    max-width: none;
  }
}

/* Untuk perangkat mobile (maksimal 768px) */
@media (max-width: 768px) {
  .navbar {
    padding: 15px 20px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  /* Penyesuaian HERO di Mobile */
  .hero-title {
    font-size: 1.8em;
  }
  .hero-tagline {
    font-size: 1em;
  }

  /* === Hamburger Menu Tampil dan Penataan Logo === */
  .hamburger {
    display: block;
    order: 2;
  }

  .logo-container {
    flex-grow: 0;
  }

  /* === LOGIN ADMIN DI TENGAH & 100% LEBAR === */
  .login-btn {
    width: 100%;
    order: 4;
    text-align: center;
    margin: 10px 0 0 0;
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--primary-color);
    color: #fff;
    border: none;
  }

  .login-btn:hover {
    background: var(--hover-color);
    color: #fff;
  }
  /* ========================================= */

  /* Navigasi mobile (Dropdown) */
  .nav-links {
    display: flex;
    position: absolute;
    top: 115px;
    left: 0;
    width: 100%;
    height: 0;
    flex-direction: column;
    background: #fcfcfc;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: height 0.3s ease, padding 0.3s ease;
    z-index: 999;
  }

  /* Class 'open' ditambahkan oleh JavaScript */
  .nav-links.open {
    height: auto;
    max-height: 300px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }

  .nav-links a {
    padding: 12px 20px;
    display: block;
    background: transparent;
    text-align: left;
  }

  /* === Hamburger Animation === */
  .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);
  }
  /* -------------------------- */

  .candidate-card {
    width: 100%; /* 1 kartu per baris di mobile */
    max-width: none;
  }

  .voting-wrapper {
    gap: 30px;
  }
  .slideshow-card,
  .form-card {
    width: 100%;
    max-width: none;
  }

  .footer-logo {
    position: static;
    margin-top: 10px;
  }
}

/* Untuk ponsel kecil (maksimal 500px) */
@media (max-width: 500px) {
  .logo-text {
    font-size: 1rem;
  }
}
