/* ================= 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;
	--color-red: #ff0000;
}

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

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

#header {
	background-color: var(--color-white);
	position: fixed;
	display: flex;
	align-items: center;
	padding: 5px 0;
	gap: 10px;
	top: 0;
	transition: transform 0.4s ease;
	transform: translateY(0);
	width: calc(100% - 20px);
	border-bottom: 1px solid var(--color-gray);
}

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

.header-icon {
	width: 24px;
	height: 24px;
}

.header-search {
	font-family: MyFont;
	font-size: 16px;
	width: 100%;
	padding: 20px 0 20px 0;
	outline: none;
	border: none;
}

.header-search::placeholder {
	font-size: 16px;
}

.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: var(--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-icon-home {
	width: 24px;
	height: 24px;
}

#headerIsi a {
	display: flex;
	align-items: center;
	gap: 5px;
	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;
}

#headerIsi-icon-dropdown {
	width: 18px;
	height: 18px;
}

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

.dropdown button {
	font-family: MyFont;
	font-size: 16px;
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 8px 12px;
	border-radius: 5px;
	cursor: pointer;
	border: none;
	transition: all 0.3s ease;
}

.dropdown-menu {
	display: none;
	position: absolute;
	top: 60px;
	right: 0;
	border-radius: 5px;
	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);
	transition: all 0.3s ease;
}

pre#isi {
	font-size: 16px;
	font-family: MyFont;
	margin-top: 90px;
	margin-bottom: 20px;
	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;
}

#link-direct {
	font-family: MyFontMono;
	text-decoration: none;
	color: var(--color-red);
	transition: color .3s ease;
}

#link-direct:hover {
	color: var(--color-gray);
}

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

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

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

	#headerIsi {
		max-width: 790px;
	}

	.main {
		max-width: 800px;
		margin-left: 10px;
		margin-right: 10px;
		margin-top: 70px;
	}

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