/* =========================================================
   about03-detail.css
   載入：shared-typography.css 之後
   頁面：about_news_detail, about_award_detail, about_activity_album_detail
========================================================= */

/* =========================================================
   about_news_detail.aspx - 內頁文章 + 右側列表（新版語意結構）
   版型：.section-page + .section-layout + .section-main（shared-sidebar.css）
   內文／側欄：.news-detail-layout > .news-detail-article + .news-detail-aside
========================================================= */

.about-news-detail-page .section-main .news-detail-layout {
  --detail-history-w: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--detail-history-w);
  gap: 24px;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
}

.about-news-detail-page .section-main .news-detail-article,
.about-news-detail-page .section-main .news-detail-aside {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  flex: none;
  margin: 0;
  min-height: 100%;
  min-width: 0;
  padding: 0;
}

.about-news-detail-page .section-main .news-detail-article {
  width: auto;
  max-width: none;
  background: transparent;
}

.about-news-detail-page .section-main .news-detail-aside {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.about-news-detail-page .section-main .news-detail-nav {
  margin-top: 2rem;
}

.about-news-detail-page .section-main .news-article-wrap {
  flex: 1 1 auto;
  width: 100%;
  background: #ffffff !important;
  border: 1px solid rgba(12, 89, 111, 0.10);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(7, 41, 56, 0.055);
  padding: 32px;
}

.about-news-detail-page .section-main .news-article-wrap h3 {
  margin: 0 0 16px !important;
  color: var(--about-primary-deep);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.45;
}

.about-news-detail-page .section-main .news-article-wrap h3 .line {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.about-news-detail-page .section-main .news-article-wrap h3 .line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--about-primary), var(--about-accent));
  border-radius: 999px;
}

.about-news-detail-page .section-main .news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #637780;
  font-size: 14px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(12, 89, 111, 0.10);
}

.about-news-detail-page .section-main .news-meta i {
  color: #0c7890;
}

.about-news-detail-page .section-main .news-content {
  padding: 0 !important;
  color: #33444c;
  line-height: 1.95;
  font-size: 16px;
}

.about-news-detail-page .section-main .news-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 18px 0;
}

.about-news-detail-page .section-main .news-btn-box .pagination {
  gap: 12px;
  margin-bottom: 0;
}

.about-news-detail-page .section-main .news-btn-box .btn {
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
}

.about-news-detail-page .section-main .history-aside-panel {
  position: sticky;
  top: 122px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  box-sizing: border-box;
  padding: 26px 24px;
  background: #ffffff;
  border: 1px solid rgba(12, 89, 111, 0.10);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(7, 41, 56, 0.055);
}

/* 覆蓋 common.css .module-inter .sub-title { padding: 3rem 0 .5rem } */
.about-news-detail-page .section-main .history-aside-panel .sub-title {
  flex: 0 0 auto;
  background: transparent !important;
  border: none;
  border-left: 4px solid var(--about-primary);
  padding: 0 8px 0 14px !important;
  margin: 0 0 22px !important;
  box-shadow: none;
}

.about-news-detail-page .section-main .history-aside-panel .sub-title span {
  color: var(--about-primary-deep);
  font-size: 18px;
  font-weight: 800;
}

.about-news-detail-page .section-main .history-aside-panel .year-select {
  flex: 0 0 auto;
  width: 100% !important;
  max-width: 100% !important;
  height: 42px !important;
  margin: 0 0 18px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(12, 89, 111, 0.18) !important;
  background: #ffffff !important;
  color: #3c525d !important;
  font-size: 14px !important;
  font-weight: 600;
  padding: 0 16px !important;
  box-shadow: 0 4px 14px rgba(7, 41, 56, 0.04);
  box-sizing: border-box;
}

.about-news-detail-page .section-main .history-aside-panel .history-scroll-container {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ListView 外層 span 撐滿但不吃掉 panel 內距 */
.about-news-detail-page .section-main .history-aside-panel .history-scroll-container > span {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 覆蓋全站 .history-card { padding: 12px 0 } */
.about-news-detail-page .section-main .history-aside-panel .history-card {
  display: block !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid rgba(12, 89, 111, 0.08) !important;
  border-radius: 12px;
  padding: 16px 18px !important;
  margin: 0 0 12px !important;
  box-shadow: 0 4px 14px rgba(7, 41, 56, 0.035);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.about-news-detail-page .section-main .history-aside-panel .history-card:last-child {
  margin-bottom: 0 !important;
  border-bottom: 1px solid rgba(12, 89, 111, 0.08) !important;
}

.about-news-detail-page .section-main .history-aside-panel .history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(7, 41, 56, 0.08);
  border-color: rgba(25, 167, 184, 0.24);
}

.about-news-detail-page .section-main .history-aside-panel .history-title {
  display: block !important;
  width: 100%;
  padding: 0 !important;
  margin: 0 0 10px !important;
  color: var(--about-text);
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none !important;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.about-news-detail-page .section-main .history-aside-panel .history-card:hover .history-title {
  color: var(--about-primary);
}

.about-news-detail-page .section-main .history-aside-panel .history-date {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  color: #6a7c85;
  font-size: 13px;
}

/* =========================================================
   Responsive for shared about layouts.
========================================================= */

@media (max-width: 1199.98px) {
  .about-news-detail-page .section-main .news-detail-aside {
    position: static !important;
    width: 100% !important;
  }

  .about-news-detail-page .section-main .history-aside-panel {
    position: static;
    top: auto;
  }

  .about-news-page .news-header {
    align-items: flex-start !important;
  }

  .about-news-page .news-year-filter {
    justify-content: flex-start;
  }

  .about-news-detail-page .section-main .news-detail-layout {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    align-items: start;
  }

  .about-news-detail-page .section-main .news-detail-article,
  .about-news-detail-page .section-main .news-detail-aside {
    min-height: 0;
  }

  .about-news-detail-page .section-main .news-article-wrap {
    padding: 28px;
  }

  .about-news-detail-page .section-main .history-aside-panel {
    padding: 24px 22px;
  }

  .about-news-detail-page .section-main .history-aside-panel .history-scroll-container {
    flex: none;
    max-height: none;
    overflow-y: visible;
    padding: 0;
  }
}

@media (max-width: 991.98px) {
  .about-news-page .news-list-link,
  .about-news-page .news-list-item.no-image .news-list-link {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .about-news-page .news-list-img-wrapper {
    width: 220px;
    height: 138px;
  }

  .about-news-page .news-more-btn {
    grid-column: 2;
    justify-self: flex-start;
    margin: 0 0 18px 22px;
  }
}

@media (max-width: 767.98px) {
  .about-news-page .year-select {
    width: 100% !important;
    min-width: 0;
  }

  .about-news-page .news-list-link,
  .about-news-page .news-list-item.no-image .news-list-link {
    display: block;
    min-height: 0;
  }

  .about-news-page .news-list-img-wrapper {
    width: 100%;
    height: 190px !important;
  }

  .about-news-page .news-list-body {
    padding: 18px 18px 12px;
  }

  .about-news-page .news-list-title {
    font-size: 17px;
    -webkit-line-clamp: 2;
  }

  .about-news-page .news-list-text {
    font-size: 13px;
    -webkit-line-clamp: 3;
  }

  .about-news-page .news-more-btn {
    margin: 0 18px 18px;
  }

  .about-news-detail-page .section-main .news-article-wrap {
    padding: 24px;
    border-radius: 14px;
  }

  .about-news-detail-page .section-main .news-article-wrap h3 {
    font-size: 1.55rem;
  }

  .about-news-detail-page .section-main .news-btn-box .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .about-news-detail-page .section-main .news-btn-box .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .about-news-page .news-list-img-wrapper {
    height: 170px !important;
  }
}
