/**
 * ASAS Child — Header.
 */

.asas-header {
	position: relative;
	z-index: 100;
	background: var(--asas-navy-dark);
	color: var(--asas-white);
}

.asas-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	min-height: var(--asas-header-h);
}

/* ------------------------------------------------------------------ */
/* Brand                                                               */
/* ------------------------------------------------------------------ */

.asas-header__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--asas-white);
	flex-shrink: 0;
}

.asas-header__logo {
	width: 56px;
	height: 56px;
	object-fit: contain;
	display: block;
}

.asas-header__brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.asas-header__brand-name {
	font-family: var(--asas-font-heading);
	font-weight: 700;
	font-size: 1.5rem;
	letter-spacing: 0.02em;
	color: var(--asas-white);
}

.asas-header__brand-tagline {
	font-family: var(--asas-font-body);
	font-weight: 500;
	font-size: 0.6875rem;
	letter-spacing: 0.04em;
	color: rgba(255, 255, 255, 0.72);
}

/* ------------------------------------------------------------------ */
/* Navigation                                                          */
/* ------------------------------------------------------------------ */

.asas-nav {
	margin-inline-start: auto;
}

.asas-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.asas-nav__list > li {
	position: relative;
}

.asas-nav__list > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	font-family: var(--asas-font-body);
	font-weight: 500;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.86);
	text-decoration: none;
	border-radius: var(--asas-radius-sm);
	transition: color 0.2s ease, background-color 0.2s ease;
}

.asas-nav__list > li > a:hover,
.asas-nav__list > li > a:focus {
	color: var(--asas-white);
	background: rgba(255, 255, 255, 0.06);
}

.asas-nav__list > li.current-menu-item > a,
.asas-nav__list > li.current-menu-ancestor > a {
	color: var(--asas-white);
	box-shadow: inset 0 -2px 0 var(--asas-gold);
	border-radius: 0;
}

/* Indikator dropdown */
.asas-nav__list > li.menu-item-has-children > a::after {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s ease;
}

.asas-nav__list > li.menu-item-has-children:hover > a::after {
	transform: rotate(225deg) translateY(-2px);
}

/* Submenu */
.asas-nav__list .sub-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 220px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: var(--asas-white);
	border-radius: var(--asas-radius-sm);
	box-shadow: var(--asas-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

/* Jambatan halimunan: tutup jurang 8px supaya submenu tak hilang semasa hover turun */
.asas-nav__list > li.menu-item-has-children::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 12px;
}

.asas-nav__list > li:hover > .sub-menu,
.asas-nav__list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.asas-nav__list .sub-menu a {
	display: block;
	padding: 10px 14px;
	font-family: var(--asas-font-body);
	font-weight: 500;
	font-size: 0.875rem;
	color: var(--asas-ink);
	text-decoration: none;
	border-radius: 6px;
}

.asas-nav__list .sub-menu a:hover,
.asas-nav__list .sub-menu a:focus {
	background: var(--asas-cream);
	color: var(--asas-navy);
}

/* ------------------------------------------------------------------ */
/* Actions                                                             */
/* ------------------------------------------------------------------ */

.asas-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.asas-header__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.86);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.asas-header__icon-btn:hover,
.asas-header__icon-btn:focus {
	background: rgba(255, 255, 255, 0.08);
	color: var(--asas-white);
}

.asas-header__cta {
	padding: 11px 20px;
	font-size: 0.8125rem;
}

/* Burger */
.asas-header__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0 9px;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.asas-header__burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--asas-white);
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.asas-header__burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.asas-header__burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.asas-header__burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------------ */
/* Search panel                                                        */
/* ------------------------------------------------------------------ */

.asas-search-panel {
	background: var(--asas-navy);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 16px 0;
}

.asas-search-form {
	display: flex;
	gap: 10px;
	max-width: 720px;
	margin-inline: auto;
}

.asas-search-form__input {
	flex: 1;
	padding: 13px 16px;
	font-family: var(--asas-font-body);
	font-size: 0.9375rem;
	color: var(--asas-ink);
	background: var(--asas-white);
	border: 1px solid transparent;
	border-radius: var(--asas-radius-sm);
}

.asas-search-form__input:focus {
	outline: 2px solid var(--asas-gold);
	outline-offset: 1px;
}

/* ------------------------------------------------------------------ */
/* Mobile                                                              */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	.asas-header__inner {
		gap: 16px;
	}

	.asas-header__burger {
		display: flex;
	}

	.asas-header__cta {
		display: none;
	}

	.asas-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		margin: 0;
		background: var(--asas-navy-dark);
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		box-shadow: var(--asas-shadow-lg);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.28s ease;
	}

	.asas-nav.is-open {
		max-height: 80vh;
		overflow-y: auto;
	}

	.asas-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px 0 16px;
	}

	.asas-nav__list > li > a {
		padding: 14px 24px;
		border-radius: 0;
		font-size: 0.9375rem;
	}

	.asas-nav__list > li.current-menu-item > a {
		box-shadow: inset 3px 0 0 var(--asas-gold);
	}

	.asas-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: rgba(255, 255, 255, 0.04);
		border-radius: 0;
		padding: 0;
		display: none;
	}

	/* Buang jambatan hover pada mobile */
	.asas-nav__list > li.menu-item-has-children::after {
		display: none;
	}

	.asas-nav__list > li.is-open > .sub-menu {
		display: block;
	}

	.asas-nav__list .sub-menu a {
		color: rgba(255, 255, 255, 0.78);
		padding: 12px 24px 12px 40px;
		border-radius: 0;
	}

	.asas-nav__list .sub-menu a:hover,
	.asas-nav__list .sub-menu a:focus {
		background: rgba(255, 255, 255, 0.06);
		color: var(--asas-white);
	}
}

@media (max-width: 600px) {
	.asas-header__brand-tagline {
		display: none;
	}

	.asas-header__logo {
		width: 44px;
		height: 44px;
	}

	.asas-header__brand-name {
		font-size: 1.25rem;
	}

	.asas-search-form {
		flex-direction: column;
	}
}
