/* ============================================================
   media.css — 媒體報導／最新消息 頁面專屬樣式
   只給 media.php 使用，跟 style.css 分開維護
   ============================================================ */

/* ---------- Banner 標題區（疊在首圖下方） ---------- */
.news-banner {
  height: 260px;
}

.news-banner-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 2;
  color: #fff;
  text-align: left;
}

.news-banner-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-style: italic;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin: 6px 0 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.news-banner-zh {
  font-family: 'Noto Serif TC', serif;
  font-weight: 900;
  font-size: 40px;
  letter-spacing: 0.06em;
  margin: 0;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* ---------- 區塊外層 ---------- */
.news-section {
  padding: 64px 0 90px;
    /* 強制覆蓋掉其他 class 的背景設定 */
  background-image: url('../img/bg_media.png') !important; 
  background-color: transparent !important; 
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;  
  
  height: 100%; 
  display: flex;
  align-items: center;
  justify-content: center;
  background-attachment: fixed !important; 
}



.news-layout {
  display: flex;
  align-items: flex-start;
  gap: 56px;
}

/* ---------- 左側：分類篩選 ---------- */
.news-sidebar {
  flex: 0 0 250px;
  padding-top: 4px;
  position: sticky;
  top: 72px; /* 頂部導覽列高度(52px) + 留白，避免緊貼 */
  align-self: flex-start;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
}

.news-eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  letter-spacing: 0.05em;
  color: var(--sun-dark, #854F0B);
  margin: 0 0 6px;
}

.news-sidebar-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--deep-dark, #042C53);
  margin: 0 0 10px;
}

.news-sidebar-desc {
  font-size: 14px;
  color: var(--ink-soft, #5A5F5A);
  margin: 0 0 28px;
}

.news-filter {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--sand-line, #E1DED2);
}

.news-filter-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px;
  color: var(--ink-soft, #5A5F5A);
  padding: 11px 4px;
  border-bottom: 1px solid var(--sand-line, #E1DED2);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.news-filter-btn:hover {
  color: var(--deep-dark, #042C53);
}

.news-filter-btn.active {
  color: #b89742;
  font-weight: 700;
  padding-left: 10px;
}

/* ---------- 右側：新聞清單卡片 ---------- */
.news-list {
  flex: 1 1 auto;
  background: var(--sand, #e5f4fd);
  border-radius: 10px;
  padding: 8px 32px;
  background-color: rgba(238, 238, 238, 0.7);  
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--sand-line, #E1DED2);
}

.news-item:last-child {
  border-bottom: none;
}

.news-item[hidden] {
  display: none;
}

/* 滑鼠移入該列：日期、標題、圓形按鈕統一變金色 */
.news-item:hover .news-date,
.news-item:hover .news-title,
.news-item:hover .news-more {
  color: #b89742;
}

.news-item:hover .news-more {
  border-color: #b89742;
  background: #fff;
}

/* 日期方塊 */
.news-date {
  flex: 0 0 66px;
  text-align: center;
  color: var(--deep, #0C447C);
  transition: color 0.2s ease;
}

.news-day {
  display: block;
  font-family: 'Noto Serif TC', serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.news-ym {
  display: block;
  font-size: 12px;
  color: var(--ink-soft, #5A5F5A);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* 文字內容 */
.news-body {
  flex: 1 1 auto;
}

.news-tag {
  display: inline-block;
  font-size: 11.5px;
  color: #b89742;
  border: 1px solid #b89742;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.news-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--deep-dark, #042C53);
  margin: 0 0 8px;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.news-desc {
  font-size: 13.5px;
  color: var(--ink-soft, #5A5F5A);
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item.is-open .news-desc {
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* 展開按鈕 */
.news-more {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--deep, #0C447C);
  background: #fff;
  color: var(--deep, #0C447C);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.news-more:hover {
  background: var(--deep, #0C447C);
  color: #fff;
}

.news-item.is-open .news-more {
  transform: rotate(45deg);
  background: #b89742;
  border-color: #b89742;
  color: #fff;
}

/* 目前分類沒有任何項目時的提示文字 */
.news-empty {
  display: none;
  padding: 40px 4px;
  text-align: center;
  color: var(--ink-soft, #5A5F5A);
  font-size: 14px;
}

.news-empty.is-visible {
  display: block;
}

/* ---------- RWD：平板／手機改上下排列 ---------- */
@media (max-width: 860px) {
  .news-layout {
    flex-direction: column;
    gap: 30px;
  }

  .news-sidebar {
    flex: none;
    width: 100%;
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .news-filter {
    display: flex;
    gap: 18px;
    border-top: none;
    padding-top: 0;
  }

  .news-filter-btn {
    width: auto;
    border-bottom: none;
    padding: 4px 0;
  }

  .news-list {
    width: 100%;
    padding: 6px 18px;
    box-sizing: border-box;
  }

  .news-banner-zh {
    font-size: 30px;
  }

  .news-banner-en {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .news-item {
    gap: 16px;
    padding: 20px 2px;
  }

  .news-date {
    flex-basis: 52px;
  }

  .news-day {
    font-size: 24px;
  }

  .news-title {
    font-size: 15px;
  }
}


/* ============================================================
   活動錦集（圖文式清單）— media2.html 使用
   左側篩選共用上方 .news-sidebar / .news-eyebrow / .news-filter 樣式
   ============================================================ */

/* 有些頁面不需要左側副標說明文字時，直接不放 .news-sidebar-desc 即可 */

.gallery-list {
  flex: 1 1 auto;
}

.gallery-item {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 56px;
}

.gallery-item:last-child {
  margin-bottom: 0;
}

.gallery-thumb {
  flex: 0 0 260px;
  width: 260px;
  height: 172px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sand, #F1EFE8);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-body {
  flex: 1 1 auto;
  padding-top: 4px;
}

.gallery-title {
  font-family: 'Noto Serif TC', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--deep-dark, #042C53);
  line-height: 1.5;
  margin: 0 0 12px;
}

.gallery-desc {
  font-size: 13.5px;
  color: var(--ink-soft, #5A5F5A);
  line-height: 1.85;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-btn {
  display: inline-block;
  background: var(--deep, #0C447C);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 4px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-btn:hover {
  background: #b89742;
  transform: translateY(-1px);
}

/* 目前分類沒有任何項目時的提示文字（與 .news-empty 共用視覺，獨立命名避免耦合） */
.gallery-empty {
  display: none;
  padding: 40px 4px;
  text-align: center;
  color: var(--ink-soft, #5A5F5A);
  font-size: 14px;
}

.gallery-empty.is-visible {
  display: block;
}

/* ---------- RWD：平板／手機改上下排列 ---------- */
@media (max-width: 700px) {
  .gallery-item {
    flex-direction: column;
    gap: 18px;
    margin-bottom: 40px;
  }

  .gallery-thumb {
    width: 100%;
    flex-basis: auto;
    height: 200px;
  }

  .gallery-title {
    font-size: 18px;
  }
}

