/* ============================================================
 * 南京市雨花台区人民政府 · 区政府领导细览页
 * 内容区最大宽度 1300px；左栏 ≤280px，右栏 ≤940px，响应式自适应
 * 手写原生 CSS，无任何框架
 * 配色：
 *   主蓝 #2a5caa  深蓝 #1d3f77  高亮蓝 #3b82d6
 *   侧栏选中底 #e9f1fb
 *   正文 #333 / 次要 #666 / 日期 #999 / 分割线 #e5e5e5
 * ============================================================ */

:root {
  --primary: rgba(50, 93, 146, 1);
  --deep: #1d3f77;
  --accent: #3b82d6;
  --side-bg: #e9f1fb;
  --text: #333333;
  --sub: #666666;
  --date: #999999;
  --line: #e5e5e5;
  --container: 1300px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* 防横向溢出保险 */
html,
body {
  overflow-x: hidden;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* img {
  border: 0;
  display: block;
} */

button,
input {
  font-family: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

/* ===== 图片占位盒：后期补图时直接给内部 img 填 src 即可 ===== */
.img-slot {
}

.img-slot>img {
  width: 100%;
  height: 100%;
}

.img-slot.skin-transparent {
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* ===== 面包屑 ===== */
.crumb {
  padding: 14px 0;
  font-size: 16px;
  color: #8a8f99;
  display: flex;
  align-items: center;
}

.crumb a {
  color: var(--primary);
  margin: 0 8px;
}

.crumb a:hover {
  text-decoration: underline;
}

.crumb .sep {
  margin: 0 8px;
  color: #b8bdc6;
}

.crumb svg {
  vertical-align: -2px;
  margin-right: 4px;
}

/* ===== 信息公开属性表 ===== */
.info-table {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 28px;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid #e0e6ef;
  background: #fff;
  font-size: 15px;
  color: var(--text);
}

.info-table th,
.info-table td {
  border: 1px solid #e0e6ef;
  padding: 10px 16px;
  line-height: 1.8;
  vertical-align: top;
  word-break: break-word;
}

.info-table .info-label {
  width: 132px;
  background: #f3f7fc;
  color: #7a8494;
  font-weight: normal;
  text-align: right;
  white-space: nowrap;
}

.info-table tbody tr:hover td {
  background: #fafcff;
}

.info-table td a {
  color: var(--primary);
}

.info-table td a:hover {
  text-decoration: underline;
}

/* ===== 主体两栏 ===== */
.page-main {
  padding-bottom: 40px;
}

.layout {
  display: flex;
  gap: 34px;
  justify-content: space-between;
  align-items: flex-start;
}

/* 左栏：≤280px（领导名单） */
.side-col {
  flex: 0 1 280px;
  width: 280px;
  max-width: 280px;
  min-width: 220px;
  border-right: 1px solid var(--primary);
}

.side-item {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 80px;
  padding: 0 22px;
  font-size: 22px;
  color: #333;
  border-right: 4px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background .2s, color .2s;
}

.side-item:hover {
  background: #f5f8fd;
  color: var(--primary);
}

.side-item.active {
  background: linear-gradient(90deg, #e0ecff 0%, #ffffff 100%);
  border-right-color: var(--accent);
  color: var(--primary);
  font-weight: 600;
}

.side-item .p-icon {
  width: 16px;
  height: 16px;
  display: none;
  position: absolute;
  top: 50%;
  left: 50px;
  transform: translate(0, -50%);
}

.side-item.active .p-icon {
  display: block;
}

/* 右栏：≤940px（领导介绍） */
.main-col {
  flex: 1 1 auto;
  max-width: 940px;
  min-width: 0;
}

.leader-panel {
  margin: 0 auto;
  padding-top: 8px;
}

.leader-photo {
  width: 150px;
  height: 195px;
  margin: 0 auto;
}

.leader-name {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  color: #222;
  margin-top: 18px;
  letter-spacing: 2px;
}

.leader-title {
  text-align: center;
  font-size: 18px;
  color: #333;
  margin-top: 10px;
  letter-spacing: 1px;
}

.leader-bio {
  margin-top: 32px;
}

.leader-bio p {
  font-size: 18px;
  color: #333;
  line-height: 2;
  margin-bottom: 12px;
  text-align: justify;
}

.leader-empty {
  margin-top: 34px;
  text-align: center;
  color: #999;
  font-size: 16px;
}

/* ===== 响应式：窄屏堆叠，不写死宽度 ===== */
/* 与首页保持一致：1360 以下留 16px 边距，640 以下收紧到 12px */
@media (max-width:1360px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width:980px) {

  /* stretch：纵向排列时两栏宽度都占满容器 */
  .layout {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  /* 列方向下 flex-basis 作用于高度，必须复位为 auto */
  .side-col {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    min-width: 0;
    /* 横向标签条不需要桌面的右侧竖线 */
    border-right: 0;
  }

  /* 领导名单变为横向可滑动标签条 */
  .side-menu {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid #eee;
  }

  .side-menu::-webkit-scrollbar {
    display: none;
  }

  .side-item {
    height: 42px;
    border-right: 0;
    border-bottom: 3px solid transparent;
    padding: 0 14px;
    font-size: 17px;
    white-space: nowrap;
  }

  .side-item.active {
    border-bottom-color: var(--accent);
  }

  /* 整格可点，手机上不必精准点中文字 */
  .side-item > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
  }

  /* 横向标签条空间有限，选中图标不再挤占文字 */
  .side-item.active .s-icon,
  .side-item.active .p-icon {
    display: none;
  }

  .main-col {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
  }
}

@media (max-width:640px) {

  .leader-panel {
    max-width: none;
  }

  .leader-photo {
    width: 132px;
    height: 172px;
  }

  .leader-name {
    font-size: 24px;
  }

  .leader-title {
    font-size: 16px;
  }

  .leader-bio p {
    font-size: 16px;
    line-height: 1.95;
  }
}

/* ============================================================
 * 正文细览页（无左右栏目，单栏展示）
 * ============================================================ */
.article {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.article-title {
  font-size: 30px;
  /* font-weight: 600; */
  line-height: 1.45;
  color: #444;
  text-align: center;
  letter-spacing: 1px;
  margin: 8px 0 20px;
}

/* 稿件信息行：发布时间 / 来源 / 浏览次数 / 视力保护色 */
.article-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 26px;
  font-size: 16px;
  color: #8a8f99;
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.article-info a {
  color: var(--primary);
}

.color-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.color-picker a {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 2px;
  cursor: pointer;
  transition: transform .2s ease;
}

.color-picker a:hover {
  transform: scale(1.15);
}

.color1 { background: #e6ffff; }
.color2 { background: #ccffff; }
.color3 { background: #ffffcc; }
.color4 { background: #ffccff; }
.color5 { background: #99ccff; }
.color6 { background: #eeeeee; }

/* 正文 */
.article-content {
  font-size: 18px;
  line-height: 2;
  color: var(--text);
  word-break: break-word;
}

.article-content p {
  margin-bottom: 14px;
  text-indent: 2em;
  text-align: justify;
}

.article-content img {
  max-width: 100%;
  height: auto;
  margin: 12px auto;
}

.article-content table {
  max-width: 100%;
  margin: 16px auto;
  border-collapse: collapse;
}

.article-content td,
.article-content th {
  border: 1px solid #dcdcdc;
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1.8;
}

.article-content a {
  color: var(--primary);
}

.article-content a:hover {
  text-decoration: underline;
}

/* 视频 */
.entry-sp {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.entry-sp iframe {
  width: 720px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-bottom: 24px;
}

/* 附件 */
.article-attach {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 16px;
  line-height: 2;
  color: var(--text);
}

.attach-label {
  color: var(--primary);
  font-weight: 600;
}

.article-attach a {
  color: var(--primary);
}

.article-attach a:hover {
  text-decoration: underline;
}

/* 分享 */
.article-share {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  min-height: 20px;
}

@media (max-width:980px) {
  .article {
    max-width: none;
  }

  .article-title {
    font-size: 26px;
  }

  .article-content {
    font-size: 17px;
  }
}

@media (max-width:640px) {

  /* 手机边距与首页保持一致 */
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .crumb {
    padding: 10px 0;
    font-size: 13px;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .crumb a,
  .crumb .sep {
    margin: 0 4px;
  }

  /* 属性表改为竖排卡片，避免四列挤压 */
  .info-table {
    display: block;
    border: 0;
    margin-bottom: 18px;
  }

  .info-table tbody,
  .info-table tr {
    display: block;
  }

  .info-table tr {
    border-bottom: 1px solid var(--line);
  }

  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
    border: 0;
    padding: 0 12px;
  }

  .info-table .info-label {
    width: auto;
    padding: 6px 12px 2px;
    background: #f7fafd;
    color: #8a8f99;
    font-size: 13px;
    text-align: left;
  }

  .info-table td {
    padding: 2px 12px 10px;
    font-size: 14px;
    line-height: 1.7;
  }

  .article {
    padding-bottom: 8px;
  }

  .article-title {
    font-size: 20px;
    line-height: 1.5;
    margin: 6px 0 16px;
  }

  .article-info {
    font-size: 13px;
    gap: 6px 12px;
    padding-bottom: 14px;
    margin-bottom: 20px;
  }

  .color-picker a {
    width: 14px;
    height: 14px;
  }

  .article-content {
    font-size: 16px;
    line-height: 1.95;
  }

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

  /* 宽表格在手机上允许横向滑动，别把正文撑破 */
  .article-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-content td,
  .article-content th {
    font-size: 14px;
    padding: 6px 8px;
  }

  .article-attach {
    font-size: 14px;
    line-height: 1.9;
    margin-top: 22px;
    padding-top: 14px;
  }

  .article-share {
    margin-top: 20px;
    padding-top: 14px;
  }
}
