/* ===== Header logo 顯示控制 ===== */
.header.is-top .header_logo{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease;
}

.header .header_logo{
  transition: opacity .25s ease;
}

.header_logo{
  width: 225px;
}

.header_logo > img{
  width: 225px;
}


/* ===== Base Typography ===== */
.txt_sub{
  font-size: 20px;
  line-height: 20px;
  font-weight: bolder;
  padding-top: 10px;
  margin-top: 4%;
}

p{
  display: block;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 0;
  margin-inline-end: 0;
  unicode-bidi: isolate;
}

.name02{
  font-size: 18pt;
  line-height: 20pt;
  font-weight: bolder;
  color: #333;
  margin: 0 0 1% 0;
  padding: 0;
}

ul.ulpoint{
  display: block;
  list-style-type: disc;
  list-style-position: outside;
  margin: 1em 0;
  padding-left: 60px;
  unicode-bidi: isolate;
}

.lipoint{
  display: list-item;
  unicode-bidi: isolate;
}


/* ===== Community title / Agenda buttons ===== */
.community-sec_title{
  display: flex;
  align-items: center;
  gap: 12px;
}

.community-sec_title .title{
  margin: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.agenda-btns{
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.agenda-btns .btn-cta{
  flex: 0 0 auto;
  width: auto;
}

.agenda-img,
.agenda-room-large{
  display: block;
  max-width: 100%;
  height: auto;
}

.agenda-date{
  width: 180px;
}

.agenda-date-large{
  width: 320px;
}

.agenda-room{
  width: 100px;
}

.agenda-switch-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.agenda-room-row{
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 16px;
}

.agenda-room-large{
  width: 350px;
  max-width: 100%;
  height: auto;
}


/* ===== Footer ===== */
.footer{
  border-top: 4px solid #ff6100;
}

.footer_info{
  padding: 24px 0 0;
  overflow: hidden;
}

.footer_info_head{
  margin-bottom: 12px;
}

.footer_info_address{
  margin: 0 0 6px;
}

.footer_info > img{
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.footer_info_head img{
  width: 400px;
}


/* ===== Desktop ===== */
@media only screen and (min-width: 769px){
  #livestream{
    clear: none;
    float: left;
    width: 47%;
    display: block;
    padding: 0;
    margin: 1% 1% 20px;
    text-align: left;
  }
}

@media (min-width: 992px){
  .footer_info > img{
    margin-top: -90px;
  }
}


/* ===== Tablet / Mobile ===== */
@media (max-width: 991px){
  .header .header_logo{
    width: 220px !important;
    max-width: calc(100% - 90px);
  }

  .header .header_logo > img{
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 768px){
  .community-sec_title{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }

  .agenda-btns{
    margin-left: -1px;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
  }

  .agenda-date{
    width: 80px;
  }

  .agenda-date-large{
    width: 100%;
  }

  .agenda-switch-row{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .agenda-switch-row .agenda-btns{
    width: 100%;
  }

  .agenda-room{
    width: 80px;
  }

  .agenda-room-row{
    justify-content: flex-end;
    margin: 4px 0 12px;
  }

  .agenda-room-large{
    width: 100%;
  }

  .footer_info{
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }

  .footer_info_head img{
    width: 300px;
  }
}

/* 先隱藏所有日期區塊，JS 會只打開對應那一天 */
.live-day{
  display: none;
}

.live-day.is-active{
  display: block;
}

/* 每一個論壇區塊 */
.live-row{
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom:none;
}

.live-row:last-child{
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* 論壇標題 */
.live-row-title{
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 800;
  color: #202020;
  line-height: 1.4;
}

/* 左右兩個頻道卡片 */
.live-row .row{
  margin-left: -12px;
  margin-right: -12px;
}

.livestream{
  width: 50%;
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
}

/* 頻道名稱 */
.livestream .name02{
  font-size: 22px;
  line-height: 1.4;
  margin: 0 0 12px;
}

/* 影片區 */
.video-container{
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 14px;
  background: #000;
}

.video-container iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Webex 按鈕 */
.live-webex{
  display: inline-block;
  text-decoration: none;
}

.live-webex img{
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.row{
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.row .livestream{
  flex: 1 1 calc(50% - 12px);
  max-width: calc(50% - 12px);
}

.row .livestream:only-child{
  flex: 1 1 100%;
  max-width: 100%;
}

.video-container{
  width: 100%;
}

.video-container iframe{
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  border: 0;
  border-radius: 20px;
}




/* 手機板改上下排 */
@media (max-width: 768px){
  .live-row{
    margin-bottom: 28px;
    padding-bottom: 22px;
  }

  .live-row-title{
    font-size: 22px;
    margin-bottom: 12px;
  }

  .livestream{
    width: 100%;
    margin-bottom: 20px;
  }

  .livestream:last-child{
    margin-bottom: 0;
  }

  .livestream .name02{
    font-size: 18px;
  }

  .live-webex img{
    width: 160px;
  }
  
   .row .livestream{
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* ===== 直播頁：教室圖片 ===== */
.live-room-badge{
    display: block;
    width: 360px;
    max-width: 100%;
    margin: 4px 0 12px 0;  /* 靠左，放在標題下方 */
}

.live-room-badge img{
    display: block;
    width: 100%;
    height: auto;
}

/* 如果某些區塊沒有教室圖片，不會被影響 */
.live-row .live-room-badge + .row{
    margin-top: 0;
}

/* 手機板：教室圖片縮小並靠左 */
@media (max-width: 768px){
    .live-room-badge{
        width: 220px;
        max-width: 75vw;
        margin: 6px 0 14px 0;
    }
}
/* ===== 5/14 雙教室直播：每個影片上方各自顯示教室圖 ===== */
.live-row-room-pair .row{
    align-items: flex-start;
}

.live-row-room-pair .livestream{
    display: flex;
    flex-direction: column;
}

/* 教室圖放在各自影片上方 */
.live-row-room-pair .room-in-card{
    width: 300px;
    max-width: 80%;
    margin: 0 0 10px 0;
}

.live-row-room-pair .room-in-card img{
    display: block;
    width: 100%;
    height: auto;
}

/* 如果有保留 402AB廳 / 402CD廳 文字，讓距離不要太大 */
.live-row-room-pair .name02{
    margin: 0 0 10px;
}

/* 手機板：上下排，教室圖縮小 */
@media (max-width: 768px){
    .live-row-room-pair .room-in-card{
        width: 220px;
        max-width: 75vw;
        margin: 0 0 10px 0;
    }
}