/* 🌐 RESET & ROOT SETUP */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 18px;
}
body {
  font-family: 'Segoe UI', 'Open Sans', sans-serif;
  background-color: #fdfbf9;
  color: #1a1a1a;
  line-height: 1.8;
  padding: 24px;
  max-width: 960px;
  margin: auto;
  word-wrap: break-word;
}

/* 🔠 TYPOGRAFI */
h1, h2, h3 {
  color: #1c3c4d;
  text-align: center;
  font-weight: bold;
  line-height: 1.3;
  margin: 32px 0 16px;
}
h1 { font-size: 2.2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }
p {
  margin-bottom: 20px;
  text-align: justify;
  font-size: 1.05em;
}
ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

/* 🖼️ GAMBAR */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
}
img[loading="lazy"] {
  filter: blur(4px);
  transition: filter 0.3s ease;
}
img[loading="lazy"]:not([src*="data:image"]) {
  filter: blur(0);
}

.search-wrapper {
  max-width: 960px;
  margin: auto;
  padding: 30px 20px;
}
.search-heading {
  text-align: center;
}
.search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1em;
  margin: 20px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.search-results {
  list-style: none;
  padding-left: 0;
}
.search-item {
  margin-bottom: 24px;
}
.search-title {
  font-weight: bold;
  font-size: 1.1em;
  color: #2b6777;
}
.search-date {
  color: #888;
}
.search-excerpt {
  margin-top: 6px;
  color: #555;
}
.search-no-results {
  text-align: center;
  color: #777;
  display: none;
}

/* 📄 KONTEN UTAMA */
main {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 50px;
}
.page-content, .post-content {
  text-align: justify;
  font-size: 1rem;
  line-height: 1.8;
}

/* 👑 HEADER */
header {
  text-align: center;
  background-color: #f0f4f8;
  border-bottom: 2px solid #ccc;
  padding: 40px 20px;
  margin-bottom: 30px;
}
header h1 {
  font-size: 2em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1c3c4d;
}
header p {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

/* 🔗 LINK */
a {
  color: #1565C0;
  text-decoration: none;
}
a:hover {
  color: #004080;
  text-decoration: underline;
}

/* 🍔 NAVIGASI RESPONSIF */
.nav-toggle {
  position: fixed;
  top: 20px; /* Sedikit mundurkan agar tidak menumpuk dengan header */
  left: 16px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  z-index: 10001; /* Pastikan tombol selalu di atas popup */
}
.nav-popup {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 70px;
  left: 15px;
  width: 260px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  z-index: 9999;
  max-height: 90vh;
  overflow-y: auto;
  gap: 12px; /* jarak antar link */
}
.nav-popup.open {
  display: flex;
}
.nav-popup a {
  padding: 10px;
  font-size: 1em;
  color: #1565C0;
  text-decoration: none;
}
.nav-popup a:hover {
  background-color: #e0f0f8;
}

/* 🌐 OVERLAY */

.nav-overlay.active {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.3);
  z-index: 999;
}

/* 🖥️ NAVIGASI DESKTOP */
.main-nav {
  display: none;
}
@media (min-width: 768px) {
  .main-nav {
    display: block;
    text-align: center;
    padding: 10px;
  }
  .nav-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
  }
  .nav-list li a {
    font-weight: 600;
    color: #1565C0;
  }
  .nav-list li a:hover {
    color: #004080;
    text-decoration: underline;
  }
}

/* ✅ Format H1–H4: tebal dan huruf awal kapital */
h1, h2, h3, h4 {
  font-weight: bold;
  text-transform: capitalize; /* mengubah huruf pertama tiap kata jadi besar */
}

/* ✅ Format paragraf: rata kiri-kanan */
p {
  text-align: justify;
  text-justify: inter-word;
}

/* 💡 Tambahan opsional untuk jarak antar paragraf & heading */
p, h1, h2, h3, h4 {
  margin-bottom: 1.2em;
}

/* ✅ Format H1–H4: tebal dan huruf awal kapital */
h1, h2, h3, h4 {
  font-weight: bold;
  text-transform: capitalize; /* mengubah huruf pertama tiap kata jadi besar */
}

/* ✅ Format paragraf: rata kiri-kanan */
p {
  text-align: justify;
  text-justify: inter-word;
}

/* 💡 Tambahan opsional untuk jarak antar paragraf & heading */
p, h1, h2, h3, h4 {
  margin-bottom: 1.2em;
}

/* Backlink: biru, tebal, dan miring */
a.backlink {
  color: #0077cc;         /* Biru khas tautan SEO */
  font-weight: bold;      /* Huruf tebal */
  font-style: italic;     /* Huruf miring */
  text-decoration: none;  /* Tanpa garis bawah (opsional) */
  border-bottom: 1px dotted #0077cc; /* Tambahan: efek hover style */
}

a.backlink:hover {
  color: #0055aa;
  text-decoration: underline;
}

/* 👣 FOOTER */
footer {
  background-color: #f2f2f2;
  text-align: center;
  padding: 24px 15px;
  font-size: 0.85em;
  color: #777;
  border-top: 1px solid #ccc;
  line-height: 1.5;
}
footer a:hover {
  text-decoration: underline;
  color: #004080;
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
  html {
    font-size: 16px;
    text-align: left;
  }

  body {
    padding: 15px;
  }

  header h1 {
    font-size: 1.6em;
  }

  main {
    padding: 18px;
  }

  footer {
    font-size: 0.8em;
  }

  /* 🔧 Perbaikan khusus navigasi mobile */
  .main-nav {
    display: none !important;
  }

  .nav-toggle {
    display: block !important;
    font-size: 24px;
  }

  .nav-popup {
    width: 90%;
    left: 5%;
    top: 70px;
  }
}
