/* ================================================
   企业官网模板 - 共享样式
   2026-04-04-benda 模板集
   ================================================ */

/* CSS 变量 */
:root {
  --primary: #333333;
  --primary-dark: #222222;
  --red: #e74c3c;
  --red-hover: #c0392b;
  --text-dark: #333333;
  --text-mid: #666666;
  --text-light: #999999;
  --bg-light: #f5f5f5;
  --bg-white: #ffffff;
  --border: #e0e0e0;
  --shadow-hover: 0 16px 48px rgba(51,51,51,0.15);
  --transition: all 0.3s ease;
}

/* 重置样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif; color: var(--text-dark); background: var(--bg-white); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 12px; }

/* 区块标题 */
.section-header { text-align: left; margin-bottom: 32px; display: flex; align-items: center; }
.section-tag { display: inline-block; background: rgba(51,51,51,0.08); color: var(--primary); font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; padding: 5px 16px; margin-bottom: 14px; }
.section-title { font-size: clamp(18px, 2.5vw, 26px); font-weight: 700; color: var(--primary); line-height: 1.25; margin-bottom: 16px; }
.section-subtitle { font-size: 16px; color: var(--text-light); line-height: 1.8; max-width: 600px; }
.section-divider { display: none; }

/* 导航 */
header { position: relative; z-index: 999; background: var(--bg-white); transition: var(--transition); }
.navbar { display: flex; align-items: center; justify-content: space-between; height: 110px; }
.logo-img { width: 200px; height: 85px; object-fit: contain; }
nav ul { display: flex; gap: 4px; padding-left: 0; margin-right: 4px; }
nav ul li a { display: block; padding: 8px 16px; font-size: 15px; font-weight: 500; color: var(--text-mid); transition: var(--transition); position: relative; }
nav ul li a::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%) scaleX(0); width: 60%; height: 2px; background: var(--red); transition: var(--transition); }
nav ul li a:hover, nav ul li a.active { color: var(--primary); background: rgba(51,51,51,0.06); }
nav ul li a:hover::after, nav ul li a.active::after { transform: translateX(-50%) scaleX(1); }

/* 二级菜单 */
nav ul li { position: relative; }
nav ul li.has-dropdown > a { padding-right: 28px; }
.dropdown-arrow { font-size: 10px; margin-left: 6px; transition: var(--transition); }
nav ul li.has-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--bg-white);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 100;
  border-radius: 4px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}
nav ul li.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-mid);
  white-space: nowrap;
  transition: var(--transition);
}
.dropdown-menu li a:hover {
  background: var(--bg-light);
  color: var(--red);
}
.dropdown-menu li a::after { display: none; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 26px; height: 2px; background: var(--primary); transition: var(--transition); }

/* 页面横幅 */
.page-banner {
  background: linear-gradient(135deg, rgba(51,51,51,0.6) 0%, rgba(34,34,34,0.7) 100%),
              url('/templates/2026-04-04-benda/banner/banner.jpg') center/cover no-repeat;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.page-banner::before { content: ''; position: absolute; top: -80px; right: -80px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(231,76,60,0.15) 0%, transparent 70%); }
.page-banner-inner { position: relative; z-index: 1; }
.page-banner h1 { font-size: clamp(24px,3vw,36px); font-weight: 800; color: white; margin-bottom: 12px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,0.6); }
.breadcrumb a { color: rgba(255,255,255,0.6); transition: var(--transition); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { color: rgba(255,255,255,0.35); }
.breadcrumb .current { color: var(--red); }

/* 底部 */
footer { background: #1a1a1a; color: rgba(255,255,255,0.7); }
.footer-main { padding: 64px 0 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr; gap: 40px; }
.footer-brand { padding-right: 24px; }
.footer-logo { margin-bottom: 20px; }
.footer-logo img { height: 48px; width: auto; }
.footer-desc { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.8; margin-bottom: 24px; }
.footer-socials { display: flex; gap: 12px; }
.footer-social { width: 40px; height: 40px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 16px; transition: var(--transition); }
.footer-social:hover { background: var(--red); border-color: var(--red); color: white; }
.footer-col-title { font-size: 15px; font-weight: 700; color: white; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--red); display: inline-block; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 14px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.55); transition: var(--transition); display: inline-block; }
.footer-links a:hover { color: var(--red); padding-left: 6px; }
.footer-contact-items { display: flex; flex-direction: column; gap: 18px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 14px; font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; }
.footer-contact-item i { color: var(--red); font-size: 14px; margin-top: 3px; flex-shrink: 0; width: 18px; }
.footer-bottom { background: #111; padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-bottom a { color: rgba(255,255,255,0.35); transition: var(--transition); }
.footer-bottom a:hover { color: var(--red); }

/* 回到顶部 */
.back-to-top { position: fixed; bottom: 32px; right: 32px; width: 46px; height: 46px; background: var(--primary); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 4px 16px rgba(51,51,51,0.3); transition: var(--transition); opacity: 0; pointer-events: none; z-index: 100; }
.back-to-top.show { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--red); transform: translateY(-3px); }

/* 动画 */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* 移动端菜单 */
.mobile-menu { display: none; position: fixed; inset: 0; background: rgba(255,255,255,0.98); backdrop-filter: blur(20px); z-index: 998; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 20px; font-weight: 600; color: var(--primary); padding: 14px 40px; transition: var(--transition); }
.mobile-menu a:hover { color: var(--red); }
.mobile-close { position: absolute; top: 24px; right: 24px; font-size: 28px; color: var(--text-mid); cursor: pointer; background: none; border: none; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 40px 0 0; }
.page-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); font-size: 14px; color: var(--text-mid); cursor: pointer; transition: var(--transition); background: white; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* 分类侧边栏 */
.sidebar-title { font-size: 13px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--text-mid); cursor: pointer; transition: var(--transition); border-left: 3px solid transparent; }
.cat-item:hover { color: var(--primary); background: var(--bg-light); }
.cat-item:hover .cat-arrow { opacity: 1; transform: translateX(0); }
.cat-item.active { color: var(--primary); background: var(--bg-light); border-left-color: var(--red); font-weight: 600; }
.cat-arrow { font-size: 12px; color: var(--red); opacity: 0; transform: translateX(-6px); transition: var(--transition); }
.cat-item.active .cat-arrow { opacity: 1; transform: translateX(0); }
.sidebar-stats { margin-top: 32px; padding: 20px; background: var(--bg-light); text-align: center; }
.stats-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.stats-number { font-size: 36px; font-weight: 900; color: var(--primary); line-height: 1; }
.stats-unit { font-size: 13px; color: var(--text-mid); margin-top: 4px; }

/* 响应式 */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 992px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; } }
@media (max-width: 768px) {
  header { position: relative; }
  nav { display: none; } .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .logo-img { width: 140px; height: 60px; }
  .back-to-top { bottom: 20px; right: 20px; }
}
@media (max-width: 576px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-brand { padding-right: 0; text-align: center; }
  .footer-socials { justify-content: center; }
  .footer-col-title { display: block; text-align: center; }
  .footer-bottom .container { flex-direction: column; gap: 10px; }
}
