/* ===== 电力行业资讯网 公共样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "SimSun", sans-serif;
  background: #f0f2f5;
  color: #333;
  font-size: 14px;
}
a { color: #333; text-decoration: none; }
a:hover { color: #c40000; }
ul, ol { list-style: none; }
img { border: 0; }
.wrap { width: 1200px; margin: 0 auto; }

/* 顶栏 */
.topbar { background: #f7f7f7; border-bottom: 1px solid #e3e3e3; font-size: 12px; color: #777; }
.topbar .wrap { display: flex; justify-content: space-between; line-height: 32px; }
.topbar a { color: #555; margin-left: 16px; }
.topbar a:hover { color: #c40000; }

/* 头部 */
.header { background: #fff; padding: 26px 0 22px; }
.header .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo .name { font-size: 34px; font-weight: 700; color: #1e5aa8; letter-spacing: 2px; }
.logo .name b { color: #c40000; }
.logo .slogan { margin-top: 6px; font-size: 13px; color: #999; letter-spacing: 4px; }
.search-box { display: flex; }
.search-box input {
  width: 260px; height: 36px; border: 2px solid #1e5aa8; border-right: none;
  padding: 0 10px; font-size: 14px; outline: none;
}
.search-box button {
  width: 80px; height: 36px; border: none; background: #1e5aa8; color: #fff;
  font-size: 14px; cursor: pointer;
}
.search-box button:hover { background: #174a8c; }

/* 导航 */
.nav { background: #1e5aa8; }
.nav ul { display: flex; }
.nav li { flex: 0 0 auto; }
.nav a {
  display: block; padding: 0 26px; line-height: 44px; color: #fff;
  font-size: 16px; font-weight: 700;
}
.nav a:hover, .nav a.active { background: #c40000; color: #fff; }

/* 主体布局 */
.main { display: flex; gap: 16px; margin-top: 16px; }
.content { flex: 1; min-width: 0; }
.sidebar { width: 310px; flex-shrink: 0; }

/* 板块盒子 */
.sec { background: #fff; border: 1px solid #e0e0e0; margin-bottom: 16px; }
.sec-title {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid #c40000; padding: 0 14px; line-height: 40px;
}
.sec-title h2 { font-size: 18px; color: #1e5aa8; }
.sec-title h2::before { content: ""; display: inline-block; width: 4px; height: 16px; background: #c40000; margin-right: 8px; vertical-align: -2px; }
.sec-title .more { font-size: 12px; color: #999; }
.sec-body { padding: 8px 14px 12px; }

/* 新闻列表 */
.news-list li {
  display: flex; justify-content: space-between; align-items: center;
  line-height: 36px; border-bottom: 1px dotted #ddd; font-size: 14px;
}
.news-list li:last-child { border-bottom: none; }
.news-list li a {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px;
}
.news-list li a::before { content: "· "; color: #c40000; font-weight: 700; }
.news-list .date { color: #999; font-size: 13px; font-family: Arial, sans-serif; }

/* 头条 */
.headline { text-align: center; padding: 26px 30px 20px; }
.headline h1 { font-size: 26px; }
.headline h1 a { color: #c40000; }
.headline .sum {
  margin-top: 14px; background: #f7f7f7; border: 1px solid #eee; padding: 12px 16px;
  color: #666; text-align: left; line-height: 1.9; font-size: 14px;
}
.headline .meta { margin-top: 10px; color: #aaa; font-size: 12px; }

/* 首页两栏栏目 */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 热点排行 */
.hot-list li { display: flex; align-items: center; line-height: 34px; border-bottom: 1px dotted #eee; }
.hot-list .num {
  width: 20px; height: 20px; line-height: 20px; text-align: center; flex-shrink: 0;
  background: #b7c9e2; color: #fff; font-size: 12px; margin-right: 8px; font-family: Arial, sans-serif;
}
.hot-list li:nth-child(1) .num, .hot-list li:nth-child(2) .num, .hot-list li:nth-child(3) .num { background: #c40000; }
.hot-list li a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.hot-list .views { color: #aaa; font-size: 12px; margin-left: 8px; }

/* 公告 / 友链 */
.notice { line-height: 1.9; color: #666; font-size: 13px; padding: 4px 0; }
.friend-links a {
  display: inline-block; margin: 4px 14px 4px 0; color: #555; font-size: 13px;
}
.friend-links a:hover { color: #c40000; }

/* 页脚 */
.footer { background: #333; color: #bbb; margin-top: 20px; padding: 26px 0; font-size: 13px; }
.footer .wrap { text-align: center; }
.footer .links a { color: #ccc; margin: 0 10px; }
.footer .links a:hover { color: #fff; }
.footer p { margin-top: 10px; color: #888; }

/* 列表页 */
.crumb { background: #fff; border: 1px solid #e0e0e0; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: #888; }
.crumb b { color: #c40000; font-weight: 400; }
.article-list li { padding: 12px 4px; border-bottom: 1px dashed #ddd; }
.article-list li:last-child { border-bottom: none; }
.article-list .t { font-size: 16px; font-weight: 700; }
.article-list .s { margin-top: 6px; color: #888; font-size: 13px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-list .m { margin-top: 6px; color: #aaa; font-size: 12px; }
.article-list .m span { margin-right: 18px; }
.pager { display: flex; justify-content: center; gap: 8px; padding: 18px 0; }
.pager a, .pager span {
  min-width: 32px; height: 32px; line-height: 32px; text-align: center;
  border: 1px solid #ddd; background: #fff; color: #555; font-size: 13px; padding: 0 8px;
}
.pager .cur { background: #1e5aa8; border-color: #1e5aa8; color: #fff; }
.pager a:hover { border-color: #1e5aa8; color: #1e5aa8; }
.pager .cur:hover { color: #fff; }

/* 详情页 */
.detail { background: #fff; border: 1px solid #e0e0e0; padding: 36px 44px 30px; }
.detail h1 { font-size: 26px; text-align: center; line-height: 1.5; color: #222; }
.detail .info {
  text-align: center; color: #999; font-size: 13px; margin-top: 16px;
  padding-bottom: 18px; border-bottom: 1px solid #eee;
}
.detail .info span { margin: 0 12px; }
.detail .info .views-num { color: #c40000; font-weight: 700; }
.article-content { padding: 26px 6px 10px; }
.article-content p {
  font-size: 16px; line-height: 2.1; text-indent: 2em; margin-bottom: 18px; color: #333;
  text-align: justify;
}
.article-content p.chapter { text-align: center; font-weight: 700; text-indent: 0; font-size: 17px; margin: 24px 0 10px; }
.article-content p.noindent { text-indent: 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 15px; }
.article-content table td {
  border: 1px solid #7f7f7f; padding: 8px 10px; text-align: center;
  line-height: 1.8; color: #333;
}
.related { margin-top: 10px; border-top: 1px solid #eee; padding-top: 16px; }
.related h3 { font-size: 16px; color: #1e5aa8; margin-bottom: 10px; }
.related ul { columns: 2; column-gap: 30px; }
.related li { line-height: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.related li a::before { content: "· "; color: #c40000; font-weight: 700; }
.detail-foot { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid #eee; font-size: 13px; }
.detail-foot a { color: #1e5aa8; }

/* ===== 后台 ===== */
.admin-body { background: #f0f2f5; }
.admin-top { background: #222d3c; color: #fff; line-height: 50px; }
.admin-top .wrap { display: flex; justify-content: space-between; }
.admin-top .brand { font-size: 17px; font-weight: 700; }
.admin-top a { color: #cdd6e4; margin-left: 18px; font-size: 13px; }
.admin-top a:hover { color: #fff; }
.admin-main { display: flex; gap: 16px; margin-top: 16px; align-items: flex-start; }
.admin-side { width: 190px; background: #fff; border: 1px solid #e0e0e0; flex-shrink: 0; }
.admin-side a {
  display: block; line-height: 46px; padding: 0 18px; font-size: 14px;
  border-bottom: 1px solid #f0f0f0; color: #444;
}
.admin-side a:hover, .admin-side a.active { background: #1e5aa8; color: #fff; }
.admin-content { flex: 1; min-width: 0; }
.panel { background: #fff; border: 1px solid #e0e0e0; padding: 20px; margin-bottom: 16px; }
.panel h2 { font-size: 17px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #c40000; color: #1e5aa8; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input {
  height: 34px; border: 1px solid #ccc; padding: 0 10px; font-size: 13px; outline: none;
}
.btn {
  display: inline-block; height: 34px; line-height: 34px; padding: 0 16px; border: none;
  background: #1e5aa8; color: #fff; font-size: 13px; cursor: pointer; border-radius: 2px;
}
.btn:hover { background: #174a8c; }
.btn.gray { background: #888; }
.btn.red { background: #c40000; }
.btn.sm { height: 26px; line-height: 26px; padding: 0 10px; font-size: 12px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { background: #f5f7fa; color: #555; font-weight: 700; }
table.grid th, table.grid td { border: 1px solid #e5e5e5; padding: 8px 10px; text-align: left; }
table.grid td.views-cell { color: #c40000; font-weight: 700; }
table.grid tr:hover td { background: #fafcff; }
.form-row { display: flex; align-items: center; margin-bottom: 14px; }
.form-row label { width: 90px; flex-shrink: 0; font-size: 14px; color: #555; }
.form-row input[type=text], .form-row input[type=number], .form-row input[type=date],
.form-row input[type=password], .form-row select, .form-row textarea {
  flex: 1; border: 1px solid #ccc; padding: 8px 10px; font-size: 14px; outline: none;
  font-family: inherit; max-width: 640px;
}
.form-row textarea { resize: vertical; }
.form-row .tip { margin-left: 10px; color: #999; font-size: 12px; }
.msg { margin-top: 10px; font-size: 13px; }
.msg.ok { color: #2c8a2c; }
.msg.err { color: #c40000; }

/* 登录页 */
.login-wrap { width: 380px; margin: 110px auto; background: #fff; border: 1px solid #e0e0e0; padding: 36px 36px 30px; }
.login-wrap h1 { font-size: 20px; text-align: center; color: #1e5aa8; margin-bottom: 6px; }
.login-wrap .sub { text-align: center; color: #999; font-size: 12px; margin-bottom: 24px; }
.login-wrap input {
  width: 100%; height: 40px; border: 1px solid #ccc; padding: 0 12px; font-size: 14px;
  margin-bottom: 14px; outline: none;
}
.login-wrap input:focus { border-color: #1e5aa8; }
.login-wrap .btn { width: 100%; height: 40px; line-height: 40px; font-size: 15px; }

@media (max-width: 1240px) { .wrap { width: 96%; } }

/* ===== 广告位 ===== */
.ad-box { position: relative; }
.ad-box img { display: block; width: 100%; }
.ad-box .ad-tag {
  position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.35); color: #eee;
  font-size: 10px; padding: 0 5px; line-height: 16px; border-radius: 2px;
}
.top-ad { margin: 12px auto 0; }
.side-ad { margin-bottom: 16px; border: 1px solid #e0e0e0; background: #fff; }

/* ===== 首屏：左最新要闻 + 右焦点轮播 ===== */
.focus-row { display: flex; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.latest-col { width: 330px; flex-shrink: 0; }
.latest-col .sec { height: 100%; margin-bottom: 0; }
.carousel-col { flex: 1; min-width: 0; }
.carousel {
  position: relative; overflow: hidden; height: 300px;
  border: 1px solid #e0e0e0; background: #0b1a30;
}
.carousel a.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.carousel a.slide.on { opacity: 1; }
.carousel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  color: #fff; font-size: 17px; font-weight: 700;
}
.carousel .dots { position: absolute; right: 12px; bottom: 14px; display: flex; gap: 7px; z-index: 2; }
.carousel .dots i {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer;
}
.carousel .dots i.on { background: #c40000; }
