/********** 新增：Professor Cheng 生平雙語切換區塊 **********/
/*****
  使用方式：
  1. 此檔案獨立於原本 style.css，避免影響既有網站樣式。
  2. 所有選擇器皆以 #cheng-biography 或 .cheng-legacy 開頭，降低 CSS 衝突風險。
  3. 語言切換採 radio + label 的純 CSS 寫法；尾端收回按鈕使用極少量 inline onclick 關閉 details。
*****/

/* 新增：移除外部標題字體指定，回到原頁 body 預設的 Georgia 字體 */
body,
h1, h2, h3, h4, h5, h6,
.ceda-brand-title,
.ceda-brand-subtitle,
.ceda-nav-link,
.ceda-hero-title,
.memorial-title {
  font-family: Georgia, "Times New Roman", "Noto Sans TC", serif !important;
}

#cheng-biography.cheng-legacy-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(223, 177, 118, .18), transparent 34%), linear-gradient(135deg, #2b3e5c, rgba(42, 33, 45, .95))
}

#cheng-biography.cheng-legacy-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, .06) 0, rgba(255, 255, 255, 0) 42%);
}

#cheng-biography .container {
  position: relative;
  z-index: 1;
}

/* 新增：人物照片卡片*/
/* 修改：Professor Cheng portrait card 改為正圓形 */
.cheng-legacy-portrait-card {
  width: 280px;
  height: 280px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 50%;
  background: #5f4c3f;
  border: 1px solid rgba(38, 49, 78, .14);
  box-shadow: 0 18px 42px rgba(38, 49, 78, .12);
  overflow: hidden;
}

/* 修改：照片本身裁切為正圓形 */
.cheng-legacy-portrait-card img,
.cheng-legacy-portrait-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  border-radius: 50%;
}

/* 修改：手機版略縮小，避免太佔版面 */
@media (max-width: 575.98px) {
  .cheng-legacy-portrait-card {
    width: 220px;
    height: 220px;
    padding: 6px;
  }
}

/* 新增：人物照片卡片 
#cheng-biography .cheng-legacy-portrait-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}

#cheng-biography .cheng-legacy-portrait-img {
  display: block;
  width: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center;
}*/

#cheng-biography .cheng-legacy-portrait-caption {
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 244, 236, .94));
}

#cheng-biography .cheng-legacy-portrait-caption span {
  display: inline-block;
  margin-bottom: .35rem;
  color: #8d6231;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#cheng-biography .cheng-legacy-portrait-caption h2 {
  margin-bottom: .35rem;
  color: #26314e;
  font-weight: 700;
}

#cheng-biography .cheng-legacy-portrait-caption p {
  color: #6b5f58;
}

/* 新增：右側摘要文字與重點資訊 */
#cheng-biography .cheng-legacy-lead {
  max-width: 820px;
  color: rgba(255, 255, 255, .82);
  font-size: 1.05rem;
  line-height: 1.8;
}

#cheng-biography .cheng-fact-card {
  height: 100%;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(8px);
}

#cheng-biography .cheng-fact-card strong {
  display: block;
  color: #f2c879;
  font-size: 1.65rem;
  line-height: 1.1;
}

#cheng-biography .cheng-fact-card span {
  display: block;
  margin-top: .35rem;
  color: rgba(255, 255, 255, .78);
  font-size: .9rem;
  line-height: 1.35;
}

/* 新增：語言切換按鈕 */
#cheng-biography .cheng-language-switch > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

#cheng-biography .cheng-language-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

#cheng-biography .cheng-language-btn {
  min-width: 150px;
  padding: .3rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 10px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .08);
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

#cheng-biography .cheng-language-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .14);
}

#chengBioEnglish:checked ~ .cheng-language-buttons label[for="chengBioEnglish"],
#chengBioChinese:checked ~ .cheng-language-buttons label[for="chengBioChinese"] {
  color: #2b2531;
  background: #f2c879;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
}

/* 新增：中英文內容面板，預設隱藏，再依 radio 狀態顯示 */
#cheng-biography .cheng-bio-panel {
  display: none;
}

#chengBioEnglish:checked ~ .cheng-bio-en,
#chengBioChinese:checked ~ .cheng-bio-zh {
  display: block;
}

#cheng-biography .cheng-bio-card {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(1.25rem, 2.6vw, 2.4rem);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: #fffffff0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

#cheng-biography .cheng-bio-heading-wrap {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 1.55rem;
  text-align: center;
  border-bottom: 0;
}

/* 新增：標題下方置中細線與小花裝飾 */
#cheng-biography .cheng-bio-heading-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .35rem;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #26314e1f 22%, #26314e1f 78%, transparent 100%);
}

#cheng-biography .cheng-bio-heading-wrap::before {
  content: "✽";
  position: absolute;
  left: 50%;
  bottom: -.03rem;
  z-index: 1;
  padding: 0 .6rem;
  color: #26314e1f;
  background: #f2f2f3;
  font-size: 1rem;
  line-height: 1;
  transform: translateX(-50%);
}

#cheng-biography .cheng-bio-kicker {
  display: inline-block;
  margin-bottom: .45rem;
  color: #9b6b35;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#cheng-biography .cheng-bio-card h3 {
  margin: 0;
  color: #26314e;
  font-weight: 700;
  line-height: 1.28;
}

#cheng-biography .cheng-legacy-paragraph {
  color: #3d4052;
  font-size: 1rem;
  line-height: 1.9;
  text-align: justify;
}

#cheng-biography .cheng-zh-paragraph {
  font-family: inherit;
  letter-spacing: .02em;
  line-height: 2;
}

/* 新增：More / Show less 展開收合 */
#cheng-biography .cheng-bio-more {
  margin-top: .5rem;
}

#cheng-biography .cheng-bio-more summary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: .5rem 0 1.25rem;
  padding: .7rem 1.2rem;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #7a5631, #b98545);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(96, 61, 24, .22);
}

#cheng-biography .cheng-bio-more summary::-webkit-details-marker {
  display: none;
}

#cheng-biography .cheng-bio-more summary::after {
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  transition: transform .2s ease;
}

#cheng-biography .cheng-bio-more[open] summary::after {
  transform: rotate(180deg);
}

#cheng-biography .cheng-bio-more .less-label {
  display: none;
}

#cheng-biography .cheng-bio-more[open] .more-label {
  display: none;
}

#cheng-biography .cheng-bio-more[open] .less-label {
  display: inline;
}


/* 新增：縮小本區塊內 pill 與卡片圓角，讓視覺更精緻 */
#cheng-biography .rounded-pill,
#cheng-biography .memorial-pill {
  border-radius: 8px !important;
}

/* 新增：展開長文尾端的 Show less / 收回內容 按鈕 */
#cheng-biography .cheng-bio-less-end {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .85rem;
  padding: .62rem 1.05rem;
  border: 1px solid rgba(38, 49, 78, .16);
  border-radius: 8px;
  color: #26314e;
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(38, 49, 78, .08);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

#cheng-biography .cheng-bio-less-end:hover {
  transform: translateY(-1px);
  background: #f7f3ec;
  box-shadow: 0 10px 22px rgba(38, 49, 78, .12);
}

@media (max-width: 991.98px) {
  #cheng-biography .cheng-legacy-portrait-img {
    max-height: 420px;
  }
}

@media (max-width: 575.98px) {
  #cheng-biography .cheng-language-btn {
    width: 100%;
  }

  #cheng-biography .cheng-legacy-paragraph {
    text-align: left;
  }
}


/*************************************************/
/************ 新增：留言紀念網站區塊 ***************/
.cheng-message-site {
  /*background: #f7f4ef;*/
  background-image: url(../img/cheng-message-site.jpg);
  background-size: cover;
}

/* 新增：留言紀念網站內容外框 */
.cheng-message-site-panel {
  max-width: 1040px;
  margin: 0 auto;
  padding: 42px 36px;
  background: #e1dffb54;
  border: 1px solid rgba(38, 49, 78, .12);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(38, 49, 78, .08);
}

/* 新增：英文小標 */
.cheng-message-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: #a26536;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
}

/* 新增：區塊主標題 */
.cheng-message-title {
  margin-bottom: 16px;
  color: #26314e;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

/* 新增：網站名稱連結 */
.cheng-message-site-name {
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.cheng-message-site-name a {
  color: #26314e;
  text-decoration: none;
  border-bottom: 1px solid rgba(38, 49, 78, .28);
}

.cheng-message-site-name a:hover {
  color: #724307;
  border-bottom-color: #8a6f4d;
  font-weight: 700;
}

/* 新增：兩個紀念網站按鈕排列 */
.cheng-message-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* 新增：仿紀念網站入口按鈕樣式 */
.cheng-memcheng-btn {
  display: inline-block;
  padding: 9px 18px;
  color: #26314e;
  background: #f3c258;
  border: 1px solid rgba(38, 49, 78, .24);
  border-radius: 6px;
  font-size: 1.1rem;
  font-family: Georgia, "Times New Roman", "Noto Sans TC", serif;
  line-height: 1.45;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(38, 49, 78, .08);
  transition: all .2s ease;
}

.cheng-memcheng-btn:hover {
  color: #ffffff;
  background: #26314e;
  border-color: #26314e;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(38, 49, 78, .14);
}

/* 新增：手機版按鈕滿版排列 */
@media (max-width: 575.98px) {
  .cheng-message-site-panel {
    padding: 32px 20px;
  }

  .cheng-memcheng-btn {
    width: 100%;
  }
}