/**************************************
 * CEDA 2026 網站主要樣式表
 * 說明：本檔整合原本 HTML 內的 CSS，並整理原 style.css 中目前首頁需要的樣式。
 * 注意：本版未使用 Bootstrap JavaScript，導覽列展開/收合以 checkbox + CSS 控制。
 **************************************/

/**************************************
 * 01. 全站色票與基礎變數
 * 說明：集中管理主要色彩，方便後續統一調整網站視覺。
 **************************************/
:root {
  --ceda-primary: #a9643a;       /* 主咖啡色：標題、邊框與重點色 */
  --ceda-primary-dark: #7c4829;  /* 深咖啡色：深色底與 hover 可用 */
  --ceda-brown: #b28269;         /* 淺咖啡色：Hero 標題第二段 */
  --ceda-orange: #ef9161;        /* 膚橘色：次要重點與連結 */
  --ceda-blue: #4b97d2;          /* 中藍色：標籤背景 */
  --ceda-mgblue: #365799;        /* 中藍灰：新聞文字 */
  --ceda-bg: #403027;            /* 全站背景深咖啡 */
  --ceda-about-bg: #694831;      /* About 區塊背景咖啡 */
  --ceda-footer-light: #d2d2d4;  /* Footer 淺灰文字 */
  --ceda-nav-bg: rgba(12, 24, 42, 0.96); /* 手機與平板選單深藍底 */
  --ceda-hero-navy: #18324f;     /* Hero 主文字深藍 */
}

/**************************************
 * 02. 全站基礎設定
 * 說明：設定背景、連結、圖片與 Bootstrap 常用色彩覆蓋。
 **************************************/
body {
  background-color: var(--ceda-bg);
  font-family: Georgia, "Times New Roman", "Noto Serif TC", "Noto Sans TC", serif;
  /*font-family: "Noto Sans TC", "Inter", sans-serif;*/
}

a {
  color: #f7ab84;
}

a:hover,
a:focus {
  color: #d77c1e;
}

h2{
    
    font-weight: 700;
    line-height: 1.17;
    letter-spacing: -0.025em;
    text-shadow: rgba(255, 255, 255, 0.45) 0px 1px 0px;
    margin: 0px;
}

.img-rounded {
  border-radius: 0.75rem;
}

.text-primary {
  color: var(--ceda-primary) !important; /* 覆蓋 Bootstrap primary 為咖啡色 */
}

.text-mgblue {
  color: var(--ceda-mgblue) !important; /* 新聞列表文字用藍灰色 */
}

.text-ltorenge {
  color: var(--ceda-orange) !important; /* 橘膚色文字 */
}

.text-ltgray {
  color: var(--ceda-footer-light) !important; /* Footer 淺灰文字 */
}

.text-coffee {
  color: var(--ceda-brown) !important; /* 淺咖啡文字 */
}
.text-dkyellow {
  color: #d5aa23 !important; /* 深黃文字 */
}


.text-fs-4 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
}

.bg-mdblue {
  background-color: var(--ceda-blue) !important; /* 區塊小標籤背景 */
}

.bg-light {
  background-color: #f8f8f9 !important;
}

.bg-dark {
    background-color: #182b49 !important;
}
.bg-brown {
    background-color: #695243 !important;
}
.bg-secondary {
    background: #a7663a !important;/* 橘咖啡 */
}



.border-primary {
  border-color: var(--ceda-primary) !important; /* 覆蓋 Bootstrap primary 邊框 */
}

.ceda-section-heading {
  max-width: 600px; /* 原本 HTML inline style，已改為外部 CSS */
}

/**************************************
 * 03. 按鈕共用樣式
 * 說明：保留網站按鈕圓角、粗體與 hover 效果。
 **************************************/
.btn {
  border-radius: 1rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
  background-color: var(--ceda-primary) !important;
  border-color: var(--ceda-primary) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: transparent !important;
  color: var(--ceda-primary) !important;
}

.btn:hover,
.btn:focus {
  box-shadow: none;
}

/**************************************
 * 04. 上方導覽列：桌機版
 * 說明：比照參考圖的左側 Logo 與右側導覽排列；下拉選單使用 hover/focus，不依賴 JS。
 **************************************/
.ceda-site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 30;
  width: 100%;
  color: #ffffff;
  /*background: linear-gradient(180deg, rgba(12, 24, 42, 0.98) 0%, rgba(12, 24, 42, 0.88) 78%, rgba(12, 24, 42, 0) 100%);*/
    background: linear-gradient(180deg, rgb(12 24 42 / 86%) 0%, rgb(24 48 83 / 70%) 78%, rgba(12, 24, 42, 0) 100%);
}

.ceda-navbar {
  min-height: 82px;
   padding-top: 0;
   padding-bottom: 0;
}

.ceda-nav-wrap {
  position: relative;
}

.ceda-brand {
  min-width: 205px;
  color: #ffffff !important;
  text-decoration: none;
}

.ceda-brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  border: 1px solid rgba(190, 129, 77, 0.78);
  border-radius: 50%;
  background: rgba(11, 28, 48, 0.45);
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.16);
}

.ceda-brand-mark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.ceda-brand-title {
  display: block;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", "Noto Sans TC", serif;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.ceda-brand-subtitle {
  display: block;
  margin-top: 0.16rem;
  color: rgba(255, 255, 255, 0.76);
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  line-height: 1;
}

.ceda-nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ceda-toggler {
  width: 44px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.ceda-toggler span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ceda-nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.ceda-nav-list {
  align-items: center;
  gap: clamp(0.1rem, 0.45vw, 0.58rem);
}

.ceda-navbar .ceda-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2.05rem 0.36rem 1.85rem;
  color: rgba(255, 255, 255, 0.86);
  font-family:"Noto Serif TC";
  /*font-family: "Inter", "Noto Sans TC", sans-serif;*/
  font-size: clamp(0.82rem, 0.74vw, 1rem); /* 選單字體加大，仍保留長選項可換算的彈性 */
  font-weight: 700;
  letter-spacing: 0.03em;
  /*text-transform: uppercase;*/
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.ceda-navbar .ceda-nav-link:hover,
.ceda-navbar .ceda-nav-link:focus,
.ceda-navbar .ceda-nav-link.active {
  color: #ffffff;
}

.ceda-navbar .ceda-nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.36rem;
  right: 0.36rem;
  bottom: 1.35rem;
  height: 5px;
  border-radius: 99px;
  background: #b87340;
}

.ceda-nav-dropdown {
  position: relative;
}

.ceda-nav-dropdown-toggle i {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.58rem;
}

.ceda-dropdown-menu {
  position: absolute;
  top: calc(100% - 0.7rem);
  left: 50%;
  z-index: 35;
  display: block;
  min-width: 185px;
  padding: 0.62rem 0;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  background: rgba(14, 31, 54, 0.97);
  box-shadow: 0 1rem 2.2rem rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.ceda-nav-dropdown:hover .ceda-dropdown-menu,
.ceda-nav-dropdown:focus-within .ceda-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.ceda-dropdown-menu a {
  display: block;
  padding: 0.52rem 1rem;
  color: rgba(255, 255, 255, 0.84);
  font-family:"Noto Serif TC";
  /*font-family: "Inter", "Noto Sans TC", sans-serif;*/
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.ceda-dropdown-menu a:hover,
.ceda-dropdown-menu a:focus {
  color: #ffffff;
  background: rgba(184, 115, 64, 0.22);
}

.ceda-dropdown-menu-wide {
  min-width: 250px; /* Venue / Travel / Accommodation 下拉選單較長，給予較寬空間 */
}

.ceda-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 0.1rem 0.05rem;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #b87340;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0.55rem 1rem rgba(83, 42, 14, 0.2);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ceda-nav-cta:hover,
.ceda-nav-cta:focus {
  color: #ffffff;
  opacity: 0.92;
  transform: translateY(-1px);
}

/**************************************
 * 05. Hero 首屏區塊：桌機版
 * 說明：使用 img/carousel-1.jpg 原圖，透過漸層遮罩讓左側標題可讀性更高。
 **************************************/
.ceda-hero-section {
  margin-bottom: 0.5rem;
}

.ceda-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 430px;
  height: clamp(430px, 42vw, 760px);
  background-color: #f2ede6;
}

.ceda-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.ceda-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(245, 239, 230, 0.96) 0%, rgba(245, 239, 230, 0.88) 38%, rgba(245, 239, 230, 0.48) 56%, rgba(245, 239, 230, 0.06) 76%, rgba(245, 239, 230, 0) 100%);
}

.ceda-hero-container {
  top: 20px;
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.ceda-hero-copy {
  width: min(56%, 690px);
  padding-top: clamp(0.25rem, 1.4vw, 1.6rem);
  color: var(--ceda-hero-navy);
  text-align: left;
}

.ceda-hero-title {
  margin: 0;
  color: #163050;
  font-family: Georgia, "Times New Roman", "Noto Sans TC", serif;
  font-size: clamp(1.75rem, 2.85vw, 4.15rem);
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: -0.025em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.ceda-hero-title sup {
  top: -0.55em;
  margin-left: 0.04em;
  font-size: 0.48em;
}

.ceda-hero-title .hero-title-brown {
  color: var(--ceda-primary);
  font-size: x-large;
}

.ceda-hero-separator {
  width: min(500px, 88%);
  height: 1px;
  margin: clamp(0.55rem, 0.9vw, 1rem) 0 clamp(0.6rem, 1vw, 1rem);
  background: rgba(22, 48, 80, 0.36);
}

.ceda-hero-subtitle {
  margin: 0 0 clamp(1.35rem, 2.1vw, 2.2rem);
  color: var(--ceda-hero-navy);
  font-family: Georgia, "Times New Roman", "Noto Sans TC", serif;
  font-size: clamp(1rem, 1.35vw, 1.75rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ceda-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 3vw, 3.25rem);
  margin-bottom: clamp(1.25rem, 2vw, 2.2rem);
  color: var(--ceda-hero-navy);
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: clamp(0.9rem, 1vw, 1.15rem);
  font-weight: 700;
}

.ceda-hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}

.ceda-hero-meta-item i {
  color: var(--ceda-primary);
  font-size: 1.35em;
}

.ceda-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ceda-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.95rem;
  min-width: 142px;
  padding: 0.78rem 1.45rem;
  border-radius: 0.55rem;
  color: #ffffff;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0.55rem 1.1rem rgba(18, 35, 58, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ceda-hero-btn:hover,
.ceda-hero-btn:focus {
  color: #ffffff;
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 1.35rem rgba(18, 35, 58, 0.26);
}

.ceda-hero-btn-primary {
  background: #142b48;
}

.ceda-hero-btn-secondary {
  background: #a7663a;
}

/**************************************
 * 06. 內容區塊樣式
 * 說明：About、News、Committee、Speaker、Venue 與 Past CEDA 共用首頁內容視覺。
 **************************************/
.about {
  background-color: var(--ceda-about-bg);
}

.about p {
  color: #ffffff;
  font-size: 12pt;
  font-family: "Noto Serif TC";
}

.card {
  border-radius: 0.75rem;
  border-top: 3px solid rgb(190, 140, 48) !important;
  background-color: #142b48;
}

.card-title {
  color: #faf3e0;
  font-weight: 700;
}

#Committee,
#Speakers,
#Past {
  background: transparent;
}

.bg-map {
  background: linear-gradient(0deg, rgb(35, 53, 83) 16%, rgba(89, 113, 145, 1) 57%, rgb(135, 147, 159) 80%, rgb(161, 156, 152) 100%);
  background-size: cover;
}

.pastlink {
  width: 80%;
  margin: 30px;
  padding: 12px;
  border-radius: 1rem;
  background-color: var(--ceda-blue);
  color: #ffffff;
  text-align: center;
}

.pastlink a {
  color: #ffffff;
  text-decoration: none;
}

.pastlink a:hover,
.pastlink a:focus {
  color: #ffc4a5;
  font-weight: 700;
  text-decoration: underline;
  background-color: #2b7ab7;
}

.flex-title {
    overflow: hidden; /* 核心屬性：裁切超出父容器範圍的橫線，達成絕對齊尾 */
}

.flex-title::after {
    content: "";
    display: inline-block;
    vertical-align: middle; /* 確保橫線與最後一行文字的垂直中心對齊 */
    width: 100%; /* 給予橫線極大的長度以確保能填滿右側剩餘空間 */
    height: 1px;
    background-color: #ac891a;
    margin-left: 20px; /* 橫線與最後一個字之間的水平間距 */
    margin-right: -100%; /* 核心屬性：抵銷寬度佔據的空間，強制橫線與最後一個字保持在同一行 */
}

/**************************************
 * 06.2 Venue 地點
 * 說明：資訊類。
 **************************************/

/*.btn-lg-square {
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}*/


/**************************************
 * 06.3 Memorial 新增區塊一：鄭清水院士生平與學術貢獻
 * 說明：使用深藍與暖金色建立莊重、具紀念感的視覺層次。
 **************************************/
.memorial-section {
  position: relative;
  overflow: hidden;
}

.memorial-bio {
  background:
    radial-gradient(circle at 18% 18%, rgba(239, 145, 97, 0.18) 0, rgba(239, 145, 97, 0) 36%),
    linear-gradient(135deg, #10243c 0%, #172f4d 46%, #493426 100%);
  color: #fff8ee;
}

.memorial-bio::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px), linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.24;
}

.memorial-bio .container,
.memorial-tribute .container,
.memorial-resources .container {
  position: relative;
  z-index: 1;
}

.memorial-pill {
  background: rgba(239, 145, 97, 0.18);
  border: 1px solid rgba(247, 171, 132, 0.55);
  color: #ffe5d3;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.memorial-title {
  color: #fff7e6;
  font-size: clamp(1.85rem, 3vw, 3.05rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.memorial-lead {
  color: rgba(255, 248, 238, 0.9);
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.95;
}

.memorial-portrait-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 231, 211, 0.28);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1.35rem 3.25rem rgba(0, 0, 0, 0.25);
}

.memorial-portrait-img {
  display: block;
  width: 100%;
  min-height: 480px;/*410px*/
  object-fit: cover;
  object-position: center;
}

.memorial-portrait-caption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.1rem;
  background: #10243c73;
  backdrop-filter: blur(8px);
}

.memorial-caption-kicker {
  display: block;
  margin-bottom: 0.32rem;
  color: #f7ab84;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.memorial-timeline {
  display: grid;
  gap: 0.3rem;
}

.memorial-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 0.2rem;
  padding: 0.5rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.07);
}

.memorial-year {
  color: #ffd1ae;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.memorial-timeline-item p {
  margin: 0;
  color: rgba(255, 248, 238, 0.88);
  line-height: 1.75;
}

.memorial-contribution-card {
  padding: 1rem;
  border: 1px solid rgba(255, 231, 211, 0.18);
  border-radius: 1.25rem;
  background: rgba(10, 26, 46, 0.72);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.18);
}

.memorial-contribution-card i {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  /*margin-bottom: 1rem;*/
  border-radius: 50%;
  color: #ffd1ae;
  background: rgba(239, 145, 97, 0.16);
}

.memorial-contribution-card h3 {
  color: #fff7e6;
  font-size: 1.18rem;
  font-weight: 800;
}

.memorial-contribution-card p {
  margin: 0;
  color: rgba(255, 248, 238, 0.82);
  line-height: 1.8;
}

/**************************************
 * 06.4 Memorial 新增區塊二：鄭清水院士紀念文字
 * 說明：提供研討會首頁可直接閱讀的追思文字與引用式版面。
 **************************************/
.memorial-tribute {
  background: linear-gradient(180deg, #f3ede4 0%, #e6d7ca 100%);
}

.memorial-tribute .memorial-pill {
  background: rgba(167, 102, 58, 0.12);
  border-color: rgba(167, 102, 58, 0.28);
  color: #7c4829;
}

.memorial-tribute .memorial-title {
  color: #17304f;
}

.memorial-tribute-panel {
  position: relative;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-left: 6px solid #a7663a;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1rem 3rem rgba(64, 48, 39, 0.12);
}

.memorial-quote-mark {
  position: absolute;
  top: -1.1rem;
  right: clamp(1.4rem, 4vw, 3.5rem);
  color: rgba(167, 102, 58, 0.16);
  font-family: Georgia, serif;
  font-size: clamp(6rem, 12vw, 10rem);
  line-height: 1;
}

.memorial-tribute-text {
  position: relative;
  z-index: 1;
  color: #243852;
  font-family: "Noto Serif TC", Georgia, serif;
  /*font-size: 1.15rem;
  line-height: 2;*/
}

.memorial-tribute-signature {
  position: relative;
  z-index: 1;
  color: #7c4829;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/**************************************
 * 06.5 Memorial 新增區塊三：照片與相關連結六欄三列
 * 說明：桌機版使用六欄卡片牆；18 張卡片約為三排六列。點選照片以純 CSS :target 放大，未使用 JavaScript。
 **************************************/
.memorial-resources {
  background:
    linear-gradient(180deg, rgba(18, 43, 72, 0.98) 0%, rgba(64, 48, 39, 0.98) 100%),
    url("../img/carousel-2.jpg") center/cover no-repeat;
    color: #fff7e6;
}

.memorial-resource-intro {
  color: rgba(255, 248, 238, 0.82);
  font-size: 0.98rem;
  line-height: 1.75;
}

.memorial-related-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.memorial-related-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.36rem 0.78rem;
  border: 1px solid rgba(255, 209, 174, 0.36);
  border-radius: 999px;
  color: #ffd1ae;
  background: rgba(255, 255, 255, 0.075);
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.memorial-related-links a:hover,
.memorial-related-links a:focus {
  color: #ffffff;
  border-color: rgba(255, 231, 211, 0.78);
  background: rgba(255, 255, 255, 0.13);
}

.memorial-photo-grid {
  --bs-gutter-x: 0.85rem;
  --bs-gutter-y: 0.85rem;
}

.memorial-photo-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 231, 211, 0.18);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 0.75rem 1.6rem rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.memorial-photo-card:hover,
.memorial-photo-card:focus-within {
  border-color: rgba(255, 209, 174, 0.58);
  background: rgba(255, 255, 255, 0.115);
  transform: translateY(-3px);
}

.memorial-photo-link {
  position: relative;
  display: block;
  overflow: hidden;
  /*border-radius: 0.95rem 0.95rem 0 0;*/
  text-decoration: none;
}

.memorial-photo-link::after {
  content: "zoom-in";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.55rem;
  padding: 0.26rem 0.35rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 36, 60, 0.76);
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.memorial-photo-card:hover .memorial-photo-link::after,
.memorial-photo-card:focus-within .memorial-photo-link::after {
  opacity: 1;
  transform: translateY(0);
}

.memorial-photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.28s ease;
}

.memorial-photo-card:hover .memorial-photo-thumb,
.memorial-photo-card:focus-within .memorial-photo-thumb {
  transform: scale(1.055);
  filter: saturate(1.06) contrast(1.04);
}

.memorial-photo-card figcaption {
  min-height: 3.15rem;
  padding: 0.58rem 0.62rem 0.68rem;
  color: rgba(255, 248, 238, 0.78);
  font-family: "Noto Serif TC", Georgia, serif;
  line-height: 1.45;
}

.memorial-photo-card figcaption small {
  display: block;
  font-size: 0.72rem;
}

.memorial-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.memorial-lightbox:target {
  display: flex;
}

.memorial-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 13, 24, 0.86);
  backdrop-filter: blur(6px);
}

.memorial-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1020px, 94vw);
  max-height: 90vh;
  margin: 0;
  padding: clamp(0.65rem, 2vw, 1rem);
  border: 1px solid rgba(255, 231, 211, 0.28);
  border-radius: 1.2rem;
  background: rgba(18, 43, 72, 0.94);
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.45);
}

.memorial-lightbox-dialog img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 0.85rem;
}

.memorial-lightbox-dialog figcaption {
  padding: 0.7rem 0.3rem 0.15rem;
  color: rgba(255, 248, 238, 0.82);
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
}

.memorial-lightbox-close {
  position: absolute;
  top: -0.9rem;
  right: -0.9rem;
  display: inline-flex;
  width: 2.45rem;
  height: 2.45rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 231, 211, 0.38);
  border-radius: 50%;
  color: #ffffff;
  background: #a7663a;
  font-size: 1.7rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 0.8rem 1.4rem rgba(0, 0, 0, 0.28);
}

.memorial-lightbox-close:hover,
.memorial-lightbox-close:focus {
  color: #ffffff;
  background: #7c4829;
}

@media (min-width: 992px) {
  .memorial-photo-grid > .col {
    flex: 0 0 auto;
    width: 16.6666667%;
  }
}

@media (max-width: 767.98px) {
  .memorial-photo-card figcaption {
    min-height: 2.8rem;
    padding: 0.5rem;
  }

  .memorial-photo-card figcaption small {
    font-size: 0.67rem;
  }
}

@media (max-width: 991.98px) {
  .memorial-portrait-img {
    min-height: 320px;
  }

  .memorial-timeline-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .memorial-lead,
  .memorial-tribute-text {
    font-size: 1rem;
    line-height: 1.85;
  }

  .memorial-portrait-caption {
    position: static;
    border-radius: 0;
  }
}

/**************************************
 * 07. Footer 頁尾
 * 說明：保留咖啡色與藍色斜切背景，並統一頁尾連結樣式。
 **************************************/
.footer {
  background: linear-gradient(23deg, #7f491e 50%, #2a3b56 50%) center center / 100% 100%;
}

.footer .btn.btn-link {
  display: block;
  margin-bottom: 5px;
  padding: 0;
  color: #fff7e6;
  font-weight: 400;
  text-align: left;
  text-transform: capitalize;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.footer .btn.btn-link::before {
  content: "\f105";
  position: relative;
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

.footer .btn.btn-link:hover,
.footer .btn.btn-link:focus {
  color: #f8f8f9;
  letter-spacing: 1px;
  box-shadow: none;
}

/**************************************
 * 08. 平板與中小尺寸導覽列
 * 說明：1199.98px 以下啟用 CSS-only 漢堡選單，讓平板可正常操作。
 **************************************/
@media (max-width: 1199.98px) {
  .ceda-site-header {
    background: #0c182ae3;
    box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.16);
  }

  .ceda-navbar {
    min-height: 72px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .ceda-nav-wrap {
    flex-wrap: wrap;
  }

  .ceda-brand {
    min-width: auto;
  }

  .ceda-brand-mark {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .ceda-brand-mark img {
    width: 28px;
    height: 28px;
  }

  .ceda-brand-title {
    font-size: 1.2rem;
  }

  .ceda-brand-subtitle {
    font-size: 0.68rem;
  }

  .ceda-toggler {
    display: inline-flex;
  }

  .ceda-nav-check:checked + .ceda-toggler span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .ceda-nav-check:checked + .ceda-toggler span:nth-child(2) {
    opacity: 0;
  }

  .ceda-nav-check:checked + .ceda-toggler span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .ceda-nav-menu {
    flex: 0 0 100%;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    transition: max-height 0.32s ease, opacity 0.22s ease, padding 0.22s ease, margin 0.22s ease;
  }

  .ceda-nav-check:checked ~ .ceda-nav-menu {
    max-height: calc(100vh - 72px);
    margin-top: 0.85rem;
    padding: 0.65rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    opacity: 1;
    overflow-y: auto;
  }

  .ceda-nav-list {
    width: 100%;
    align-items: stretch;
    gap: 0;
  }

  .ceda-navbar .ceda-nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.05rem 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;

  }

  .ceda-navbar .ceda-nav-link.active::after {
    left: 0;
    right: auto;
    bottom: 0.5rem;
    width: 36px;
  }

  /* 手機與平板版：隱藏目前選單 active 狀態的咖啡色底線 */
  .ceda-nav-link.active::after {
    display: none;
  }
/* 手機與平板版：主選單字型顏色 */
  .navbar-dark .navbar-nav .nav-link{
    color: #f6e7be;
  }

  .ceda-dropdown-menu {
    position: static;
    min-width: 100%;
    padding: 0.2rem 0 0.55rem 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .ceda-dropdown-menu a {
    padding: 0.42rem 0.15rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
  }

  .ceda-nav-dropdown:hover .ceda-dropdown-menu,
  .ceda-nav-dropdown:focus-within .ceda-dropdown-menu {
    transform: none;
  }

  .ceda-nav-cta {
    width: 100%;
    margin: 0.95rem 0 0;
    padding: 0.78rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.95rem;
  }

  .ceda-hero-copy {
    width: min(58%, 620px);
  }
}

/**************************************
 * 09. 平板 Hero 調整
 * 說明：991.98px 以下縮小 Hero 標題與輔助文字，避免標題在平板過大或換行擁擠。
 **************************************/
@media (max-width: 991.98px) {
  .ceda-hero {
    height: auto;
    min-height: 640px;
    padding: 4rem 0 3rem;
  }

  .ceda-hero-bg {
    object-position: 65% top;
  }

  .ceda-hero::before {
    background: linear-gradient(180deg, rgba(245, 239, 230, 0.96) 0%, rgba(245, 239, 230, 0.6) 59%, rgba(245, 239, 230, 0.09) 100%);
  }

  .ceda-hero-container {
    top: 60px;
    align-items: flex-start;
  }

  .ceda-hero-copy {
    width: 100%;
    max-width: 680px;
    padding-top: 0;
  }

  .ceda-hero-title {
    font-size: clamp(1.65rem, 4.4vw, 2.35rem); /* 平板標題比上一版再縮小 */
    line-height: 1.15;
  }

  .ceda-hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .ceda-hero-meta {
    font-size: 0.98rem;
    line-height: 1.5;
  }
}

/**************************************
 * 10. 手機版導覽列與 Hero
 * 說明：575.98px 以下進一步縮小 Logo、Hero 標題與按鈕，提升手機閱讀舒適度。
 **************************************/
@media (max-width: 575.98px) {
  .ceda-navbar {
    min-height: 66px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .ceda-brand-title {
    font-size: 1.05rem;
  }

  .ceda-brand-subtitle {
    font-size: 0.62rem;
  }

  .ceda-brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .ceda-brand-mark img {
    width: 25px;
    height: 25px;
  }

  .ceda-hero {
    min-height: 620px;
    padding: 3rem 0 2.5rem;
  }

  .ceda-hero-title {
    font-size: clamp(1.25rem, 6.2vw, 1.65rem); /* 手機標題再縮小 */
    line-height: 1.18;
  }

  .ceda-hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .ceda-hero-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .ceda-hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .ceda-hero-btn {
    width: 100%;
    max-width: 230px;
    padding: 0.72rem 1.1rem;
    font-size: 0.76rem;
  }

  .about p {
    font-size: 1rem;
  }
}
