/* 系網首頁（2026-10 改版）：鴻經館照片頁首（下半部淡成頁面底色）、公告佈告欄、學術活動、近期榮譽、相關網站 */

:root {
  --home-accent: #832e33;
  --home-accent-dark: #5a1419;
  --home-ink: #2b2523;
  --home-muted: #6b605c;
  --home-line: #e5dfda;
  --home-ground: #f3f1ee;
}

/* 原本 #main 鋪點點底紋圖，照片淡出要接純色，首頁改成米白純色 */
html #main {
  background: var(--home-ground) !important;
}

.home-main li {
  list-style: none;
}

.home-main ul {
  margin: 0;
  padding: 0;
}

/* ---- 頁首 ---- */

.home-hero {
  position: relative;
  flex: 0 0 100%;
  max-width: 100%;
  height: 500px;
  overflow: hidden;
  background: var(--home-ground);
}

/* 照片往上推 120px：裁掉最上面一整排冷氣，留下招牌、櫻花 */
.home-hero-img {
  position: absolute;
  top: -120px;
  left: 0;
  width: 100%;
  height: calc(100% + 120px);
  object-fit: cover;
  object-position: center 60%;
}

/* 照片下半部淡成頁面底色，跟下面的公告區之間沒有切線 */
.home-hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(243, 241, 238, 0) 0%,
    rgba(243, 241, 238, 0) 32%,
    rgba(243, 241, 238, 0.7) 52%,
    rgba(243, 241, 238, 0.94) 68%,
    #f3f1ee 84%);
}

/* index.css 對 #main 裡的 .container 設了上下邊距，這裡要用 #main 提高優先序 */
#main .home-hero-inner {
  position: relative;
  height: 100%;
  padding-bottom: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}

.home-hero-title {
  margin: 0;
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 54px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: #3a0a0e;
}

.home-hero-en {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--home-accent);
}

.home-programs {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.home-program {
  min-width: 250px;
  box-sizing: border-box;
  padding: 14px 20px;
  border: 1px solid #e3cfd0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(60, 20, 22, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--home-accent);
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
}

.home-program:hover {
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(60, 20, 22, 0.14);
  text-decoration: none;
  color: var(--home-accent-dark);
}

.home-program-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-program-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--home-accent);
}

.home-program-name {
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--home-ink);
}

.home-program-en {
  font-size: 13px;
  color: var(--home-muted);
}

/* ---- 內容 ---- */

.home-main {
  padding: 16px 0 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  color: var(--home-ink);
}

.home-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 28px;
}

.home-card {
  min-width: 0;
  border: 1px solid var(--home-line);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(60, 20, 22, 0.05), 0 6px 18px rgba(60, 20, 22, 0.05);
}

.home-board {
  flex: 999 1 540px;
}

.home-events {
  flex: 1 1 320px;
}

.home-card-head {
  padding: 18px 24px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.home-board .home-card-head {
  border-bottom: 1px solid #eee3e0;
  background: linear-gradient(180deg, #f6eceb 0px, #ffffff 90px);
}

.home-card-title,
.home-section-title {
  margin: 0;
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--home-ink);
}

.home-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--home-accent);
}

.home-more:hover {
  color: var(--home-accent-dark);
}

.home-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
}

.home-chip.is-pin {
  background: var(--home-accent);
  color: #ffffff;
}

.home-chip.is-admission {
  background: #f3e4e5;
  color: #7a2a30;
}

.home-chip.is-honor {
  background: #fbf1d9;
  color: #7a5a00;
}

.home-chip.is-notice {
  background: #e9eef3;
  color: #34495c;
}

/* 佈告欄 */

.home-board-list {
  padding: 0 0 10px !important;
}

.home-board-list li {
  padding: 0 24px;
  border-bottom: 1px solid #f0e9e6;
}

.home-board-list li.is-pinned {
  background: #fbf5f4;
}

.home-board-list a {
  min-height: 64px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--home-ink);
  text-decoration: none;
}

.home-board-list a:hover .home-board-title {
  color: var(--home-accent);
  text-decoration: underline;
}

.home-date {
  width: 58px;
  flex-shrink: 0;
  padding: 6px 0;
  border-radius: 10px;
  background: #f6eded;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.home-date span {
  font-size: 11px;
  color: #7a2a30;
}

.home-date strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--home-accent);
}

.home-board-text {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.home-board-title {
  font-size: 16px;
  line-height: 1.5;
}

/* 學術活動 */

.home-next {
  margin: 0 14px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #832e33 0%, #6b1f25 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
}

.home-next:hover {
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(90, 20, 25, 0.25);
}

.home-next-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: #f5e4e5;
}

.home-next-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.home-next-date {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.home-next-date strong {
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.home-next-date span {
  font-size: 14px;
  color: #f5e4e5;
}

.home-next-title {
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.home-next-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #f9eded;
}

.home-next-affil {
  color: #e8c9cb;
}

.home-next-where {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.home-next-where > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-event-list {
  padding: 6px 24px 12px !important;
}

.home-event-list li {
  border-bottom: 1px solid #f0e9e6;
}

.home-event-list a {
  padding: 13px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--home-ink);
  text-decoration: none;
}

.home-event-list a:hover .home-event-title {
  color: var(--home-accent);
  text-decoration: underline;
}

.home-event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--home-muted);
}

.home-event-meta strong {
  color: var(--home-accent);
}

.home-event-meta .home-chip {
  font-size: 12px;
}

.home-event-speaker {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-event-title {
  font-size: 15px;
  line-height: 1.5;
}

/* ---- 近期榮譽、相關網站 ---- */

.home-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 24px;
}

.home-section-title::after {
  content: "";
  order: 1;
  flex: 1;
  height: 1px;
  background: #e2d8d3;
}

.home-section-title a {
  order: 2;
  font-family: inherit;
  font-family: system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--home-accent);
}

.home-honors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

/* 跟榮譽榜頁同一套：酒紅標頭＋月桂環獎章、金色獎章、宋體姓名、頂端金線 */
.home-honor-card {
  border: 1px solid #eadfcb;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(60, 40, 0, 0.04), 0 6px 18px rgba(60, 40, 0, 0.05);
}

.home-honor-head {
  position: relative;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  background: linear-gradient(120deg, #4a0f13 0%, #6e2328 55%, #832e33 100%);
}

/* 右邊一圈淡金色光暈 */
.home-honor-head::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 197, 110, 0.25) 0%, rgba(232, 197, 110, 0) 70%);
  pointer-events: none;
}

.home-honor-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff8e6;
}

.home-honor-label svg {
  width: 36px;
  height: 36px;
  color: #e3c06c;
}

.home-honor-head .home-more {
  position: relative;
  z-index: 1;
  color: #e3c06c;
}

.home-honor-head .home-more:hover {
  color: #fff8e6;
}

.home-honor-list {
  padding: 4px 22px 8px !important;
}

.home-honor-list li {
  padding: 14px 0;
  border-bottom: 1px solid #f3ede4;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.home-honor-list li:last-child {
  border-bottom: 0;
}

.home-honor-medal {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 1px;
  filter: drop-shadow(0 2px 3px rgba(156, 117, 38, 0.3));
}

.home-honor-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-honor-who {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.home-honor-who strong {
  font-family: 'Noto Serif TC', 'Noto Serif CJK TC', serif;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: #4a1418;
}

.home-honor-sub {
  padding: 0 7px;
  border-radius: 4px;
  background: #f8f0dc;
  font-size: 12.5px;
  color: #7a5a10;
}

.home-honor-year {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 700;
  color: #74570f;
}

.home-honor-what {
  font-size: 15px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-honor-org {
  font-size: 13px;
  color: var(--home-muted);
}

.home-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-link {
  border: 1px solid var(--home-line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  color: var(--home-ink);
  text-decoration: none;
}

.home-link:hover {
  border-color: #d9bfc1;
  box-shadow: 0 6px 18px rgba(60, 20, 22, 0.08);
  text-decoration: none;
  color: var(--home-accent);
}

.home-link-img {
  height: 96px;
  box-sizing: border-box;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-link-img img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}

.home-link-name {
  padding: 10px 16px;
  border-top: 1px solid #f0e9e6;
  font-size: 14.5px;
  font-weight: 500;
}

/* 桌機上公告和學術活動並排時等高，公告各列平均撐開，下方不留空白 */
@media (min-width: 992px) {
  .home-row {
    align-items: stretch;
  }

  .home-board {
    display: flex;
    flex-direction: column;
  }

  .home-board-list {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .home-board-list li {
    flex: 1 1 auto;
    display: flex;
  }

  .home-board-list li > a {
    flex: 1;
  }
}

/* ---- 平板 ---- */

@media (max-width: 991.98px) {
  .home-hero {
    height: 440px;
  }

  .home-hero-title {
    font-size: 44px;
  }

  .home-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- 手機：照片在上，下緣淡成底色，系名接在下面 ---- */

@media (max-width: 767.98px) {
  .home-hero {
    height: auto;
  }

  .home-hero-fade {
    bottom: auto;
    height: 240px;
  }

  /* 手機一樣裁掉頂端那排冷氣 */
  .home-hero-img {
    top: -56px;
    height: 296px;
    object-position: 16% 50%;
  }

  .home-hero-fade {
    background: linear-gradient(180deg, rgba(243, 241, 238, 0) 40%, rgba(243, 241, 238, 0.75) 74%, #f3f1ee 100%);
  }

  #main .home-hero-inner {
    height: auto;
    padding-top: 196px;
    padding-bottom: 4px;
    gap: 6px;
  }

  .home-hero-title {
    font-size: 30px;
    letter-spacing: 0.08em;
  }

  .home-hero-en {
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .home-programs {
    margin-top: 12px;
    flex-direction: column;
    gap: 10px;
  }

  .home-program {
    min-width: 0;
    width: 100%;
    min-height: 64px;
    padding: 10px 16px;
  }

  .home-program-label {
    display: none;
  }

  .home-program-name {
    font-size: 19px;
  }

  .home-main {
    gap: 22px;
    padding-top: 20px;
  }

  .home-row {
    gap: 22px;
  }

  .home-card-head {
    padding: 14px 18px 8px;
  }

  .home-card-title {
    font-size: 22px;
  }

  .home-board-list li {
    padding: 0 18px;
  }

  .home-board-list a {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

  .home-date {
    width: 50px;
    border-radius: 9px;
  }

  .home-date strong {
    font-size: 15px;
  }

  .home-board-title {
    flex-basis: 100%;
    font-size: 15px;
  }

  .home-next {
    margin: 0 12px;
    padding: 16px;
  }

  .home-next-date strong {
    font-size: 30px;
  }

  .home-next-title {
    font-size: 17px;
  }

  .home-event-list {
    padding: 4px 18px 8px !important;
  }

  .home-section-title {
    font-size: 21px;
  }

  .home-honors {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .home-honor-head {
    padding: 10px 16px;
  }

  .home-honor-label {
    font-size: 17px;
  }

  .home-honor-label svg {
    width: 30px;
    height: 30px;
  }

  .home-honor-medal {
    width: 28px;
    height: 28px;
  }

  .home-honor-list {
    padding: 0 16px 4px !important;
  }

  .home-honor-what {
    font-size: 14px;
  }

  .home-links {
    gap: 12px;
  }

  .home-link-img {
    height: 70px;
    padding: 8px 10px;
  }

  .home-link-img img {
    max-height: 52px;
  }

  .home-link-name {
    padding: 8px 10px;
    font-size: 13px;
  }
}
