/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #333; line-height: 1.6; background: #fff;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 变量 ===== */
:root {
  --primary: #1a5f9e;
  --primary-light: #4a9fd8;
  --primary-dark: #0d3a5c;
  --accent: #2d8cf0;
  --gray-light: #f5f6f8;
  --gray-mid: #e8ecf0;
  --gray-dark: #666;
  --text: #333;
  --text-light: #999;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block; padding: 12px 32px; border-radius: 6px;
  font-size: 15px; font-weight: 500; cursor: pointer; border: none;
  transition: var(--transition); text-align: center;
}
.btn-primary {
  background: var(--primary); color: var(--white);
  box-shadow: 0 4px 16px rgba(26,95,158,0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent; color: var(--white); border: 2px solid var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--primary); }
.btn-full { width: 100%; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05); transition: var(--transition);
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 40px; height: 40px; background: var(--primary);
  color: var(--white); font-size: 20px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
}
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 16px; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.logo-sub { font-size: 10px; color: var(--text-light); letter-spacing: 2px; }

.nav-menu { display: flex; gap: 36px; }
.nav-link {
  font-size: 14px; color: var(--text); font-weight: 500;
  position: relative; padding: 4px 0; transition: var(--transition);
}
.nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--primary); transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.mobile-toggle {
  display: none; background: none; border: none; font-size: 24px;
  color: var(--primary); cursor: pointer;
}

/* ===== 首屏 Hero ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0a1929 0%, #1a3a5c 40%, #1a5f9e 100%);
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(74,159,216,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(45,140,240,0.1) 0%, transparent 50%);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  color: var(--white); max-width: 800px; padding: 0 20px;
  animation: fadeInUp 1s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-title {
  font-size: 56px; font-weight: 800; letter-spacing: 6px;
  margin-bottom: 16px; text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero-subtitle {
  font-size: 22px; font-weight: 300; opacity: 0.95;
  margin-bottom: 12px; letter-spacing: 2px;
}
.hero-desc {
  font-size: 16px; opacity: 0.75; margin-bottom: 36px; line-height: 1.8;
}
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  color: var(--white); opacity: 0.5; text-align: center; font-size: 12px;
}
.scroll-line {
  width: 1px; height: 40px; background: var(--white);
  margin: 8px auto 0; animation: scrollLine 1.5s ease infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== 通用区块 ===== */
section { padding: 100px 0; }
.section-header {
  text-align: center; margin-bottom: 60px;
}
.section-header.left { text-align: left; }
.section-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--primary-light); letter-spacing: 4px; margin-bottom: 12px;
}
.section-title {
  font-size: 36px; font-weight: 700; color: var(--text); margin-bottom: 16px;
}
.section-desc {
  font-size: 16px; color: var(--gray-dark); max-width: 600px; margin: 0 auto;
}
.section-header.light .section-title { color: var(--white); }
.section-header.light .section-desc { color: rgba(255,255,255,0.7); }

/* ===== 产品中心 ===== */
.products { background: var(--gray-light); }
.product-tabs {
  display: flex; justify-content: center; gap: 12px; margin-bottom: 40px; flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 24px; border: 1px solid #ddd; background: var(--white);
  border-radius: 30px; cursor: pointer; font-size: 14px; color: var(--gray-dark);
  transition: var(--transition);
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active {
  background: var(--primary); color: var(--white); border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(26,95,158,0.3);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.product-category-desc {
  background: var(--white); padding: 20px 28px; border-radius: var(--radius);
  margin-bottom: 32px; border-left: 4px solid var(--primary-light);
  color: var(--gray-dark); font-size: 14px;
}

.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.product-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: var(--transition);
}
.product-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
}
.product-img {
  height: 180px; position: relative; overflow: hidden;
}
.product-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img img {
  transform: scale(1.08);
}
.product-badge {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(26,95,158,0.85); color: var(--white); padding: 4px 12px;
  border-radius: 4px; font-size: 12px; z-index: 2;
}

.product-info { padding: 20px; }
.product-info h3 {
  font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px;
}
.product-spec {
  font-size: 12px; color: var(--text-light); margin-bottom: 12px;
}
.product-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.product-tags span {
  font-size: 11px; padding: 3px 10px; background: var(--gray-light);
  color: var(--primary); border-radius: 12px;
}

.process-tags { margin-top: 40px; text-align: center; }
.process-tags h4 {
  font-size: 16px; color: var(--text); margin-bottom: 16px; font-weight: 600;
}
.tag-list { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.process-tag {
  padding: 8px 20px; background: var(--white); border: 1px solid var(--primary-light);
  color: var(--primary); border-radius: 20px; font-size: 13px; font-weight: 500;
}

/* ===== 公司优势 ===== */
.advantages {
  background: linear-gradient(135deg, #0d3a5c 0%, #1a5f9e 100%);
  color: var(--white);
}
.advantage-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.advantage-card {
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg);
  padding: 40px 30px; text-align: center; transition: var(--transition);
}
.advantage-card:hover {
  background: rgba(255,255,255,0.15); transform: translateY(-4px);
}
.adv-icon { font-size: 40px; margin-bottom: 16px; }
.advantage-card h3 {
  font-size: 18px; font-weight: 600; margin-bottom: 12px;
}
.advantage-card p {
  font-size: 14px; opacity: 0.8; line-height: 1.7;
}

/* ===== 工程案例 ===== */
.cases { background: var(--white); }
.case-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.case-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  height: 320px; cursor: pointer; box-shadow: var(--shadow);
}
.case-img {
  width: 100%; height: 100%; object-fit: cover; transition: var(--transition);
}
.case-card:hover .case-img { transform: scale(1.05); }
.case-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(13,58,92,0.9));
  color: var(--white); padding: 40px 24px 24px;
  transition: var(--transition);
}
.case-overlay h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.case-overlay p { font-size: 14px; opacity: 0.8; }

/* ===== 关于我们 ===== */
.about { background: var(--gray-light); }
.about-inner {
  display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: start;
}
.about-content p {
  font-size: 15px; color: var(--gray-dark); line-height: 1.8; margin-bottom: 16px;
}
.about-content strong { color: var(--primary); }
.about-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px;
}
.stat-item { text-align: center; }
.stat-num {
  display: block; font-size: 32px; font-weight: 800; color: var(--primary);
  margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--text-light); }
.about-img {
  position: relative;
}
.about-img img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.about-img:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* ===== 联系我们 ===== */
.contact {
  background: linear-gradient(135deg, #1a5f9e 0%, #0d3a5c 100%);
  color: var(--white);
}
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
}
.contact-info-box { display: flex; flex-direction: column; gap: 28px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon { font-size: 24px; width: 40px; flex-shrink: 0; }
.contact-item h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.contact-item p { font-size: 14px; opacity: 0.8; line-height: 1.6; }

.contact-form-box {
  background: rgba(255,255,255,0.08); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg);
  padding: 36px;
}
.contact-form-box h3 { font-size: 20px; margin-bottom: 24px; font-weight: 600; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 12px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 16px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: var(--white); border-radius: var(--radius);
  font-size: 14px; outline: none; transition: var(--transition); font-family: inherit;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: rgba(255,255,255,0.5); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary-light); }
.contact-form textarea { resize: vertical; }

/* ===== 页脚 ===== */
.footer { background: #0a1929; color: rgba(255,255,255,0.6); padding: 48px 0 24px; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .logo-icon { width: 36px; height: 36px; font-size: 16px; }
.footer-name { color: var(--white); font-weight: 600; font-size: 15px; }
.footer-brand p { font-size: 12px; margin-top: 2px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a { font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px;
  text-align: center; font-size: 12px;
}
.footer-bottom p { margin-bottom: 4px; }

/* ===== 在线咨询 ===== */
.chat-float {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  background: var(--primary); color: var(--white);
  padding: 12px 20px; border-radius: 50px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(26,95,158,0.4);
  transition: var(--transition); font-size: 14px; font-weight: 500;
}
.chat-float:hover { background: var(--primary-dark); transform: translateY(-2px); }
.chat-badge {
  position: absolute; top: -4px; right: -4px;
  background: #e74c3c; color: var(--white); font-size: 11px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}

.chat-window {
  position: fixed; bottom: 100px; right: 30px; z-index: 998;
  width: 380px; max-height: 520px; background: var(--white);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-window.open { display: flex; }

.chat-header {
  background: var(--primary); color: var(--white);
  padding: 14px 18px; display: flex; justify-content: space-between; align-items: center;
}
.chat-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.chat-dot { width: 8px; height: 8px; background: #2ecc71; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.chat-close { background: none; border: none; color: var(--white); font-size: 24px; cursor: pointer; }

.chat-body {
  flex: 1; padding: 16px; overflow-y: auto; background: var(--gray-light);
}
.chat-welcome { display: flex; gap: 10px; margin-bottom: 16px; }
.chat-avatar {
  width: 36px; height: 36px; background: var(--primary);
  color: var(--white); border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 14px; font-weight: bold;
  flex-shrink: 0;
}
.chat-bubble {
  background: var(--white); padding: 12px 16px; border-radius: 12px;
  border-top-left-radius: 4px; box-shadow: var(--shadow); font-size: 13px; line-height: 1.6;
  max-width: 280px;
}
.chat-bubble p { margin-bottom: 6px; }
.chat-bubble p:last-child { margin-bottom: 0; }

.chat-msg { display: flex; gap: 10px; margin-bottom: 12px; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg.user .chat-bubble {
  background: var(--primary); color: var(--white);
  border-radius: 12px; border-top-right-radius: 4px; border-top-left-radius: 12px;
}
.chat-msg.user .chat-avatar { background: var(--primary-light); }

.chat-input-area { padding: 12px 16px; background: var(--white); border-top: 1px solid var(--gray-mid); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--gray-mid);
  border-radius: var(--radius); font-size: 13px; outline: none; transition: var(--transition);
}
.chat-input-row input:focus { border-color: var(--primary-light); }
.chat-send-btn {
  padding: 10px 18px; background: var(--primary); color: var(--white);
  border: none; border-radius: var(--radius); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: var(--transition);
}
.chat-send-btn:hover { background: var(--primary-dark); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .advantage-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-menu {
    position: fixed; top: 72px; left: 0; right: 0; background: var(--white);
    flex-direction: column; padding: 20px; gap: 0;
    box-shadow: var(--shadow-lg); display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 12px 0; border-bottom: 1px solid var(--gray-mid); }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .section-title { font-size: 28px; }
  section { padding: 60px 0; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .advantage-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .chat-window { width: calc(100vw - 40px); right: 20px; bottom: 90px; }
  .chat-float { bottom: 20px; right: 20px; }
  .form-row { flex-direction: column; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; letter-spacing: 2px; }
}
