/* ============================================================
   沪港科技 · 港口起重机知识库（高端文章落地页样式）
   工业蓝橙主题 · 两栏布局 · 响应式
   ============================================================ */
:root {
  --color-primary: #1f5c8a;
  --color-primary-dark: #16324f;
  --color-navy: #0f2136;
  --color-accent: #e8871a;
  --color-accent-dark: #c76a0a;
  --color-bg: #f4f7fa;
  --color-card: #ffffff;
  --color-text: #2a3440;
  --color-muted: #6b7683;
  --color-border: #e4eaf0;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(16, 40, 64, .08);
  --shadow-md: 0 6px 20px rgba(16, 40, 64, .10);
  --shadow-lg: 0 14px 40px rgba(16, 40, 64, .14);
  --grad-hero: linear-gradient(135deg, #16324f 0%, #1f5c8a 55%, #2a7bb5 100%);
  --grad-accent: linear-gradient(135deg, #e8871a 0%, #f6a23a 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  font-size: 16px;
}

a { color: var(--color-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-accent); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--grad-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.brand small { font-size: 10px; letter-spacing: 2px; color: var(--color-muted); }

.main-nav ul { display: flex; list-style: none; gap: 6px; }
.main-nav a {
  display: block; padding: 8px 16px; border-radius: 8px;
  color: var(--color-text); font-weight: 500;
}
.main-nav a:hover, .main-nav a.is-active { background: #eef4fa; color: var(--color-primary); }

.header-phone { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--color-accent-dark); white-space: nowrap; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 4px 0; transition: .3s; }

/* ---------------- 面包屑 ---------------- */
.breadcrumb { background: #fff; border-bottom: 1px solid var(--color-border); padding: 12px 0; font-size: 14px; }
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { color: var(--color-muted); margin: 0 8px; }
.breadcrumb .current { color: var(--color-text); }

/* ---------------- Hero（首页） ---------------- */
.hero {
  background: var(--grad-hero); color: #fff;
  padding: 72px 0; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(232, 135, 26, .18); filter: blur(2px);
}
.hero h1 { font-size: 40px; line-height: 1.25; margin-bottom: 18px; }
.hero p { font-size: 17px; opacity: .9; max-width: 640px; margin-bottom: 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 8px;
  font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .2s;
}
.btn--accent { background: var(--grad-accent); color: #fff; box-shadow: 0 6px 16px rgba(232, 135, 26, .35); }
.btn--accent:hover { color: #fff; transform: translateY(-2px); }
.btn--light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.btn--light:hover { color: #fff; background: rgba(255, 255, 255, .24); }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { color: #fff; transform: translateY(-2px); }

/* ---------------- 区块 ---------------- */
.section { padding: 48px 0; }
.section-title { font-size: 28px; text-align: center; margin-bottom: 32px; position: relative; }
.section-title::after {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 2px;
  background: var(--grad-accent); margin: 12px auto 0;
}

/* ---------------- 两栏布局 ---------------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }

/* ---------------- 文章卡片流（首页） ---------------- */
.post-list { display: grid; gap: 20px; }
.post-card {
  background: var(--color-card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; gap: 20px; padding: 22px;
  transition: transform .18s, box-shadow .2s; border: 1px solid var(--color-border);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card__thumb {
  flex: 0 0 84px; width: 84px; height: 84px; border-radius: 12px;
  background: linear-gradient(135deg, #eef4fa, #dbe9f5);
  display: flex; align-items: center; justify-content: center; font-size: 40px;
}
.post-card__body { flex: 1; min-width: 0; }
.post-card__meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-muted); margin-bottom: 8px; }
.post-card h2 { font-size: 18px; margin-bottom: 8px; }
.post-card h2 a { color: var(--color-text); }
.post-card h2 a:hover { color: var(--color-primary); }
.post-card p { color: var(--color-muted); font-size: 14px; line-height: 1.6; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #fef1e0; color: var(--color-accent-dark); font-size: 12px; font-weight: 600;
}

/* ---------------- 详情页文章主体 ---------------- */
.article {
  background: var(--color-card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--color-border);
  padding: 40px 44px; overflow-wrap: break-word;
}
.article__header { border-bottom: 1px solid var(--color-border); padding-bottom: 22px; margin-bottom: 26px; }
.article__header h1 { font-size: 30px; line-height: 1.4; color: var(--color-navy); margin-bottom: 14px; }
.article__meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--color-muted); flex-wrap: wrap; }
.article-phone { margin-top: 14px; }
.article-phone a {
  display: inline-block; padding: 8px 16px; border-radius: 8px;
  background: #fef1e0; color: var(--color-accent-dark); font-weight: 700;
}
.article__body { font-size: 16.5px; color: var(--color-text); }
.article__body p { margin: 0 0 18px; text-align: justify; }
.article__body h2 {
  font-size: 22px; color: var(--color-navy); margin: 30px 0 14px;
  padding-left: 14px; border-left: 4px solid var(--color-accent); line-height: 1.4;
}
.article__body h3 { font-size: 18px; color: var(--color-primary); margin: 22px 0 10px; }
.article__figure { margin: 26px 0; text-align: center; }
.article__figure img {
  width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.article__figure figcaption { font-size: 13px; color: var(--color-muted); margin-top: 10px; }

.article__table-wrap { margin: 26px 0; overflow-x: auto; }
.article__table-wrap table {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  background: #fafcfe; border-radius: 8px; overflow: hidden;
}
.article__table-wrap caption {
  font-size: 14px; color: var(--color-muted); text-align: left;
  padding-bottom: 10px; caption-side: top;
}
.article__table-wrap th, .article__table-wrap td {
  padding: 11px 14px; text-align: left; border: 1px solid var(--color-border);
}
.article__table-wrap thead th {
  background: var(--color-primary); color: #fff; font-weight: 600; white-space: nowrap;
}
.article__table-wrap tbody tr:nth-child(even) { background: #f2f7fb; }

.article__list { margin: 0 0 18px 22px; }
.article__list li { margin-bottom: 8px; }
.article__list li::marker { color: var(--color-accent); }
.article__footer { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--color-border); text-align: center; }

/* ---------------- 侧栏 ---------------- */
.sidebar { position: sticky; top: 88px; display: grid; gap: 20px; }
.sidebar__card {
  background: var(--color-card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); padding: 22px;
}
.sidebar__card h3 {
  font-size: 17px; color: var(--color-navy); margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--color-accent);
}
.sidebar__list { list-style: none; }
.sidebar__list li { padding: 9px 0; border-bottom: 1px dashed var(--color-border); }
.sidebar__list li:last-child { border-bottom: 0; }
.sidebar__list a {
  display: flex; gap: 8px; color: var(--color-text); font-size: 14.5px; line-height: 1.5;
}
.sidebar__list a::before { content: "›"; color: var(--color-accent); font-weight: 700; flex: 0 0 auto; }
.sidebar__list a:hover { color: var(--color-primary); }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--color-navy); color: #c7d4e0; margin-top: 48px; }
.site-footer .container { padding-top: 40px; padding-bottom: 24px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.friend-links { margin-bottom: 28px; }
.friend-links ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.friend-links a { color: #c7d4e0; font-size: 14px; }
.friend-links a:hover { color: var(--color-accent); }
.authority { display: grid; gap: 8px; font-size: 14px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.authority strong { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; font-size: 13px; color: #8fa2b3; }
.site-footer__bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------------- 返回顶部 ---------------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px;
  border-radius: 50%; border: 0; cursor: pointer;
  background: var(--color-primary); color: #fff; font-size: 20px;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden;
  transition: .3s; z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-accent); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .article { padding: 26px 20px; }
  .article__header h1 { font-size: 24px; }
  .hero h1 { font-size: 30px; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: #fff; box-shadow: var(--shadow-md); }
  .main-nav.open ul { flex-direction: column; padding: 8px; }
  .nav-toggle { display: block; }
  .post-card { flex-direction: column; }
}
