/* v15: three-stage header responsive navigation. Overrides only header at intermediate widths. */
/* Wide desktop: original single-line menu. */
@media (min-width: 1680px) {
  #header.header-hp .navigation { display:block !important; visibility:visible !important; }
  #header.header-hp .mobile-menu-icon-hp { display:none !important; }
  #header.header-hp .navbar-nav .nav-link::after { content:none !important; }
}
/* Medium desktop / tablet landscape: display deliberate two-line link captions. */
@media (min-width: 992px) and (max-width: 1679.98px) {
  #header.header-hp .header-in-hp {display:flex !important; align-items:center !important; flex-wrap:nowrap !important;}
  #header.header-hp .logo-hp {flex:0 0 auto !important;}
  #header.header-hp .logo-hp img {max-width:130px !important; height:auto !important;}
  #header.header-hp .navigation {display:block !important;visibility:visible !important;min-width:0 !important; flex:1 1 auto !important;}
  #header.header-hp .navigation>nav.navbar {display:flex !important;align-items:center !important;flex-wrap:nowrap !important;min-width:0 !important;padding-left:4px !important;padding-right:0 !important;}
  #header.header-hp .navbar-collapse {display:flex !important;visibility:visible !important;min-width:0 !important;flex:1 1 auto !important;}
  #header.header-hp .navbar-nav {display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;justify-content:center !important;align-items:stretch !important;width:100% !important;margin-left:0 !important;}
  #header.header-hp .navbar-nav .nav-item {flex:1 1 0 !important;min-width:0 !important;display:flex !important;align-items:stretch !important;justify-content:center !important;}
  #header.header-hp .navbar-nav .nav-link[data-aitw-compact] {
    font-size:14px !important;line-height:1.35 !important;display:flex !important;align-items:center !important;justify-content:center !important;
    width:100% !important;min-width:0 !important;padding:9px 1px !important;text-align:center !important;white-space:normal !important;
  }
  #header.header-hp .navbar-nav .nav-link[data-aitw-compact]::after {
    content:attr(data-aitw-compact) !important;white-space:pre-line !important;display:block !important;
    font-family:'Noto Sans TC','Microsoft JhengHei',sans-serif !important;
    font-size:clamp(11px,1.02vw,14px) !important;font-weight:600 !important;line-height:1.45 !important;
    color:inherit !important;text-align:center !important;letter-spacing:0 !important;
  }
  #header.header-hp .mobile-menu-icon-hp {display:none !important;visibility:hidden !important;}
  #header.header-hp .header-right-hp {display:none !important;}
  #header.header-hp .sx-header-actions {display:flex !important;flex:0 0 auto !important;gap:7px !important;margin-left:4px !important;font-size:11px !important;}
  #header.header-hp .sx-header-actions .sx-register {padding:7px 9px !important;}
}
/* Narrow screens: one unified hamburger; avoid intermediate menu taking space. */
@media (max-width: 991.98px) {
  #header.header-hp .navigation {display:none !important;visibility:hidden !important;}
  #header.header-hp .mobile-menu-icon-hp {display:flex !important;visibility:visible !important;}
}

/* v21: real two-line DOM labels instead of pseudo-element; readable on laptop. */
#header .navbar-nav .aitw-nav-two {display:none!important;}
#header .navbar-nav .aitw-nav-full {display:inline!important;}
@media (min-width:992px) and (max-width:1679.98px) {
 #header.header-hp .navbar-nav .nav-link[data-aitw-compact] {font-size:14px!important;line-height:1.4!important;padding:7px 2px!important;white-space:normal!important;}
 #header.header-hp .navbar-nav .nav-link[data-aitw-compact]::after {content:none!important;display:none!important;}
 #header.header-hp .navbar-nav .aitw-nav-full {display:none!important;}
 #header.header-hp .navbar-nav .aitw-nav-two {display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;white-space:nowrap!important;font-family:'Noto Sans TC','Microsoft JhengHei',sans-serif!important;font-size:14px!important;font-weight:600!important;line-height:1.55!important;letter-spacing:0!important;}
 #header.header-hp .navbar-nav .aitw-nav-two>span {display:block!important;font-size:inherit!important;line-height:inherit!important;}
}
