/* =========================================================================
 * Header toàn site (.lo-header) — dùng tokens trong assets/css/lo-tokens.css
 * ========================================================================= */

.lo-header {
	--lo-header-navy: #0b2a63;
	--lo-header-navy-2: #12357a;
	--lo-hctl: 40px; /* chiều cao chung: ô tìm kiếm + 2 nút */
	/* Cả cụm header dính trên cùng khi cuộn (không đổi chiều cao để nội dung không bị giật). */
	position: sticky;
	top: 0;
	z-index: 900;
	width: 100%;
	color: var(--lo-ink);
	transition: box-shadow var(--lo-ease);
}
.lo-header.is-stuck { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1); }
.admin-bar .lo-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .lo-header { top: 46px; }
}
@media (max-width: 600px) {
	/* Thanh admin của WP không dính ở màn hình hẹp. */
	.admin-bar .lo-header { top: 0; }
}
.lo-header *,
.lo-header *::before,
.lo-header *::after { box-sizing: border-box; }
.lo-header ul { margin: 0; padding: 0; list-style: none; }
.lo-header a { text-decoration: none; transition: color var(--lo-ease), background var(--lo-ease), border-color var(--lo-ease); }
.lo-header img { display: block; max-width: 100%; height: auto; }
.lo-header .lo-icon { flex: none; display: inline-block; vertical-align: -0.125em; }
.lo-header button { font-family: var(--lo-font); text-transform: none; letter-spacing: 0; box-shadow: none; }
.lo-header__container { width: 100%; max-width: var(--lo-container); margin: 0 auto; padding: 0 20px; }

/* Thanh trên ------------------------------------------------------------- */
.lo-header__top { background: var(--lo-header-navy); color: #fff; font-size: var(--lo-fs-base); }
.lo-header__top-row { display: flex; align-items: center; gap: 24px; min-height: 46px; }
.lo-header__clock { flex: none; display: inline-flex; align-items: center; gap: 10px; }
.lo-header__clock > .lo-icon { font-size: 19px; }
.lo-header__divider { width: 1px; height: 18px; margin: 0 6px; background: rgba(255, 255, 255, 0.3); }
.lo-header__time { min-width: 64px; font-variant-numeric: tabular-nums; }

.lo-ticker { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.lo-ticker__badge { flex: none; padding: 4px 10px; border-radius: var(--lo-r-sm); background: var(--lo-primary); color: #fff; font-size: var(--lo-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.lo-ticker__list { position: relative; flex: 1; min-width: 0; height: 22px; overflow: hidden; }
.lo-ticker__item { position: absolute; inset: 0; opacity: 0; transform: translateY(100%); transition: opacity 0.35s ease, transform 0.35s ease; }
.lo-ticker__item.is-active { opacity: 1; transform: translateY(0); }
.lo-ticker__item.is-leaving { opacity: 0; transform: translateY(-100%); }
.lo-ticker__item a { display: block; overflow: hidden; color: #fff; line-height: 22px; white-space: nowrap; text-overflow: ellipsis; }
.lo-ticker__item a:hover { color: #ffd5d6; }
.lo-ticker__btn {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 17px;
	cursor: pointer;
}
.lo-ticker__btn:hover { background: rgba(255, 255, 255, 0.14); }

.lo-header__lang { flex: none; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, 0.2); }
.lo-header__lang > .lo-icon { font-size: 19px; }
.lo-header__lang .lang-toggle-btn { padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; }
.lo-header__lang .lang_show { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
.lo-header__lang .lang_show svg { width: 22px; height: 22px; }

/* Hàng chính ------------------------------------------------------------- */
.lo-header__main { position: relative; overflow: hidden; background: linear-gradient(90deg, #f8fafd 0%, #f1f4f9 60%, #e9eef6 100%); border-bottom: 1px solid var(--lo-line); }
.lo-header__art {
	position: absolute;
	top: 0;
	right: 0;
	width: auto;
	height: 100%;
	max-width: 34%;
	object-fit: cover;
	opacity: 0.85;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
	mask-image: linear-gradient(90deg, transparent, #000 55%);
	pointer-events: none;
}
/* Ô tìm kiếm và 2 nút cùng nằm trên một hàng (căn trên), từ khoá ở dưới ô tìm kiếm. */
.lo-header__main-row { position: relative; display: flex; align-items: flex-start; gap: 24px; padding-top: 16px; padding-bottom: 12px; }

.lo-logo { flex: none; align-self: center; display: inline-flex; align-items: center; gap: 12px; color: var(--lo-header-navy); }
.lo-logo__img { width: auto; max-height: 72px; }
.lo-logo__mark { display: grid; place-items: center; width: 60px; height: 60px; color: var(--lo-header-navy); font-size: 56px; }
.lo-logo__mark .lo-icon { stroke-width: 1.6; }
.lo-logo__text { display: grid; gap: 2px; }
.lo-logo__name { font-family: var(--lo-font); font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; text-transform: uppercase; color: var(--lo-header-navy); }
.lo-logo__name em { font-style: normal; color: var(--lo-primary); }
.lo-logo__tagline { color: var(--lo-ink-2); font-size: var(--lo-fs-sm); }

.lo-header__search { flex: 1; min-width: 0; display: grid; gap: 10px; }
.lo-hsearch { display: flex; align-items: stretch; height: var(--lo-hctl); margin: 0; border: 1px solid var(--lo-line); border-radius: var(--lo-r); background: #fff; box-shadow: var(--lo-shadow-sm); overflow: hidden; }
.lo-hsearch:focus-within { border-color: var(--lo-header-navy-2); box-shadow: 0 0 0 3px rgba(18, 53, 122, 0.12); }
.lo-hsearch__field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; margin: 0; padding: 0 16px; }
.lo-hsearch__icon { font-size: 20px; color: var(--lo-ink); }
.lo-header .lo-hsearch__input {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--lo-ink);
	font: 400 var(--lo-fs-md) var(--lo-font);
	outline: none;
}
.lo-hsearch__input::placeholder { color: #94a3b8; }
.lo-hsearch__scope { position: relative; flex: none; display: flex; align-items: center; margin: 0; border-left: 1px solid var(--lo-line); }
.lo-header .lo-hsearch__scope select {
	height: 100%;
	margin: 0;
	padding: 0 38px 0 18px;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--lo-ink);
	font: 500 var(--lo-fs-md) var(--lo-font);
	cursor: pointer;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.lo-hsearch__scope .lo-icon { position: absolute; right: 14px; pointer-events: none; font-size: 16px; }
.lo-header .lo-hsearch .lo-hsearch__submit {
	flex: none;
	height: auto;
	min-height: 0;
	display: grid;
	place-items: center;
	width: 52px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--lo-primary);
	color: #fff;
	font-size: 24px;
	cursor: pointer;
}
.lo-header .lo-hsearch .lo-hsearch__submit:hover { background: var(--lo-primary-hover); }
.lo-header .lo-hsearch__submit .lo-icon { width: 19px; height: 19px; }

.lo-keywords {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
	mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.lo-keywords > * { flex: none; }
.lo-keywords__label { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--lo-ink); font-size: var(--lo-fs-base); font-weight: 600; }
.lo-keywords__label .lo-icon { color: var(--lo-primary); font-size: 18px; }
.lo-keywords__chip { padding: 5px 12px; border-radius: var(--lo-r-pill); background: #e8edf5; color: var(--lo-ink-2); font-size: var(--lo-fs-sm); line-height: 1.3; }
.lo-keywords__chip:hover { background: var(--lo-header-navy); color: #fff; }

.lo-header__actions { flex: none; display: flex; align-items: center; gap: 10px; height: var(--lo-hctl); }
.lo-hbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: var(--lo-hctl);
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: var(--lo-r);
	font: 600 var(--lo-fs-md)/1.2 var(--lo-font);
	white-space: nowrap;
}
.lo-hbtn .lo-icon { font-size: 18px; }
.lo-hbtn--primary { background: var(--lo-primary); color: #fff; box-shadow: 0 8px 18px rgba(215, 32, 39, 0.22); }
.lo-hbtn--primary:hover { background: var(--lo-primary-hover); color: #fff; }
.lo-hbtn--outline { background: #fff; border-color: var(--lo-header-navy); color: var(--lo-header-navy); }
.lo-hbtn--outline:hover { background: var(--lo-header-navy); color: #fff; }
.lo-header__account .ls-auth-buttons { width: auto; }

/* Menu chính ------------------------------------------------------------- */
.lo-header__nav { background: #fff; border-bottom: 1px solid var(--lo-line); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.lo-nav { display: flex; align-items: stretch; }
.lo-nav__item { position: relative; flex: 1 1 auto; display: flex; }
/* Vạch chia ngắn ở giữa, giữa các mục menu. */
.lo-nav__item + .lo-nav__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 1px;
	height: 22px;
	background: var(--lo-line);
	transform: translateY(-50%);
}
.lo-nav__item > a {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 14px;
	color: var(--lo-header-navy);
	font-size: var(--lo-fs-md);
	font-weight: 600;
	white-space: nowrap;
}
/* Gạch đỏ mảnh ở đáy: mục đang xem và khi rê chuột. */
.lo-nav__item > a::after {
	content: "";
	position: absolute;
	left: 18%;
	right: 18%;
	bottom: 0;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--lo-primary);
	transform: scaleX(0);
	transition: transform var(--lo-ease);
}
.lo-nav__item > a:hover,
.lo-nav__item:focus-within > a,
.lo-nav__item.is-current > a { background: var(--lo-line-soft); color: var(--lo-header-navy); }
.lo-nav__item > a:hover::after,
.lo-nav__item:focus-within > a::after,
.lo-nav__item.is-current > a::after { transform: scaleX(1); }
.lo-nav__icon { font-size: 20px; color: var(--lo-header-navy-2); }
.lo-nav__caret { font-size: 15px; opacity: 0.7; transition: transform var(--lo-ease); }
.lo-nav__item:hover .lo-nav__caret,
.lo-nav__item:focus-within .lo-nav__caret { transform: rotate(180deg); }
.lo-nav__home { flex: 0 0 auto; }
.lo-nav__home > a { width: 100px; padding: 0; color: var(--lo-primary); font-size: 22px; }
.lo-nav__home > a:hover,
.lo-nav__home.is-current > a { color: var(--lo-primary); }
/* Ô trang chủ luôn có gạch đỏ, gạch rộng hơn các mục khác. */
.lo-nav__home > a::after { left: 0; right: 0; transform: scaleX(1); }

.lo-nav__sub {
	position: absolute;
	top: 100%;
	left: 50%;
	z-index: 60;
	min-width: 240px;
	padding: 8px;
	border-radius: 0 0 var(--lo-r) var(--lo-r);
	background: #fff;
	box-shadow: var(--lo-shadow-hover);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity var(--lo-ease), transform var(--lo-ease), visibility var(--lo-ease);
}
.lo-nav__item:hover > .lo-nav__sub,
.lo-nav__item:focus-within > .lo-nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.lo-nav__sub a { display: block; padding: 10px 14px; border-radius: var(--lo-r-sm); color: var(--lo-ink); font-size: var(--lo-fs-base); white-space: nowrap; }
.lo-nav__sub a:hover,
.lo-nav__sub a[aria-current="page"] { background: var(--lo-line-soft); color: var(--lo-primary); }

/* Nút chỉ dùng trên mobile ---------------------------------------------- */
.lo-header__burger,
.lo-header__search-toggle { display: none; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1439px) {
	.lo-nav__item > a { padding: 0 10px; gap: 7px; font-size: var(--lo-fs-base); }
	.lo-nav__home > a,
	.lo-nav__home > a:hover,
	.lo-nav__home.is-current > a { width: 76px; }
}

@media (max-width: 1279px) {
	.lo-logo__name { font-size: 32px; }
	.lo-logo__mark { width: 50px; height: 50px; font-size: 46px; }
	.lo-hbtn { padding: 0 12px; }
	.lo-nav__item > a { padding: 0 12px; gap: 8px; font-size: var(--lo-fs-base); }
	.lo-nav__icon { font-size: 19px; }
	.lo-nav__home > a { width: 72px; }
}

@media (max-width: 1100px) {
	.lo-header__main-row { flex-wrap: wrap; gap: 16px 24px; }
	.lo-header__search { order: 3; flex-basis: 100%; max-width: none; }
	.lo-header__actions { align-self: center; margin-left: auto; }
	.lo-nav__icon { display: none; }
}

@media (max-width: 1023px) {
	.lo-header__top,
	.lo-header__nav,
	.lo-header__actions,
	.lo-keywords,
	.lo-header__art { display: none; }
	.lo-header__main { background: #fff; }
	.lo-header__main-row { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
	.lo-header__burger { display: block; flex: none; }
	.lo-header__search-toggle {
		display: inline-grid;
		place-items: center;
		flex: none;
		width: 42px;
		height: 42px;
		padding: 0;
		border: 1px solid var(--lo-line);
		border-radius: var(--lo-r);
		background: #fff;
		color: var(--lo-ink);
		font-size: 20px;
		cursor: pointer;
	}
	.lo-logo { margin: 0 auto; }
	.lo-logo__img { max-height: 44px; }
	.lo-logo__mark { width: 36px; height: 36px; font-size: 34px; }
	.lo-logo__name { font-size: 24px; }
	.lo-logo__tagline { display: none; }
	.lo-header__search {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 61;
		padding: 10px 16px 14px;
		background: #fff;
		border-bottom: 1px solid var(--lo-line);
		box-shadow: var(--lo-shadow);
		display: none;
	}
	.lo-header.is-search-open .lo-header__search { display: grid; }
	.lo-header__main { overflow: visible; }
	.lo-hsearch { height: 46px; }
	.lo-hsearch__scope select { padding-left: 12px; font-size: var(--lo-fs-sm); }
	.lo-header .lo-hsearch .lo-hsearch__submit { width: 52px; }
	.lo-header .lo-hsearch__submit .lo-icon { width: 20px; height: 20px; }
	.lo-header__container { padding: 0 16px; }
}

@media (max-width: 479px) {
	.lo-hsearch__scope { display: none; }
}
