/* dzcm 国家级教学成果申报展示 - 红色主题 */
:root {
  /* 柔和红色（主色） */
  --red-primary: #ff1940;
  --red-dark: #cd8693;
  --red-light: #edb3bd;
  --red-accent: #d693a0;
  --red-soft: #fdf5f6;
  --red-hover: #d3808e;

  --text-dark: #333;
  --text-muted: #666;
  --border: #e8e8e8;
  --bg-page: #f5f5f5;
  --white: #fff;
  --pattern-red: url("/dzcm/imgs/pattern-red.png");
  --footer-campus: url("/dzcm/imgs/footer-campus.png");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "SimHei", sans-serif;
  color: var(--text-dark);
  background: var(--bg-page);
  line-height: 1.6;
  min-width: 1200px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--red-primary);
}

/* ========== 顶部 Header ========== */
.site-header {
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.site-header::before,
.site-header::after {
  display: none;
}

.header-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--white);
  border-bottom: 1px solid #ececec;
}

.header-brand {
  flex: 1;
  min-width: 0;
}

.school-logo-img {
  height: 45px;
  width: auto;
  max-width: 520px;
  display: block;
}

.header-site-link {
  font-size: 21px;
  font-weight: bold;
  color: #df092f;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
  user-select: none;
}

.header-banner {
  background-color: #c51031;
  background-image: var(--pattern-red);
  background-repeat: repeat;
  background-size: 120px 120px;
  padding: 0 24px;
  height: 125px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.header-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

.header-banner h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--white);
  font-size: 30px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1.5;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.25),
    0 3px 6px rgba(0, 0, 0, 0.35),
    0 6px 12px rgba(0, 0, 0, 0.2);
}

/* ========== 导航栏 ========== */
.site-nav {
  background: var(--white);
  border-bottom: 2px solid #EA1E20;
  box-shadow: 0 2px 8px rgba(224, 142, 156, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}

.nav-item {
  flex: 1;
  text-align: center;
  padding: 14px 4px;
  font-size: 14px;
  color: var(--text-dark);
  border-right: 1px solid var(--border);
  position: relative;
  transition: all 0.25s;
}

.nav-item:last-child {
  border-right: none;
}

.nav-item:hover,
.nav-item.active {
  background: #EA1E20;
  color: var(--white);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--bg-page);
}

/* ========== 主内容区 ========== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 0 48px;
}

/* 区块标题 - 大气版 */
.section-block {
  background: var(--white);
  margin-bottom: 28px;
  border: 1px solid #ececec;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border-radius: 2px;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
}

.section-head h3 {
  font-size: 18px;
  color: var(--red-primary);
  font-weight: bold;
  letter-spacing: 1px;
}

.section-head .more {
  font-size: 14px;
  color: var(--red-primary);
  font-weight: normal;
}

.section-head .more:hover {
  color: var(--red-dark);
}

.section-body {
  padding: 20px;
}

.section-body-grid {
  padding: 24px 28px 28px;
  background: var(--white);
}

/* 成果简介 + 成果总结报告 双栏卡片 */
.intro-summary-row {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: stretch;
}

.intro-summary-row .panel-card {
  min-width: 0;
}

.panel-card {
  background: var(--white);
  border: 1px solid #ececec;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-intro {
  flex: 1.65;
}

.panel-video {
  flex: 1;
}

.panel-body-video {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.featured-video-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 220px;
}

.featured-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 2px;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #000;
}

.featured-video:not(.is-playing):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.featured-video-player {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #000;
  object-fit: contain;
  vertical-align: top;
}

.featured-video.is-playing .featured-video-player {
  display: block;
}

.featured-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.featured-video-poster:focus {
  outline: 2px solid rgba(255, 0, 42, 0.45);
  outline-offset: -2px;
}

.featured-video.is-playing .featured-video-poster {
  display: none;
}

.featured-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-light) 100%);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  transition: transform 0.4s;
}

.featured-video:not(.is-playing):hover .featured-video-bg {
  transform: scale(1.05);
}

.featured-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.08) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.featured-video-play {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
  padding: 0;
}

.featured-video-play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.featured-video-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  line-height: 1.5;
  background: linear-gradient(to top, rgba(205, 134, 147, 0.75) 0%, transparent 100%);
  pointer-events: none;
}

.panel-summary {
  flex: 1;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #fafafa;
  border-bottom: 1px solid #e8e8e8;
}

.panel-head h3 {
  font-size: 18px;
  font-weight: bold;
  color: #ff002a;
  letter-spacing: 1px;
}

.panel-head .more {
  font-size: 14px;
  color: var(--red-primary);
}

.panel-head .more:hover {
  color: var(--red-dark);
}

.panel-body {
  padding: 22px 24px 26px;
  flex: 1;
}

.panel-body-list {
  padding: 10px 12px 12px;
}

.intro-text {
  font-size: 14px;
  color: var(--text-dark);
  text-align: justify;
  line-height: 2;
  text-indent: 2em;
}

/* 成果总结报告列表 */
.summary-list {
  list-style: none;
}

.summary-list li {
  margin-bottom: 6px;
}

.summary-list li:last-child {
  margin-bottom: 0;
}

.summary-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f5f6f8;
  transition: background 0.2s;
  min-width: 0;
  overflow: hidden;
}

.summary-list a:hover {
  background: #ececec;
}

.summary-icon {
  width: 36px;
  height: 36px;
  background: var(--red-primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon svg {
  width: 20px;
  height: 20px;
}

.summary-text {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 侧边列表（子页面复用） */
.side-list {
  list-style: none;
}

.side-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.side-list li:last-child {
  border-bottom: none;
}

.side-list .icon {
  width: 28px;
  height: 28px;
  background: var(--red-primary);
  color: var(--white);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* 双栏布局（其他页面复用） */
.two-col {
  display: flex;
  gap: 20px;
}

.col-intro {
  flex: 1.4;
}

.col-side {
  flex: 1;
  border-left: 1px dashed var(--border);
  padding-left: 20px;
}

/* 四列资源卡片网格（参考设计稿） */
.resource-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 56px;
  padding: 16px 14px 16px 0;
  background: #f5f6f8;
  border-left: 5px solid var(--red-primary);
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  transition: background 0.2s ease;
  box-sizing: border-box;
  overflow: hidden;
}

.resource-card-text {
  flex: 1;
  min-width: 0;
  padding-left: 18px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-card:hover {
  background: #ececec;
  color: #333;
}

.resource-card-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
  background: #f9f9f9;
  border: 1px dashed var(--border);
}

/* 旧版链接网格（兼容） */
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.link-grid a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px dashed var(--border);
  border-right: 1px dashed var(--border);
  transition: background 0.2s;
}

.link-grid a:nth-child(4n) {
  border-right: none;
}

.link-grid a:hover {
  background: var(--red-soft);
  color: var(--red-primary);
}

.link-grid a::before {
  content: "";
  width: 4px;
  height: 14px;
  background: var(--red-primary);
  margin-right: 10px;
  flex-shrink: 0;
}

/* 成果应用成效 - 图片卡片 */
.result-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 4px 0;
}

.result-card {
  position: relative;
  height: 168px;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  display: block;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

a.result-card:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.summary-empty,
.result-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.result-bg {
  width: 100%;
  height: 100%;
  transition: transform 0.4s;
}

.result-card:hover .result-bg {
  transform: scale(1.08);
}

.result-bg-1 { background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-light) 100%); }
.result-bg-2 { background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-light) 100%); }
.result-bg-3 { background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-light) 100%); }
.result-bg-4 { background: linear-gradient(135deg, var(--red-accent) 0%, var(--red-light) 100%); }

.result-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(205, 134, 147, 0.68) 0%, rgba(224, 142, 156, 0.32) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.result-card .overlay span {
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  line-height: 1.5;
}

/* 封面 Hero 区域（首页顶部特色块） */
.hero-cover {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-primary) 85%, var(--red-light) 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 60px;
}

.hero-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='1'/%3E%3Ccircle cx='50' cy='50' r='28' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 100px 100px;
}

.hero-content {
  position: relative;
  text-align: right;
  color: var(--white);
  max-width: 680px;
}

.hero-content .year-tag {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.hero-content .subtitle {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.hero-content .main-title {
  font-size: 26px;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 16px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hero-content .attach-tag {
  display: inline-block;
  padding: 6px 20px;
  background: var(--white);
  color: var(--red-primary);
  font-size: 14px;
  font-weight: bold;
}

.hero-meta {
  margin-top: 20px;
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.8;
}

/* ========== 页脚 ========== */
.site-footer {
  background-color: #c62828;
  background-image: var(--pattern-red);
  background-repeat: repeat;
  background-size: 120px 120px;
  position: relative;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.95);
  padding: 18px 24px 26px;
  text-align: center;
  font-size: 13px;
  line-height: 2;
}

/* 整页轻微暗角，文字区更清晰 */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.08) 45%,
    rgba(198, 40, 40, 0.35) 100%
  );
  pointer-events: none;
}

.site-footer::after {
  display: none;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* 校园线稿：置于文字上方独立装饰带，裁剪中间天际线，不进入文字区 */
.footer-campus {
  height: 78px;
  max-width: 1060px;
  margin: 0 auto 16px;
  background: var(--footer-campus) center 40% / cover no-repeat;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.85) 22%,
    rgba(0, 0, 0, 0.85) 78%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.85) 22%,
    rgba(0, 0, 0, 0.85) 78%,
    transparent 100%
  );
}

.footer-inner p {
  position: relative;
  padding: 6px 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* 锚点偏移 */
section[id] {
  scroll-margin-top: 56px;
}

@media (max-width: 992px) {
  .resource-card-grid,
  .result-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 16px 8px 32px;
  }

  .intro-summary-row {
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 16px;
  }

  .intro-summary-row .panel-video,
  .intro-summary-row .panel-intro {
    display: flex;
    flex-direction: column;
    min-height: 300px;
  }

  .intro-summary-row .panel-video {
    flex: 1;
  }

  .intro-summary-row .panel-intro {
    flex: 1.65;
  }

  .intro-summary-row .panel-head {
    padding: 10px 8px;
    min-height: 38px;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  .intro-summary-row .panel-head h3 {
    font-size: 13px;
    letter-spacing: 0;
    line-height: 1.3;
  }

  .intro-summary-row .panel-head .more {
    font-size: 12px;
    white-space: nowrap;
  }

  .intro-summary-row .panel-body,
  .intro-summary-row .panel-body-video {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 252px;
    padding: 8px;
  }

  .intro-summary-row .intro-text {
    flex: 1;
    font-size: 11px;
    line-height: 1.6;
    text-indent: 1.5em;
    margin: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .intro-summary-row .featured-video-wrap {
    flex: 1;
    min-height: 236px;
    height: 100%;
    padding-top: 0;
  }

  .intro-summary-row .featured-video,
  .intro-summary-row .featured-video-player {
    min-height: 0;
  }

  .intro-summary-row .featured-video:not(.is-playing):hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  .intro-summary-row .featured-video:not(.is-playing):hover .featured-video-bg {
    transform: none;
  }

  .intro-summary-row .featured-video-play {
    width: 36px;
    height: 36px;
  }

  .intro-summary-row .featured-video-play svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
  }

  .intro-summary-row .featured-video-title {
    padding: 8px 6px;
    font-size: 11px;
  }

  .intro-summary-row .featured-video-overlay {
    padding: 8px;
  }

  .resource-card-grid,
  .result-cards {
    grid-template-columns: 1fr;
  }

  .section-head,
  .panel-head {
    padding: 14px 18px;
  }

  .section-body-grid {
    padding: 18px;
  }

  /* 覆盖上方通用 panel-head，保证双栏标题区等高 */
  .intro-summary-row .panel-head {
    padding: 10px 8px;
    min-height: 38px;
  }
}
