/* 公共样式 - 头部、底部、按钮、排版 */

:root {
  /* 主色 - 原木色系 */
  --color-primary: #8a6a3a;
  --color-primary-dark: #5a4321;
  --color-primary-light: #c8a878;
  --color-text: #333;
  --color-text-light: #666;
  --color-text-muted: #999;
  --color-border: #e5e5e5;
  --color-bg: #fff;
  --color-bg-soft: #f7f5f1;
  --color-bg-dark: #2a2a2a;
  --max-width: 1280px;
  --header-height: 80px;
}

body {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

.container {
  max-width: 1280px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title .en {
  display: block;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title .cn {
  display: block;
  font-size: 32px;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  display: inline-block;
}

.section-title .cn::before,
.section-title .cn::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--color-primary);
  vertical-align: middle;
  margin: 0 16px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 14px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  transition: all 0.3s ease;
  letter-spacing: 2px;
}

.btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* 顶部导航 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-bottom-color: var(--color-border);
}

.header-inner {
  max-width: 1280px;
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: 2px;
}

.header-logo img {
  height: 36px;
  margin-right: 10px;
  width: auto;
  object-fit: contain;
}

/* 头部联系电话 */
.header-phone-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-left: 24px;
}

.header-phone {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 1px;
  white-space: nowrap;
}

.header-phone::before {
  content: '☎';
  margin-right: 6px;
  font-size: 13px;
}

.header-phone-alt {
  margin-left: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  padding: 8px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a.active {
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s ease;
}

/* 页脚（资料定制：品牌 / 主营业务 / 快速导航 / 联系我们） */
.site-footer {
  background: #2a2a2a;
  background: var(--color-bg-dark);
  color: #aaa;
  padding: 18px 0 24px;
  font-size: 13px;
}

.footer-seo {
  line-height: 1.9;
  text-align: center;
  padding: 0 24px;
}

.footer-seo-main {
  width: min(100%, 860px);
  margin: 0 auto;
}

.footer-seo a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-seo a:hover {
  color: var(--color-primary-light);
}

.footer-company-name {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.footer-meta-line {
  color: #d0d0d0;
  margin-bottom: 2px;
}

.footer-dot,
.footer-sep {
  display: inline-block;
  margin: 0 8px;
  color: #666;
}

.footer-intro {
  max-width: 1100px;
  margin: 8px auto 10px;
  color: #f0f0f0;
  line-height: 1.9;
}

.footer-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 12px auto 10px;
}

.footer-qr {
  width: 108px;
  height: 108px;
  flex: none;
  border-radius: 4px;
  background: #fff;
  padding: 4px;
}

.footer-link-row {
  margin-top: 4px;
}

.footer-row-label {
  color: #fff;
  margin-right: 8px;
}

.footer-link-group {
  display: inline;
}

.footer-link-group-text {
  display: block;
  margin-top: 6px;
}

.footer-keyword-text {
  color: #e5e5e5;
  line-height: 1.9;
  margin: 2px 0;
  word-break: break-word;
}

.footer-bottom {
  border-top: 1px solid #3a3a3a;
  margin-top: 16px;
  padding-top: 14px;
  text-align: center;
  color: #777;
  font-size: 12.5px;
}

@media (max-width: 1200px) {
  /* 中等屏宽时页头只显示主号码，避免与导航挤压 */
  .header-phone-alt {
    display: none;
  }

  .footer-seo {
    padding: 0;
  }

  .footer-qr-wrap {
    margin: 10px 0 8px;
  }
}

/* 面包屑 */
.breadcrumb {
  max-width: 1280px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  margin: 0 8px;
}

/* 通用筛选条 */
.filter-bar {
  background: var(--color-bg-soft);
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.filter-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-list a {
  display: inline-block;
  padding: 8px 24px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 14px;
  color: var(--color-text-light);
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.filter-list a:hover,
.filter-list a.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* 通用翻页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-text-light);
  background: #fff;
  transition: all 0.2s ease;
}

.pagination a:hover,
.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pagination .disabled {
  color: var(--color-text-muted);
  pointer-events: none;
  background: var(--color-bg-soft);
}

/* 响应式 */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    padding: 8px 24px 16px;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 4px;
    border-bottom: 1px solid #f0ede8;
    font-size: 15px;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav a.active {
    color: var(--color-primary);
  }

  .header-phone {
    display: none;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section {
    padding: 60px 0;
  }

  .section-title .cn {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .footer-qr-wrap {
    margin: 10px 0 8px;
  }

  .site-footer {
    padding-top: 20px;
  }

  .footer-company-name {
    font-size: 16px;
  }

  .footer-meta-line,
  .footer-intro,
  .footer-link-row,
  .footer-bottom {
    font-size: 12px;
    line-height: 1.9;
  }

  .footer-dot,
  .footer-sep {
    margin: 0 4px;
  }

  .section-title .cn::before,
  .section-title .cn::after {
    width: 20px;
    margin: 0 8px;
  }
}

/* ============================================================
   IE 内核（360 兼容模式）降级样式
   使用 \9 hack：仅 IE 解析这些声明，现代浏览器完全忽略
   目标：IE 下导航横排、卡片网格化（inline-block 近似）、颜色正常
   ============================================================ */

/* --- HTML5 元素注册为块级（IE8 及以下必需） --- */
header, nav, footer, section, main, details { display: block\9; }
summary { display: block\9; }
source { display: none\9; }

/* --- 页头：table 布局实现横排（IE 不支持/错用 flex） --- */
.header-inner { display: table\9; width: 100%\9; }
.header-logo { display: table-cell\9; vertical-align: middle\9; }
.main-nav { display: table-cell\9 !important; position: static\9 !important; vertical-align: middle\9; text-align: center\9; }
.main-nav a { display: inline-block\9; padding: 30px 16px\9; border-bottom: none\9; }
.header-phone-group { display: table-cell\9; vertical-align: middle\9; text-align: right\9; white-space: nowrap\9; }
.header-phone { display: inline-block\9; }
.nav-toggle { display: none\9 !important; }

/* --- 卡片网格：inline-block 近似多列（IE 不支持 CSS Grid） --- */
.project-grid, .business-grid, .stats-list, .contact-cards, .factory-gallery,
.biz-grid, .base-grid, .team-grid, .honor-grid, .visit-grid, .stats-row,
.news-list, .home-bid-list { display: block\9; }

.project-grid > *, .business-grid > *, .stats-list > *, .contact-cards > *,
.factory-gallery > *, .biz-grid > *, .base-grid > *, .team-grid > *,
.honor-grid > *, .visit-grid > *, .stats-row > *, .news-list > *, .home-bid-list > * {
  display: inline-block\9; vertical-align: top\9; margin-bottom: 16px\9;
}

.stats-list > *, .factory-gallery > *, .business-grid > *, .stats-row > * { width: 23%\9; }
.project-grid > *, .contact-cards > *, .visit-grid > *, .biz-grid > * { width: 31%\9; }
.base-grid > *, .team-grid > *, .honor-grid > *, .news-list > * { width: 48%\9; }

/* --- 横幅文字居中（flex 失效的降级） --- */
.sub-banner .content { display: block\9; text-align: center\9; padding-top: 90px\9; }

/* --- 筛选条 / FAQ锚点 / 联系条 --- */
.filter-list li, .filter-list a, .faq-nav a { display: inline-block\9; }
.contact-strip-phones { display: block\9; text-align: center\9; }
.contact-strip-phone { display: inline-block\9; }

/* --- 按钮主色补丁（CSS 变量在 IE 失效） --- */
.btn { border: 1px solid #8a6a3a\9; color: #8a6a3a\9; background: #fff\9; display: inline-block\9; padding: 12px 28px\9; }
.btn-primary { background: #5a4321\9; color: #fff\9; }

/* --- FAQ 手风琴（IE 不支持 details/summary，配合 JS 切换） --- */
details.faq-item .faq-a { display: none\9; }
details.faq-item.open .faq-a { display: block\9; }
details.faq-item summary { cursor: pointer\9; }
