/* ============================================
   LayuiTPL - EastCMS - Layui 自适应模板
   依赖：static/layui/css/layui.css
   ============================================ */

/* ===== 基础变量 ===== */
:root {
  --primary: #1E9FFF;
  --primary-dark: #1890e0;
  --bg-white: #ffffff;
  --bg-light: #f8f8f8;
  --bg-dark: #2c3e50;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e6e6e6;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* ===== 全局 ===== */
* { box-sizing: border-box; }
body { background: #f5f5f5; color: var(--text); font-family: "Helvetica Neue",Helvetica,"PingFang SC","Microsoft YaHei",Arial,sans-serif; }
a { color: var(--text); transition: color .2s; }
a:hover { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; }
.layui-container { max-width: 1200px; }

/* ===== 顶部工具栏 ===== */
.toolbar {
  background: #f0f0f0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 32px;
}
.toolbar a { color: var(--text-muted); }
.toolbar a:hover { color: var(--primary); }
.toolbar .toolbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.toolbar .welcome-text { white-space: nowrap; }
.toolbar .tblinks { white-space: nowrap; display: flex; align-items: center; gap: 6px; }

/* ===== 头部导航 ===== */
.header-main {
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 999;
}
.header-main .header-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.header-main .logo { padding: 12px 0; }
.header-main .logo img { height: 48px; }
.header-main .logo h1 { margin: 0; font-size: 24px; color: var(--primary); display: inline-block; vertical-align: middle; }
.header-main .logo a { display: flex; align-items: center;}

/* 导航栏容器 */
.nav-wrap { background: var(--primary); }

/* 主导航 */
.nav-menu { padding: 0; }
.nav-menu .layui-nav { background: transparent; padding: 0; }
.nav-menu .layui-nav .layui-nav-item { line-height: 60px; }
.nav-menu .layui-nav .layui-nav-item a { font-size: 15px; color: #fff; padding: 0 20px; transition: background .2s; }
.nav-menu .layui-nav .layui-nav-item a:hover,
.nav-menu .layui-nav .layui-nav-item.layui-this a { color: #fff; background: rgba(255,255,255,.15); }
.nav-menu .layui-nav .layui-this:after { background: #fff; }

/* 搜索框 */
.header-search { padding: 8px 0; }
.header-search form { display: flex; align-items: center; justify-content: flex-end; }
.header-search .layui-input-inline { margin-right: 0; }
.header-search .layui-input { height: 36px; }
.header-search .layui-btn { border-radius: 0 5px 5px 0; height: 36px; line-height: 36px; padding: 0 18px; }
.header-search .layui-form-select dl { max-height: 180px; }

/* 移动端汉堡菜单按钮 */
.mobile-menu-btn {
  display: none;
  position: absolute;
  right: 15px;
  top: 20px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}
@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-menu { display: none; width: 100%; }
  .nav-menu.show { display: block; }
  .nav-menu .layui-nav { display: block; }
  .nav-menu .layui-nav .layui-nav-item { display: block; line-height: 44px; text-align: center; border-bottom: 1px solid var(--border); }
  .header-search { padding: 8px 0; }
  .toolbar { display: none; }
}

/* ===== 首页幻灯片 ===== */
.home-carousel { margin: 20px 0; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.home-carousel .layui-carousel-ind { bottom: 15px; }
.home-carousel .layui-carousel-ind ul { background: rgba(0,0,0,.3); border-radius: 10px; padding: 4px 8px; }
.home-carousel .layui-carousel-ind li { width: 10px; height: 10px; border-radius: 50%; margin: 0 4px; background: rgba(255,255,255,.5); }
.home-carousel .layui-carousel-ind li.layui-this { background: var(--primary); }
.home-carousel .slide-item {
  display: block;
  position: relative;
  height: 380px;
  overflow: hidden;
}
.home-carousel .slide-item img { width: 100%; height: 100%; object-fit: cover; }
.home-carousel .slide-title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
  padding: 60px 30px 25px;
  font-size: 18px;
  font-weight: 500;
}
@media (max-width: 768px) {
  .home-carousel .slide-item { height: 220px; }
  .home-carousel .slide-title { font-size: 14px; padding: 40px 15px 15px; }
}

/* ===== 头条卡片 ===== */
.headline-card {
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: var(--shadow);
  height: 100%;
}
.headline-card .hl-main { margin-bottom: 12px; }
.headline-card .hl-main h3 { font-size: 18px; margin: 0 0 8px; }
.headline-card .hl-main h3 a { color: var(--text); }
.headline-card .hl-main h3 a:hover { color: var(--primary); }
.headline-card .hl-main p { color: var(--text-light); line-height: 1.7; font-size: 14px; }
.headline-card .hl-list { list-style: none; padding: 0; margin: 0; }
.headline-card .hl-list li { line-height: 32px; border-bottom: 1px dotted var(--border); }
.headline-card .hl-list li a { font-size: 14px; }
.headline-card .hl-list li .hl-date { color: var(--text-muted); font-size: 12px; margin-right: 8px; }

/* ===== 通用卡片模块 ===== */
.section-card {
  background: #fff;
  border-radius: 6px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.section-card .sc-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-card .sc-header strong {
  font-size: 16px;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}
.section-card .sc-header .sc-more { font-size: 13px; color: var(--text-muted); }
.section-card .sc-header .sc-more:hover { color: var(--primary); }
.section-card .sc-body { padding: 15px 20px; }

/* ===== 文章列表 ===== */
.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 15px;
}
.article-list li:last-child { border-bottom: none; }
.article-list .al-thumb {
  flex-shrink: 0;
  width: 160px;
  height: 110px;
  border-radius: 4px;
  overflow: hidden;
}
.article-list .al-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-list .al-info { flex: 1; min-width: 0; }
.article-list .al-info h3 { font-size: 16px; margin: 0 0 8px; line-height: 1.4; }
.article-list .al-info h3 a { color: var(--text); }
.article-list .al-info h3 a:hover { color: var(--primary); }
.article-list .al-info .al-desc { color: var(--text-light); font-size: 13px; line-height: 1.6; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-list .al-info .al-meta { font-size: 12px; color: var(--text-muted); }
.article-list .al-info .al-meta span { margin-right: 12px; }
.article-list .al-info .al-meta .al-tag { color: var(--primary); margin-right: 12px; }
@media (max-width: 600px) {
  .article-list li { flex-direction: column; }
  .article-list .al-thumb { width: 100%; height: 180px; }
}

/* ===== 图文信息列表（无缩略图） ===== */
.text-list { list-style: none; padding: 0; margin: 0; }
.text-list li {
  padding: 10px 0;
  border-bottom: 1px dotted var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.text-list li:last-child { border-bottom: none; }
.text-list li a { flex: 1; font-size: 14px; }
.text-list li .tl-date { color: var(--text-muted); font-size: 12px; }

/* ===== 图片网格列表 ===== */
.image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.image-grid .ig-item { border-radius: 4px; overflow: hidden; background: #fff; }
.image-grid .ig-item a { display: block; }
.image-grid .ig-item img { width: 100%; height: 160px; object-fit: cover; transition: transform .3s; }
.image-grid .ig-item:hover img { transform: scale(1.05); }
.image-grid .ig-item .ig-title { padding: 8px 10px; font-size: 13px; text-align: center; color: var(--text); }
.image-grid .ig-item .ig-date { display: block; text-align: center; font-size: 12px; color: var(--text-muted); padding-bottom: 8px; }
@media (max-width: 768px) {
  .image-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 侧边栏热点 ===== */
.side-hot-list { list-style: none; padding: 0; margin: 0; }
.side-hot-list li { padding: 8px 0; border-bottom: 1px dotted var(--border); }
.side-hot-list li:last-child { border-bottom: none; }
.side-hot-list li a { font-size: 14px; }
.side-hot-list li .sh-num {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 3px;
  background: #eee;
  color: var(--text-muted);
  font-size: 12px;
  margin-right: 8px;
}
.side-hot-list li:first-child .sh-num,
.side-hot-list li:nth-child(2) .sh-num,
.side-hot-list li:nth-child(3) .sh-num {
  background: var(--primary);
  color: #fff;
}

/* ===== 图文推荐侧栏 ===== */
.side-pic-list .sp-item { margin-bottom: 12px; overflow: hidden; }
.side-pic-list .sp-item img { width: 100%; height: 140px; object-fit: cover; border-radius: 4px; margin-bottom: 6px; }
.side-pic-list .sp-item a { font-size: 14px; }

/* ===== 文章详情页 ===== */
.article-detail { background: #fff; border-radius: 6px; box-shadow: var(--shadow); padding: 30px; }
.article-detail .ad-title { text-align: center; margin-bottom: 15px; }
.article-detail .ad-title h1 { font-size: 24px; margin: 0 0 12px; color: var(--text); font-weight: 600; }
.article-detail .ad-meta {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}
.article-detail .ad-meta span { margin: 0 10px; }
.article-detail .ad-intro {
  background: var(--bg-light);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.8;
}
.article-detail .ad-content {
  font-size: 16px;
  line-height: 2;
  color: var(--text);
  word-wrap: break-word;
}
.article-detail .ad-content p { margin: 0 0 15px; }
.article-detail .ad-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 10px 0; }
.article-detail .ad-content table { max-width: 100%; }
.article-detail .ad-content blockquote {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  margin: 15px 0;
  color: var(--text-light);
}

/* 分页 */
.article-detail .ad-pages { text-align: center; margin: 20px 0; }
.article-detail .ad-pages ul { display: inline-flex; gap: 5px; }
.article-detail .ad-pages a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 14px;
}
.article-detail .ad-pages a:hover,
.article-detail .ad-pages .thisclass { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 上一篇/下一篇 */
.article-detail .ad-prevnext {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-top: 20px;
}
.article-detail .ad-prevnext a { font-size: 14px; color: var(--text-light); }
.article-detail .ad-prevnext a:hover { color: var(--primary); }

/* 二维码 */
.article-detail .ad-qrcode { text-align: center; margin: 20px 0; }

/* 顶踩 */
.article-detail .ad-digg { text-align: center; margin: 20px 0; }
.article-detail .ad-digg button {
  padding: 8px 30px;
  margin: 0 10px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all .3s;
}
.article-detail .ad-digg .digg-up { background: #f0f8ff; color: var(--primary); }
.article-detail .ad-digg .digg-down { background: #fff5f5; color: #ff5722; }
.article-detail .ad-digg .digg-up:hover { background: var(--primary); color: #fff; }
.article-detail .ad-digg .digg-down:hover { background: #ff5722; color: #fff; }

/* 操作按钮 */
.article-detail .ad-actions { text-align: center; margin: 15px 0; }
.article-detail .ad-actions a {
  display: inline-block;
  margin: 0 8px;
  color: var(--text-light);
  font-size: 13px;
}
.article-detail .ad-actions a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .article-detail { padding: 15px; }
  .article-detail .ad-title h1 { font-size: 18px; }
  .article-detail .ad-content { font-size: 15px; line-height: 1.8; }
}

/* ===== 分页组件 ===== */
.pagination-wrap { text-align: center; padding: 30px 0; }
.pagination-wrap .pageinfo { margin-bottom: 10px; color: var(--text-muted); font-size: 13px; }
.pagination-wrap a,
.pagination-wrap .thisclass {
  display: inline-block;
  height: 36px;
  line-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin: 0 3px;
  font-size: 14px;
  color: var(--text);
  transition: all .2s;
}
.pagination-wrap a:hover { color: var(--primary); border-color: var(--primary); }
.pagination-wrap .thisclass { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== 面包屑 ===== */
.breadcrumb { padding: 12px 0; color: var(--text-muted); font-size: 13px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb strong { color: var(--text); }

/* ===== 底部 ===== */
.footer {
  background: var(--bg-dark);
  color: #ccc;
  padding: 30px 0;
  margin-top: 40px;
  text-align: center;
}
.footer a { color: #ccc; }
.footer a:hover { color: var(--primary); }
.footer .copyright { font-size: 13px; line-height: 1.8; }

/* ===== 搜索页 ===== */
.search-header-box {
  background: #fff;
  padding: 30px 0;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.search-header-box .search-title { font-size: 20px; margin-bottom: 15px; color: var(--text); }
.search-header-box .layui-inline .layui-input { height: 42px; width: 300px; border-radius: 21px 0 0 21px; }
.search-header-box .layui-inline .layui-btn { height: 42px; border-radius: 0 21px 21px 0; }
.search-result-bar { padding: 10px 0; color: var(--text-muted); font-size: 14px; }
.search-result-bar strong { color: var(--primary); }
.search-result-item {
  background: #fff;
  padding: 20px;
  margin-bottom: 12px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.search-result-item h3 { margin: 0 0 8px; font-size: 16px; }
.search-result-item p { color: var(--text-light); font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
.search-result-item .sri-meta { font-size: 12px; color: var(--text-muted); }

/* ===== TAG标签页面 ===== */
.tag-cloud { padding: 20px; text-align: center; }
.tag-cloud a {
  display: inline-block;
  margin: 6px 8px;
  padding: 6px 16px;
  border-radius: 20px;
  background: #e8f4ff;
  color: var(--primary);
  font-size: 14px;
  transition: all .3s;
}
.tag-cloud a:hover { background: var(--primary); color: #fff; }

/* ===== 单页面 ===== */
.singlepage-box { background: #fff; border-radius: 6px; box-shadow: var(--shadow); padding: 30px; }
.singlepage-box .sp-title { text-align: center; margin-bottom: 25px; }
.singlepage-box .sp-title h1 { font-size: 22px; }
.singlepage-box .sp-content { font-size: 16px; line-height: 2; }

/* ===== 栏目列表侧栏 ===== */
.side-channel-list { list-style: none; padding: 0; margin: 0; }
.side-channel-list li { border-bottom: 1px dotted var(--border); }
.side-channel-list li a {
  display: block;
  padding: 10px 15px;
  font-size: 14px;
  transition: all .2s;
}
.side-channel-list li a:hover,
.side-channel-list li a.thisclass { background: #e8f4ff; color: var(--primary); }

/* ===== 图片内容页 ===== */
.article-detail .ad-images { text-align: center; }
.article-detail .ad-images img { max-width: 100%; border-radius: 4px; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.article-detail .ad-images p { text-align: center; color: var(--text-muted); font-size: 13px; }

/* ===== 辅助 ===== */
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.clearfix:after { content: ""; display: table; clear: both; }
