/* ============================================================
   医疗资讯门户模板（Green 系） · 响应式
   复刻 news 类门户版式：顶条 → LOGO+搜索 → 绿色导航 →
   左主栏(875) + 右栏(300) → 深色页脚。内容/图片全部占位。
   配色变量集中在 :root，改站名/主色只需改这里。
   ============================================================ */
:root{
  --brand:#4bc061;          /* 主绿（导航/按钮/链接hover） */
  --brand-deep:#3c9a4e;     /* 导航hover深绿 */
  --accent:#ffa800;         /* 强调橙（栏目图标） */
  --text:#333333;
  --text-2:#666666;
  --text-3:#999999;
  --line:#e6e6e6;
  --bg:#f8f8f8;
  --white:#ffffff;
  --radius:8px;
  --maxw:1200px;
  --header-h:90px;
}
*{margin:0;padding:0;box-sizing:border-box;}
html,body{width:100%;}
body{
  font-family:"Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  color:var(--text);
  background:var(--white);
  font-size:14px;
  line-height:1.6;
  -webkit-text-size-adjust:100%;
}
img{max-width:100%;height:auto;display:block;border:0;vertical-align:top;}
a{color:var(--text-2);text-decoration:none;}
a:hover{color:var(--brand);}
ul,ol{list-style:none;}
.clr::after{content:"";display:block;clear:both;}

/* 占位图：渐变灰块，带“图”字，避免外链 */
.ph{
  background:linear-gradient(135deg,#e9edf2,#cfd8e3);
  display:flex;align-items:center;justify-content:center;
  color:#9aa7b4;font-size:13px;overflow:hidden;position:relative;
}
.ph::after{content:attr(data-label);}

/* ---------- 容器 ---------- */
.wrap-b{width:100%;}
.wrap{
  width:100%;
  max-width:var(--maxw);
  margin:0 auto;
  padding:0 15px;
}

/* ---------- 顶部条 ---------- */
.topbar{background:#eeeeee;border-bottom:1px solid var(--line);}
.topbar .wrap{display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:8px;min-height:40px;font-size:13px;color:var(--text-2);}
.topbar a{color:var(--text-2);margin-left:14px;}
.topbar a:hover{color:var(--brand);}

/* ---------- 头部 LOGO + 搜索 ---------- */
.header{padding:18px 0;}
.header .wrap{display:flex;align-items:center;justify-content:space-between;
  gap:20px;flex-wrap:wrap;}
.logo{display:flex;align-items:center;gap:12px;min-width:0;}
.logo .mark{
  width:54px;height:54px;border-radius:12px;flex:0 0 auto;
  background:linear-gradient(135deg,var(--brand),var(--brand-deep));
  color:#fff;font-size:22px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.logo .name{font-size:26px;font-weight:700;color:var(--text);line-height:1.2;}
.logo .slogan{font-size:13px;color:var(--text-3);}
.search{display:flex;flex:1 1 360px;max-width:520px;}
.search input{
  flex:1 1 auto;min-width:0;height:42px;padding:0 16px;
  border:1px solid var(--line);border-right:none;background:#f7f7f7;
  font-size:14px;color:var(--text);border-radius:var(--radius) 0 0 var(--radius);
}
.search input:focus{outline:none;border-color:var(--brand);}
.search button{
  flex:0 0 52px;height:42px;border:none;cursor:pointer;
  background:var(--brand);color:#fff;border-radius:0 var(--radius) var(--radius) 0;
  font-size:18px;
}
.search button:hover{opacity:.9;}
.search-tags{font-size:12px;color:var(--text-3);margin-top:6px;}
.search-tags a{color:var(--text-3);margin-right:10px;}
.search-tags a:hover{color:var(--accent);}

/* ---------- 主导航 ---------- */
.nav-box{background:var(--brand);}
.nav{display:flex;flex-wrap:wrap;}
.nav a{
  flex:1 1 auto;text-align:center;color:#fff;font-size:16px;
  line-height:46px;padding:0 10px;white-space:nowrap;
}
.nav a:hover,.nav a.active{background:var(--brand-deep);color:#fff;}
.nav a.active{font-weight:700;}

/* ---------- 布局：左主 + 右栏 ---------- */
.main{padding:22px 0 36px;}
.layout{display:flex;gap:25px;align-items:flex-start;}
.left-box{flex:1 1 600px;min-width:0;}
.right-box{flex:0 0 300px;max-width:300px;}

/* ---------- 栏目块 ---------- */
.column{margin-bottom:30px;background:var(--white);border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;}
.column-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:0 16px;height:54px;border-bottom:3px solid var(--accent);
  background:#fff;
}
.column-head .title{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:700;color:var(--text);}
.column-head .title .ic{
  width:30px;height:30px;border-radius:8px;background:var(--accent);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:15px;
}
.column-head .sub{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;}
.column-head .sub a{color:var(--text-2);}
.column-head .sub a:hover{color:var(--brand);}
.column-head .more{font-size:13px;color:var(--text-3);}
.column-body{padding:16px;}

/* 头条轮播（左主栏顶部） */
.hero{display:flex;gap:18px;flex-wrap:wrap;margin-bottom:30px;}
.hero .slider{flex:1 1 360px;min-width:0;position:relative;border-radius:var(--radius);overflow:hidden;background:#ddd;aspect-ratio:16/10;}
.hero .slider .slide{position:absolute;inset:0;opacity:0;transition:opacity .5s;}
.hero .slider .slide.on{opacity:1;}
.hero .slider .cap{position:absolute;left:0;right:0;bottom:0;padding:10px 14px;
  background:rgba(0,0,0,.5);color:#fff;font-size:15px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hero .slider .dots{position:absolute;top:12px;right:12px;left:auto;transform:none;
  display:flex;gap:6px;z-index:2;}
.hero .slider .dots span{width:9px;height:9px;border-radius:50%;background:#fff;cursor:pointer;opacity:.7;}
.hero .slider .dots span.on{background:var(--brand);opacity:1;}
.hero .toplist{flex:1 1 280px;min-width:0;}
.hero .toplist h3{font-size:18px;margin-bottom:10px;color:var(--text);}
.hero .toplist li{line-height:34px;border-bottom:1px dashed var(--line);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hero .toplist li .n{color:var(--accent);font-weight:700;margin-right:8px;}

/* 图文列表（主栏） */
.news-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;}
.news-card .ph{aspect-ratio:16/10;border-radius:var(--radius);}
.news-card h4{font-size:15px;line-height:1.5;margin-top:8px;font-weight:600;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.news-card .meta{font-size:12px;color:var(--text-3);margin-top:6px;}

/* 文字列表（带圆点） */
.txt-list li{position:relative;padding-left:16px;line-height:36px;border-bottom:1px dashed var(--line);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.txt-list li::before{content:"";position:absolute;left:0;top:16px;width:5px;height:5px;border-radius:50%;background:#ccc;}
.txt-list li .date{float:right;color:var(--text-3);font-size:12px;}
.txt-list.two{column-count:2;column-gap:30px;}

/* 右栏卡片 */
.side{margin-bottom:22px;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:#fff;}
.side-head{padding:0 14px;height:44px;line-height:44px;background:var(--brand);color:#fff;font-size:16px;font-weight:700;}
.side-body{padding:14px;}
.rank li{display:flex;align-items:center;gap:10px;line-height:38px;border-bottom:1px dashed var(--line);
  white-space:nowrap;overflow:hidden;}
.rank li .num{flex:0 0 22px;height:22px;line-height:22px;text-align:center;border-radius:4px;
  background:#ddd;color:#fff;font-size:13px;}
.rank li:nth-child(1) .num{background:#ff5e5b;}
.rank li:nth-child(2) .num{background:#ff9d00;}
.rank li:nth-child(3) .num{background:#f9d219;}
.rank li a{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* 图片墙 */
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;}
.gallery .ph{aspect-ratio:4/3;border-radius:var(--radius);}
.gallery p{font-size:13px;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* ---------- 页脚 ---------- */
.footer{background:#333;color:#999;margin-top:30px;}
.footer .sitemap{border-top:1px solid #444;border-bottom:1px solid #444;padding:22px 0;}
.footer .sitemap .wrap{display:flex;flex-wrap:wrap;justify-content:center;gap:0;}
.footer .sitemap a{color:#999;font-size:15px;padding:0 14px;border-left:1px solid #666;}
.footer .sitemap a:first-child{border-left:none;}
.footer .sitemap a:hover{color:var(--brand-deep);}
.footer .copy{padding:22px 0;text-align:center;font-size:13px;line-height:2;}
.footer .copy a{color:#aaa;margin:0 6px;}

/* 移动端导航按钮（默认隐藏） */
.nav-toggle{display:none;}

/* ============================================================
   响应式断点
   ============================================================ */
@media (max-width:1100px){
  .left-box{flex:1 1 100%;}
  .right-box{flex:1 1 100%;max-width:100%;}
  .layout{flex-wrap:wrap;}
}
@media (max-width:768px){
  :root{--header-h:auto;}
  .topbar .wrap{justify-content:center;gap:6px 14px;}
  .header .wrap{gap:14px;}
  .logo .name{font-size:22px;}
  .search{flex:1 1 100%;max-width:100%;}
  /* 导航：变成可横向滚动的一行，避免换行撑高或溢出 */
  .nav-box{position:relative;}
  .nav{overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap;}
  .nav a{flex:0 0 auto;line-height:44px;padding:0 16px;}
  .txt-list.two{column-count:1;}
  .column-head{flex-wrap:wrap;height:auto;padding:10px 14px;gap:8px;}
  .column-head .sub{width:100%;order:3;}
  .hero .slider .cap{font-size:13px;padding:8px 10px;}
}
@media (max-width:480px){
  body{font-size:13px;}
  .hero .slider{aspect-ratio:16/9;}
  .news-list{grid-template-columns:1fr 1fr;}
  .gallery{grid-template-columns:1fr 1fr 1fr;}
  .footer .sitemap a{font-size:13px;padding:0 9px;}
}


/* ============================================================
   1CMS 模板扩展：面包屑 / 列表 / 详情 / 单页 / 搜索 / 分页
   ============================================================ */
.crumb{background:#fafafa;border-bottom:1px solid var(--line);font-size:13px;color:var(--text-3);}
.crumb .wrap{display:flex;align-items:center;gap:8px;min-height:40px;flex-wrap:wrap;}
.crumb a{color:var(--text-2);}
.crumb a:hover{color:var(--brand);}
.crumb .sep{color:#bbb;}

/* 通用栏目块补充 */
.column-head .title .ic{font-size:14px;}
.column-head .more{flex:0 0 auto;color:var(--text-3);white-space:nowrap;}
.column-head .more:hover{color:var(--brand);}
.news-card{display:block;min-width:0;}
.news-card img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:var(--radius);background:var(--bg);}
.news-card:hover h4{color:var(--brand);}
.gallery a{display:block;min-width:0;}
.gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius);background:var(--bg);}
.gallery a:hover p{color:var(--brand);}
.txt-list li a{display:inline;color:var(--text);}
.txt-list li a:hover{color:var(--brand);}
.txt-list li .date{float:right;color:var(--text-3);font-size:12px;margin-left:12px;}

/* 首页头条轮播使用真实图片 */
.hero .slider .slide img{width:100%;height:100%;object-fit:cover;display:block;}
.hero .slider .slide a{display:block;width:100%;height:100%;}
.hero .toplist{padding-top:0;}
.hero .toplist .txt-list li .n{color:var(--accent);font-weight:700;margin-right:8px;}
.rank li a{color:var(--text-2);}
.rank li a:hover{color:var(--brand);}

/* 列表页 */
.list-box{min-height:280px;}
.list-title{font-size:22px;padding:2px 0 12px;margin-bottom:6px;}
.list-style li{display:flex;align-items:center;gap:12px;min-width:0;}
.list-style li a.news-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);}
.list-style li .date{flex:0 0 auto;margin-left:auto;}
.thumb-sm{flex:0 0 96px;}
.thumb-sm img{width:96px;height:64px;object-fit:cover;border-radius:6px;}

/* 分页 */
.pagelist{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:18px 0 4px;}
.pagelist a{display:inline-block;min-width:34px;padding:6px 12px;text-align:center;border:1px solid var(--line);
  border-radius:4px;background:#fff;color:var(--text-2);font-size:13px;}
.pagelist a:hover{border-color:var(--brand);color:var(--brand);}
.pagelist a.active,.pagelist a.current{background:var(--brand);border-color:var(--brand);color:#fff;}

/* 文章详情 */
.article-box{padding:22px 22px 26px;}
.article-title{font-size:26px;line-height:1.45;color:var(--text);margin-bottom:12px;word-break:break-word;}
.article-meta{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:13px;color:var(--text-3);
  border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:18px;}
.article-meta a{color:var(--text-2);}
.article-meta a:hover{color:var(--brand);}
.article-cover{margin-bottom:18px;}
.article-cover img{width:100%;max-height:420px;object-fit:cover;border-radius:var(--radius);}
.article-content{font-size:16px;line-height:1.9;color:#3a3a3a;word-break:break-word;overflow:hidden;}
.article-content p{margin:0 0 16px;}
.article-content img{max-width:100%;height:auto;}
.article-content h2,.article-content h3{font-size:20px;margin:22px 0 12px;color:var(--text);}
.article-content ul,.article-content ol{padding-left:24px;margin:0 0 16px;}
.article-content li{list-style:disc;}
.article-prevnext{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;
  border-top:1px dashed var(--line);padding-top:16px;margin-top:22px;font-size:14px;}
.article-prevnext a{color:var(--text-2);}
.article-prevnext a:hover{color:var(--brand);}
.article-prevnext .disabled,.article-prevnext span.disabled{color:#bbb;}
.related-box{margin-bottom:26px;}
.related-box .block-head{padding:0 16px;height:48px;display:flex;align-items:center;
  border-bottom:3px solid var(--accent);font-size:18px;font-weight:700;}
.related-box ul{padding:8px 16px 16px;}

/* 单页 */
.page-box{padding:22px 22px 30px;}
.page-title{font-size:24px;margin-bottom:16px;}
.page-content{font-size:15px;line-height:1.9;color:var(--text-2);}
.page-content p{margin-bottom:14px;}

/* 搜索页 */
.search-page{min-height:260px;}
.search-form-big{display:flex;gap:10px;margin-bottom:18px;}
.search-form-big input{flex:1 1 auto;min-width:0;height:44px;padding:0 14px;border:1px solid var(--line);
  border-radius:var(--radius);font-size:15px;background:#fafafa;}
.search-form-big input:focus{outline:none;border-color:var(--brand);}
.search-form-big button{flex:0 0 90px;height:44px;border:none;border-radius:var(--radius);
  background:var(--brand);color:#fff;font-size:15px;cursor:pointer;}
.search-tip{font-size:14px;color:var(--text-3);margin-bottom:12px;}
.empty{padding:44px 12px;text-align:center;color:var(--text-3);font-size:14px;}

/* 站点地图：链接过多时自动换行，不撑破 */
.footer .sitemap .wrap a{white-space:nowrap;}

@media (max-width:768px){
  .article-box,.page-box{padding:16px 14px 20px;}
  .article-title{font-size:22px;}
  .article-content{font-size:15px;}
  .crumb .wrap{min-height:34px;}
  .thumb-sm{flex:0 0 72px;}
  .thumb-sm img{width:72px;height:50px;}
  .list-style li .date{display:none;}
  .hero .toplist{flex:1 1 100%;}
  .article-prevnext{flex-direction:column;}
}

/* ============================================================
   文字列表修正：原来 .date 用 float:right，标题一长浮动元素就被挤到
   下一行，出现「日期单独一行 / 条目错行」。改为 flex：标题严格单行
   省略，日期固定贴在同一行右侧，多列布局下也不会掉行。
   ============================================================ */
.txt-list li{display:flex;align-items:center;gap:8px;min-width:0;break-inside:avoid;}
.txt-list li > a{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;color:var(--text);}
.txt-list li > a:hover{color:var(--brand);}
.txt-list li > .date{flex:0 0 auto;float:none;margin-left:auto;white-space:nowrap;
  color:var(--text-3);font-size:12px;}
.txt-list li > .n{flex:0 0 auto;margin-right:0;}
.txt-list.two{column-gap:24px;}
