/* ============================================
   鲁北生活网 - 全站样式表
   配色：主色 #1f8a85（湖青蓝）
   路径说明：本文件需上传到 /e/template/lbsw/css/style.css
   ============================================ */

/* --- 基础重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: #222;
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
}
html { overflow-x: hidden; }
a { color: #222; text-decoration: none; transition: color .2s; }
a:hover { color: #1f8a85; }
img { max-width: 100%; border: 0; vertical-align: middle; }
ul, ol { list-style: none; }

/* --- 容器 --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* --- 顶部细条 --- */
.topbar { background: #f5f7f9; border-bottom: 1px solid #e8ecef; font-size: 13px; color: #666; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar .topbar-right { color: #666; }
.topbar .topbar-right strong { color: #1f8a85; font-weight: 600; }

/* --- 头部 --- */
.site-header { background: #fff; padding: 25px 0; border-bottom: 1px solid #e8ecef; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.logo { line-height: 1.2; }
.logo h1 { font-size: 32px; font-weight: 700; color: #1f8a85; letter-spacing: 2px; }
.logo .logo-sub { font-size: 13px; color: #999; margin-top: 4px; }

/* --- 搜索框 --- */
.search-box { display: flex; align-items: center; }
.search-box form { display: flex; border: 1px solid #d0d5da; border-radius: 4px; overflow: hidden; }
.search-box input[type="text"] {
  width: 240px; height: 38px; padding: 0 12px; border: 0; outline: none; font-size: 14px;
}
.search-box button {
  height: 38px; padding: 0 22px; background: #1f8a85; color: #fff; border: 0; cursor: pointer;
  font-size: 14px; transition: background .2s;
}
.search-box button:hover { background: #176e6a; }

/* --- 主导航 --- */
.main-nav { background: #1f8a85; }
.main-nav .container { display: flex; }
.main-nav ul { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.main-nav li { flex-shrink: 0; }
.main-nav a {
  display: block; padding: 13px 24px; color: #fff; font-size: 16px; font-weight: 500;
  white-space: nowrap; transition: background .2s;
}
.main-nav a:hover, .main-nav a.active { background: #176e6a; color: #fff; }

/* --- 面包屑 --- */
.breadcrumb { padding: 15px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #1f8a85; }

/* --- 首页布局 --- */
.home-layout { display: flex; gap: 25px; margin: 20px 0 40px; }
.main-col { flex: 1; min-width: 0; }
.side-col { width: 340px; flex-shrink: 0; }

/* --- 焦点头条区 --- */
.focus-area { display: flex; gap: 20px; margin-bottom: 30px; }
.focus-main {
  flex: 1; min-width: 0; border-radius: 6px; overflow: hidden; position: relative;
  background: #e8ecef; height: 320px;
}
.focus-main img { width: 100%; height: 100%; object-fit: cover; }
.focus-main .focus-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  padding: 50px 16px 14px;
}
.focus-main .focus-overlay a { color: #fff; font-size: 18px; font-weight: 600; line-height: 1.4; }
.focus-main .focus-overlay a:hover { color: #a8e6e2; }

.focus-list { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.focus-list li {
  padding: 10px 14px; background: #f5f7f9; border-radius: 4px;
  border-left: 3px solid #1f8a85;
}
.focus-list li a { font-size: 14px; line-height: 1.5; display: block; }
.focus-list .focus-date { font-size: 12px; color: #e67e22; margin-top: 4px; }

/* --- 栏目分块 --- */
.section-block { margin-bottom: 28px; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid #1f8a85; padding-bottom: 8px; margin-bottom: 16px;
}
.section-header h2 { font-size: 20px; font-weight: 700; color: #222; }
.section-header .more-link { font-size: 13px; color: #999; }
.section-header .more-link:hover { color: #1f8a85; }

/* --- 图文列表卡片 --- */
.news-card {
  display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid #eef1f4;
}
.news-card:last-child { border-bottom: 0; }
.news-card .thumb {
  width: 160px; height: 110px; flex-shrink: 0; border-radius: 4px; overflow: hidden;
  background: #e8ecef;
}
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #d0d5da, #b8bec4); color: #fff; font-size: 24px; font-weight: 700;
}
.news-card .info { flex: 1; min-width: 0; }
.news-card .info h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.news-card .info h3 a { line-height: 1.4; }
.news-card .info .desc { font-size: 13px; color: #888; line-height: 1.5; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .info .meta { font-size: 12px; color: #e67e22; }

/* --- 侧边栏 --- */
.side-widget {
  background: #fff; border-radius: 6px; padding: 18px; margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); border: 1px solid #eef1f4;
}
.side-widget h3 {
  font-size: 17px; font-weight: 700; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 2px solid #1f8a85;
}
.hot-list li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: 14px; }
.hot-list .rank-num {
  display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center;
  font-size: 12px; font-weight: 700; color: #fff; border-radius: 3px; flex-shrink: 0;
}
.hot-list .rank-num.top3 { background: #e67e22; }
.hot-list .rank-num.normal { background: #b8bec4; }
.hot-list a { line-height: 1.4; }
.hot-list a:hover { color: #1f8a85; }

.about-widget p { font-size: 13px; color: #666; line-height: 1.8; }
.contact-widget p { font-size: 13px; color: #666; line-height: 2; }
.contact-widget strong { color: #222; }

/* --- 列表页 --- */
.page-title-bar { margin-bottom: 20px; }
.page-title-bar h1 { font-size: 24px; font-weight: 700; color: #222; }
.page-title-bar .class-desc { font-size: 13px; color: #888; margin-top: 6px; }

.pagination { padding: 25px 0; text-align: center; }
.pagination a, .pagination span {
  display: inline-block; padding: 6px 14px; margin: 0 3px; border: 1px solid #d0d5da;
  border-radius: 3px; font-size: 14px; color: #666;
}
.pagination a:hover { background: #1f8a85; color: #fff; border-color: #1f8a85; }
.pagination .current { background: #1f8a85; color: #fff; border-color: #1f8a85; }

/* --- 内容页 --- */
.content-area { background: #fff; border-radius: 6px; padding: 30px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.content-title { font-size: 26px; font-weight: 700; line-height: 1.4; margin-bottom: 16px; }
.content-meta {
  display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: #999;
  padding-bottom: 16px; border-bottom: 1px solid #eef1f4; margin-bottom: 24px;
}
.content-meta span { display: flex; align-items: center; }
.content-body { font-size: 16px; line-height: 2; color: #333; }
.content-body p { margin-bottom: 16px; }
.content-body img, .content-body .content-image {
  width: 100% !important; max-width: 100% !important; height: auto !important;
  border-radius: 4px; margin: 10px auto; display: block;
}

.prev-next-bar {
  margin-top: 30px; padding: 16px 0; border-top: 1px solid #eef1f4;
  font-size: 14px; line-height: 1.8;
}
.prev-next-bar a { color: #1f8a85; }

.related-block { margin-top: 20px; }
.related-block h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #1f8a85; }
.related-block ul li { padding: 6px 0; font-size: 14px; }

/* --- 页脚 --- */
.site-footer { background: #2c3e50; color: #a0aab5; margin-top: 40px; padding: 40px 0 0; }
.footer-cols { display: flex; gap: 40px; padding-bottom: 30px; }
.footer-col { flex: 1; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; font-weight: 600; }
.footer-col p, .footer-col a { font-size: 13px; color: #a0aab5; line-height: 2; }
.footer-col a:hover { color: #1f8a85; }
.footer-col ul li { line-height: 2; }

.footer-bottom {
  border-top: 1px solid #3a4a5c; padding: 16px 0; text-align: center; font-size: 12px; color: #7a8694;
}
.footer-bottom a { color: #7a8694; }
.footer-bottom a:hover { color: #1f8a85; }

/* --- 响应式 --- */
/* 平板及以下：主区与侧栏上下堆叠，避免并排挤压 */
@media (max-width: 992px) {
  .home-layout { flex-direction: column; gap: 20px; }
  .side-col { width: 100%; }
  .focus-area { flex-direction: column; }
  .focus-list { width: 100%; }
}

@media (max-width: 768px) {
  .topbar .container { height: auto; padding: 6px 15px; flex-direction: column; gap: 2px; }
  .site-header .container { flex-direction: column; align-items: stretch; gap: 15px; }
  .logo h1 { font-size: 26px; }

  /* 搜索框占满整行，输入框自适应伸缩，不再固定宽度 */
  .search-box { width: 100%; }
  .search-box form { width: 100%; }
  .search-box input[type="text"] { flex: 1; width: auto; min-width: 0; }

  .focus-main { height: 220px; }

  .news-card .thumb { width: 120px; height: 85px; }
  .news-card .info h3 { font-size: 15px; }

  .content-area { padding: 18px; }
  .content-title { font-size: 20px; }
  .content-body { font-size: 15px; overflow-wrap: break-word; word-break: break-word; }
  .content-body table { display: block; max-width: 100%; overflow-x: auto; }
  .content-body a { word-break: break-all; }

  .footer-cols { flex-direction: column; gap: 20px; }
  /* 小屏导航自动换行全部显示，不再左右横滑 */
  .main-nav ul { flex-wrap: wrap; overflow-x: visible; }
  .main-nav li { flex-shrink: 1; }
  .main-nav a { padding: 12px 16px; font-size: 15px; white-space: normal; }
}

/* 小屏手机：再收一档，防止卡片/标题挤破 */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .logo h1 { font-size: 22px; letter-spacing: 1px; }
  .search-box button { padding: 0 16px; }
  .news-card { gap: 12px; }
  .news-card .thumb { width: 100px; height: 72px; }
  .news-card .info h3 { font-size: 14px; }
  .news-card .info .desc { font-size: 12px; }
  .focus-main { height: 180px; }
  .focus-main .focus-overlay a { font-size: 16px; }
  .content-title { font-size: 18px; }
  .main-nav a { padding: 11px 13px; font-size: 14px; }
  .section-header h2 { font-size: 18px; }
}