/* Pengaturan Dasar dan Font */
:root {
  --primary-color: #333;
  --secondary-color: #f4f4f4;
  --header-bg: #4a4a4a;
  --blue: #5c9ded;
  --pink: #f770a3;
  --orange: #f5b041;
  --green: #48c78e;
}

body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("images/header-bg.jpg");
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 60px 20px;
}

header h1 {
  margin: 0;
  font-size: 3rem;
}

header p {
  margin: 0;
  font-size: 1.2rem;
}

/* ================================= */
/* === BAGIAN NAVIGASI (DESKTOP) === */
/* ================================= */

nav {
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex; /* Menggunakan flexbox untuk alignment */
  justify-content: center; /* Menengahkan menu utama */
  align-items: center;
  padding: 0 20px;
}

/* Sembunyikan logo dan hamburger di desktop */
.nav-logo,
.hamburger-btn {
  display: none;
}

/* Menu utama */
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.nav-links li a {
  display: block;
  padding: 20px 25px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  transition: background-color 0.3s;
}

.nav-links li a:hover {
  background-color: #f0f0f0;
}

/* Dropdown Menu (Desktop) */
.dropdown {
  position: relative;
}

.dropbtn .fa-chevron-down {
  font-size: 0.7em;
  margin-left: 5px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1c1c1c;
  width: 280px;
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  border-radius: 8px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: top 0.3s ease, opacity 0.3s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
  visibility: visible;
  opacity: 1;
  top: 100%;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 12px;
  text-decoration: none;
  color: #f0f0f0;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: #333333;
  color: white;
}

.dropdown-icon {
  font-size: 20px;
  margin-right: 15px;
  width: 25px;
  text-align: center;
  color: var(--blue);
}

.dropdown-text {
  display: flex;
  flex-direction: column;
}

.dropdown-text strong {
  font-weight: 500;
  font-size: 1rem;
}

.dropdown-text small {
  font-size: 0.8rem;
  color: #999999;
}

/* ================================ */
/* === BAGIAN KONTEN UTAMA      === */
/* ================================ */

/* Kotak Deskripsi */
.description-box {
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  margin-top: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.description-box h2 {
  margin-top: 0;
}
.description-box p {
  font-size: 1.5rem;
  font-weight: bold;
  border: 2px solid #ddd;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
}
.desc-content {
  color: #666;
  line-height: 1.6;
}

/* Seksi Informasi */
.info-section {
  margin-top: 40px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.info-card {
  padding: 25px;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}
.info-card.blue {
  background-color: var(--blue);
}
.info-card.pink {
  background-color: var(--pink);
}
.info-card.orange {
  background-color: var(--orange);
}
.info-card.green {
  background-color: var(--green);
}

/* Slider Berita Otomatis */
.news-section {
  margin-top: 40px;
}
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.news-header a {
  text-decoration: none;
  color: var(--blue);
  font-weight: 500;
}
.slider-container {
  max-width: 940px;
  margin: auto;
  overflow: hidden;
  position: relative;
}
.news-grid.slider-track {
  width: calc(240px * 14);
  display: flex;
  gap: 20px;
  animation: scroll 30s linear infinite;
}
.slider-container:hover .slider-track {
  animation-play-state: paused;
}
.news-card {
  flex-shrink: 0;
  width: 220px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-240px * 7));
  }
}
.news-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.news-content {
  padding: 15px;
}
.news-date {
  font-size: 0.8rem;
  color: #999;
  display: block;
  margin-bottom: 8px;
}
.news-content h3 {
  font-size: 1rem;
  margin: 0;
  line-height: 1.4;
}

/* ========================= */
/* === BAGIAN FOOTER     === */
/* ========================= */
footer {
  background-color: #e2e2e2;
  margin-top: 50px;
  padding: 30px 0;
}

.footer-content {
  display: flex;
  align-items: center;
}

.footer-logo {
  background-color: var(--primary-color);
  color: white;
  font-size: 2rem;
  font-weight: bold;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  margin-right: 20px;
}

.footer-address h3 {
  margin: 0 0 5px 0;
}
.footer-address p {
  margin: 0;
  color: #555;
}

/* ========================================= */
/* === PENYESUAIAN MOBILE (RESPONSIVE)   === */
/* ========================================= */
@media (max-width: 768px) {
  /* Tampilan Navigasi di Mobile */
  nav {
    justify-content: space-between; /* Logo di kiri, hamburger di kanan */
    height: 60px;
  }

  .nav-logo,
  .hamburger-btn {
    display: block; /* Tampilkan logo dan hamburger di mobile */
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: 60px;
    left: -100%; /* Sembunyikan di luar layar */
    background-color: white;
    flex-direction: column;
    width: 80%;
    height: calc(100vh - 60px);
    padding-top: 20px;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    justify-content: flex-start; /* Mulai menu dari atas */
  }

  .nav-links.active {
    left: 0; /* Tampilkan menu saat di-klik */
  }

  nav .nav-links li {
    width: 100%;
    text-align: center;
  }

  /* Tampilan Dropdown di Mobile */
  .dropdown {
    position: static;
  }
  .dropdown-content {
    position: static;
    display: none; /* Sembunyikan sub-menu */
    background-color: #f0f0f0;
    box-shadow: none;
    width: 100%;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .dropdown:hover .dropdown-content {
    display: block; /* Tampilkan sub-menu saat di-hover/klik */
  }

  /* Konten Lainnya di Mobile */
  .info-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-logo {
    margin-right: 0;
    margin-bottom: 15px;
  }
}
