/* ==============================
   0️⃣ Variables & Global Reset
============================== */
:root {
  --primary-color: #2c7a4b;
  --secondary-color: #66bb6a;
  --accent-color: #007BFF;
  --text-color: #fff;
  --bg-light: #f9f9f9;
  --bg-page: #f4f4f4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background: var(--bg-page);
  color: #333;
}

/* ==============================
 1️⃣ Container
============================== */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* ==============================
 2️⃣ Header & Navbar
============================== */
header {
  background: var(--primary-color);
  color: var(--text-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-title img {
  width: 50px;
  height: 50px;
}

.title-text .small-title {
  font-size: 14px;
  display: block;
  opacity: 0.9;
}

.title-text .main-title {
  font-size: 24px;
  font-weight: bold;
}

/* Navbar */
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  transition: all 0.3s ease;
}

nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--accent-color);
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-color);
  transition: transform 0.3s ease;
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

/* Mobile Navbar */
@media (max-width: 768px) {
  nav ul {
      display: none;
      flex-direction: column;
      background: var(--primary-color);
      position: absolute;
      top: 60px;
      right: 0;
      width: 200px;
      padding: 10px;
      z-index: 999;
      border-radius: 0 0 10px 10px;
  }

  nav ul.active {
      display: flex;
  }

  .menu-toggle {
      display: block;
  }
}

/* ==============================
 3️⃣ Buttons (Update Gradient)
============================== */
.btn {
  display: inline-block;
  background: linear-gradient(45deg, #2f2c2c, #574f4f);
  color: var(--text-color);
  padding: 10px 20px;
  margin-top: 15px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background: linear-gradient(45deg, #574f4f, #2f2c2c);
  transform: translateY(-3px);
}

/* ==============================
 4️⃣ Grid & Card Layout
============================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.card, .quick-card, .berita-card, .galeri-item {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover, .quick-card:hover, .berita-card:hover, .galeri-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ==============================
 5️⃣ Hero Section
============================== */
.hero {
  position: relative;
  background-image: url('https://kecamatanmandor.com/assets/images/kantor-kecamatan-mandor-kab-landak.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 60vh;
  max-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
}

.hero-overlay {
  background-color: rgba(0,0,0,0.4);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  color: var(--text-color);
}

.hero h2 {
  font-size: 48px;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero p {
  font-size: 20px;
  margin-bottom: 20px;
}

/* Responsive Hero */
@media (max-width: 768px) {
  .hero h2 {
      font-size: 36px;
  }
  .hero p {
      font-size: 18px;
  }
}

@media (max-width: 480px) {
  .hero h2 {
      font-size: 32px;
  }
  .hero p {
      font-size: 16px;
  }
}

/* ==============================
 6️⃣ Quick Access Cards
============================== */
.quick-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.quick-card:hover {
  background: #d0f0d9;
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.icon {
  font-size: 40px;
  margin-bottom: 10px;
}

@media (max-width: 480px) {
  .icon {
      font-size: 30px;
  }
}

/* ==============================
 7️⃣ Berita Card
============================== */
.berita-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.card-content h3 {
  margin: 10px 0;
  font-size: 18px;
}

.card-content small {
  color: gray;
  display: block;
  margin-bottom: 10px;
}

/* ==============================
 8️⃣ Animasi Fade-in
============================== */
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate.show {
  opacity: 1;
  transform: translateY(0);
}

.animate:nth-child(1) { transition-delay: 0.2s; }
.animate:nth-child(2) { transition-delay: 0.4s; }
.animate:nth-child(3) { transition-delay: 0.6s; }

/* ==============================
 9️⃣ Galeri Foto
============================== */
.galeri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 20px;
}

.galeri-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.galeri-item:hover img {
  transform: scale(1.08);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* ==============================
 🔟 Footer
============================== */
footer {
  background: var(--primary-color);
  color: var(--text-color);
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
}

/* ==============================
 Responsive Cards
============================== */
@media (max-width: 480px) {
  .card, .quick-card, .berita-card {
      padding: 15px;
  }
}


/* ==============================
 Logo + Judul Horizontal
============================== */
.logo-title {
  display: flex;
  align-items: center; /* logo dan tulisan sejajar vertikal */
  gap: 10px; /* jarak antara logo dan teks */
}

.logo-title img {
  width: 50px;
  height: 50px;
}

.title-text .small-title,
.title-text .main-title {
  font-size: 22px;       /* ukuran sama */
  font-weight: bold;     /* tebal sama */
  color: var(--text-color);
  line-height: 1.2;
  display: block;        /* tetap baris terpisah */
}

/* Responsive untuk layar kecil */
@media (max-width: 480px) {
  .logo-title img {
      width: 40px;
      height: 40px;
  }
  .title-text .small-title,
  .title-text .main-title {
      font-size: 18px;
  }
}


/* Footer Grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
  color: #fff; /* teks putih */
}

.footer-section h3 {
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 5px;
}

.footer-section ul li a {
  text-decoration: none;
  color: #fff;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

/* ==============================
 2️⃣ Header & Navbar (Update Gradient)
============================== */
header {
  background: linear-gradient(90deg, #004740, #00b3a2); /* hitam ke hitam muda */
  color: var(--text-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ==============================
 🔟 Footer (Update Gradient)
============================== */
footer {
  background: linear-gradient(90deg, #004740, #00b3a2); /* hitam ke hitam muda */
  color: var(--text-color);
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
}