/* ==========================================================================
   Header CourseHub - struktur ala Coursera
   Semua selector diawali .chh agar tidak bentrok dengan CSS tema Geeks.
   Ganti warna aksen di satu tempat: --chh-accent
   ========================================================================== */

.chh {
	--chh-accent: #6a38f2;
	--chh-accent-dark: #5628d6;
	--chh-ink: #14142b;
	--chh-muted: #5c5c7a;
	--chh-border: #e4e4f0;
	--chh-topbar: #12122b;
	--chh-wrap: 1240px;

	position: relative;
	z-index: 900;
	background: #fff;
	font-family: inherit;
}

.chh a { text-decoration: none; }

.chh__wrap {
	max-width: var(--chh-wrap);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Baris atas ---------- */

.chh__topbar {
	background: var(--chh-topbar);
}

.chh__topmenu {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.chh__topmenu li a {
	display: block;
	padding: 14px 16px;
	font-size: 14px;
	color: rgba(255, 255, 255, .78);
	border-bottom: 3px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}

.chh__topmenu li a:hover { color: #fff; }

.chh__topmenu .current-menu-item a {
	color: #fff;
	font-weight: 600;
	border-bottom-color: #fff;
}

/* ---------- Baris utama ---------- */

.chh__main {
	border-bottom: 1px solid var(--chh-border);
	background: #fff;
}

.chh__bar {
	display: flex;
	align-items: center;
	gap: 20px;
	height: 76px;
}

.chh__logo {
	flex: 0 0 auto;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--chh-accent);
	line-height: 1;
}

.chh__logo img {
	display: block;
	max-height: 40px;
	width: auto;
}

.chh__nav { flex: 0 0 auto; }

.chh__drop { position: relative; }

.chh__dropbtn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 4px;
	border: 0;
	background: none;
	font: inherit;
	font-size: 15px;
	color: var(--chh-ink);
	cursor: pointer;
}

.chh__dropbtn:hover { color: var(--chh-accent); }

.chh__dropbtn svg {
	transition: transform .18s ease;
}

.chh__dropbtn[aria-expanded="true"] svg { transform: rotate(180deg); }

.chh__panel {
	position: absolute;
	top: calc(100% + 14px);
	left: -16px;
	min-width: 330px;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--chh-border);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(20, 20, 43, .12);
}

.chh__panel[hidden] { display: none; }

.chh__panellist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.chh__panellist a {
	display: block;
	padding: 12px 14px;
	border-radius: 8px;
	color: var(--chh-ink);
	transition: background .15s ease;
}

.chh__panellist a:hover { background: #f4f2ff; }

.chh__panellist strong {
	display: block;
	font-size: 15px;
	font-weight: 600;
}

.chh__panellist span {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: var(--chh-muted);
}

/* ---------- Kolom pencarian ---------- */

.chh__search {
	position: relative;
	flex: 1 1 auto;
	max-width: 620px;
}

.chh__search input[type="search"] {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 54px 0 20px;
	font-size: 15px;
	color: var(--chh-ink);
	background: #fff;
	border: 1px solid #c7c7d9;
	border-radius: 999px;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.chh__search input[type="search"]:focus {
	outline: none;
	border-color: var(--chh-accent);
	box-shadow: 0 0 0 3px rgba(106, 56, 242, .18);
}

.chh__search button {
	position: absolute;
	top: 4px;
	right: 4px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: #fff;
	background: var(--chh-accent);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s ease;
}

.chh__search button:hover { background: var(--chh-accent-dark); }

/* ---------- Tombol kanan ---------- */

.chh__actions {
	display: flex;
	align-items: center;
	gap: 18px;
	flex: 0 0 auto;
	margin-left: auto;
}

.chh__link {
	font-size: 15px;
	color: var(--chh-ink);
	white-space: nowrap;
}

.chh__link:hover { color: var(--chh-accent); }

.chh__btn {
	display: inline-block;
	padding: 11px 20px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--chh-accent);
	border-radius: 6px;
	white-space: nowrap;
	transition: background .15s ease;
}

.chh__btn:hover { background: var(--chh-accent-dark); color: #fff; }

.chh__btn--block { display: block; text-align: center; }

/* ---------- Tombol hamburger ---------- */

.chh__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.chh__burger span {
	display: block;
	width: 22px;
	height: 2px;
	margin: 0 auto;
	background: var(--chh-ink);
	border-radius: 2px;
}

/* ---------- Panel mobile ---------- */

.chh__mobile {
	padding: 20px 24px 28px;
	border-bottom: 1px solid var(--chh-border);
	background: #fff;
}

.chh__mobile[hidden] { display: none; }

.chh__msearch input[type="search"] {
	width: 100%;
	height: 46px;
	margin: 0 0 18px;
	padding: 0 18px;
	font-size: 15px;
	border: 1px solid #c7c7d9;
	border-radius: 999px;
}

.chh__mlist {
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.chh__mlist a {
	display: block;
	padding: 13px 0;
	font-size: 16px;
	color: var(--chh-ink);
	border-bottom: 1px solid var(--chh-border);
}

.chh__mactions {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* ---------- Responsif ---------- */

@media (max-width: 1080px) {
	.chh__search { max-width: none; }
	.chh__actions { gap: 12px; }
}

@media (max-width: 900px) {
	.chh__topbar,
	.chh__nav,
	.chh__search,
	.chh__actions .chh__link { display: none; }

	.chh__burger { display: flex; }

	.chh__wrap { padding: 0 16px; }

	.chh__bar { height: 64px; gap: 12px; }

	.chh__logo { font-size: 19px; }
}

/* ---------- Aksesibilitas ---------- */

.chh :focus-visible {
	outline: 2px solid var(--chh-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.chh * { transition: none !important; }
}
