/*!
 * 东阳中心官网 · 「东阳木雕大师」页专属样式
 * 与 css/style.css 分离，避免与主样式的改动相互干扰。
 * 版本：v20260924a
 */

/* ── 返回上一级：面包屑 ─────────────────────────────────── */
.crumb-bar {
  background: #faf8f5;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.crumb-bar .container {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.crumb-bar a {
  color: #6b6259;
  text-decoration: none;
  transition: color .2s;
}

.crumb-bar a:hover { color: var(--pku-red); }

.crumb-bar .sep { color: #c3bab0; }

.crumb-bar .cur { color: var(--pku-red); font-weight: 600; }

/* ── 大师卡片 ───────────────────────────────────────────── */
/* 大师卡同样用瀑布流 —— 卡片内容量差异极大（0~4 张作品图），
   grid 拉等高的结果是内容少的卡片出现大片空白 */
.ms-grid {
  column-count: 2;
  column-gap: 24px;
}

.ms-card {
  break-inside: avoid;
  page-break-inside: avoid;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 30px 26px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
  margin-bottom: 24px;
}

.ms-card:hover {
  box-shadow: 0 12px 34px rgba(74, 4, 7, .09);
  transform: translateY(-2px);
}

.ms-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--pku-red);
  opacity: .85;
}

.ms-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.ms-seal {
  flex: 0 0 58px;
  width: 58px; height: 58px;
  border-radius: 10px;
  background: var(--pku-red-light);
  color: var(--pku-red);
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 人物头像（中国工艺美术大师博物馆大师库的官方肖像照） */
.ms-avatar {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  background: #f2efe9;
  border: 2px solid #efe7de;
  box-shadow: 0 4px 14px rgba(74, 4, 7, .10);
}

.ms-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 5px;
}

.ms-life {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: .3px;
}

.ms-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.ms-badge {
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 4px;
  background: #f4f1ec;
  color: #6b6259;
  border: 1px solid #e6e0d8;
  white-space: nowrap;
}

.ms-badge.b-red { background: var(--pku-red-light); color: var(--pku-red); border-color: #eccfcf; }
.ms-badge.b-gold { background: #fdf6e6; color: #8a6a1f; border-color: #eddfbe; }
.ms-badge.b-jade { background: #eef6f1; color: #1f6b4a; border-color: #d5e8dd; }

/* 生平：固定 4 行高度 —— 短的用 min-height 撑齐、长的用 max-height 截断，
   这样同组卡片高度完全一致；超长的给「展开全文」 */
.ms-bio {
  font-size: 13.5px;
  line-height: 1.88;
  color: #4a4a4a;
  margin: 0 0 8px;
  text-align: justify;
  min-height: 102px;   /* 4 行 */
  max-height: 102px;
  overflow: hidden;
}

.ms-bio.open {
  max-height: none;
}

.ms-works {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.ms-works-t {
  font-size: 12px;
  letter-spacing: 1.2px;
  color: var(--pku-red);
  font-weight: 700;
  margin-bottom: 9px;
}

.ms-works ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ms-works li {
  font-size: 13px;
  line-height: 1.9;
  color: #55504a;
  padding-left: 15px;
  position: relative;
}

.ms-works li::before {
  content: '';
  position: absolute;
  left: 2px; top: 11px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--pku-red);
  opacity: .55;
}

.ms-works li em {
  font-style: normal;
  color: #9a938a;
  font-size: 12px;
}

/* ── 大师卡片里的作品图 ─────────────────────────────────── */
/* 作品缩略图：**固定像素尺寸**（240×240），不随容器宽度变化 ——
   此前用 grid 1fr，导致大师卡（2 列）里 244px、名家卡（3 列）里 333px，
   同一页出现两种尺寸，是"比例/尺寸不一致"的根源。 */
.ms-pics,
.mn-pics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.ms-pic {
  flex: 0 0 240px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.ms-pic img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  object-position: center;
  background: #f2efe9;
  cursor: zoom-in;
  transition: transform .35s ease;
}

.ms-pic:hover img { transform: scale(1.04); }

.ms-pic figcaption {
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.8px;
  line-height: 1.6;
  color: #6d665d;
  padding: 8px 10px 9px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.ms-pic figcaption b {
  color: var(--ink);
  font-weight: 600;
}

/* ── 近代名家（小卡） ───────────────────────────────────── */
/* 名家卡用瀑布流（多列）而非 grid —— grid 会把同排卡片拉成等高，
   内容少的卡片下半部分出现大片空白，这是"看着乱"的主因 */
.mn-grid {
  column-count: 3;
  column-gap: 16px;
}

.mn-card {
  break-inside: avoid;
  page-break-inside: avoid;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 18px 18px;
  border-top: 3px solid #d9cfc2;
  margin-bottom: 16px;
}


/* 名家卡片里的肖像（有则显示） */
.mn-avatar {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 2px solid #efe7de;
  background: #f2efe9;
  margin-right: 10px;
  vertical-align: middle;
}

.mn-card h4 {
  display: flex;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 4px;
}

.mn-card .alias {
  font-size: 11.5px;
  color: var(--pku-red);
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.mn-card p {
  font-size: 12.6px;
  line-height: 1.85;
  color: #5c564e;
  margin: 0;
}

/* 名家卡简介：固定 3 行高度，超长可展开 */
.mn-card p.mn-desc {
  min-height: 70px;   /* 3 行 */
  max-height: 70px;
  overflow: hidden;
}

.mn-card p.mn-desc.open { max-height: none; }

/* 名家卡称号行也固定一行高，避免长短不一 */
.mn-card p.mn-title {
  min-height: 23px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ── 荣誉体系表 ─────────────────────────────────────────── */
.honor-tbl {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13.4px;
}

.honor-tbl th,
.honor-tbl td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.honor-tbl thead th {
  background: #faf7f3;
  color: var(--ink);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 1px;
}

.honor-tbl tbody tr:last-child td { border-bottom: none; }

.honor-tbl td:first-child { color: var(--pku-red); font-weight: 700; white-space: nowrap; }
.honor-tbl td:nth-child(2) { white-space: nowrap; }
.honor-tbl td:last-child { line-height: 1.85; color: #5c564e; }

/* 无作品图时的占位说明，避免卡片留大片空白 */
.ms-nopic {
  margin-top: 16px;
  border: 1px dashed #ded6ca;
  border-radius: 8px;
  padding: 22px 18px;
  text-align: center;
  font-size: 12.6px;
  line-height: 1.9;
  color: #8d857a;
  background: #fbf9f6;
}

.ms-nopic b { color: #6b6355; }

/* ── 口径提示条 ─────────────────────────────────────────── */
.ms-note {
  background: #faf7f3;
  border-left: 3px solid #d9cfc2;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.9;
  color: #5c564e;
  margin-top: 26px;
}

.ms-note b { color: var(--ink); }

/* ── 图片放大层 ─────────────────────────────────────────── */
.mw-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 18, .88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 30px;
  cursor: zoom-out;
}

.mw-lightbox.on { display: flex; }

.mw-lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.mw-lightbox .cap {
  position: absolute;
  bottom: 24px; left: 0; right: 0;
  text-align: center;
  color: #f0ece6;
  font-size: 13px;
  letter-spacing: .5px;
}

/* ── 窄屏 ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ms-grid { column-count: 1; }
  .mn-grid { column-count: 2; }
}

@media (max-width: 720px) {
  .ms-card { padding: 24px 20px 22px; }
  .ms-badges { margin-left: 0; }
  .mn-grid { column-count: 1; }
  .honor-tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .honor-tbl th, .honor-tbl td { white-space: nowrap; }
}


/* 代表作品：默认只列 4 条，其余隐藏，可展开 */
.ms-works li.hid { display: none; }
.ms-works ul.open li.hid { display: list-item; }

/* 「展开全文 / 还有 N 项」按钮 */
.ms-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--pku-red);
  background: #fff;
  border: 1px solid #eccfcf;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: inherit;
}

.ms-more:hover {
  background: var(--pku-red-light);
}
