/* ================= Font ================= */
@font-face {
	font-family: 'MyFont';
	src: url('/assets/font/Quicksand.ttf') format('truetype');
}

@font-face {
	font-family: 'MyFontMono';
	src: url('/assets/font/FreeMono.ttf') format('truetype');
}

/* ================= Variabel Global ================= */
:root {
	--color-black: #000;
	--color-gray: #777;
	--color-white: #fff;
}

/* ============= Halaman Utama ============= */
body {
	font-family: MyFont;
	font-size: 16px;
	margin: 0 10px 0 10px;
	padding: 0;
	scroll-behavior: smooth;
}

.main {
	margin-top: 80px;
	margin-bottom: 20px;
}

#header {
	position: fixed;
	top: 0;
	transition: transform 0.4s ease;
	transform: translateY(0);
	width: calc(100% - 20px);
}

#header.hidden {
	transform: translateY(-80px);	/* sesuaikan dengan tinggi navbar */
	pointer-events: none;
}

#search-box {
	font-family: MyFont;
	font-size: 14px;
	width: 100%;
	padding: 20px 0 20px 0;
	outline: none;
	border: none;
	border-bottom: 1px solid var(--color-gray);
}

.judul a {
	font-size: 24px;
	color: var(--color-black);
	text-decoration: none;
	transition: color 0.3s ease;
}

.judul a:hover {
	color: var(--color-gray);
}

.preview {
	font-size: 16px;
}

.kategori {
	font-size: 14px;
	font-weight: 600;
	color: red;
}

#headerIsi {
	background-color: var(--color-white);
	position: fixed;
	display: flex;
	justify-content: space-between;
	align-items: center;
	top: 0;
	padding: 15px 0;
	transition: transform 0.4s ease;
	transform: translateY(0);
	width: calc(100% - 20px);
	border-bottom: 1px solid var(--color-gray);
}

#headerIsi.hidden {
	transform: translateY(-80px);	/* sesuaikan dengan tinggi navbar */
	pointer-events: none;
}

#headerIsi a {
	text-decoration: none;
	color: var(--color-black);
	transition: color .3s ease;
}

#headerIsi a:hover {
	color: var(--color-gray);
}

#headerIsi button {
	cursor: pointer;
	transition: all .3s ease;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown button {
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid var(--color-gray);
  transition: all 0.3s ease;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 60px;
  right: 0;
  background: var(--color-white);
  min-width: 200px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-menu a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: var(--color-black);
  border-bottom: 1px solid var(--color-gray);
  transition: all 0.3s ease;
}

.dropdown-menu a:last-child {
	border-bottom: none;
}

pre#isi {
	font-size: 16px;
	font-family: MyFont;
	margin-top: 80px;
	margin-bottom: 29px;
	white-space: pre-wrap;
	word-wrap: break-word;
}

pre#isi p {
	line-height: 1.5;
	margin: 0;
}

#judul-isi {
	font-size: 24px;
}

#subjudul-isi {
	font-size: 20px;
}

#list {
	line-height: 1.5;
}

#sublist {
	line-height: 1.5;
}

.monospace {
	font-family: MyFontMono;
	margin: 0;
	overflow-x: auto;
}

.monospace::-webkit-scrollbar {
	width: 0;
}

@media (min-width: 720px) {
	body {
		display: flex;
		justify-content: center;
		margin: 0 auto;
	}

	#header {
		display: flex;
		justify-content: center;
	}

	#search-box,
	#headerIsi {
		max-width: 800px;
	}

	.main,
	.main-isi {
		max-width: 800px;
		margin-left: 10px;
		margin-right: 10px;
	}
}