/* ========== 北京市第一六六中学（非正式网站） 全站样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "SimSun", "宋体", "NSimSun", serif;
  font-size: 14px;
  color: #333;
  background: #ececec url("") repeat;
  line-height: 1.6;
}
img { border: 0; max-width: 100%; display: block; }
a { color: #333; text-decoration: none; }
a:hover { color: #c7000b; text-decoration: underline; }
ul, ol { list-style: none; }
.wrap { width: 1200px; margin: 0 auto; }
.clearfix::after { content: ""; display: block; clear: both; }

/* ---------- 顶部工具条 ---------- */
.topbar {
  background: #8f0a10;
  color: #f3d9a4;
  font-size: 12px;
  height: 32px;
  line-height: 32px;
}
.topbar .wrap { display: flex; justify-content: space-between; }
.topbar a { color: #f3d9a4; margin-left: 12px; }
.topbar a:hover { color: #fff; }
.topbar .sep { margin: 0 4px; color: #b56a5a; }

/* ---------- 站头 ---------- */
.header {
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(183,14,20,0.06) 100%),
    #fff;
  border-bottom: 3px solid #b70e14;
  padding: 22px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header .logo h1 {
  font-family: "KaiTi", "STKaiti", "楷体", "SimSun", serif;
  font-size: 42px;
  color: #b70e14;
  letter-spacing: 6px;
  font-weight: 700;
  line-height: 1.2;
}
.header .logo h1 span.badge {
  font-family: "SimSun", serif;
  font-size: 13px;
  color: #fff;
  background: #b70e14;
  border-radius: 3px;
  padding: 3px 8px;
  letter-spacing: 2px;
  vertical-align: 12px;
  margin-left: 14px;
}
.header .logo p {
  margin-top: 6px;
  font-size: 12px;
  color: #8a6d3b;
  letter-spacing: 3px;
  font-family: "Times New Roman", "SimSun", serif;
}
.header .search { display: flex; align-items: center; }
.header .search input {
  width: 220px;
  height: 34px;
  border: 2px solid #b70e14;
  border-right: none;
  padding: 0 10px;
  font-family: "SimSun", serif;
  font-size: 13px;
  outline: none;
}
.header .search button {
  height: 34px;
  padding: 0 18px;
  background: #b70e14;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
}
.header .search button:hover { background: #8f0a10; }

/* ---------- 主导航 ---------- */
.nav {
  background: linear-gradient(180deg, #c9161d 0%, #a80d13 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
  position: relative;
  z-index: 20;
}
.nav ul { display: flex; }
.nav li { flex: 1; }
.nav li a {
  display: block;
  text-align: center;
  color: #fff;
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  letter-spacing: 4px;
  padding: 13px 0;
  border-right: 1px solid rgba(255,255,255,.18);
}
.nav li:first-child a { border-left: 1px solid rgba(255,255,255,.18); }
.nav li a:hover { background: #8f0a10; text-decoration: none; }
.nav li.on a { background: #8f0a10; font-weight: bold; }

/* ---------- 公告滚动条 ---------- */
.notice-bar {
  background: #fffbe8;
  border-bottom: 1px solid #e8d9a0;
  height: 38px;
  line-height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.notice-bar .label {
  flex: 0 0 auto;
  background: #b70e14;
  color: #fff;
  font-family: "SimHei", "黑体", sans-serif;
  padding: 0 14px;
  height: 38px;
  line-height: 38px;
  letter-spacing: 2px;
  font-size: 13px;
}
.notice-bar marquee { flex: 1; color: #7a5b00; font-size: 13px; padding-left: 12px; }
.notice-bar marquee a { color: #7a5b00; margin-right: 60px; }
.notice-bar marquee a:hover { color: #c7000b; }

/* ---------- 主体布局 ---------- */
.main { background: #ececec; padding: 14px 0 20px; }

/* ---------- 轮播图 ---------- */
.focus-row { display: flex; gap: 14px; }
.carousel {
  width: 660px;
  height: 380px;
  position: relative;
  overflow: hidden;
  border: 1px solid #ccc;
  background: #000;
  flex: 0 0 auto;
}
.carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease;
}
.carousel .slide.on { opacity: 1; }
.carousel .slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 15px;
  padding: 10px 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.carousel .dots {
  position: absolute;
  right: 12px; bottom: 42px;
  display: flex;
  gap: 6px;
}
.carousel .dots span {
  width: 22px; height: 22px;
  line-height: 22px;
  text-align: center;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
}
.carousel .dots span.on { background: #c7000b; }

/* ---------- 头条新闻 ---------- */
.headline {
  flex: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-top: 3px solid #b70e14;
  padding: 12px 18px;
  height: 380px;
  overflow: hidden;
}
.headline h2 {
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 20px;
  color: #b70e14;
  text-align: center;
  padding: 6px 0 10px;
  border-bottom: 1px dashed #ccc;
  margin-bottom: 10px;
  line-height: 1.5;
}
.headline .sub {
  text-align: center;
  color: #777;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.7;
}
.headline .sub a { color: #b70e14; }

/* ---------- 通用列表 ---------- */
.news-list li {
  border-bottom: 1px dotted #c9c9c9;
  padding: 7px 2px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}
.news-list li .t {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-right: 12px;
  flex: 1;
}
.news-list li .t::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  background: #b70e14;
  margin-right: 8px;
  vertical-align: 2px;
}
.news-list li .d { color: #999; font-size: 12px; flex: 0 0 auto; }
.news-list li.top .t a { color: #b70e14; font-weight: bold; }

/* ---------- 板块标题 ---------- */
.sec-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #b70e14;
  margin-bottom: 10px;
}
.sec-title h3 {
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 17px;
  color: #fff;
  background: #b70e14;
  display: inline-block;
  padding: 6px 16px;
  letter-spacing: 3px;
  font-weight: normal;
}
.sec-title .more { font-size: 12px; color: #999; }
.sec-title .more:hover { color: #c7000b; }

/* ---------- 三栏区 ---------- */
.cols { display: flex; gap: 14px; margin-top: 14px; }
.col { background: #fff; border: 1px solid #ddd; padding: 14px; }
.col-notice { flex: 0 0 340px; }
.col-news { flex: 1; min-width: 0; }
.col-side { flex: 0 0 300px; }

.pic-news {
  display: flex;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
}
.pic-news img { width: 180px; height: 120px; object-fit: cover; border: 1px solid #ddd; padding: 2px; background: #fff; }
.pic-news .txt h4 {
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 6px;
}
.pic-news .txt p { color: #777; font-size: 13px; text-align: justify; }

/* ---------- 侧栏 ---------- */
.side-box { border: 1px solid #ddd; background: #fff; margin-bottom: 14px; }
.side-box .hd {
  background: linear-gradient(180deg,#c9161d,#a80d13);
  color: #fff;
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 15px;
  letter-spacing: 3px;
  padding: 8px 14px;
}
.side-box .bd { padding: 10px 12px; }
.quick-links a {
  display: block;
  background: #f7f3e8;
  border: 1px solid #e4d9b8;
  color: #6d5a1f;
  text-align: center;
  padding: 8px 0;
  margin-bottom: 8px;
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
}
.quick-links a:hover { background: #b70e14; color: #fff; text-decoration: none; border-color: #b70e14; }
.contact-info p { font-size: 13px; color: #555; margin-bottom: 6px; line-height: 1.8; }
.contact-info strong { color: #b70e14; }

/* ---------- 图片新闻行 ---------- */
.pic-row { margin-top: 14px; background: #fff; border: 1px solid #ddd; padding: 14px; }
.pic-row .items { display: flex; gap: 14px; }
.pic-row .item { flex: 1; }
.pic-row .item img { width: 100%; height: 150px; object-fit: cover; border: 1px solid #ddd; padding: 3px; background: #fff; }
.pic-row .item p {
  text-align: center;
  font-size: 13px;
  margin-top: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- 内页通用 ---------- */
.page-head {
  background: linear-gradient(90deg, #b70e14 0%, #d4524b 100%);
  color: #fff;
  padding: 34px 0;
  margin-bottom: 14px;
}
.page-head h2 {
  font-family: "KaiTi", "STKaiti", "楷体", serif;
  font-size: 34px;
  letter-spacing: 8px;
}
.page-head p { font-size: 12px; letter-spacing: 3px; color: #f3d9a4; margin-top: 4px; }
.crumb {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 14px;
  font-size: 13px;
  color: #777;
  margin-bottom: 14px;
}
.crumb a { color: #b70e14; }

.content-card { background: #fff; border: 1px solid #ddd; padding: 26px 30px; }
.article h1 {
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 24px;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 12px;
  color: #222;
}
.article .meta {
  text-align: center;
  color: #999;
  font-size: 12px;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.article .meta span { margin: 0 12px; }
.article .body p {
  text-indent: 2em;
  font-size: 15px;
  line-height: 2;
  margin-bottom: 14px;
  text-align: justify;
  color: #333;
}
.article .body .pic { text-align: center; margin: 18px 0; }
.article .body .pic img { display: inline-block; max-width: 720px; width: 100%; border: 1px solid #ddd; padding: 4px; background: #fff; }
.article .body .pic span { display: block; font-size: 12px; color: #999; margin-top: 6px; text-indent: 0; }
.article .pager {
  border-top: 1px solid #e5e5e5;
  margin-top: 24px;
  padding-top: 14px;
  font-size: 13px;
}
.article .pager p { margin-bottom: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 内页两栏（栏目页） */
.page-cols { display: flex; gap: 14px; }
.page-main { flex: 1; min-width: 0; background: #fff; border: 1px solid #ddd; padding: 20px 24px; }
.page-side { flex: 0 0 300px; }

.page-main h3.block-t {
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 18px;
  color: #b70e14;
  border-left: 5px solid #b70e14;
  padding-left: 10px;
  margin: 18px 0 12px;
  line-height: 1.4;
}
.page-main h3.block-t:first-child { margin-top: 0; }
.page-main p { text-indent: 2em; line-height: 2; margin-bottom: 12px; text-align: justify; font-size: 14.5px; }
.page-main p.noindent { text-indent: 0; }
.page-main table.pub {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 13.5px;
}
.page-main table.pub th, .page-main table.pub td {
  border: 1px solid #cbb;
  padding: 8px 10px;
  text-align: left;
}
.page-main table.pub th {
  background: #f5e9e9;
  color: #7a1216;
  font-family: "SimHei", "黑体", sans-serif;
  font-weight: normal;
}
.page-main .center-pic { text-align: center; margin: 14px 0; }
.page-main .center-pic img { display: inline-block; max-width: 100%; border: 1px solid #ddd; padding: 4px; }
.page-main .center-pic span { display: block; font-size: 12px; color: #999; margin-top: 6px; }

/* 新闻列表页 */
.news-page-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted #bbb;
  padding: 11px 4px;
  font-size: 15px;
}
.news-page-list li .t { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: 16px; }
.news-page-list li .t::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: #b70e14;
  margin-right: 10px;
  vertical-align: 2px;
}
.news-page-list li .d { color: #999; font-size: 13px; }
.pageno { text-align: center; padding: 18px 0 6px; color: #999; font-size: 13px; }
.pageno a, .pageno span {
  display: inline-block;
  border: 1px solid #ccc;
  padding: 3px 10px;
  margin: 0 3px;
  background: #fff;
}
.pageno span.cur { background: #b70e14; color: #fff; border-color: #b70e14; }

/* 校史时间轴 */
.timeline { border-left: 3px solid #e3b6b8; margin: 10px 0 20px 8px; padding-left: 22px; }
.timeline li { position: relative; margin-bottom: 14px; line-height: 1.9; font-size: 14.5px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -30px; top: 8px;
  width: 11px; height: 11px;
  background: #b70e14;
  border-radius: 50%;
  border: 2px solid #f0d4d5;
}
.timeline strong { color: #b70e14; font-family: "SimHei", "黑体", sans-serif; margin-right: 8px; }

/* ---------- 友情链接 & 页脚 ---------- */
.friendlinks {
  background: #fff;
  border: 1px solid #ddd;
  margin-top: 14px;
  padding: 10px 16px;
  font-size: 13px;
  color: #777;
}
.friendlinks strong { color: #b70e14; font-family: "SimHei", "黑体", sans-serif; margin-right: 10px; letter-spacing: 2px; }
.friendlinks a { color: #555; margin-right: 18px; }
.footer {
  background: #7d090e;
  color: #e8c9c9;
  margin-top: 14px;
  padding: 26px 0 20px;
  font-size: 13px;
  line-height: 2.1;
  text-align: center;
}
.footer a { color: #f3d9a4; margin: 0 8px; }
.footer .disclaimer {
  color: #d99a9c;
  font-size: 12px;
  border-top: 1px solid #9c3438;
  margin-top: 10px;
  padding-top: 10px;
}

/* 响应式（基础适配） */
@media (max-width: 1240px) {
  .wrap { width: 96%; }
  .focus-row { flex-direction: column; }
  .carousel { width: 100%; height: 320px; }
  .headline { height: auto; }
  .cols { flex-direction: column; }
  .col-notice, .col-side { flex: 1; }
  .page-cols { flex-direction: column; }
  .page-side { flex: 1; }
  .pic-row .items { flex-wrap: wrap; }
  .pic-row .item { flex: 0 0 48%; }
}
