/* CSDA 前台動態兩層 Header（新增檔，不修改原 site.css） */
.csda-site-header{position:relative;z-index:100}
.csda-site-header .header-shell{gap:20px}
.csda-site-header .csda-site-nav{margin-left:auto;display:flex;align-items:center;gap:clamp(9px,1.5vw,23px);padding:0;position:static;background:transparent;box-shadow:none;border:0;overflow:visible}
.csda-site-header .csda-nav-group{position:relative;flex:0 0 auto}
.csda-site-header .csda-nav-main-row{display:flex;align-items:center;position:relative}
.csda-site-header .csda-nav-main,
.csda-site-header .csda-nav-home{display:flex;align-items:center;justify-content:center;white-space:nowrap;height:88px;padding:0 2px;border:0;background:transparent;color:#3e4856;font:inherit;font-size:13px;cursor:pointer;text-decoration:none}
.csda-site-header .csda-nav-main:hover,
.csda-site-header .csda-nav-main:focus-visible,
.csda-site-header .csda-nav-home:hover,
.csda-site-header .csda-nav-home:focus-visible{color:#263f8d}
.csda-site-header .csda-nav-no-link{cursor:default}
.csda-site-header .csda-sub-arrow{width:18px;height:35px;margin:0 0 0 3px;display:flex;align-items:center;justify-content:center;border:0;background:transparent;color:#55647a;cursor:pointer;font-size:20px;padding:0}
.csda-site-header .csda-sub-chevron{color:#59677b;font-size:18px;margin-left:5px}
.csda-site-header .csda-submenu{display:none;position:absolute;top:calc(100% - 1px);left:0;z-index:102;min-width:190px;max-width:320px;overflow:hidden;padding:8px 0;background:#fff;border:1px solid #e3e8f1;border-radius:0 0 8px 8px;box-shadow:0 13px 30px rgba(28,42,68,.15)}
.csda-site-header .csda-submenu-link{display:block!important;height:auto!important;min-height:42px;line-height:1.6;padding:10px 16px!important;border:0!important;font-size:13px;color:#3d4656;white-space:normal;overflow-wrap:anywhere;text-decoration:none}
.csda-site-header .csda-submenu-link:hover,
.csda-site-header .csda-submenu-link:focus-visible{background:#f3f6fb;color:#294788}
.csda-site-header .csda-submenu-link:after,
.csda-site-header .csda-nav-main:after,
.csda-site-header .csda-nav-home:after{display:none!important}
.csda-site-header .csda-nav-group.is-expanded>.csda-submenu{display:block}
@media(min-width:981px){
  .csda-site-header .csda-nav-group:hover>.csda-submenu,
  .csda-site-header .csda-nav-group:focus-within>.csda-submenu{display:block}
  .csda-site-header .csda-menu-button{display:none}
}
@media(max-width:1180px) and (min-width:981px){
  .csda-site-header .header-shell{gap:12px}
  .csda-site-header .csda-site-nav{gap:10px}
  .csda-site-header .csda-nav-main,.csda-site-header .csda-nav-home{font-size:12px}
}
@media(max-width:980px){
  .csda-site-header{position:sticky;top:0}
  .csda-site-header .csda-menu-button{display:flex}
  .csda-site-header .csda-site-nav{position:absolute;top:100%;left:0;right:0;z-index:101;max-height:calc(100vh - 72px);overflow-y:auto;display:none;flex-direction:column;align-items:stretch;gap:0;margin:0;padding:8px 18px 20px;background:#fff;border-top:1px solid #edf0f4;border-bottom:1px solid #e5e9ef;box-shadow:0 18px 34px rgba(27,41,67,.10)}
  .csda-site-header .csda-site-nav.is-open{display:flex}
  .csda-site-header .csda-nav-home,
  .csda-site-header .csda-nav-main{height:46px;justify-content:flex-start;padding:0 6px;font-size:14px}
  .csda-site-header .csda-nav-home{border-bottom:1px solid #eef1f5}
  .csda-site-header .csda-nav-group{width:100%;border-bottom:1px solid #eef1f5}
  .csda-site-header .csda-nav-main-row{width:100%}
  .csda-site-header .csda-nav-main{flex:1;min-width:0}
  .csda-site-header .csda-sub-arrow{width:44px;height:44px;font-size:23px;margin-left:auto;flex:0 0 44px}
  .csda-site-header .csda-sub-chevron{margin-right:16px}
  .csda-site-header .csda-submenu{position:static;min-width:0;max-width:none;width:100%;padding:0 0 8px 10px;border:0;border-radius:0;box-shadow:none;background:#f8fafc}
  .csda-site-header .csda-submenu-link{min-height:42px;padding:10px 13px!important;font-size:13px;border-bottom:1px solid #eef1f5!important}
  .csda-site-header .csda-nav-group:focus-within>.csda-submenu{display:none}
  .csda-site-header .csda-nav-group.is-expanded>.csda-submenu{display:block}
  .csda-site-header .csda-nav-main-trigger{cursor:pointer}
}
@media(max-width:480px){
  .csda-site-header .csda-site-nav{max-height:calc(100vh - 62px);padding:6px 12px 16px}
  .csda-site-header .csda-nav-home,.csda-site-header .csda-nav-main{font-size:13px}
}


/* v4.1：還原原首頁的 6px 細線 V 形下拉箭頭。
 * 原 site.css 的 .chev 使用 border-right/border-bottom + rotate(45deg)。
 * 僅改箭頭外觀，保留目前的 dropdown 點擊熱區、手機展開與 JS 行為。
 */
.csda-site-header .csda-sub-arrow > span,
.csda-site-header .csda-sub-chevron {
  display: inline-block;
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  box-sizing: border-box;
  font-size: 0;
  line-height: 0;
  border: 0;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transform-origin: center;
}
.csda-site-header .csda-sub-chevron {
  margin-left: 7px;
  color: #3e4856;
}
.csda-site-header .csda-nav-group:hover .csda-sub-chevron,
.csda-site-header .csda-nav-group:focus-within .csda-sub-chevron {
  color: #263f8d;
}
