/* Post Switch Container */
.post_switch_container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Post Switch Navigation */
.post_switch_nav {
  border-bottom: 1px solid #eee;
}
.post_switch_nav .tab_title_box {
  display: flex;
  justify-content: flex-start;
  list-style: none;
  padding: 0;
  margin: 0;
}
.post_switch_nav .tab_title_box li a {
  text-decoration: none;
  color: #888;
  transition: all 0.3s ease;
  position: relative;
}

/* Tabs with icon */
.post_switch_nav.has-icon .tab_title_box {
  gap: 40px;
}
.post_switch_nav.has-icon .tab_title_box li a {
  min-width: 100px;
}
.post_switch_nav.has-icon .tab_title_box li a .icon_circle {
  width: 100px;
  height: 100px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}
.post_switch_nav.has-icon .tab_title_box li a .icon_circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(1);
  opacity: 0.6;
}
.post_switch_nav.has-icon .tab_title_box li a .label_box {
    display: block;
    position: relative;
    align-items: center;
    text-align: center;
    top: -10px;
}
.post_switch_nav.has-icon .tab_title_box li a .label_box .cn_name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}
.post_switch_nav.has-icon .tab_title_box li a .label_box .en_name {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tabs without icon */
.post_switch_nav.no-icon {
  margin: 30px 0 20px; /* Original spacing */
  padding-bottom: 20px;
}
.post_switch_nav.no-icon .tab_title_box {
  gap: 40px;
}
.post_switch_nav.no-icon .tab_title_box li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}
.post_switch_nav.no-icon .tab_title_box li a .cn_name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* Active State */
.post_switch_nav .tab_title_box li a.green_btn {
  color: #00A7BA;
}
.post_switch_nav.has-icon .tab_title_box li a.green_btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #00A7BA;
}
.post_switch_nav.no-icon .tab_title_box li a.green_btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -21px; /* Align with nav border */
  height: 2px;
  background-color: #00A7BA;
}
.post_switch_nav.has-icon .tab_title_box li a.green_btn .icon_circle img {
  filter: none;
  opacity: 1;
}
.post_switch_nav.has-icon .tab_title_box li a.green_btn .label_box .cn_name {
  color: #00A7BA;
}
.post_switch_nav.has-icon .tab_title_box li a.green_btn .label_box .en_name {
  color: #00A7BA;
}
.post_switch_nav.no-icon .tab_title_box li a.green_btn .cn_name {
  color: #00A7BA;
}

/* Card Grid Layout */
.lists.card_grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 50px;
  row-gap: 40px; /* Reduced from 60px */
  padding: 20px 0;
}

.item.card {
  display: flex;
  flex-direction: column; /* 讓卡片內容垂直排列 */
  background: transparent;
  padding-bottom: 30px; /* Reduced from 50px */
  border-bottom: 1px solid #eee;
  position: relative;
}

/* Vertical separator lines for desktop */
@media screen and (min-width: 768px) {
  .item.card:not(:nth-child(3n))::after {
    content: "";
    position: absolute;
    right: -25px; /* Adjusted for 50px gap */
    top: 0;
    bottom: 30px; /* Match new bottom padding */
    width: 1px;
    background-color: #eee;
  }
}

/* Remove bottom border from the last row (optional, usually looks better in grid) */
/* .item.card:nth-last-child(-n+3) { border-bottom: none; } */

.item.card .card_content {
  display: flex;
  flex-direction: column; /* 內層也使用 Flex */
  flex-grow: 1; /* 重要：讓文字區域撐開，把圖片推到底部 */
  margin-bottom: 0;
  padding: 15px 0 0;
}

.item.card .date {
  font-size: 13px;
  color: #999;
  margin-bottom: 4px; /* Reduced from 8px */
  font-family: inherit;
}

.item.card .title h2 {
  font-size: 18px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 8px;
  font-weight: 700;
  max-height: 2.8em; /* 改回最大高度，不強行撐開 */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.item.card .summary {
  font-size: 14px;
  color: #000;
  line-height: 1.4;
  margin-bottom: 12px;
  max-height: 4.2em; /* 改回最大高度 */
  overflow: hidden;
  flex-grow: 1; /* 讓摘要區域自動伸展填滿空間 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.item.card .summary p {
  margin: 0;
}

.item.card .more {
  text-align: right;
  margin-bottom: 0;
  padding: 0 0 20px; /* 回拉間距，從 8px 增加到 20px */
}

.item.card .more .read_more {
  display: inline-block;
  padding: 3px 15px;
  border: 1px solid #00A7BA;
  color: #00A7BA;
  text-decoration: none;
  font-size: 12px;
  transition: all 0.2s ease;
  font-weight: 400;
}

.item.card .more .read_more:hover {
  background: #00A7BA;
  color: #fff;
}

.item.card .img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}

.item.card .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.item.card .img:hover img {
  filter: brightness(0.9);
}

.item.card .img .video_play_btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}
.item.card .img .video_play_btn img {
  width: 60px;
  height: 60px;
  opacity: 0.9;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin: 40px 0 60px;
}
.pagination a img {
  width: 30px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.pagination a:hover img {
  opacity: 1;
}

.pagination .page_numbers {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pagination .page_num {
  font-size: 15px;
  color: #666;
  cursor: pointer;
  padding: 4px 12px;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.pagination .page_num:hover:not(.active) {
  background: #f8f8f8;
  color: #00A7BA;
  border-color: #eee;
}

.pagination .page_num.active {
  background: #00A7BA;
  color: #fff;
  font-weight: 500;
}

.pagination .ellipsis {
  color: #999;
  letter-spacing: 2px;
  font-size: 14px;
}

.pagination .page_info {
  font-size: 14px;
  color: #666;
  letter-spacing: 1px;
  min-width: 60px;
  text-align: center;
}

.content_l_title {
  flex: 2;
}

.content_l_title p {
  color: #888;
}

.content_l_title .content_subtitle {
  font-weight: bolder;
  color: #777;
}

/*-------------------------------------------- 
	Media Queries 
---------------------------------------------*/
/* Portrait and Landscape */
/*@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-min-device-pixel-ratio: 2) {
}*/
/*iPad Pro*/
/*iPad*/
/*iPhone*/
@media screen and (max-width: 767px) {
  .post_switch_container {
    padding: 0px;
  }

  /* Navigation Tabs RWD */
  .post_switch_nav .tab_title_box {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    scrollbar-width: none; /* Firefox */
  }
  .post_switch_nav .tab_title_box::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }

  .post_switch_nav.has-icon .tab_title_box {
    gap: 20px;
  }
  .post_switch_nav.has-icon .tab_title_box li a {
    min-width: 80px;
  }
  .post_switch_nav.has-icon .tab_title_box li a .icon_circle {
    width: 70px;
    height: 70px;
    margin: 0 auto;
  }
  .post_switch_nav.has-icon .tab_title_box li a .label_box {
    top: -5px;
  }
  .post_switch_nav.has-icon .tab_title_box li a .label_box .cn_name {
    font-size: 13px;
  }
  .post_switch_nav.has-icon .tab_title_box li a .label_box .en_name {
    font-size: 10px;
  }

  .post_switch_nav.no-icon .tab_title_box {
    gap: 30px;
  }
  .post_switch_nav.no-icon .tab_title_box li a {
    min-width: 60px;
  }

  /* Grid Layout RWD */
  .lists.card_grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 30px;
    padding: 10px 0;
  }

  .item.card {
    padding-bottom: 25px;
  }
  .item.card::after {
    display: none !important;
  }

  .item.card .title h2 {
    font-size: 17px;
  }
  
  .pagination {
    gap: 20px;
    margin: 30px 0 40px;
  }
  .pagination .page_numbers {
    gap: 5px;
  }
}

/* Small phone */
@media screen and (max-width: 480px) {
  .post_switch_nav.has-icon .tab_title_box li a .icon_circle {
    width: 60px;
    height: 60px;
  }
}
