﻿@media (max-width: 959px) {

  /*行動版左側選單_包住*/
  #w {
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  /*行動版上方*/
  #w #pagebody {
    position: relative;
    left: 0;
    z-index: 99999;
  }

  #w #pagebody #toolbarnav {
    position: fixed;
    display: block;
    left: 0px;
    top: 0px;
    z-index: 9999;
    width: 100%;
    height: 65px;
    background: #fff;
  }

  #w #pagebody #toolbarnav h1 {
    position: absolute;
    left: 50%;
    margin-left: -190px;
    padding-top: 10px;
    color: #000;
    font-weight: bold;
    font-size: 2.1em;
    text-shadow: 1px 1px 0px #313131;
  }

  #w #pagebody #toolbarnav h1.small {
    display: none;
  }

  #w #pagebody #toolbarnav #menu-btn {
    width: 60px;
    height: 40px;
    margin: 8px;
    background: url(../images/menu.png) center center no-repeat #333;
    border: 0;
    text-indent: -999999px;
    position: absolute;
    top: 0;
    left: 0;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    -border-radius: 3px;
    box-shadow: inset 0 1 1px #000;
    cursor: pointer;
  }

  #w #pagebody #content {
    display: block;
    height: 100%;
    z-index: 9999;
    padding-top: 90px;
  }

  /*行動版左側選單_選單*/
  #w #navmenu {
    background: #000;
    height: 100%;
    display: block;
    position: fixed;
    width: 200px;
    left: 0px;
    top: 0px;
    z-index: 0;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 99999;
  }

  #w #navmenu header {
    display: block;
    height: 44px;
  }

  #w #navmenu header h2 {
    text-align: center;
    padding-top: 10px;
    color: #e6e8f2;
    font-weight: bold;
    font-size: 2.1em;
    text-shadow: 1px 1px 0px #313131;
  }

  /*連結*/
  #w #navmenu ul {
    list-style: none;
  }

  #w #navmenu li {
    width: 100%;
    float: left;
  }

  #w #navmenu ul li a {
    display: block;
    color: #fff;
    font-size: 1.1em;
  }

  #w #navmenu ul li a:visited {
    text-decoration: none;
  }

  #w #navmenu ul li a:hover {
    color: #FFF;
    text-decoration: none;
  }

  #w #navmenu ul li .qa_title:hover {
    background: #000;
  }

  /*連結下拉*/
  #menu #qaContent li .qa_title {
    font-size: 0.95em;
    padding: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: normal;
    border-bottom: 1px solid #232323;
    background: #000;
    text-align: left;
  }

  #menu #qaContent li .qa_title a {
    font-size: 0.95em;
  }

  #menu #qaContent li .qa_content li {
    font-size: 0.8em;
    border-bottom: none;
  }

  #menu #qaContent li .qa_content li a {
    display: block;
    font-size: 1.2em;
    line-height: 30px;
    padding: 5px 0 5px 10px;
    color: #000;
    background: #eee;
    text-align: left;
  }


  /* 行動版快捷按鈕 */
  #mobile-sub-nav {
    display: flex;
    width: 100%;
    background-color: rgba(130, 125, 120, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 65px;
    background-image: url(../images/menubg.jpg);
  }

  #mobile-sub-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 4px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    box-sizing: border-box;
  }

  #mobile-sub-nav .nav-item:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
  }

  #mobile-sub-nav .nav-item:active {
    background-color: #96632a;
  }




  /*統一設定*/
  .container {
    width: 96%;
    margin: 0 2%;
  }

  .web {
    display: none !important;
  }

  .mobile {
    display: block !important;
  }

  .addtop100p {
    padding-top: 0 !important;
  }

  .mobile-font-small {
    font-size: 80%;
  }

  /*編輯器*/
  .ckediter {
    display: none;
  }

  .ckediter-mobile {
    display: block;
  }

  .ckediter-mobile p {
    font-size: 1rem !important;
    line-height: 24.0pt;
    color: #2c3e50;
  }

  .ckediter-mobile img {}

  .ckediter-mobile iframe {
    width: 100%;
    height: 56vh;
  }

  .ckediter-mobile embed {
    width: 100%;
    height: 56vh;
  }

  /*主內容*/
  #banner {
    display: none;
  }

  #bannermobile {
    display: block;
  }

  #bannerin {
    height: 200px;
  }

  /*網頁版上方*/
  header {
    display: none;
  }

  nav {
    display: none;
  }

  #w #pagebody #toolbarnav h1 {
    display: none;
  }

  #w #pagebody #toolbarnav h1.small {
    display: block;
    position: absolute;
    width: 180px;
    left: 50%;
    margin-left: -90px;
    padding-top: 3px;
    color: #000;
    font-weight: bold;
    font-size: 2.1em;
    text-shadow: 1px 1px 0px #313131;
  }

  /*右上網路掛號*/
  #register-btn {
    display: none;
  }

  /*手機下方掛號*/
  #register-btn-mobile {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 0;
    color: #fff;
    background: #69b16c;
    text-align: center;
    z-index: 16000;
    font-size: 0.8em;
  }

  #register-btn-mobile a.btn01 {
    display: inline-block;
    padding: 2px 5px;
    color: #fff;
    background: #d4a890;
  }

  #register-btn-mobile a.btn02 {
    display: inline-block;
    padding: 2px 5px;
    color: #fff;
    background: #ad7354;
  }

  /*2022新增*/
  p#index-covid19 a {
    display: none;
    background-color: #a31618;
    color: #fff;
    padding: 5px 8px;
    text-align: center;
    font-size: 2em;
    letter-spacing: 20%;
  }

  /*首頁三塊介紹*/
  #indexnote {
    display: block;
    width: 98%;
    margin: 15px 1%;
  }

  #indexnote .indexnote {
    margin-bottom: 1%;
  }

  /* 首頁六宮格容器 */
  #index-icon {
    position: static;
    width: 100%;
  }

  #index-icon ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    padding: 0;
    margin: 0 auto;
    max-width: 600px;
  }

  #index-icon li {
    flex: 0 0 32%;
    min-width: 100px;
    /* 防止太小掉行 */
    max-width: 33.333%;
    border-radius: 10px;
    list-style: none;
    text-align: center;
  }

  #index-icon li a {
    display: block;
    padding: 15px 5px 10px 5px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin: 0 auto;
    /* << 這裡確保 <a> 本身在 li 裡置中 */
  }

  #index-icon li a::before {
    content: "";
    display: block;
    width: 60px;
    height: 60px;
    margin: 0 auto 6px;
    background-repeat: no-repeat;
    background-size: 720px auto;
  }

  #index-icon li a.icon01::before {
    background-position: 0 0;
  }

  #index-icon li a.icon02::before {
    background-position: -120px 0;
  }

  #index-icon li a.icon03::before {
    background-position: -240px 0;
  }

  #index-icon li a.icon04::before {
    background-position: -360px 0;
  }

  #index-icon li a.icon05::before {
    background-position: -480px 0;
  }

  #index-icon li a.icon06::before {
    background-position: -600px 0;
  }


  /*首頁消息*/
  #indexnews {
    float: none;
    width: 96%;
    margin: 10px 2%;
  }

  #indexnews li {
    padding: 15px 0 0 0;
  }

  #indexnews li .date {
    width: 96%;
    border-right: none;
    border-bottom: 1px solid #666;
    color: #ad7354;
  }

  /*首頁圖片消息*/
  #indexservice {
    float: none;
    width: 96%;
    margin: 25px 2%;
  }

  /*首頁據點*/
  #indexlocation {
    width: 100%;
    height: auto;
  }

  #map {
    float: none;
    width: 100%;
    height: 300px;
    overflow: hidden;
    display: none;
  }

  #txt {
    float: none;
    width: 100%;
    margin: 10px 0;
    padding: 25px 0;
    height: auto;
  }

  #txt-bottom {
    font-size: 150%;
  }

  #txt-bottom #link {
    position: inherit;
    width: 100%;
    margin: 10px 0;
  }

  #txt-bottom #link01 a {
    width: 48%;
    padding-top: 5px;
  }

  #txt-bottom #link02 a {
    width: 48%;
    padding-top: 5px;
  }

  /*首頁下載app*/
  #index-app {
    display: none;
  }

  #index-app-mobile {
    display: block;
    text-align: center;
    width: 80%;
    margin: 25px 10% 50px 10%;
  }

  #index-app-mobile h3 {
    margin: 10px 0;
    font-size: 1.3em;
  }

  #index-app-mobile p {
    margin: 0;
  }

  #index-app-mobile a.btn {
    display: block;
    color: #9f2923;
    background: #e8b8b7;
    padding: 3px 5px;
    border: 1px solid #ccc;
    margin: 5px;
  }

  #index-app-mobile a.btn:hover {
    color: #fff;
    background: #9f2923;
  }

  /*據點介紹*/
  #location {
    margin-top: 25px;
  }

  .location {
    float: none;
    width: 80%;
    margin: 5px 10% 15px 10%;
  }

  .location .img {
    height: auto;
  }

  /*據點內頁*/
  #location-top .img {
    float: none;
    width: 90%;
    margin: 0 5% 10px 5%;
  }

  #location-top .txt {
    float: none;
    width: 90%;
    padding: 25px;
    margin: 0 5% 10px 5%;
  }

  #location-top .txt li .red {
    display: block;
  }

  /*門診表*/
  #schedule {
    overflow: auto;
  }

  #schedule #item {
    white-space: nowrap;
    width: 1110px;
  }

  #schedule-mobile {}

  #schedule-mobile #item {
    width: 100%;
  }

  #schedule-mobile .item li .drtime {
    display: block;
    font-size: 0.6em;
  }

  /*內科門診*/
  .inter-item {
    float: left;
    width: 100%;
  }

  /*自費門診*/
  #item-inter-txt #txt {
    float: left;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  #item-inter-txt #btn .btn01 {
    display: none;
  }

  /*皮膚科專屬*/
  #item-inter-txt #btn .btn02 {
    position: fixed;
    right: 0;
    top: 100px;
  }

  #item-inter-txt #btn .btn02 a {
    width: 30px;
    height: auto;
    padding: 5px;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
    font-size: 0.7em;
    text-align: center;
  }

  #item-inter-txt #btn .btn02 a:hover {
    border-bottom: 0 solid #d0b29d;
  }

  /*醫療團隊-醫師*/
  .list-dr {
    border-top: none;
  }

  .list-dr .list {
    display: grid;
    width: 96%;
    padding: 10px 2%;
    border-top: 5px solid #ecdfcb;
  }

  .list-dr .list .img {
    width: 100%;
  }

  .list-dr .list .txt {
    width: 100%;
  }

  /*醫療團隊-其他*/
  #list-other {
    display: none;
  }

  #list-other1 {
    display: block;
  }

  .list-other1 {
    display: flex;
    flex-direction: row;
    /*橫向往右*/
    flex-wrap: wrap;
    /*nowrap不換行、wrap換行、wrap-reverse換行換方向*/
    border-top: 5px solid #ecdfcb;
  }

  .list-other1:nth-child(even) {
    background: #fbf7f1;
  }

  .list-other1 .list {
    width: 50%;
    margin: 5px 0;
  }

  /*掛哪一科*/
  #itemcheck #qaContent li span.name {
    width: 100%;
    padding: 5px 5px;
  }

  #itemcheck #qaContent li span.name:nth-child(even) {
    background: #fbf7f1;
  }

  #itemcheck #qaContent li span.item {
    width: 100%;
  }

  #itemcheck #qaContent li span.item:nth-child(even) {
    background: #fbf7f1;
  }

  /*聯絡我們*/
  .listname {
    width: 100%;
  }

  .listinput {
    width: 100%;
  }

  /*腎友周報+最新消息*/
  #news li {
    display: block;
  }

  #news li span.period {
    flex-shrink: 0;
    width: 50%;
    display: block;
  }

  #news li span.maintitle {
    flex-shrink: 5;
    display: block;
  }

  #news li span.date {
    flex-shrink: 0;
    width: 50%;
    display: inline-block;
    font-size: 0.75rem;
    line-height: 0.2em;
  }

  #news li span.addleft {
    width: 100% !important;
    text-align: left !important;
  }

  #news li span.newstitle a {
    font-size: 0.9em;
  }

  /*廣播時間BOX設置*/
  #radio-list li .time {
    float: none;
    display: block;
    width: 100%;
    text-align: right;
  }

  .radio-dr-img {
    top: 20%;
  }

  .radio-title {
    text-align: center;
    position: static;
    font-size: 1.7em;
    padding: 5px 0;
    color: #000;
  }

  /*電子報內頁*/
  .newsletter {
    width: 100%;
  }

  /*衛教標題*/
  h1.title02 {
    font-size: 1.7em !important;
  }

  /*活動照片列表*/
  #event-photos .album-card {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  #event-photos .album-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /*尾部兩個網站連結*/
  .linkmore {
    float: none;
    width: 96%;
    padding: 10px 2%;
  }

  /*腎友週報-兩連結*/
  .title-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .title-wrapper .title {
    align-self: flex-start;
    width: 100%;
  }

  .button-group {
    display: flex;
    gap: 10px;
    align-self: flex-end;
    width: auto;
  }

  .btn-news {
    margin: 10px 0;
  }



  /*尾部*/
  footer .column-left {
    float: none;
    width: 80%;
    margin: 10px 10%;
    padding-bottom: 40px;
  }

  footer .column-right {
    display: none;
  }

  #footerlogo {
    display: none;
  }
}

@media (min-width: 20px) and (max-width: 530px) {
  #w #pagebody #toolbarnav h1 {
    display: none;
  }

  #w #pagebody #toolbarnav h1.small {
    display: block;
    position: absolute;
    width: 150px;
    left: 50%;
    margin-left: -70px;
    padding-top: 10px;
    color: #000;
    font-weight: bold;
    font-size: 2.1em;
    text-shadow: 1px 1px 0px #313131;
  }

  /*醫療團隊-其他*/
  .list-other1:nth-child(even) {
    background: #fff;
  }

  .list-other1 .list {
    width: 100%;
    margin: 5px 0;
  }

  .list-other1 .list:nth-child(even) {
    background: #fbf7f1;
    border-top: 5px solid #ecdfcb;
  }

  /*廣播時間BOX設置*/
  .radio-dr-img .img {
    width: 100px;
    height: 100px;
  }

  .radio-dr-name {
    font-size: 0.7em;
  }

  /*媒體專訪*/
  .radio-bg iframe {
    width: 100%;
    height: auto;
  }

  /*網路掛號*/
  #register .register-btn {
    float: none;
    width: 300px;
    margin: 20px auto 5px auto;
    padding: 30px 0 25px 0;
  }
}