/* =====================================================================
   style.css  —  新媒体主题（对应原站 /web/news_*.htm 的 template_id=3）
   顶栏 Navbar + 主区 sec-panel + 侧栏 widget + Footer + 右侧悬浮
   ===================================================================== */

:root {
  --c-brand:    #da542e;   /* 与原站分页 / button 一致的橙红色 */
  --c-brand-2:  #f06b3a;
  --c-text:     #333;
  --c-text-soft:#666;
  --c-muted:    #999;
  --c-line:     #eee;
  --c-line-2:   #f5f5f5;
  --c-bg:       #f4f4f4;
  --c-card:     #ffffff;
  --shadow-card: 0 2px 14px rgba(0, 0, 0, .04);
  --radius:     4px;
  --maxwidth:   1100px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans CN", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}
a { color: var(--c-text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-brand); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

.container {
  width: var(--maxwidth);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
}
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* === 1. Header / Navbar === */
.header {
  background: var(--c-card);
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.navbar-header .logo a { display: flex; align-items: center; }
.navbar-header .logo img {
  height: 42px;
  width: auto;
  display: block;
}

.navbar-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
}
.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 1px;
  transition: all .3s;
}
.navbar-toggle.collapsed .icon-bar-2 { opacity: 0; }

.primary-menu ul.nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-menu .menu-item { position: relative; }
.primary-menu .menu-item > a {
  display: block;
  padding: 14px 22px;
  font-size: 15px;
  color: var(--c-text);
  transition: color .2s, background .2s;
}
.primary-menu .menu-item:hover > a,
.primary-menu .menu-item.current-menu-item > a {
  color: var(--c-brand);
}
.primary-menu .menu-item.dropdown > a::after {
  content: " ▾";
  font-size: 10px;
  opacity: .7;
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 130px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s;
  z-index: 10;
}
.primary-menu .menu-item.dropdown:hover .dropdown-menu,
.primary-menu .menu-item.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
}
.dropdown-menu .menu-item > a {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--c-text-soft);
}
.dropdown-menu .menu-item > a:hover {
  background: var(--c-line-2);
  color: var(--c-brand);
}

/* === 2. wrap === */
#wrap { padding: 24px 0 40px; }
.wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* === 3. main === */
.main {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
}
.entry-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--c-muted);
}
.entry-breadcrumb .home {
  list-style: none;
}
.entry-breadcrumb i {
  font-style: normal;
  color: var(--c-brand);
  margin-right: 4px;
}
.entry-breadcrumb a { color: var(--c-text-soft); }
.entry-breadcrumb a:hover { color: var(--c-brand); }

/* ---- sec-panel 列表 ---- */
.sec-panel { margin-bottom: 18px; }
.sec-panel-head {
  border-bottom: 2px solid var(--c-brand);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.sec-panel-head h1,
.sec-panel-head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--c-text);
  font-weight: 600;
}
.sec-panel-head h1 span,
.sec-panel-head h2 span {
  display: inline-block;
  border-bottom: 2px solid var(--c-brand);
  padding: 0 4px 10px;
  margin-bottom: -2px;
}
.sec-panel-head .more {
  float: right;
  font-size: 12px;
  color: var(--c-muted);
  padding: 6px 8px;
}

.post-loop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.post-loop.cols-0 {
  grid-template-columns: 1fr;
}
.post-loop.cols-0 .item {
  display: flex;
  gap: 16px;
}
.post-loop.cols-0 .item .item-img {
  flex: 0 0 240px;
  max-width: 240px;
}
.post-loop.cols-0 .item .item-img-inner { aspect-ratio: 4/3; }
.post-loop.cols-0 .item-content { padding: 0; }

.post-loop .item {
  background: var(--c-card);
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post-loop .item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  border-color: transparent;
}
.item-img {
  position: relative;
  overflow: hidden;
}
.item-img-inner {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--c-line-2);
}
.item-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.post-loop .item:hover .item-img-inner img {
  transform: scale(1.04);
}
.item-category {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: inline-block;
  padding: 3px 10px;
  background: rgba(218, 84, 46, .9);
  color: #fff;
  font-size: 12px;
  border-radius: 2px;
}
.item-content {
  padding: 14px 16px 16px;
}
.item-title {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-title a { color: var(--c-text); }
.post-loop .item:hover .item-title a { color: var(--c-brand); }
.item-excerpt {
  font-size: 13px;
  color: var(--c-text-soft);
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-meta {
  font-size: 12px;
  color: var(--c-muted);
  display: flex;
  gap: 14px;
  align-items: center;
}
.item-meta .fa-eye {
  font-style: normal;
  color: var(--c-brand);
  margin-right: 4px;
}

/* === 4. entry（详情页） === */
.entry-head { margin-bottom: 18px; border-bottom: 1px dashed var(--c-line); padding-bottom: 14px; }
.entry-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.4;
  color: var(--c-text);
}
.entry-info {
  font-size: 12px;
  color: var(--c-muted);
}
.entry-info .nickname { color: var(--c-brand); }
.entry-info .dot { margin: 0 8px; color: var(--c-line); }
.entry-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--c-text);
}
.entry-content p {
  margin: 0 0 16px;
}
.entry-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 8px 0;
}
.entry-copyright {
  margin: 24px 0 0;
  padding: 12px 14px;
  background: var(--c-line-2);
  border-left: 3px solid var(--c-brand);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--c-muted);
}
.entry-copyright p { margin: 0; }
.entry-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--c-line);
  font-size: 12px;
  color: var(--c-muted);
}

/* === 5. sidebar === */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.widget {
  background: var(--c-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.widget-title {
  margin: 0;
  padding: 12px 16px;
  font-size: 15px;
  border-bottom: 2px solid var(--c-brand);
  position: relative;
}
.widget-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--c-brand);
  margin-right: 8px;
  vertical-align: middle;
}
.widget_image_ad { padding: 0; }
.widget_image_ad a { display: block; }
.widget_image_ad img {
  width: 100%;
  height: auto;
  display: block;
}

.widget_post_thumb ul,
.widget_recent_comments ul {
  margin: 0;
  padding: 8px 0;
  list-style: none;
}
.widget_post_thumb .item,
.widget_recent_comments .item {
  display: flex;
  gap: 10px;
  padding: 8px 14px;
  align-items: center;
  border-bottom: 1px dashed var(--c-line);
}
.widget_post_thumb .item:last-child,
.widget_recent_comments .item:last-child { border-bottom: none; }
.widget_post_thumb .item-img,
.widget_recent_comments .item-img {
  width: 80px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
}
.widget_post_thumb .item-img img,
.widget_recent_comments .item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.widget_post_thumb .item-content,
.widget_recent_comments .item-content {
  flex: 1;
  min-width: 0;
}
.widget_post_thumb .item-title,
.widget_recent_comments .item-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.widget_post_thumb .item-title a { color: var(--c-text); }
.widget_post_thumb .item:hover .item-title a,
.widget_recent_comments .item:hover .item-title a { color: var(--c-brand); }
.widget_post_thumb .item-date,
.widget_recent_comments .item-date {
  font-size: 11px;
  color: var(--c-muted);
}

.widget_tag_cloud .tagcloud {
  padding: 12px 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.widget_tag_cloud .tagcloud a {
  display: inline-block;
  padding: 4px 10px;
  background: var(--c-line-2);
  color: var(--c-text-soft);
  font-size: 12px;
  border-radius: 3px;
  transition: all .2s;
}
.widget_tag_cloud .tagcloud a:hover {
  background: var(--c-brand);
  color: #fff;
}

/* === 6. 单页（服务介绍、广告服务等） === */
.page-content {
  line-height: 1.85;
}
.page-content p { margin: 0 0 14px; }
.page-content h3 {
  margin: 18px 0 10px;
  font-size: 17px;
  color: var(--c-text);
  border-left: 4px solid var(--c-brand);
  padding-left: 10px;
}
.page-content ul {
  padding-left: 22px;
  margin: 0 0 14px;
}
.page-content ul li { list-style: disc; margin: 4px 0; color: var(--c-text-soft); }

/* === 7. page 分页 === */
.site_page {
  text-align: left;
  height: 32px;
  line-height: 32px;
  margin-top: 18px;
  padding: 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--c-text-soft);
}
.site_page .p, .site_page .pre, .site_page .next {
  display: inline-block;
  min-width: 30px;
  height: 28px;
  line-height: 28px;
  background: #fff;
  border: 1px solid #ddd;
  text-align: center;
  float: left;
  margin: 0 2px;
  padding: 0 8px;
  border-radius: 3px;
  color: var(--c-text-soft);
}
.site_page .p.active {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
}
.site_page input[type=text] {
  width: 40px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin: 0 4px;
  padding: 3px 4px;
}

/* === 8. Footer === */
.footer {
  background: #2c2c2c;
  color: #aaa;
  padding: 26px 0;
  font-size: 12px;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  gap: 0;
}
.footer-nav li {
  padding: 0 14px;
  border-right: 1px solid #444;
}
.footer-nav li:last-child { border-right: none; }
.footer-nav li.current-menu-item a { color: var(--c-brand); }
.footer-nav li a {
  color: #aaa;
  font-size: 13px;
}
.footer-nav li a:hover { color: #fff; }
.copyright { font-size: 12px; color: #888; line-height: 1.6; }
.copyright a { color: #aaa; }
.copyright a:hover { color: #fff; }
.footer-sns { display: flex; gap: 10px; }

/* === 9. 右侧悬浮 action === */
.action {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 60;
}
.action .a-box {
  width: 44px;
  height: 44px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background .2s, color .2s;
  color: var(--c-text-soft);
}
.action .a-box:last-child { border-bottom: 1px solid var(--c-line); border-radius: 0 0 4px 4px; }
.action .a-box:first-child { border-radius: 4px 4px 0 0; }
.action .a-box:hover { background: var(--c-brand); color: #fff; }

.action .a-box.wechat .wechat-wrap {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--c-card);
  padding: 8px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  margin-right: 8px;
  display: none;
  box-shadow: var(--shadow-card);
}
.action .a-box.wechat .wechat-wrap img {
  width: 130px;
  height: 130px;
  display: block;
}
.action .a-box.wechat:hover .wechat-wrap { display: block; }

/* 简易图标（unicode / emoji） */
.ico-home::before { content: "\1F3E0"; }
.ico-user::before { content: "\1F4AC"; }
.ico-mail::before { content: "\2709"; }
.ico-top::before { content: "\2191"; }
.ico-wechat::before { content: "\1F4F2"; }

/* === 10. 响应式 === */
@media (max-width: 900px) {
  .wrap { grid-template-columns: 1fr; }
  .primary-menu { display: none; }
  .primary-menu.show { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--c-card); border-top: 1px solid var(--c-line); box-shadow: 0 4px 10px rgba(0,0,0,.06); }
  .primary-menu.show ul.nav { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-menu.show .menu-item > a { padding: 12px 20px; border-bottom: 1px solid var(--c-line); }
  .primary-menu.show .dropdown-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: 0 0 0 16px; background: var(--c-line-2); }
  .navbar-toggle { display: flex; }
  .footer .container { flex-direction: column; gap: 12px; align-items: flex-start; }
  .post-loop { grid-template-columns: 1fr; }
  .post-loop.cols-0 .item { flex-direction: column; }
  .post-loop.cols-0 .item .item-img { flex: 0 0 auto; max-width: 100%; }
  .action { right: 6px; }
  .action .a-box { width: 38px; height: 38px; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .header .container { padding-top: 8px; padding-bottom: 8px; }
  .navbar-header .logo img { height: 32px; }
  .main, .widget { padding: 14px; }
  .entry-title { font-size: 18px; }
}
