/* Header Container */
.header-container {
    flex-direction: column;
    max-width: 100%;
    margin: 1em auto;
    padding: 0 1em;
  }

/* Logo */
.logo img {
  height: 40px;
  width: auto;
}

/* Site Title */
.site-title {
  flex: 1;
  text-align: center;
}

.site-title h1 {
  margin: 0;
  font-size: 2em;
}


/* Reset dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f6f8;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  background: #1f2937;
  color: #fff;
  padding: 1.5em 2em;
  text-align: center;
}

header h1 {
  margin-bottom: 0.3em;
  font-size: 2em;
}

nav a {
  color: #ddd;
  margin: 0 1em;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  color: #fff;
}

/* Container utama */
.container {
  display: flex;
  max-width: 1200px;
  margin: 2em auto;
  padding: 0 1em;
  gap: 2em;
}

.sidebar-kiri {
  width: 250px;         /* Tetapkan lebar tetap */
  max-width: 200px;
  flex: 0 0 250px;      /* Jangan biarkan dia berkembang */
  background: #ffffff;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
  overflow: hidden;     /* Sembunyikan konten yang keluar */
  word-wrap: break-word;
    
}

.sidebar-kiri ul {
  list-style: none;
  padding-left: 0;
}

.sidebar-kiri li {
  margin-bottom: 0.8em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-kiri li a {
  display: block;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  max-width: 100%;
}

.sidebar-kiri li a:hover {
  text-decoration: underline;
}


/* Konten tengah */
.konten {
  flex: 3;
  background: #ffffff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

/* Sidebar kanan */
.sidebar-kanan {
  flex: 1;
  background: #ffffff;
  padding: 1em;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

/* Footer */
footer {
  text-align: center;
  padding: 2em;
  background: #e5e7eb;
  margin-top: 3em;
  color: #555;
  font-size: 0.9em;
}

/* Artikel */
article {
  margin-bottom: 2em;
}

article h2 {
  margin-bottom: 0.5em;
  font-size: 1.4em;
}

article a {
  color: #2563eb;
  text-decoration: none;
}

article a:hover {
  text-decoration: underline;
}


.artikel-nav {
  margin-top: 3em;
  display: flex;
  justify-content: space-between; /* Penting untuk kiri dan kanan */
  gap: 1em;
}

.btn-prev,
.btn-next {
  background-color: #2563eb;
  color: #fff;
  padding: 0.75em 1.5em;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.btn-prev:hover,
.btn-next:hover {
  background-color: #1e40af;
}

.artikel-nav a svg.icon-arrow {
  vertical-align: middle;
  margin: 0 0.4em;
  fill: white;
}
.btn-prev svg {
  margin-right: 0.5em;
}
.btn-next svg {
  margin-left: 0.5em;
}


.search-results {
  list-style: none;
  padding-left: 0;
  margin-top: 1.5em;
}

.search-results li {
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid #ddd;
}

.search-results a {
  font-weight: bold;
  color: #2563eb;
  text-decoration: none;
}

.search-results a:hover {
  text-decoration: underline;
}


/* Search Box di header */
.search-box {
  max-width: 400px;
  margin: 1em auto 2em auto;
  padding: 0 1em;
}

.search-box form {
  display: flex;
  justify-content: center;
}

.search-box input[type="text"] {
  flex: 1;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 6px 0 0 6px;
  font-size: 1em;
}

.search-box button {
  padding: 0.5em 1em;
  border: none;
  background: #2563eb;
  color: #fff;
  font-weight: bold;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-box button:hover {
  background-color: #1e40af;
}


.comment-section {
  margin-top: 3em;
  background: #fff;
  padding: 1.5em;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  max-width: 100%; /* fleksibel ikut lebar konten */
}

.comment-section h3 {
  margin-bottom: 1em;
  font-size: 1.5em;
  color: #333;
}

.comment-section form > div {
  margin-bottom: 1em;
}

.comment-section label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: 600;
  color: #555;
}

.comment-section input[type="text"],
.comment-section input[type="email"],
.comment-section input[type="website"],
.comment-section textarea {
  width: 100%;
  padding: 0.6em 0.8em;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.comment-section input[type="text"]:focus,
.comment-section input[type="email"]:focus,
.comment-section input[type="website"]:focus,
.comment-section textarea:focus {
  outline: none;
  border-color: #2563eb; /* warna biru saat fokus */
}

.comment-section button {
  background-color: #2563eb;
  color: white;
  padding: 0.7em 1.5em;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.comment-section button:hover {
  background-color: #1e40af;
}


@media (max-width: 768px) {
  /* Stack layout secara vertikal */
  .container {
    flex-direction: column;
    padding: 1em;
  }

  .sidebar-kiri,
  .sidebar-kanan,
  .konten {
    width: 100% !important;
    flex: 1 1 100%;
  }

  /* Header responsive */
  header {
    padding: 1em;
    text-align: center;
  }

  nav {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    margin-top: 1em;
  }

  nav a {
    margin: 0;
    padding: 0.5em;
    background-color: #374151;
    border-radius: 6px;
  }

  .search-box {
    width: 100%;
    margin: 1em auto;
  }

  .search-box form {
    flex-direction: column;
    gap: 0.5em;
  }

  .search-box input[type="text"],
  .search-box button {
    width: 100%;
    border-radius: 6px;
  }

  /* Sidebar item wrap text */
  .sidebar-kiri li {
    white-space: normal; /* Biar judul panjang bisa ke bawah */
  }
}


