/* ============================================================
   Hyperlinkpush Blog — Enhancement Layer
   不替换 style.css，仅做覆盖式增强
   加载顺序：style.css → blog-enhance.css
   ============================================================ */

/* ===== Top bar (inside fixed header) ===== */
.hl-topbar { background: #0a4f8f; color: #cfe3f5; font-size: 12px; padding: 6px 0; }
.hl-topbar .container { display: flex !important; justify-content: space-between !important; align-items: center !important; flex-wrap: nowrap !important; }
.hl-topbar .hl-date { flex-shrink: 0; white-space: nowrap; }
.hl-topbar .hl-topbar-right { display: flex !important; align-items: center !important; gap: 16px; flex-shrink: 0; }
.hl-topbar .hl-social { display: inline-flex !important; align-items: center !important; }
.hl-topbar .hl-social a { margin-left: 12px; }
.hl-topbar .hl-topbar-action { display: inline-flex !important; align-items: center !important; gap: 8px; }
.hl-topbar a, .hl-topbar .hl-login-link { color: #fff; opacity: .85; transition: opacity .15s; }
.hl-topbar a:hover, .hl-topbar .hl-login-link:hover { opacity: 1; text-decoration: none; }
.hl-topbar .hl-login-link { font-size: 12px; }
.hl-topbar .publish { background: #e8772e !important; border-color: #e8772e !important; color: #fff !important; font-size: 11px; padding: 3px 10px !important; }
.hl-topbar .publish:hover { background: #c75f1a !important; }
body > header.header { background: #fff; }
body > header.header .hl-topbar { background: #0a4f8f; }

/* ===== UEditor full toolbar height fix ===== */
.edui-default .edui-toolbar {
  height: auto !important;
  min-height: 24px;
  overflow: visible !important;
}
.edui-default .edui-editor {
  overflow: visible !important;
}
.edui-default .edui-editor-toolbarbox {
  height: auto !important;
  overflow: visible !important;
}
.edui-default .edui-button, .edui-default .edui-splitbutton, .edui-default .edui-menubutton {
  height: 24px !important;
}
.edui-default .edui-box {
  margin: 1px 2px !important;
}

/* ===== Featured band (index) ===== */
.hl-featured {
  margin: 2px 0;
}
.hl-featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(15,23,33,.10);
  border: 1px solid #f0f2f5;
}
.hl-featured-card .hl-thumb {
  position: relative;
  min-height: 340px;
  background-size: cover;
  background-position: center;
  background-color: #f5f7fa;
}
.hl-featured-card .hl-thumb .hl-badge {
  position: absolute; top: 18px; left: 18px;
  background: #e8772e; color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 6px 13px; border-radius: 999px;
}
.hl-featured-card .hl-body {
  padding: 32px 36px;
  display: flex; flex-direction: column; justify-content: center;
}
.hl-featured-card .hl-cat-line {
  display: inline-flex; align-items: center; gap: 8px;
  color: #0f6cbd; font-weight: 600; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px;
}
.hl-featured-card h2 {
  font-size: 26px; line-height: 1.28; margin-bottom: 12px; font-weight: 700;
}
.hl-featured-card h2 a { color: #1f2933; }
.hl-featured-card h2 a:hover { color: #0f6cbd; }
.hl-featured-card .hl-excerpt {
  color: #52606d; font-size: 14px; margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hl-featured-card .hl-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: #7b8794; flex-wrap: wrap;
}
.hl-featured-card .hl-meta .hl-author { color: #1f2933; font-weight: 500; }
.hl-featured-card .hl-meta .hl-dot { width: 3px; height: 3px; background: #7b8794; border-radius: 50%; }

/* ===== Section heading ===== */
.hl-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 30px 0 18px;
}
.hl-section-head h3 {
  font-size: 20px; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 11px;
}
.hl-section-head h3::before {
  content: ""; width: 4px; height: 20px;
  background: #0f6cbd; border-radius: 2px;
}
.hl-section-head a { font-size: 13px; color: #0f6cbd; }

/* ===== Sidebar widgets (right.htm) ===== */
.hl-widget {
  background: #fff;
  border: 1px solid #f0f2f5;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 2px;
  box-shadow: 0 1px 3px rgba(15,23,33,.04);
}
.hl-widget h3.hl-widget-title {
  font-size: 16px; font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 11px;
  border-bottom: 2px solid #f5f7fa;
  position: relative;
}
.hl-widget h3.hl-widget-title::after {
  content: ""; position: absolute;
  left: 0; bottom: -2px; width: 38px; height: 2px;
  background: #0f6cbd;
}

/* Popular list */
.hl-popular-list { display: flex; flex-direction: column; gap: 14px; }
.hl-popular-item { display: flex; gap: 11px; align-items: flex-start; }
.hl-popular-item .hl-num {
  font-family: Georgia, serif;
  font-size: 16px; font-weight: 700;
  line-height: 1; min-width: 24px;
  color: #e4e7eb;
}
.hl-popular-item:nth-child(1) .hl-num { color: #e8772e; }
.hl-popular-item:nth-child(2) .hl-num { color: #0f6cbd; }
.hl-popular-item:nth-child(3) .hl-num { color: #8e7cc3; }
.hl-popular-item .hl-info h4 {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  margin: 0 0 4px;
}
.hl-popular-item .hl-info h4 a { color: #1f2933; }
.hl-popular-item .hl-info h4 a:hover { color: #0f6cbd; }
.hl-popular-item .hl-info .hl-date { font-size: 11px; color: #7b8794; }

/* Category list with count */
.hl-cat-list { list-style: none; margin: 0; padding: 0; }
.hl-cat-list li { border-bottom: 1px solid #f5f7fa; }
.hl-cat-list li:last-child { border-bottom: none; }
.hl-cat-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; color: #52606d; font-size: 14px; font-weight: 500;
}
.hl-cat-list a:hover { color: #0f6cbd; }
.hl-cat-list .hl-count {
  background: #f5f7fa; color: #7b8794;
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
}
.hl-cat-list a:hover .hl-count { background: #eef4fb; color: #0f6cbd; }

/* Newsletter widget */
.hl-widget-newsletter {
  background: linear-gradient(135deg, #0f6cbd, #0a4f8f);
  color: #fff; border: none;
}
.hl-widget-newsletter h3.hl-widget-title {
  color: #fff; border-color: rgba(255,255,255,.25);
}
.hl-widget-newsletter h3.hl-widget-title::after { background: #fff; }
.hl-widget-newsletter p { font-size: 13px; opacity: .9; margin: 0 0 14px; }
.hl-widget-newsletter input {
  width: 100%; padding: 10px 14px; border: none;
  border-radius: 999px; margin-bottom: 10px; font-size: 13px; outline: none;
}
.hl-widget-newsletter button {
  width: 100%; background: #e8772e; color: #fff;
  border: none; border-radius: 999px;
  padding: 10px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.hl-widget-newsletter button:hover { background: #c75f1a; }

/* ===== Article page enhancements ===== */
.hl-reading-time {
  display: inline-flex; align-items: center; gap: 5px;
  background: #eef4fb; color: #0f6cbd;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  margin-left: 6px;
}

.hl-author-bio {
  display: flex; gap: 16px;
  background: #f5f7fa;
  border-radius: 10px;
  padding: 20px;
  margin: 26px 0;
  border: 1px solid #eef1f5;
}
.hl-author-bio .hl-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #0f6cbd);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 20px;
  flex-shrink: 0;
}
.hl-author-bio .hl-info h4 { font-size: 15px; font-weight: 700; margin: 0 0 5px; }
.hl-author-bio .hl-info .hl-role { font-size: 12px; color: #0f6cbd; margin-bottom: 6px; }
.hl-author-bio .hl-info p { font-size: 13px; color: #52606d; margin: 0; line-height: 1.6; }

/* Prev/Next nav */
.hl-prev-next {
  display: flex; justify-content: space-between; gap: 16px;
  margin: 24px 0; padding: 18px 0;
  border-top: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5;
  flex-wrap: wrap;
}
.hl-prev-next .hl-pn-item { flex: 1; min-width: 200px; }
.hl-prev-next .hl-pn-item.hl-right { text-align: right; }
.hl-prev-next .hl-pn-label { font-size: 11px; color: #7b8794; margin-bottom: 3px; }
.hl-prev-next .hl-pn-item a { font-weight: 600; font-size: 14px; color: #1f2933; }
.hl-prev-next .hl-pn-item a:hover { color: #0f6cbd; }

/* ===== Footer enhancement ===== */
.hl-site-footer {
  background: #0b1622;
  color: #9aa5b1;
  padding: 50px 0 0;
  margin-top: 30px;
}
.hl-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
}
.hl-footer-col h5 {
  color: #fff; font-size: 14px; font-weight: 600;
  margin: 0 0 16px; letter-spacing: .02em;
}
.hl-footer-col p { font-size: 13px; line-height: 1.7; margin: 0 0 14px; }
.hl-footer-col ul { list-style: none; margin: 0; padding: 0; }
.hl-footer-col ul li { margin-bottom: 9px; }
.hl-footer-col ul a { color: #9aa5b1; font-size: 13px; transition: color .15s; }
.hl-footer-col ul a:hover { color: #fff; }
.hl-footer-brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 700; color: #fff;
  margin-bottom: 14px;
}
.hl-footer-brand .hl-logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #0f6cbd, #6c5ce7);
  border-radius: 8px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 16px;
}
.hl-footer-social { display: flex; gap: 9px; margin-top: 14px; }
.hl-footer-social a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08);
  border-radius: 50%; color: #fff;
  transition: background .15s;
}
.hl-footer-social a:hover { background: #0f6cbd; }
.hl-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
  font-size: 12px;
}
.hl-footer-bottom a { color: #9aa5b1; }
.hl-footer-bottom a:hover { color: #fff; }
.hl-footer-bottom .hl-links { display: flex; gap: 18px; }

/* Back to top (already exists, restyle slightly) */
.action-item.gotop {
  background: #0f6cbd !important;
  color: #fff !important;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hl-featured-card { grid-template-columns: 1fr; }
  .hl-featured-card .hl-thumb { min-height: 220px; }
  .hl-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hl-featured-card .hl-body { padding: 22px; }
  .hl-featured-card h2 { font-size: 21px; }
  .hl-footer-grid { grid-template-columns: 1fr; }
  .hl-topbar { font-size: 12px; }
  .hl-prev-next .hl-pn-item { min-width: 100%; }
  .hl-prev-next .hl-pn-item.hl-right { text-align: left; }
}


/* CSS counter for popular list numbering (replaces PHP $i) */
.hl-popular-list { counter-reset: hl-pop; }
.hl-popular-item .hl-num::before {
  counter-increment: hl-pop;
  content: counter(hl-pop, decimal-leading-zero);
}




/* ===== Safe layout integration (non-conflicting) ===== */
.hl-topbar { z-index: 1000; position: relative; }
.hl-topbar .container { padding-left: 10px; padding-right: 10px; }
body > .hl-topbar + .header { margin-top: 0; }

/* Ensure sidebar widgets don't overflow */
.sidebar .hl-widget { box-sizing: border-box; max-width: 100%; }
.sidebar .hl-widget input { box-sizing: border-box; }
