/* ==========================================================================
   mrgr.cn - 内页专属样式
   资讯列表页 / 文章详情 / 知识分类 / 教程 / 项目 / 白皮书 / 关于等
   ========================================================================== */

/* ---------- 资讯列表页双栏 ---------- */
.news-page-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.news-page-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-side {
  position: sticky;
  top: 90px;
}

/* ---------- 文章详情 ---------- */
.article-wrap {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.article-head {
  padding: 40px 44px 28px;
  border-bottom: 1px solid var(--line);
}

.article-head h1 {
  font-size: 30px;
  line-height: 1.4;
  margin-bottom: 18px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 13.5px;
  color: var(--muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.article-content {
  padding: 36px 44px 40px;
  font-size: 15.5px;
  line-height: 2;
  color: var(--body);
}

.article-content img {
  border-radius: var(--r-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.article-content p {
  margin-bottom: 22px;
}

.article-content h2 {
  font-size: 22px;
  margin: 34px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--purple);
}

.article-content h3 {
  font-size: 18px;
  margin: 26px 0 12px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 22px 4px;
  padding-left: 22px;
}

.article-content ul li,
.article-content ol li {
  list-style: disc;
  margin-bottom: 10px;
  line-height: 1.9;
}

.article-content ol li {
  list-style: decimal;
}

.article-content blockquote {
  margin: 24px 0;
  padding: 20px 26px;
  border-radius: var(--r-md);
  background: var(--purple-mist);
  border-left: 4px solid var(--purple);
  color: var(--purple-ink);
  font-size: 14.5px;
}

.article-content pre {
  margin: 22px 0;
  padding: 24px 26px;
  border-radius: var(--r-md);
  background: #2D2A3E;
  color: #E5DDF2;
  font-family: "SF Mono", "Consolas", "Monaco", monospace;
  font-size: 13.5px;
  line-height: 1.75;
  overflow-x: auto;
}

.article-content code {
  font-family: "SF Mono", "Consolas", "Monaco", monospace;
  background: var(--cream-2);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13.5px;
  color: var(--pink-deep);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-foot {
  padding: 26px 44px 36px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.article-tags a {
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--purple-mist);
  color: var(--purple-deep);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.article-tags a:hover {
  background: var(--purple-deep);
  color: #fff;
}

/* ---------- 知识分类卡片网格 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.cat-card {
  background: #fff;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
}

.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-soft);
}

.cat-card .cc-img {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.cat-card .cc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cat-card:hover .cc-img img {
  transform: scale(1.08);
}

.cat-card .cc-img .cc-num {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--purple-deep);
  font-size: 14px;
}

.cat-card .cc-body {
  padding: 24px 26px 28px;
}

.cat-card .cc-body h3 {
  font-size: 19px;
  margin-bottom: 9px;
}

.cat-card .cc-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.78;
  margin-bottom: 16px;
}

.cat-card .cc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cat-card .cc-tags span {
  font-size: 11.5px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--purple-mist);
  color: var(--purple-deep);
}

/* ---------- 教程卡片 ---------- */
.tut-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.tut-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.35s ease;
}

.tut-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-soft);
}

.tut-card .tc-top {
  padding: 28px 26px;
  background: linear-gradient(135deg, var(--purple-mist), var(--blue-mist));
  position: relative;
}

.tut-card .tc-lang {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--purple-deep);
  font-weight: 700;
  margin-bottom: 8px;
}

.tut-card .tc-top h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.tut-card .tc-top p {
  font-size: 13px;
  color: var(--body);
}

.tut-card .tc-body {
  padding: 24px 26px;
}

.tut-card .tc-body h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--ink);
}

.tut-card .tc-chapters li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--body);
  border-bottom: 1px dashed var(--line);
}

.tut-card .tc-chapters li:last-child {
  border-bottom: none;
}

.tut-card .tc-chapters li .ch-no {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--purple-mist);
  color: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-en);
  flex-shrink: 0;
}

.tut-card .tc-foot {
  padding: 18px 26px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
}

.tut-card .tc-foot .tc-level {
  font-size: 12px;
  color: var(--muted);
}

.tut-card .tc-foot .tc-link {
  font-size: 13px;
  color: var(--purple-deep);
  font-weight: 600;
}

/* ---------- 问答社区 ---------- */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.qa-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 28px 30px;
  transition: all 0.35s ease;
}

.qa-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-soft);
}

.qa-card .qa-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.qa-card .qa-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}

.qa-card .qa-user {
  flex: 1;
}

.qa-card .qa-user strong {
  font-size: 14.5px;
  color: var(--ink);
  display: block;
}

.qa-card .qa-user span {
  font-size: 12px;
  color: var(--muted);
}

.qa-card .qa-q {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.5;
}

.qa-card .qa-a {
  font-size: 13.5px;
  color: var(--body);
  line-height: 1.8;
  padding: 16px 18px;
  background: var(--cream-2);
  border-radius: var(--r-md);
  border-left: 3px solid var(--purple);
  margin-bottom: 16px;
}

.qa-card .qa-foot {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.qa-card .qa-foot span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ---------- 项目案例 ---------- */
.proj-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.proj-item {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  background: #fff;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.35s ease;
}

.proj-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--purple-soft);
}

.proj-item .pj-media {
  height: 100%;
  min-height: 280px;
  overflow: hidden;
}

.proj-item .pj-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.proj-item:hover .pj-media img {
  transform: scale(1.05);
}

.proj-item .pj-body {
  padding: 36px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.proj-item .pj-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: var(--pink-mist);
  color: var(--pink-deep);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.proj-item .pj-body h3 {
  font-size: 23px;
  margin-bottom: 12px;
}

.proj-item .pj-body p {
  font-size: 14px;
  color: var(--body);
  line-height: 1.85;
  margin-bottom: 20px;
}

.proj-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.proj-stack span {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  background: var(--cream-2);
  color: var(--purple-deep);
  font-weight: 600;
}

/* ---------- 白皮书卡片 ---------- */
.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.paper-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.35s ease;
}

.paper-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-soft);
}

.paper-card .pc-cover {
  height: 220px;
  position: relative;
  overflow: hidden;
}

.paper-card .pc-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.paper-card:hover .pc-cover img {
  transform: scale(1.06);
}

.paper-card .pc-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(45, 42, 62, 0.55) 100%);
}

.paper-card .pc-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--purple-deep);
}

.paper-card .pc-body {
  padding: 24px 26px 28px;
}

.paper-card .pc-body h3 {
  font-size: 18px;
  margin-bottom: 9px;
}

.paper-card .pc-body p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.paper-card .pc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 团队 ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.member-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: center;
  transition: all 0.35s ease;
}

.member-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--purple-soft);
}

.member-card .mc-photo {
  height: 230px;
  overflow: hidden;
}

.member-card .mc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.member-card:hover .mc-photo img {
  transform: scale(1.05);
}

.member-card .mc-body {
  padding: 22px 20px 26px;
}

.member-card .mc-body h4 {
  font-size: 17px;
  margin-bottom: 4px;
}

.member-card .mc-role {
  font-size: 12.5px;
  color: var(--purple-deep);
  font-weight: 600;
  margin-bottom: 10px;
}

.member-card .mc-body p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- 统计数字条 ---------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-band .sb-item strong {
  display: block;
  font-size: 46px;
  font-weight: 800;
  font-family: var(--font-en);
  background: linear-gradient(135deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.stat-band .sb-item span {
  font-size: 14px;
  color: rgba(251, 249, 253, 0.82);
}

/* ---------- 网站地图 ---------- */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.sitemap-block {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 28px 30px;
}

.sitemap-block h3 {
  font-size: 17px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--purple-mist);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sitemap-block h3 .ico {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: var(--purple-mist);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-deep);
}

.sitemap-block ul li {
  margin-bottom: 9px;
}

.sitemap-block ul li a {
  font-size: 13.5px;
  color: var(--body);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.sitemap-block ul li a::before {
  content: "›";
  color: var(--purple);
  font-weight: 700;
}

.sitemap-block ul li a:hover {
  color: var(--purple-deep);
  transform: translateX(4px);
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.notfound .nf-code {
  font-size: 130px;
  font-weight: 800;
  font-family: var(--font-en);
  background: linear-gradient(135deg, var(--purple), var(--pink), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 12px;
}

.notfound h2 {
  font-size: 26px;
  margin-bottom: 14px;
}

.notfound p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ---------- 文档/协议正文 ---------- */
.doc-body {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 44px 50px;
}

.doc-body h2 {
  font-size: 21px;
  margin: 32px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--purple);
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body p {
  font-size: 14.5px;
  color: var(--body);
  line-height: 2;
  margin-bottom: 16px;
}

.doc-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.doc-body ol li {
  list-style: decimal;
  font-size: 14.5px;
  color: var(--body);
  line-height: 2;
  margin-bottom: 8px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .news-page-grid { grid-template-columns: 1fr; }
  .news-side { position: static; }
  .cat-grid,
  .tut-grid,
  .paper-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
  .qa-grid { grid-template-columns: 1fr; }
  .proj-item { grid-template-columns: 1fr; }
  .proj-item .pj-media { min-height: 220px; }
  .stat-band { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 760px) {
  .article-head { padding: 28px 24px 22px; }
  .article-head h1 { font-size: 23px; }
  .article-content { padding: 26px 24px; }
  .article-foot { padding: 22px 24px; }
  .proj-item .pj-body { padding: 28px 24px; }
  .doc-body { padding: 28px 24px; }
}

@media (max-width: 560px) {
  .cat-grid,
  .tut-grid,
  .paper-grid,
  .team-grid,
  .sitemap-grid { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: 1fr; }
}
