/* ===== CSS Variables ===== */
:root {
  --primary: #0066CC;
  --primary-dark: #004D99;
  --primary-light: #E6F0FA;
  --accent: #00A8B5;
  --accent-dark: #008C96;
  --text: #2D3436;
  --text-light: #636E72;
  --bg: #FFFFFF;
  --bg-gray: #F5F7FA;
  --bg-dark: #1A2332;
  --border: #E0E6ED;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --header-h: 72px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ===== Utility ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.25rem; font-weight: 700; color: var(--text); margin-bottom: 12px; position: relative; display: inline-block; }
.section-header h2::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 48px; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; }
.section-header p { color: var(--text-light); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h); background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.logo-img { height: 42px; width: auto; flex-shrink: 0; }
.logo-text { white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 18px; border-radius: 6px; font-size: 0.95rem; color: var(--text); font-weight: 500; transition: var(--transition); }
.nav a:hover, .nav a.active { color: var(--primary); background: var(--primary-light); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Page Hero (sub pages) ===== */
.page-hero {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, #001F3F 0%, #003366 40%, #004D99 70%, #0066CC 100%);
  color: #fff;
  text-align: center;
}
.page-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1.05rem; }

/* ===== Hero (Homepage) ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  background: linear-gradient(135deg, #001F3F 0%, #003366 30%, #004D99 60%, #0066CC 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,168,181,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(0,102,204,0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(0,168,181,0.2) 0%, transparent 60%);
}
.hero-particles { position: absolute; inset: 0; overflow: hidden; }
.hero-particle {
  position: absolute; background: rgba(255,255,255,0.08);
  border-radius: 50%; animation: float-up linear infinite;
}
@keyframes float-up {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-block; padding: 6px 20px; border-radius: 20px;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9);
  font-size: 0.9rem; margin-bottom: 24px; backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.15);
}
.hero h1 { font-size: 3.25rem; font-weight: 800; color: #fff; line-height: 1.25; margin-bottom: 20px; }
.hero h1 span { background: linear-gradient(90deg, #60C0FF, #00E5FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.75); margin-bottom: 36px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 8px; font-size: 1rem;
  font-weight: 600; transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0080FF);
  color: #fff; box-shadow: 0 4px 16px rgba(0,102,204,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,102,204,0.5); }
.btn-outline { border: 2px solid rgba(255,255,255,0.4); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }
.btn-outline-dark { border: 2px solid var(--primary); color: var(--primary); padding: 14px 32px; border-radius: 8px; font-weight: 600; transition: var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.btn-outline-dark:hover { background: var(--primary); color: #fff; }
.hero-stats { display: flex; gap: 48px; margin-top: 56px; }
.hero-stat h3 { font-size: 2rem; font-weight: 700; color: #fff; }
.hero-stat p { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin: 0; }
.hero-certs { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; align-items: center; }
.hero-cert-img { width: 128px; height: 128px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,0.15); padding: 6px; }

/* ===== Products ===== */
.product-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.product-category {
  background: #fff; border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow); transition: var(--transition); border: 1px solid var(--border);
}
.product-category:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.cat-icon.blue { background: linear-gradient(135deg, #E6F0FA, #CCE0F7); color: var(--primary); }
.cat-icon.teal { background: linear-gradient(135deg, #E0F7F9, #C0EEF2); color: var(--accent); }
.cat-icon.purple { background: linear-gradient(135deg, #EDE7F6, #D9CCEC); color: #6C3FB5; }
.cat-icon.green { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); color: #2E7D32; }
.product-category h3 { font-size: 1.2rem; margin-bottom: 16px; color: var(--text); }
.product-list { display: flex; flex-direction: column; gap: 8px; }
.product-list li {
  padding: 8px 12px; border-radius: 6px; font-size: 0.92rem;
  color: var(--text-light); transition: var(--transition); cursor: default;
  display: flex; align-items: center; gap: 8px;
}
.product-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.product-list li:hover { background: var(--primary-light); color: var(--primary); }
.product-thumb { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }

/* Product Grid (sub page) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
a.product-card { display: block; color: inherit; }
.product-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border); transition: var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img {
  width: 100%; height: 200px; overflow: hidden; background: var(--bg-gray);
  display: flex; align-items: center; justify-content: center;
}
.product-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.product-card-placeholder { font-size: 3rem; color: var(--border); }
.product-card-body { padding: 20px; }
.product-card-body h4 { font-size: 1rem; margin-bottom: 8px; color: var(--text); }
.product-card-body p { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; }

/* Product Detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail-img {
  background: var(--bg-gray); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; align-items: center; justify-content: center; min-height: 400px;
}
.product-detail-img img { width: 100%; height: 100%; object-fit: contain; padding: 32px; }
.product-detail-placeholder { font-size: 6rem; color: var(--border); }
.product-detail-info h2 { font-size: 1.75rem; margin-bottom: 16px; }
.product-detail-cat {
  display: inline-block; padding: 4px 14px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary); font-size: 0.85rem; margin-bottom: 12px;
}
.product-detail-desc { font-size: 1.05rem; color: var(--text-light); line-height: 1.8; margin-bottom: 28px; }
.product-detail-features {
  background: var(--bg-gray); padding: 24px; border-radius: var(--radius); margin-bottom: 28px;
}
.product-detail-features h3 { font-size: 1.05rem; margin-bottom: 12px; }
.features-content { font-size: 0.95rem; color: var(--text-light); line-height: 2; }
.product-detail-actions { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 768px) {
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
  .product-detail-img { min-height: 280px; }
}

/* ===== Solutions ===== */
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.solution-card {
  display: flex; gap: 20px; padding: 28px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); transition: var(--transition);
}
.solution-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.solution-num {
  width: 48px; height: 48px; border-radius: 12px; background: var(--primary-light);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; flex-shrink: 0;
}
.solution-info h3 { font-size: 1.1rem; margin-bottom: 8px; }
.solution-info p { font-size: 0.92rem; color: var(--text-light); line-height: 1.7; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.about-image img { width: 100%; height: auto; }
.about-image-placeholder {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3); font-size: 4rem;
}
.about-text h2 { font-size: 2rem; margin-bottom: 20px; }
.about-text p { color: var(--text-light); margin-bottom: 16px; }
.about-p { text-indent: 2em; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.about-feat {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.about-feat-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.about-feat span { font-weight: 600; font-size: 0.95rem; }

/* ===== Service ===== */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.service-card {
  text-align: center; padding: 36px 24px; border-radius: var(--radius-lg);
  transition: var(--transition); border: 1px solid var(--border);
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.service-icon {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.service-icon.blue { background: #E6F0FA; color: var(--primary); }
.service-icon.teal { background: #E0F7F9; color: var(--accent); }
.service-icon.purple { background: #EDE7F6; color: #6C3FB5; }
.service-icon.green { background: #E8F5E9; color: #2E7D32; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.service-card p { font-size: 0.9rem; color: var(--text-light); }

/* ===== News ===== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.news-card {
  display: block; background: #fff; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-img { height: 200px; overflow: hidden; }
.news-img-placeholder { width: 100%; height: 100%; }
.news-img-placeholder.n1 { background: linear-gradient(135deg, #0066CC, #00A8B5); }
.news-img-placeholder.n2 { background: linear-gradient(135deg, #2E7D32, #00A8B5); }
.news-img-placeholder.n3 { background: linear-gradient(135deg, #6C3FB5, #0066CC); }
.news-body { padding: 24px; }
.news-date { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
.news-body h3 { font-size: 1.1rem; margin-bottom: 10px; line-height: 1.5; }
.news-body p { font-size: 0.9rem; color: var(--text-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* News Detail */
.news-content { line-height: 2; font-size: 1.05rem; }
.news-content p { margin-bottom: 16px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h2 { font-size: 2rem; margin-bottom: 16px; }
.contact-info > p { color: var(--text-light); margin-bottom: 32px; }
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.contact-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-item p { font-size: 0.9rem; color: var(--text-light); }
.contact-form {
  background: var(--bg-gray); padding: 36px; border-radius: var(--radius-lg);
}
.contact-form h3 { font-size: 1.25rem; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
  transition: var(--transition); background: #fff;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary), #0080FF);
  color: #fff; border: none; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-submit:hover { box-shadow: 0 4px 16px rgba(0,102,204,0.4); transform: translateY(-1px); }

/* ===== Footer ===== */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 20px; }
.footer-col p { font-size: 0.9rem; line-height: 1.8; margin-bottom: 8px; }
.footer-col a { display: block; font-size: 0.9rem; padding: 4px 0; transition: var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 0.85rem; }

/* ===== Floating Contact ===== */
.floating-contact {
  position: fixed; bottom: 32px; right: 32px; z-index: 999;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.floating-btn {
  width: 56px; height: 56px; border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; transition: var(--transition); position: relative;
}
.floating-btn.wechat { background: linear-gradient(135deg, #07C160, #06AD56); color: #fff; }
.floating-btn.phone { background: linear-gradient(135deg, var(--primary), #0080FF); color: #fff; }
.floating-btn.top { background: #fff; color: var(--text); border: 1px solid var(--border); font-size: 1.2rem; }
.floating-btn:hover { transform: scale(1.1); }
.floating-tooltip {
  position: absolute; right: 64px; background: #333; color: #fff;
  padding: 8px 16px; border-radius: 6px; font-size: 0.85rem;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.floating-btn:hover .floating-tooltip { opacity: 1; }

/* WeChat Modal */
.wechat-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.wechat-modal-overlay.active { opacity: 1; pointer-events: auto; }
.wechat-modal {
  background: #fff; border-radius: var(--radius-lg); padding: 40px;
  text-align: center; max-width: 360px; width: 90%; box-shadow: var(--shadow-lg);
}
.wechat-modal h3 { margin-bottom: 8px; }
.wechat-modal p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 20px; }
.wechat-qr {
  width: 180px; height: 180px; margin: 0 auto 16px;
  background: var(--bg-gray); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: 4rem; color: #07C160;
}
.wechat-id {
  display: inline-block; padding: 10px 24px; background: var(--bg-gray);
  border-radius: 6px; font-weight: 600; font-size: 1.05rem; margin-bottom: 20px; letter-spacing: 1px;
}
.wechat-modal .btn-close {
  display: block; width: 100%; padding: 10px; border-radius: 6px;
  background: var(--bg-gray); font-weight: 500; transition: var(--transition);
}
.wechat-modal .btn-close:hover { background: var(--border); }

/* ===== Animations ===== */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .section { padding: 64px 0; }
  .section-header h2 { font-size: 1.75rem; }
  .page-hero { padding: 100px 0 40px; }
  .page-hero h1 { font-size: 1.75rem; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(12px);
    flex-direction: column; padding: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%); opacity: 0; pointer-events: none;
    transition: var(--transition);
  }
  .nav.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .hero-stat h3 { font-size: 1.5rem; }
  .product-categories { grid-template-columns: 1fr; }
  .solutions-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .floating-contact { bottom: 20px; right: 20px; }
  .floating-btn { width: 48px; height: 48px; font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.65rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { justify-content: center; }
  .service-grid { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
}
