/* CSS 全域變數：版面開關區塊高度 (配合選單開關圖檔高度) */
:root {
   --RWDAreaHeight: 40;
}

/* 選單開關區塊 預設不顯示*/
#RWD_DivArea {
   display: none;
}    

/* 左方選單開關(≡、×) 預設不顯示 */
   #RWD_DivL {
   display: none;
}
  
/* 左方選單開關連結 */
#RWD_AnchorL {
   display: block;
   border: 0.0625rem dotted #c0c0c0;
   text-decoration: none;
}

/* 左方選單開關連結：未瀏覽 */
#RWD_AnchorL:link {
   border: 0.0625rem dotted #c0c0c0;
   text-decoration: none;
}

/* 左方選單開關連結：已瀏覽 */
#RWD_AnchorL:visited {
   border: 0.0625rem dotted #c0c0c0;
   text-decoration: none;
}

/* 左方選單開關連結：滑鼠移至上方 */
#RWD_AnchorL:hover, #RWD_AnchorL:focus-visible {
   border: 0.0625rem solid #000000;
   background-color: #ffffff;
   text-decoration: none;
}

/* 右方選單開關(≡、×) 預設不顯示 */
#RWD_DivR {
   display: none;
}

/* 右方選單開關連結 */
#RWD_AnchorR {
   display: block;
   border: 0.0625rem dotted #c0c0c0;
   text-decoration: none;
}

/* 右方選單開關連結：未瀏覽 */
#RWD_AnchorR:link {
   border: 0.0625rem dotted #c0c0c0;
   text-decoration: none;
}

/* 右方選單開關連結：已瀏覽 */
#RWD_AnchorR:visited {
   border: 0.0625rem dotted #c0c0c0;
   text-decoration: none;
}

/* 右方選單開關連結：滑鼠移至上方 */
#RWD_AnchorR:hover, #RWD_AnchorR:focus-visible {
   border: 0.0625rem solid #000000;
   background-color: #ffffff;
   text-decoration: none;
}

@media (max-width: 61.25rem) {
   /* 功能選單「開」網頁鎖定 */
   .RWD_DivOpen {
      height: 100%;
      width: 100%;
      overflow: hidden;
      position: fixed;
   }

   /* 功能選單「開」網頁鎖定 :before */
   .RWD_DivOpen:before { 
      z-index: 50;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      content: "";
      background-color: rgba(0, 0, 0, .6);
   }

   /* 選單開關區塊 */
   #RWD_DivArea {
      display: block;
      z-index: 90;
      position: sticky;
      width: 100%;
      height: calc((var(--RWDAreaHeight) + 8) / 16 * 1rem);
      border: 0.0625rem solid #000;
      background: linear-gradient(to top, #ffffff, #00c0ff);
   }
   
   /* 選單開關區塊設定固定在螢幕上方 */
   .RWD_DivAreaFixed {
      top: 0;
      left: 0;
      opacity: 0.8;
   }

   /* 左方選單開關 */
   #RWD_DivL {
      z-index: 101;
      position: absolute;
      top: 0.25rem;
      left: 0.25rem;
      margin: 0rem;
      padding: 0rem;
      display: block;
   }

   /* 右方選單開關 */
   #RWD_DivR {
      z-index: 103;
      position: absolute;
      top: 0.25rem;
      right: 0.25rem;
      margin: 0rem;
      padding: 0rem;
      display: block;
   }

   /* 主要框架 */
   #wrap {
      width: 100%;
   }

   /* 上方框架 橫幅*/
   #banner {   
      margin-top: 0rem;
      height: 9.75rem;
      background-position: left center;
      background-repeat: no-repeat;      
   }

   /* 中央框架 */
   #doc {
      width: 100%;
   }
   #contentTd{
      width: 100%;
   }

   /* 下方框架 */
   #foot {
      background-size: 120% 115%;
      background-position: top center;
      height: auto;    
      padding-bottom: 1rem;
      display: block;
   }
   /* 下方框架 p 下方邊界 */   
   #foot p {
      margin-bottom: 0.5rem;
   }
   /* 下方框架 每個 span 變成一列、取消左右 margin 避免過度擠壓 */
   #foot p span {
      display: block;
      margin: 0.25rem 0rem;
   }

   /* 網站導覽 */
   #topNav {
      line-height: 1.4em;
      top: 0rem;
   }

   /* 網站 Logo 與 名稱 */
   #deptTitle {
      top: 0.7rem;    
   }
   #deptTitle h1 {
      font-size: 1.5em;
   }
   #WebOrgLogo{
      width: 2rem;
   }

   /* 科室部門導覽 */
   #deptNav {
      overflow-y: auto;
      max-height: 55%;
      bottom: 2rem;
   }

   /* 左方選單 */
   #navRef {
      z-index: 102;
      position: absolute;
      top: calc((var(--RWDAreaHeight) + 10) / 16 * 1rem);
      left: 0rem;
      height: 0rem;
      margin: 0rem;
      padding: 0rem;
      background-color: #FFFFFF;
      overflow-x: hidden;
      overflow-y: auto;
      transition: .5s;
   }

   /* 右方選單 */
   #extRef {
      z-index: 104;
      position: absolute;
      top: calc((var(--RWDAreaHeight) + 10) /16 * 1rem);
      right: 0rem;
      height: 0rem;
      margin: 0rem;
      padding: 0rem;
      background-color: #FFFFFF;
      overflow-x: hidden;
      overflow-y: auto;
      transition: .5s;
   } 

   /* 左方與右方選單原來位置 <td> */
   #navTd, #extTd {
      display: none;
   }

   /* 左方與右方選單內容 */
   #nav, #ext {
      margin: 0rem 0rem 1rem 0rem;
      padding-top: 0.25rem;
   }

   /* 中央內容區 */
   #content {
      max-width: unset;
      min-height: unset;  
      text-align: center;
      padding: 0rem;
      margin: 0rem;
      text-align: justify;
   }

   /* 中央內容區 快速鍵 */
   #Div_AccessLink_C {
      padding: 0rem 0rem 0rem 0.25rem;
   }

   /* 首頁 圖片連結 */
   #ad_top {
      display: block;
      width: 99%;
      margin: 0rem;
   }
   #ad_top img {
      width: 99%;
      border: 1px dotted #c0c0c0;
   }

   /* 首頁 各項訊息 */
   .hometabs {
      width: 100% !important;
      margin: 0rem;
   }
   .tabs-header {
      padding-left: 2rem;
      background-position: -0.5rem !important;
   }
   .tabs-wrap {
      padding: 0rem;
      width: 87vw !important;
   }
   .panel-body {
      width: auto !important;  
      padding-left: 0.25rem !important;
   }
   .listdiv {
      margin-right: 0.25rem;  
   }
   .listdiv span {
      display: unset;
   }

   /********************/

   /* 網站導覽 */
   #WebMapDiv {
      text-align: justify;
      margin: 0.125rem;
      padding: 0.125rem;
   }
   #WebMapDiv a {
      font-size: 0.85rem;
   }  

   /* 目前位置 */
   #content nav {
      margin: 0.25rem 0rem !important;
      padding-left: 0.25rem;
   }
   
   /* 目前位置 */
   #content div img {
      width: 99%;
   }

   /* 新聞稿、活動訊息 區塊*/
   .bureport_mywrap {
      padding-left: 0;
      margin: 0rem 0.7rem;
   }
   /* 新聞稿、活動訊息 標題*/
   .bureport_h2 {
      line-height: normal;
   }
   /* 新聞稿、活動訊息 內容*/
   .bureport_content {
      text-align: justify; 
      margin: 0rem; 
   }

   /* English、隱私權、資料開放宣告 ... */
   [id^="static_"] {
      margin: 0.5rem !important;
   }
   [id^="static_"] h2 {
      width: fit-content !important;
      text-indent: 0rem !important;
      padding-left: 1.6rem !important;
      background-position-x: 0rem !important;
   }
   [id^="static_"] h3 {
      text-indent: 0rem !important;
      padding-left: 2rem !important;
      background-position-x: 0.8rem !important;
   }
   [id^="static_"] p, [id^="static_"] div {
      width: 100% !important;
      padding: 0.125rem !important;
      text-align: justify ;
   }
   [id^="static_"] p img {
      width: 100% !important;
      margin-left: -2rem;
   }
   [id^="static_"] div img {
      width: 100%;
   }
   [id^="static_"] ul {
      padding-left: 1.5rem !important;      
   }
   [id^="static_"] li {
      width: auto !important;
      line-height: normal !important;
   }

   /* 內容標題*/
   .content_title{
      width: auto;
      text-align: justify;
      margin: 0rem;
      padding-left: 3.25rem;
      background-position-x: -1rem;
   }

   /* 科室單位業務 列表*/
   .departments .dept div {
      margin-left: 1rem;
   }
   .departments .dept p {
      width: auto;
      line-height: normal;
      margin: 0.25rem 0.25rem 0.25rem 1rem;
   }   
   .departments .mission p {
      width: auto;
      line-height: normal;
      margin: 0.25rem 0.25rem 0.25rem 2rem;
   }
   /* 科室單位業務 組織職掌 聯絡方式*/
   .dept_contact {
      width: 98% !important;   
      margin: 0rem !important;
      line-height: normal !important;
   }
   /* 科室單位業務 組織職掌 業務職掌*/
   .dept_affairs{
      width: 98% !important;   
      margin: 0rem !important;
   }
   .dept_table {
      margin: 0rem 0rem 0rem 0.2rem !important;
      width: 100% !important;
   }
   .dept_table td, .dept_table th {
      line-height: normal;
      margin: 0rem;
      padding: 0rem !important;
      width: auto !important;
      vertical-align: top;
      font-size: 0.85rem !important;
      border-color: #c0c0c0;
      border-left-style: dashed;
      border-right-style: dashed;
   }

   /* 法規搜尋、表單搜尋 */   
   #rules_search, #forms_search {
      float: none !important;
      margin: 0.25rem !important;
      text-align: right;
   }

   /* 法令規章下載、各式表單下載 */
   #filemanage .nav_sec img {
      width: unset;
   }

   /* 法令規章下載 搜尋 結果、各式表單下載 搜尋 結果列表*/
   #filemanage .nav_sec div {
      float: none !important;
      line-height: normal;
   }
   #filemanage .files_sec {
      height: auto;
      overflow: unset;
      padding-bottom: 0rem;
   }
   #filemanage, #filemanage .files_sec > ul > li {
      height: auto;
   }
   #filemanage .files_sec > ul > li .file_name {
      white-space: normal;   
   }
   #filemanage .files_sec > ul > li .file_name span {
      display: block !important;  
   }
   #filemanage .files_sec > ul > li .file_name a span {
      display: unset !important;
   }
}
