/* 官方动态页面：PC 与移动端分离，避免污染通用内容页样式。 */
.media-page {
  min-height: 100vh;
  background: #fff;
}

.media-page .media-header {
  position: absolute;
  top: 0;
  background: transparent;
  transition: background .2s, box-shadow .2s;
}

.media-page .media-header.media-header--fixed {
  position: fixed;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
}

.media-hero {
  position: relative;
  width: 100%;
  height: 396px;
  background: url('/public/index/images/updates-backdrop.jpg') center center/cover no-repeat;
}

.media-hero__panel {
  position: absolute;
  top: 50%;
  left: 0;
  width: 580px;
  transform: translateY(-50%);
  padding: 5px 0;
  color: #fff;
  text-align: center;
  background: linear-gradient(-90deg, rgba(225, 37, 27, 0) 0%, #e1251b 100%);
}

.media-hero__en {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 5px;
  word-spacing: 8px;
  text-transform: uppercase;
}

.media-hero__title {
  margin: 0;
  font-size: 50px;
  line-height: 75px;
  font-weight: 700;
}

.media-list {
  width: calc(100% - 320px);
  max-width: 1590px;
  margin: 0 auto;
  padding: 40px 0 120px;
}

.media-card {
  display: flex;
  align-items: center;
  margin-bottom: 80px;
}

.media-card:last-child {
  margin-bottom: 0;
}

.media-card__image {
  width: 350px;
  min-width: 350px;
  height: 240px;
  overflow: hidden;
  border-radius: 4px;
}

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

.media-card__content {
  flex: 1;
  min-height: 240px;
  min-width: 0;
  margin-left: 60px;
  padding-right: 60px;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}

.media-card__content h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
}

.media-card__content h2 a:hover,
.media-card__more:hover {
  color: #e1251b;
}

.media-card__summary {
  margin: 0;
  color: #888;
  font-size: 16px;
  line-height: 1.7;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.media-card__more {
  margin-top: auto;
  color: #e1251b;
  font-size: 14px;
}

.media-card__date {
  width: 300px;
  margin-left: 60px;
  display: flex;
  align-items: center;
  color: #222;
}

.media-card__day {
  font-size: 60px;
  line-height: 1;
  font-weight: 700;
}

.media-card__meta {
  margin-left: 6px;
  color: #888;
  font-size: 22px;
  line-height: 1.12;
}

.media-card__year,
.media-card__month {
  display: block;
}

.media-mobile-title {
  display: none;
}

/* Preserve the image / text / date design without squeezing long desktop titles. */
@media (min-width: 768px) and (max-width: 1599px) {
  html.site-device--desktop .media-card__image {
    width: clamp(220px, 24vw, 320px);
    min-width: 0;
    flex: 0 0 clamp(220px, 24vw, 320px);
    height: auto;
    aspect-ratio: 35 / 24;
  }
  html.site-device--desktop .media-card__content {
    margin-left: clamp(16px, 2vw, 32px);
    padding-right: clamp(16px, 2vw, 32px);
    min-height: clamp(160px, 16.46vw, 220px);
  }
  html.site-device--desktop .media-card__date {
    width: clamp(112px, 12vw, 160px);
    flex: 0 0 clamp(112px, 12vw, 160px);
    margin-left: clamp(16px, 2vw, 32px);
  }
  html.site-device--desktop .media-card__day {
    font-size: clamp(40px, 4.4vw, 60px);
  }
  html.site-device--desktop .media-card__meta {
    font-size: clamp(16px, 1.6vw, 22px);
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  html.site-device--desktop .media-list {
    width: calc(100% - 64px);
  }
}

@media (min-width: 1920px) {
  .media-hero {
    height: 400px;
  }
}

/* 官方动态移动端 */
html.site-device--mobile .media-hero {
  position: relative;
  width: 100%;
  height: 396px;
  background: url('/public/index/images/updates-backdrop-touch.jpg') center center/cover no-repeat;
}
html.site-device--mobile .media-page {
  padding-top: 52px;
}

html.site-device--mobile .media-hero {
  height: 170px;
  background-position: center top;
}

html.site-device--mobile .media-hero__panel {
  width: 50%;
  min-height: 74px;
  padding: 10px 18px 12px;
  text-align: left;
  background: linear-gradient(-90deg, rgba(216, 36, 55, 0) 0%, #d82437 100%);
}

html.site-device--mobile .media-hero__en {
  font-size: 10px;
  letter-spacing: 3px;
  word-spacing: 0;
}

html.site-device--mobile .media-hero__title {
  font-size: 28px;
  line-height: 1.25;
}

html.site-device--mobile .media-mobile-title {
  display: flex;
  align-items: center;
  padding: 18px 18px 4px;
  color: #010101;
  font-size: 14px;
  font-weight: 700;
}

html.site-device--mobile .media-mobile-title .iconfont {
  margin-right: 6px;
  color: #e1251b;
  font-size: 16px;
}

html.site-device--mobile .media-list {
  width: 100%;
  padding: 0 18px 18px;
}

html.site-device--mobile .media-card {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

html.site-device--mobile .media-card:last-child {
  border-bottom: 0;
}

html.site-device--mobile .media-card__image {
  display: none;
}

html.site-device--mobile .media-card__date {
  order: 1;
  width: 76px;
  min-width: 76px;
  margin: 0;
}

html.site-device--mobile .media-card__day {
  color: #e1251b;
  font-size: 27px;
}

html.site-device--mobile .media-card__meta {
  margin-left: 4px;
  color: #111;
  font-size: 12px;
  line-height: 1.05;
}

html.site-device--mobile .media-card__content {
  order: 2;
  flex: 1 1 0%;
  min-width: 0;
  max-width: calc(100% - 92px);
  min-height: 80px;
  margin-left: 16px;
  padding: 0 0 0 13px;
  border-left: 1px solid #ddd;
  border-right: 0;
}

html.site-device--mobile .media-card__content h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
}

html.site-device--mobile .media-card__content h2 a {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.site-device--mobile .media-card__summary {
  margin-top: 7px;
  color: #888;
  font-size: 12px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
}

html.site-device--mobile .media-card__more {
  display: none;
}

/* 后台文章调用沿用原卡片尺寸；新增样式仅作用于动态页。 */
.media-page .media-pages:empty { display: none; }
.media-page .media-pages { margin-top: 48px; text-align: center; }
.media-page .media-pages .pagination {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin: 0; padding: 0; list-style: none;
}
.media-page .media-pages .pagination > li { margin: 0; padding: 0; list-style: none; }
.media-page .media-pages a,
.media-page .media-pages .pagination > li > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; min-height: 38px; padding: 6px 12px;
  border: 1px solid #ddd; border-radius: 4px; color: #555; background: #fff;
  font-size: 14px; line-height: 1.4;
}
.media-page .media-pages a:hover,
.media-page .media-pages .active > span { color: #fff; background: #e1251b; border-color: #e1251b; }
.media-page .media-pages .disabled > span { color: #aaa; background: #f8f8f8; }
.media-page .media-pages a:focus-visible,
.media-news-detail a:focus-visible { outline: 2px solid #e1251b; outline-offset: 3px; }
.media-news-detail {
  width: calc(100% - 320px); max-width: 1590px;
  margin: 0 auto; padding: 40px 0 120px;
}
.media-news-detail__title { margin: 0 0 18px; color: #222; font-size: 28px; line-height: 1.45; overflow-wrap: anywhere; }
.media-news-detail__time { margin-bottom: 36px; color: #888; font-size: 14px; }
.media-news-detail__content { color: #444; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.media-news-detail__content p,
.media-news-detail__content ul,
.media-news-detail__content ol { margin: 0 0 18px; }
.media-news-detail__content img,
.media-news-detail__content video { max-width: 100%; height: auto; }
.media-news-detail__content table { display: block; max-width: 100%; overflow-x: auto; }
.media-news-detail__content a,
.media-news-detail__nav a,
.media-news-detail__back { color: #e1251b; }
.media-news-detail__content a { text-decoration: underline; }
.media-news-detail__nav { margin-top: 40px; padding-top: 22px; border-top: 1px solid #eee; font-size: 15px; overflow-wrap: anywhere; }
.media-news-detail__nav p { margin: 0 0 12px; }
.media-news-detail__back { display: inline-block; margin-top: 16px; font-size: 14px; }
html.site-device--mobile .media-page .media-pages { margin-top: 20px; }
html.site-device--mobile .media-news-detail { width: 100%; padding: 28px 18px 40px; }
html.site-device--mobile .media-news-detail__title { font-size: 22px; }
html.site-device--mobile .media-news-detail__time { margin-bottom: 24px; font-size: 13px; }
html.site-device--mobile .media-news-detail__content { font-size: 15px; }
