/* ============================================
   昆山瑞普金属表面技术有限公司 - 主样式表
   SEO优化版网站 | v1.0
   ============================================ */

/* ===== 基础重置与变量 ===== */
:root {
  --primary: #1a3a5c;
  --primary-light: #2d6a9f;
  --primary-dark: #0f2540;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --text-dark: #222;
  --text-mid: #555;
  --text-light: #888;
  --bg-light: #f7f9fc;
  --bg-white: #fff;
  --border: #e0e8f0;
  --shadow: 0 4px 20px rgba(26,58,92,0.10);
  --shadow-hover: 0 8px 32px rgba(26,58,92,0.18);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
  --font: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 通用按钮 ===== */
.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(230,126,34,0.35); }

.btn-outline {
  display: inline-block;
  padding: 12px 32px;
  background: transparent;
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 2px solid rgba(255,255,255,0.8);
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

.btn-secondary {
  display: inline-block;
  padding: 12px 32px;
  background: transparent;
  color: var(--primary);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--primary); color: #fff; }

.btn-block { width: 100%; text-align: center; }

/* ===== 通用Section样式 ===== */
.section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}
.section-header.left-align { text-align: left; }

.section-tag {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 14px;
  position: relative;
  display: inline-block;
}
.section-header:not(.left-align) .section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 10px auto 0;
  border-radius: 2px;
}
.section-header.left-align .section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 10px 0 0;
  border-radius: 2px;
}

.section-desc {
  color: var(--text-mid);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}

.more-link {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}
.more-link:hover { color: var(--primary); }

/* ===== 顶部信息栏 ===== */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.top-bar-left { display: flex; gap: 20px; }
.top-bar-left span { opacity: 0.9; }

/* ===== 导航栏 ===== */
.header {
  background: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 72px;
}

/* Logo */
.logo a { display: flex; align-items: center; gap: 12px; }
.logo-text { display: flex; flex-direction: column; }
.logo-cn {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  line-height: 1.2;
}
.logo-en {
  font-size: 9px;
  color: var(--primary-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

/* 导航菜单 */
.nav > ul { display: flex; gap: 4px; }
.nav > ul > li { position: relative; }
.nav > ul > li > a {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  border-radius: var(--radius);
  transition: var(--transition);
}
.nav > ul > li > a:hover,
.nav > ul > li > a.active {
  color: var(--primary);
  background: var(--bg-light);
}

/* 二级菜单 */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  min-width: 160px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  border-top: 3px solid var(--accent);
  z-index: 100;
  padding: 6px 0;
}
.has-sub:hover .sub-menu { display: block; animation: fadeDown 0.2s ease; }
.sub-menu li a {
  display: block;
  padding: 9px 18px;
  font-size: 14px;
  color: var(--text-mid);
  transition: var(--transition);
}
.sub-menu li a:hover { color: var(--primary); background: var(--bg-light); padding-left: 24px; }

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 汉堡菜单 */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Banner ===== */
.banner {
  position: relative;
  overflow: hidden;
  height: 540px;
  user-select: none;
}
.banner-slider { height: 100%; position: relative; }
.banner-item {
  display: none;
  height: 100%;
  align-items: center;
  padding: 0 60px;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}
.banner-item.active { display: flex; animation: bannerFade 0.6s ease; }
@keyframes bannerFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.banner-content { max-width: 600px; z-index: 2; }
.banner-content h1,
.banner-content h2 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.banner-content p {
  font-size: 17px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 28px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.banner-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.banner-icon {
  position: absolute;
  right: 120px;
  width: 300px;
  height: 300px;
  opacity: 0.55;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}
.banner-svg-fallback {
  width: 100%;
  height: 100%;
}
.banner-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  padding: 0;
}
.dot.active { background: #fff; transform: scale(1.3); }
.banner-prev, .banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}
.banner-prev { left: 20px; }
.banner-next { right: 20px; }
.banner-prev:hover, .banner-next:hover { background: rgba(255,255,255,0.35); }

/* ===== 统计栏 ===== */
.stats-bar {
  background: var(--primary);
  padding: 36px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 12px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1.2;
}
.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

/* ===== 产品服务 ===== */
.products-section { background: var(--bg-light); }
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: var(--transition);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.product-card:hover::before { transform: scaleX(1); }
.product-icon { width: 64px; height: 64px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; }
.product-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 8px; }
.product-card h3 { font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-bottom: 12px; }
.product-card h3 a { color: inherit; }
.product-card h3 a:hover { color: var(--primary-light); }
.product-card p { font-size: 14px; color: var(--text-mid); line-height: 1.7; margin-bottom: 16px; }
.card-link { font-size: 14px; color: var(--accent); font-weight: 600; }
.card-link:hover { color: var(--primary); }

/* ===== 关于我们 ===== */
.about-section { background: var(--bg-white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-image { position: relative; }
.about-img-placeholder {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.img-caption { text-align: center; color: rgba(255,255,255,0.9); }
.factory-icon { font-size: 80px; display: block; margin-bottom: 16px; opacity: 0.8; }
.img-caption p { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.img-caption small { font-size: 13px; opacity: 0.8; }
.about-cert {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.cert-item {
  flex: 1;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 600;
}
.cert-icon { font-size: 20px; display: block; margin-bottom: 4px; }

.about-desc { color: var(--text-mid); font-size: 15px; line-height: 1.8; margin-bottom: 18px; }
.about-features { margin: 24px 0; display: flex; flex-direction: column; gap: 14px; }
.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.feature-item strong { display: block; font-size: 15px; color: var(--primary-dark); margin-bottom: 2px; }
.feature-item p { font-size: 13px; color: var(--text-mid); margin: 0; }

/* ===== 为何选择我们 ===== */
.why-section { background: var(--primary-dark); }
.why-section .section-title { color: #fff; }
.why-section .section-title::after { background: var(--accent); }
.why-section .section-desc { color: rgba(255,255,255,0.7); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.why-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
}
.why-item:hover { background: rgba(255,255,255,0.1); transform: translateY(-4px); }
.why-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 10px;
}
.why-item h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.why-item p { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.7; }

/* ===== 案例 ===== */
.cases-section { background: var(--bg-light); }
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.case-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.case-img {
  height: 220px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.case-img-1 { background: linear-gradient(135deg, #1565c0, #42a5f5); }
.case-img-2 { background: linear-gradient(135deg, #1b5e20, #66bb6a); }
.case-img-3 { background: linear-gradient(135deg, #4a148c, #ab47bc); }
.case-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 40px 20px 20px;
  color: #fff;
  transform: translateY(100%);
  transition: var(--transition);
}
.case-card:hover .case-overlay { transform: translateY(0); }
.case-overlay h3 { font-size: 16px; margin-bottom: 6px; }
.case-overlay p { font-size: 13px; opacity: 0.85; margin-bottom: 10px; }
.case-overlay a { font-size: 13px; color: var(--accent-light); font-weight: 600; }
.case-info { padding: 18px 20px; }
.case-tag {
  display: inline-block;
  font-size: 11px;
  background: rgba(26,58,92,0.08);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.case-info h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.case-info h3 a { color: inherit; }
.case-info h3 a:hover { color: var(--primary-light); }
.cases-more { text-align: center; margin-top: 36px; }

/* ===== 新闻动态 ===== */
.news-section { background: var(--bg-white); }
.news-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}
.news-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-img {
  height: 180px;
  position: relative;
  background-size: cover;
  background-position: center;
}
.news-card.featured .news-img { height: 240px; }
.news-img-1 { background: linear-gradient(135deg, #0d47a1, #1976d2); }
.news-img-2 { background: linear-gradient(135deg, #1a237e, #3949ab); }
.news-img-3 { background: linear-gradient(135deg, #004d40, #00897b); }
.news-date {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
}
.news-body { padding: 20px; }
.news-category {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  background: rgba(230,126,34,0.1);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-body h3 { font-size: 15px; font-weight: 700; color: var(--primary-dark); line-height: 1.5; margin-bottom: 10px; }
.news-card.featured .news-body h3 { font-size: 17px; }
.news-body h3 a { color: inherit; }
.news-body h3 a:hover { color: var(--primary-light); }
.news-body p { font-size: 13px; color: var(--text-mid); line-height: 1.7; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.news-link:hover { color: var(--primary); }

/* 新闻滚动栏 */
.news-ticker {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 44px;
}
.ticker-label {
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-wrap { flex: 1; overflow: hidden; height: 100%; position: relative; }
.ticker-list {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  animation: tickerScroll 18s linear infinite;
}
.ticker-list li { height: 44px; display: flex; align-items: center; padding: 0 16px; white-space: nowrap; }
.ticker-list li a { font-size: 13px; color: var(--text-mid); }
.ticker-list li a:hover { color: var(--accent); }
@keyframes tickerScroll {
  0% { top: 0; }
  100% { top: -220px; }
}

/* ===== 合作伙伴 ===== */
.partners-section { background: var(--bg-light); padding: 50px 0; }
.partners-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.partner-item { flex: 1; min-width: 160px; max-width: 200px; }
.partner-logo {
  height: 80px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-light);
  text-align: center;
  padding: 8px;
  transition: var(--transition);
}
.partner-logo:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }

/* ===== 联系我们 ===== */
.contact-section { background: var(--bg-white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 50px;
  align-items: start;
}
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.contact-icon { font-size: 24px; flex-shrink: 0; }
.contact-item strong { display: block; font-size: 14px; color: var(--primary-dark); margin-bottom: 4px; font-weight: 700; }
.contact-item p, .contact-item a { font-size: 15px; color: var(--text-mid); }
.contact-item a:hover { color: var(--accent); }
.contact-links { margin-top: 8px; }
.contact-links strong { font-size: 13px; color: var(--primary-dark); display: block; margin-bottom: 8px; }
.contact-links a { font-size: 13px; color: var(--primary-light); margin-right: 12px; }
.contact-links a:hover { color: var(--accent); }

.contact-form { background: var(--bg-light); border-radius: var(--radius-lg); padding: 36px; border: 1px solid var(--border); }
.contact-form h3 { font-size: 20px; font-weight: 700; color: var(--primary-dark); margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45,106,159,0.1);
}
.form-group textarea { resize: vertical; }

/* ===== 页脚 ===== */
.footer { background: var(--primary-dark); color: rgba(255,255,255,0.8); }
.footer-top { padding: 60px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.65); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--accent-light); padding-left: 4px; }
.footer-about p { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.65); margin-bottom: 16px; }
.footer-contact p { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
}
.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.6); font-size: 12px; }
.footer-bottom a:hover { color: var(--accent-light); }

/* ===== 回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 14px rgba(26,58,92,0.35);
  transition: var(--transition);
}
.back-to-top.show { display: flex; }
.back-to-top:hover { background: var(--accent); transform: translateY(-3px); }
