/* 首頁專用全螢幕選單；所有名稱隔離於 nexus_menu，避免影響既有場景。 */
.nexus_menu_trigger {
    position: fixed; z-index: 200; top: clamp(18px, 3vw, 40px); right: clamp(18px, 3.6vw, 58px);
    display: flex; align-items: center; gap: 24px; min-height: 54px; padding: 0 23px;
    border: 1px solid rgba(79, 130, 132, .26); border-radius: 100px;
    color: #163f42; background: rgba(249, 255, 253, .92); backdrop-filter: blur(18px);
    box-shadow: 0 4px 22px rgba(0, 36, 40, .08); cursor: pointer;
    font: 500 11px/1 'Manrope', sans-serif; letter-spacing: .24em;
    transition: background .2s, box-shadow .2s;
}
@media (max-width: 700px) {
    .nexus_menu_trigger { top: 16px; right: 16px; min-height: 48px; gap: 18px; padding: 0 18px; }
}
.nexus_menu_trigger:hover { background: #fff; box-shadow: 0 5px 30px rgba(0, 113, 115, .16); }
.nexus_menu_icon { display: grid; gap: 7px; width: 23px; }
.nexus_menu_icon i { height: 1px; width: 23px; background: currentColor; transition: width .25s; }
.nexus_menu_icon i:last-child { width: 15px; justify-self: end; }
.nexus_menu_trigger:hover .nexus_menu_icon i:last-child { width: 23px; }
.nexus_menu_trigger:focus-visible, .nexus_menu_dialog a:focus-visible, .nexus_menu_close:focus-visible { outline: 2px solid #009ea8; outline-offset: 6px; border-radius: 3px; }

.nexus_menu_dialog {
    position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none;
    margin: 0; padding: clamp(16px, 1.4vw, 28px) clamp(26px, 4.5vw, 74px) 26px;
    border: 0; background: #fff; color: #303a46; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    font-family: 'DM Sans', 'Microsoft JhengHei', sans-serif;
    display: none; grid-template-rows: auto minmax(min-content, 1fr) auto; gap: 20px;
}
.nexus_menu_dialog[open] { display: grid; }
.nexus_menu_dialog, .nexus_menu_dialog * { box-sizing: border-box; }
.nexus_menu_dialog::backdrop { background: rgba(2, 28, 31, .15); }
@media (max-width: 700px) {
    .nexus_menu_dialog { padding: 20px 25px; gap: 20px; }
}
@media (max-height: 750px) and (min-width: 701px) {
    .nexus_menu_dialog { padding-top: 16px; gap: 16px; }
}

.nexus_menu_header { display: flex; align-items: center; gap: 28px; position: relative; z-index: 2; }
.nexus_menu_brand { display: inline-block; flex: 0 0 auto; width: clamp(230px, 25vw, 360px); text-decoration: none; }
/* 選單與頁首皆完整顯示公司原圖，不放大或位移圖片來收合透明邊界。 */
.nexus_menu_dialog .nexus_menu_brand > img { display: block; width: 100%; max-width: 100%; height: auto; }
@media (max-width: 700px) {
    .nexus_menu_brand { width: min(245px, calc(100vw - 124px)); }
}
.nexus_menu_tagline { padding: 2px 0 2px 28px; border-left: 1px solid #c5cdd0; font-size: 8px; line-height: 2.1; letter-spacing: .38em; }
@media (max-width: 1000px) {
    .nexus_menu_tagline { display: none; }
}
.nexus_menu_close { margin-left: auto; padding: 0; display: flex; align-items: center; gap: 25px; min-width: 44px; min-height: 44px; border: 0; background: none; cursor: pointer; color: #2d3744; font: 400 11px/1 'Manrope', sans-serif; letter-spacing: .35em; }
.nexus_menu_close i { width: 31px; height: 31px; position: relative; transition: transform .35s; }
.nexus_menu_close i::before, .nexus_menu_close i::after { content: ''; position: absolute; left: 15px; top: 0; width: 1px; height: 34px; background: currentColor; transform: rotate(45deg); }
.nexus_menu_close i::after { transform: rotate(-45deg); }
.nexus_menu_close:hover i { transform: rotate(90deg); }
@media (max-width: 700px) {
    .nexus_menu_close { gap: 12px; }
    .nexus_menu_close span { display: none; }
    .nexus_menu_close i { width: 25px; height: 25px; }
    .nexus_menu_close i::before, .nexus_menu_close i::after { height: 27px; left: 12px; }
}

/* 保留導覽與圖片的內容高度，避免較矮視窗中擠入底部聯絡資訊。 */
.nexus_menu_body { display: grid; grid-template-columns: 34% 66%; min-height: min-content; position: relative; }
@media (max-width: 1000px) and (min-width: 701px) {
    .nexus_menu_body { grid-template-columns: 39% 61%; }
}
@media (max-width: 700px) {
    .nexus_menu_body { display: block; }
}
.nexus_menu_nav { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding: 0 0 8px; }
.nexus_menu_link { position: relative; display: flex; align-items: flex-start; gap: clamp(22px, 3.4vw, 58px); width: 100%; padding: 6px 0; text-decoration: none; color: #303a46; transition: color .25s; }
.nexus_menu_link:hover, .nexus_menu_link.is_active { color: #0097a3; }
.nexus_menu_number { flex: 0 0 21px; padding-top: 5px; font-size: clamp(14px, 1.2vw, 18px); font-weight: 300; letter-spacing: .02em; }
.nexus_menu_words { display: flex; flex-direction: column; gap: 6px; }
.nexus_menu_english { font: 400 clamp(21px, 1.85vw, 31px)/1.2 'Manrope', sans-serif; letter-spacing: .2em; }
.nexus_menu_chinese { font-size: clamp(13px, 1.13vw, 17px); letter-spacing: .3em; line-height: 1.5; color: #384953; }
.nexus_menu_connector { width: clamp(30px, 6vw, 95px); position: relative; margin-top: 16px; height: 1px; background: linear-gradient(90deg, transparent, #009fa9); transform: scaleX(0); transform-origin: left; opacity: 0; transition: transform .4s, opacity .3s; }
.nexus_menu_connector::after { content: ''; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; background: #029fa7; border-radius: 50%; }
.nexus_menu_link.is_active .nexus_menu_connector { transform: scaleX(1); opacity: 1; }
@media (max-width: 1000px) {
    .nexus_menu_connector { display: none; }
}
@media (max-width: 700px) {
    .nexus_menu_nav { gap: 0; padding: 2px 0 12px; }
    .nexus_menu_link { padding: 12px 0; gap: 23px; }
    .nexus_menu_words { gap: 4px; }
    .nexus_menu_english { font-size: 22px; }
    .nexus_menu_chinese { font-size: 12px; }
    .nexus_menu_number { font-size: 13px; }
}
@media (max-height: 750px) and (min-width: 701px) {
    .nexus_menu_link { padding: 4px 0; }
    .nexus_menu_words { gap: 5px; }
    .nexus_menu_english { font-size: clamp(20px, 1.85vw, 27px); }
    .nexus_menu_chinese { font-size: 13px; }
}

/* 後台新增分類使選項超過 6 個時，縮小間距與字級，並讓過長名稱單行省略，維持一個畫面內顯示 */
.nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_link { padding: 3px 0; }
.nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_words { min-width: 0; gap: 3px; }
.nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_english { font-size: clamp(18px, 1.55vw, 26px); }
.nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_english, .nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_chinese { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_chinese { font-size: clamp(12px, 1vw, 15px); letter-spacing: .2em; }
@media (max-width: 700px) {
    .nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_link { padding: 9px 0; }
    .nexus_menu_nav:has(> .nexus_menu_link:nth-child(7)) .nexus_menu_english { font-size: 20px; }
}

.nexus_menu_visual { position: relative; display: flex; min-width: 0; min-height: 0; flex-direction: column; justify-content: center; }
/* 使用提供的透明 PNG，保留玻璃材質與軌道細節，作為預覽後方的淡色背景。 */
.nexus_menu_watermark { position: absolute; top: 0; left: -14%; z-index: 0; width: clamp(360px, 49vw, 820px); height: 92%; object-fit: contain; object-position: left center; opacity: .45; pointer-events: none; user-select: none; }
.nexus_menu_images { position: relative; width: 114%; margin: -1% 0 -1% -10%; min-height: 0; flex: 1; }
.nexus_menu_image { position: absolute; width: 100%; height: 100%; object-fit: contain; opacity: 0; pointer-events: none; }
.nexus_menu_image.is_active { opacity: 1; }
.nexus_menu_caption { display: flex; justify-content: space-between; align-items: flex-end; gap: 26px; margin-left: 8%; padding-bottom: 8px; position: relative; z-index: 1; }
.nexus_menu_caption_copy { max-width: 430px; }
.nexus_menu_caption h3 { display: flex; align-items: center; gap: 25px; margin: 0 0 14px; font: 400 12px/1.5 'Manrope', sans-serif; letter-spacing: .27em; }
.nexus_menu_caption h3::after { content: ''; display: inline-block; flex: 0 1 75px; height: 1px; background: linear-gradient(90deg, #0c98a4, transparent); }
.nexus_menu_caption p { margin: 0; max-width: 365px; font-size: 13px; line-height: 2; letter-spacing: .12em; }
.nexus_menu_explore { display: flex; flex-shrink: 0; align-items: center; gap: 18px; color: #0096a3; text-decoration: none; font-size: 12px; letter-spacing: .3em; }
.nexus_menu_explore i { display: grid; place-items: center; width: 47px; height: 47px; border: 1px solid #0096a3; border-radius: 50%; font: 300 24px/1 'Manrope', sans-serif; transition: background .25s, color .25s, transform .25s; }
.nexus_menu_explore:hover i { color: #fff; background: #0096a3; transform: rotate(45deg); }
@media (max-width: 1000px) {
    .nexus_menu_caption { margin-left: 0; gap: 12px; }
    .nexus_menu_explore > span { display: none; }
    .nexus_menu_caption p { font-size: 12px; }
}
@media (max-width: 700px) {
    .nexus_menu_visual { margin-top: 16px; }
    .nexus_menu_watermark { display: none; }
    .nexus_menu_images { width: 100%; margin: -20px 0 -2px; flex: none; height: 225px; }
    .nexus_menu_caption { padding-bottom: 8px; gap: 16px; }
    .nexus_menu_caption h3 { font-size: 10px; margin-bottom: 8px; letter-spacing: .18em; }
    .nexus_menu_caption h3::after { display: none; }
    .nexus_menu_caption p { font-size: 12px; letter-spacing: .06em; line-height: 1.9; }
    .nexus_menu_explore i { width: 40px; height: 40px; }
}

.nexus_menu_footer { position: relative; z-index: 2; width: max-content; max-width: 100%; font-size: 10px; color: #536169; }
.nexus_menu_footer > span { line-height: 2; font-size: 8px; letter-spacing: .45em; }
.nexus_menu_footer > div { display: flex; align-items: center; gap: 26px; margin-top: 17px; padding-top: 16px; border-top: 1px solid #c7cfd1; }
.nexus_menu_footer a { color: #303a46; text-decoration: none; font-size: 12px; letter-spacing: .04em; }
.nexus_menu_footer a:hover { color: #0096a3; }
.nexus_menu_footer > div > span { padding-left: 26px; border-left: 1px solid #b7c2c6; font-size: 9px; letter-spacing: .12em; }
@media (max-width: 1000px) {
    .nexus_menu_footer > div > span { display: none; }
}
@media (max-width: 700px) {
    .nexus_menu_footer { margin-top: 2px; width: 100%; }
    .nexus_menu_footer > span { display: none; }
    .nexus_menu_footer > div { width: 100%; margin-top: 0; padding-top: 14px; }
    .nexus_menu_footer a { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .nexus_menu_dialog *, .nexus_menu_trigger, .nexus_menu_icon i { transition: none !important; }
}

/* 轉場圖層獨立於頁面照片與選單，完成後直接移除顯示。 */
.nexus_page_entry { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 250; pointer-events: none; }
.nexus_page_entry[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
    .nexus_page_entry { display: none; }
}
