/*
	Remarks:
	1. To Prevent Blurred Text and to Optimise the Visual Kinetic,
	skew angle is slightly different from the parent.
*/
header
{
	position: fixed;
	display: flex;
	top: 0;
	left: 0;
	width: 100vw;
	height: 5rem;
	z-index: 99999;
	background: linear-gradient(#000 0, transparent 5rem);
}

#landing_header
{
	background: none;
}

/* Header: Left Side */
.header_left
{
	position: relative;
	display: flex;
	flex: 1 1 33.33%;
	align-items: center;
	box-sizing: border-box;
	background-color: #000;
	color: #FFF;
	transform: skew(-20deg);
	z-index: 99990;
}

/* Fix: Skew Visual Inconsistency - Left Side */
.header_left::before
{
	content: "";
	position: absolute;
	top: 0;
	left: -10vw;
	width: 10vw;
	height: 100%;
	background-color: #000;
	transform: skew(-20deg);
	z-index: -1;
}

.hl_contents
{
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	max-width: 100%;
	margin-left: 20rem;
	margin-right: 5rem;
	transform: skew(20deg);
}

.hl_contents img
{
	height: 2.5rem;
	width: 2.5rem;
	object-fit: contain;
}

.site_title
{
	font-size: 1.8rem;
	white-space: nowrap;
	letter-spacing: -0.063rem;
	transform: skew(-3deg);
}

.site_title_sld
{
	font-family: "YNC Hybrid", sans-serif;
	font-weight: 700;
}

.site_title_tld
{
	font-family: "YNC Hybrid", sans-serif;
	font-weight: normal;
	font-size: 1.2rem;
}

/* Header: Right Side */
.header_right
{
	flex: 1 1 66.67%;
	display: flex;
	align-items: flex-start;
	box-sizing: border-box;
	padding-bottom: 0.8rem;
	background-color: rgba(255, 255, 255, 0);
	transform: skew(-20deg);
	/* Fix: Skew Visual Inconsistency - Right Side */
	margin-right: -0.68rem;
}

.hr_navbar
{
	flex: 2 1 auto;
	display: flex;
	height: 100%;
}

.hr_navbar .nav_btn
{
	flex: 1 1 0;
	display: flex;
	position: relative;
	justify-content: center;
	align-items: center;
	background-color: #FFF;
	color: #000;
	cursor: pointer;
	font-weight: 600;
	font-size: 1rem;
	transition: background-color 0.1s, color 0.1s;
	text-decoration: none;
	height: 100%;
}

.hr_navbar .nav_btn:hover,
.hr_navbar .nav_btn.active,
.hr_navbar .nav_btn:focus
{
	background-color: #609CD4;
	color: #FFF;
}

.nav_btn_text
{
	margin: 0 1.5rem;
	transform: skew(17deg);
	text-align: center;
}

/* Btn Divider */
.hr_navbar .nav_btn:not(:last-child)::after
{
	content: "";
	position: absolute;
	top: 10%;
	right: 0;
	width: 0.1rem;
	height: 80%;
	background-color: #CCC;
	pointer-events: none;
}

.hr_lang_sel
{
	/* WCAG Compliance: Remove Default Button Style */
    border: none;
    outline: none; 
    padding: 0;
    font: inherit; 
    cursor: pointer;
    text-align: center;
	/* WCAG Compliance: End */
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	height: 100%;
	box-sizing: border-box;
	background-color: #000;
	color: #FFF;
	transition: background-color 0.1s, color 0.1s;
}

.hr_lang_sel:hover
{
	background: #609CD4;
	/* background: linear-gradient(90deg,rgba(96, 156, 212, 1) 0%, rgba(0, 0, 0, 1) 100%); */
	cursor: pointer;
}

/* WCAG Compliance: Focused Visualization */
.hr_lang_sel:focus {
    background-color: #609CD4;
	/* WCAG Compliance: Outer Stroke */
    outline: 3px solid #FFF;
    outline-offset: -3px;
}

.hl_lang_contents
{
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: 5rem;
	margin-right: 20rem;
	font-weight: 600;
	font-size: 1rem;
	white-space: nowrap;
	transform: skew(20deg);
}

.header_lang_text
{
	transform: skew(-3deg);
}

.hl_lang_contents img
{
	width: auto;
	height: 1.5rem;
	object-fit: contain;
}

/* Mobile Header */
.header_mobile_right
{
    display: none;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
    padding-right: 1rem;
}

.header_mobile_right i
{
    font-size: 1.8rem;
    color: #FFF;
    cursor: pointer;
}

.mobile_sidebar
{
    position: fixed;
    top: 0;
    right: -15.5rem;
    width: 15.5rem;
    height: 100%;
    background-color: #000;
    color: #FFF;
    display: flex;
    flex-direction: column;
    padding-top: 5rem;
    gap: 1.5rem;
    transition: right 0.3s ease, visibility 0.3s;
    z-index: 99997;

	/* For: Hiding Objects when sidebar hidden */
	visibility: hidden;
}

.mobile_sidebar.show
{
    right: 0;
	visibility: visible;
}

.mobile_navbar a
{
    color: #FFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    display: block;
	transform: skewX(-5deg);
}

.mobile_navbar a:focus,
.mobile_navbar a:hover,
.mobile_navbar a.active
{
    background-color: #609CD4;
    color: #FFF;
    outline: none;
	transition: background-color 0.1s, color 0.1s, transform 0.1s;
	transform: skewX(-15deg);
	/* Hover BG Width Limit */
	width: 10rem;
}

.mobile_overlay
{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99995;
}

.mobile_overlay.show
{
    display: block;
}

/* WCAG Compliance */
/* --- 语言选择器通用容器 (Desktop) --- */
.lang_selector_container {
    position: relative;
    flex: 1 1 0;
    height: 100%;
}

/* 下拉菜单样式 (Desktop) */
.lang_dropdown {
    position: absolute;
    top: 100%;
    left: 4rem;
    background-color: #000;
    color: #FFF;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 99990;
    display: none; /* 默认隐藏 */
    border: 1px solid #333;
    transform: skew(15deg) !important; /* 覆盖父级的skew */
}

.lang_dropdown.show {
    display: block;
}

.lang_item {
	display: flex;          /* 开启 Flex 布局 */
    align-items: center;    /* 垂直居中 */
    gap: 0.75rem;           /* 国旗与文字之间的间距 */

    padding: 0.75rem 1.5rem;
    color: #FFF;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.lang_item img {
    width: 1.2rem;          /* 统一宽度 */
    height: auto;           /* 保持比例 */
    object-fit: contain;
    flex-shrink: 0;         /* 防止在窄屏下图片被挤压 */
}

.lang_item:hover, .lang_item:focus {
    background-color: #609CD4;
    outline: none;
}

.lang_item.active {
    background-color: #333;
    font-weight: bold;
}

/* --- 手机端语言栏样式 --- */
.mobile_lang_section {
    margin-top: auto; /* 推到最下方 */
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile_lang_divider {
    height: 1px;
    background-color: #333;
    margin-bottom: 1rem;
}

.mobile_lang_trigger {
    background: #222;
    color: #FFF;
    border: 1px solid #444;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    justify-content: space-between;
}

.mobile_lang_trigger img {
    height: 1.2rem;
}

.mobile_lang_list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #111;
    display: none; /* 默认隐藏 */
    border: 1px solid #333;
}

.mobile_lang_list.show {
    display: block;
}

/* 手机端语言项样式 */
.mobile_lang_list .lang_item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #222;
}

/* 修正 .hr_lang_sel 的对齐方式，因为它现在在 container 里 */
.hr_lang_sel {
    width: 100%;
    height: 100%;
}
/* WCAG Compliance: End */

/* Original: 1920px */
@media (max-width: 120em)
{
	.header_left
	{
		flex: 1 1 23.33%;
	}
	
	.hl_contents
	{
		margin-left: 6rem;
		margin-right: 3rem;
	}
	
	.hl_lang_contents
	{
		margin-left: 6rem;
		margin-right: 6rem;
	}
}

/* Original: 1280px */
@media (max-width: 80em)
{
	.header_left
	{
		flex: 1 1 15%;
	}
	
	.hl_contents
	{
		margin-left: 2rem;
		margin-right: 2rem;
	}
	
	.hl_lang_contents
	{
		margin-left: 2rem;
		margin-right: 2rem;
	}
}

/* Original: 1024px */
@media (max-width: 64em)
{
	.header_left
	{
		flex: 1 1 0;
	}
	
    .header_right
	{
        display: none;
    }
	
    .header_mobile_right
	{
        display: flex;
    }
	
	.hl_contents
	{
		margin-left: 1rem;
		margin-right: 1rem;
	}
}
