/* ==========================================================================
   宏远重工 - 企业官网全局样式（传统制造业 · 工业蓝橙风）
   ========================================================================== */

:root {
  --color-primary: #1f5c8a;
  --color-primary-dark: #163a5c;
  --color-primary-light: #3a7ab5;
  --color-accent: #e8871a;
  --color-navy: #16324f;

  --color-text: #2b3a4a;
  --color-text-light: #66727e;
  --color-border: #e2e8ee;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7fa;

  --font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
                 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --container-max: 1200px;
  --radius: 8px;
  --shadow-sm: 0 2px 8px rgba(22, 50, 79, 0.06);
  --shadow-md: 0 6px 24px rgba(22, 50, 79, 0.12);
  --transition: 0.25s ease;
}

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

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

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { color: var(--color-navy); line-height: 1.3; font-weight: 700; }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--alt { background: var(--color-bg-alt); }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head .eyebrow {
  display: inline-block; font-size: 14px; letter-spacing: 2px;
  color: var(--color-accent); text-transform: uppercase; margin-bottom: 10px;
}
.section-head h2 { font-size: 34px; margin-bottom: 14px; }
.section-head p { color: var(--color-text-light); max-width: 640px; margin: 0 auto; font-size: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 50px;
  font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition); text-align: center;
}
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--accent { background: var(--color-accent); color: #fff; }
.btn--accent:hover { background: #c9740f; color: #fff; }
.btn--outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--light { background: #fff; color: var(--color-navy); }
.btn--light:hover { background: var(--color-bg-alt); color: var(--color-navy); }

/* ---------- 顶部工具条 ---------- */
.topbar { background: var(--color-navy); color: rgba(255,255,255,0.85); font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 42px; gap: 16px; }
.topbar__slogan { letter-spacing: 0.5px; }
.topbar__right { display: flex; gap: 22px; align-items: center; }
.topbar__right a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.topbar__right a:hover { color: #ffd166; }
.topbar__right .hotline { color: #ffd166; font-weight: 700; font-size: 17px; letter-spacing: 0.5px; }

/* ---------- 导航 ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--color-navy); font-weight: 700; font-size: 22px; }
.brand__logo {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px;
}
.brand small { display: block; font-size: 11px; font-weight: 400; color: var(--color-text-light); letter-spacing: 1px; }
.main-nav ul { display: flex; gap: 34px; }
.main-nav a { display: block; color: var(--color-text); font-size: 16px; font-weight: 500; padding: 24px 0; position: relative; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 16px; width: 0; height: 3px;
  border-radius: 2px; background: var(--color-accent); transition: width var(--transition);
}
.main-nav a:hover, .main-nav a.is-active { color: var(--color-primary); }
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }
.header-cta { margin-left: 18px; white-space: nowrap; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; width: 42px; height: 42px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-navy); transition: all var(--transition); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #16324f 0%, #1f4e6e 55%, #1f5c8a 100%);
  padding: 120px 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(232,135,26,0.15) 0, transparent 45%);
}
.hero__inner { position: relative; max-width: 720px; }
.hero h1 { color: #fff; font-size: 46px; margin-bottom: 22px; line-height: 1.25; }
.hero p { font-size: 18px; color: rgba(255,255,255,0.88); margin-bottom: 36px; max-width: 600px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__stats { position: relative; display: flex; gap: 48px; margin-top: 56px; flex-wrap: wrap; }
.hero__stats .stat strong { display: block; font-size: 34px; color: #fff; font-weight: 700; }
.hero__stats .stat span { font-size: 14px; color: rgba(255,255,255,0.75); }

/* ---------- 品牌/电话 显眼展示 ---------- */
.banner-contact { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.banner-contact .brand-name { color: #fff; font-size: 20px; font-weight: 600; letter-spacing: 1px; }
.banner-phone { color: #ffd166; font-size: 34px; font-weight: 800; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.banner-phone:hover { color: #fff; }
.cta-phone { color: #ffd166; font-size: 30px; font-weight: 800; margin: 16px 0 26px; }
.cta-phone a { color: #ffd166; }
.cta-phone a:hover { color: #fff; }
.article-phone { margin-top: 16px; font-size: 20px; font-weight: 700; }
.article-phone a { color: var(--color-primary); }

/* ---------- 网格与卡片 ---------- */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card__icon {
  width: 56px; height: 56px; border-radius: 12px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.card h3 { font-size: 20px; margin-bottom: 12px; }
.card p { color: var(--color-text-light); font-size: 15px; }
.card__link { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 14px; }
.card__link::after { content: " →"; transition: margin var(--transition); }
.card__link:hover::after { margin-left: 4px; }

/* ---------- 简介 ---------- */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-preview__media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); min-height: 320px;
  background: linear-gradient(135deg, #eef2f6, #d6e2ec); display: flex; align-items: center; justify-content: center;
  color: var(--color-primary); font-size: 60px;
}
.about-preview h2 { font-size: 32px; margin-bottom: 20px; }
.about-preview p { color: var(--color-text-light); margin-bottom: 16px; }
.about-preview ul { margin: 20px 0 28px; }
.about-preview ul li { padding-left: 26px; position: relative; margin-bottom: 10px; color: var(--color-text); }
.about-preview ul li::before { content: "✓"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }

/* ---------- 产品缩略图卡片（传统制造业布局） ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.catalog-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); scroll-margin-top: 120px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.catalog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.catalog-card__thumb {
  height: 200px; background: linear-gradient(135deg, #eef2f6 0%, #d6e2ec 100%);
  display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--color-primary); position: relative;
}
.catalog-card__thumb::after {
  content: "产品图"; position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: #6b7d8f;
  background: rgba(255,255,255,0.75); padding: 2px 8px; border-radius: 4px;
}
.catalog-card__body { padding: 24px; text-align: center; }
.catalog-card__body h3 { font-size: 19px; margin-bottom: 10px; }
.catalog-card__body p { font-size: 14px; color: var(--color-text-light); margin-bottom: 16px; }
.catalog-card__body .btn { padding: 9px 24px; font-size: 14px; }

/* ---------- 双列新闻网格 ---------- */
.news-grid--2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.news-card {
  display: flex; gap: 18px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card__icon {
  width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0; color: var(--color-primary); font-size: 30px;
  background: linear-gradient(135deg, var(--color-bg-alt), #d6e2ec); display: flex; align-items: center; justify-content: center;
}
.news-card__body { flex: 1; min-width: 0; }
.news-card__meta { font-size: 12px; color: var(--color-text-light); margin-bottom: 6px; }
.news-card__meta .tag { background: var(--color-bg-alt); color: var(--color-primary); border-radius: 4px; padding: 2px 10px; margin-right: 10px; }
.news-card h3 { font-size: 16px; line-height: 1.5; margin-bottom: 8px; }
.news-card h3 a { color: var(--color-navy); }
.news-card h3 a:hover { color: var(--color-primary); }
.news-card p { font-size: 14px; color: var(--color-text-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 单列新闻列表 ---------- */
.news-list { display: grid; gap: 24px; }
.news-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; background: #fff;
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.news-item:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.news-item__thumb {
  background: linear-gradient(135deg, var(--color-bg-alt), #d6e2ec); min-height: 160px;
  display: flex; align-items: center; justify-content: center; color: var(--color-primary); font-size: 44px;
}
.news-item__body { padding: 24px 24px 24px 0; }
.news-item__meta { font-size: 13px; color: var(--color-text-light); margin-bottom: 8px; }
.news-item__meta .tag { background: var(--color-bg-alt); color: var(--color-primary); border-radius: 4px; padding: 2px 10px; margin-right: 12px; font-size: 12px; }
.news-item h3 { font-size: 20px; margin-bottom: 10px; }
.news-item h3 a { color: var(--color-navy); }
.news-item h3 a:hover { color: var(--color-primary); }
.news-item p { color: var(--color-text-light); font-size: 15px; }

/* ---------- 卡片矩阵新闻 ---------- */
.news-grid--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-matrix {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-matrix:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.news-matrix__thumb {
  height: 130px; background: linear-gradient(135deg, var(--color-bg-alt), #d6e2ec);
  display: flex; align-items: center; justify-content: center; font-size: 44px; color: var(--color-primary);
}
.news-matrix__body { padding: 20px; flex: 1; }
.news-matrix__meta { font-size: 12px; color: var(--color-text-light); margin-bottom: 8px; }
.news-matrix__meta .tag { background: var(--color-bg-alt); color: var(--color-primary); border-radius: 4px; padding: 2px 10px; margin-right: 10px; }
.news-matrix h3 { font-size: 16px; line-height: 1.5; margin-bottom: 8px; }
.news-matrix h3 a { color: var(--color-navy); }
.news-matrix h3 a:hover { color: var(--color-primary); }
.news-matrix p { font-size: 13px; color: var(--color-text-light); }

/* ---------- 内页 Banner ---------- */
.page-banner { background: linear-gradient(135deg, #16324f, #1f5c8a); color: #fff; padding: 64px 0; text-align: center; }
.page-banner h1 { color: #fff; font-size: 38px; margin-bottom: 12px; }
.page-banner p { color: rgba(255,255,255,0.82); max-width: 620px; margin: 0 auto; }

/* ---------- 面包屑 ---------- */
.breadcrumb { font-size: 14px; color: var(--color-text-light); padding: 20px 0; border-bottom: 1px solid var(--color-border); }
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 8px; color: #c3ccd4; }
.breadcrumb .current { color: var(--color-navy); font-weight: 600; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
  padding: 0 14px; border-radius: 8px; border: 1px solid var(--color-border); color: var(--color-text);
  background: #fff; font-size: 14px; transition: all var(--transition);
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .is-current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 700; }
.pagination .is-disabled { opacity: 0.4; pointer-events: none; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 12px; background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq__question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 24px; font-size: 16px; font-weight: 600; color: var(--color-navy);
  background: none; border: none; cursor: pointer; text-align: left; font-family: inherit;
}
.faq__question::after { content: "+"; font-size: 26px; line-height: 1; color: var(--color-accent); font-weight: 400; transition: transform var(--transition); flex-shrink: 0; }
.faq__item.is-open .faq__question::after { content: "−"; }
.faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq__answer p { padding: 0 24px 20px; color: var(--color-text-light); font-size: 15px; }
.faq__item.is-open .faq__answer { max-height: 400px; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; text-align: center; padding: 64px 0; }
.cta h2 { color: #fff; font-size: 32px; margin-bottom: 14px; }
.cta p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 10px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--color-navy); color: rgba(255,255,255,0.75); padding: 64px 0 0; font-size: 14px; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 20px; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer__about p { margin-top: 16px; max-width: 300px; line-height: 1.8; }
.site-footer__contact li { display: flex; gap: 10px; margin-bottom: 14px; }

.friend-links { border-top: 1px solid rgba(255,255,255,0.12); padding: 30px 0; }
.friend-links h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.friend-links ul { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.friend-links li a { font-size: 13px; color: rgba(255,255,255,0.6); }
.friend-links li a:hover { color: #ffd166; }

.footer-resources { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0; display: flex; align-items: center; gap: 12px 26px; flex-wrap: wrap; font-size: 14px; color: rgba(255,255,255,0.65); }
.footer-resources__label { color: #fff; font-weight: 600; }
.footer-resources a { color: #ffd166; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.footer-resources a:hover { color: #fff; text-decoration: underline; }

.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0; font-size: 13px; color: rgba(255,255,255,0.55); }
.site-footer__bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- 文章 ---------- */
.article { max-width: 820px; margin: 0 auto; }
.article__header { text-align: center; margin-bottom: 40px; }
.article__header h1 { font-size: 32px; margin-bottom: 16px; }
.article__meta { color: var(--color-text-light); font-size: 14px; }
.article__meta span { margin: 0 10px; }
.article__body h2 { font-size: 24px; margin: 36px 0 16px; }
.article__body h3 { font-size: 19px; margin: 26px 0 12px; }
.article__body p { margin-bottom: 18px; color: var(--color-text); }
.article__body ul { margin: 0 0 18px 22px; list-style: disc; color: var(--color-text); }
.article__body ul li { margin-bottom: 8px; }
.article__footer { margin-top: 48px; padding: 20px; background: var(--color-bg-alt); border-radius: var(--radius); text-align: center; }

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

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .header-cta { display: none; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .news-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .about-preview { grid-template-columns: 1fr; gap: 32px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 36px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .section-head h2 { font-size: 26px; }
  .topbar__slogan { display: none; }
  .topbar__inner { justify-content: center; height: 38px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0; background: #fff; box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  .main-nav.is-open { max-height: 400px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 12px 20px; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--color-border); }
  .main-nav a::after { display: none; }
  .hero { padding: 72px 0; }
  .hero h1 { font-size: 30px; }
  .hero__stats { gap: 28px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .news-grid--2, .news-grid--3 { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .news-item__body { padding: 20px; }
  .news-item__thumb { min-height: 140px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .site-footer__bottom .container { justify-content: center; text-align: center; }
  .article__header h1 { font-size: 26px; }
  .product-grid { grid-template-columns: 1fr; }
  .banner-phone { font-size: 26px; }
  .cta-phone { font-size: 24px; }
}
