/* ============================================
   泰州立群数控机床有限公司 - 企业官网
   设计语言: 现代工业风 · 深蓝+钢灰
   ============================================ */

:root {
  --primary: #003366;
  --primary-dark: #001a33;
  --primary-light: #004d99;
  --accent: #c9a84c;
  --accent-light: #e8c95a;
  --steel: #4a5568;
  --steel-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f7f9fc;
  --bg-gray: #edf2f7;
  --bg-dark: #1a202c;
  --text: #2d3748;
  --text-light: #718096;
  --text-white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  --font: 'Microsoft YaHei','PingFang SC','Helvetica Neue',Arial,sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  background: var(--bg-white);
  overflow-x: hidden;
}

/* === Top Bar === */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 2px solid var(--accent);
  line-height: 1.4;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: rgba(255,255,255,0.75); text-decoration: none; margin-left: 16px; transition: var(--transition); }
.topbar a:hover { color: var(--accent); }

/* === Header === */
.header {
  background: var(--bg-white);
  position: sticky;top: 0;z-index: 1001;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  min-height: 64px;
}
.logo { display: flex; align-items: center; }
.logo-text h1 { font-size: 28px; color: var(--primary); font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: 2px; }
.logo-text h1 { font-size: 28px; color: var(--primary); font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: 2px; }
.logo-text span { font-size: 14px; color: var(--steel-light); }

/* === Navigation === */
.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  padding: 6px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--primary); background: rgba(0,51,102,0.06); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.mobile-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--primary); padding: 4px 8px; }

/* === Hero Slider === */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45);
  transform: scale(1.05);
  transition: transform 8s ease;
}
.hero-slide.active .bg { transform: scale(1); }
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-white);
  max-width: 800px;
  padding: 0 24px;
}
.hero-content h2 { font-size: 48px; font-weight: 700; margin-bottom: 16px; letter-spacing: 2px; opacity: 0; transform: translateY(30px); transition: all 0.8s ease 0.3s; }
.hero-slide.active .hero-content h2 { opacity: 1; transform: translateY(0); }
.hero-content p { font-size: 20px; opacity: 0.9; margin-bottom: 24px; opacity: 0; transform: translateY(20px); transition: all 0.8s ease 0.5s; }
.hero-slide.active .hero-content p { opacity: 0.9; transform: translateY(0); }
.hero-content .btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--accent);
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.7s;
}
.hero-slide.active .hero-content .btn { opacity: 1; transform: translateY(0); }
.hero-content .btn:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.4); }

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.hero-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.hero-dots span.active { background: var(--accent); border-color: var(--accent); transform: scale(1.2); }
.hero-dots span:hover { background: rgba(255,255,255,0.7); }

/* === Container === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === Sections === */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-light); }
.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 { font-size: 32px; color: var(--primary); font-weight: 700; position: relative; display: inline-block; }
.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}
.section-title p { color: var(--text-light); margin-top: 12px; font-size: 16px; }

/* === Quick Features === */
.features-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.feature-card {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.feature-card .icon { font-size: 48px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-light); }

/* === Products Grid === */
.products-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  cursor: pointer;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card .img-wrap {
  height: 200px;
  overflow: hidden;
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform 0.5s ease; }
.product-card:hover .img-wrap img { transform: scale(1.08); }
.product-card .info { padding: 20px; }
.product-card .info h3 { font-size: 16px; color: var(--primary); margin-bottom: 6px; }
.product-card .info .cat { font-size: 12px; color: var(--accent); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.product-card .info p { font-size: 13px; color: var(--text-light); }

/* === About Preview === */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-preview .image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-preview .image img { width: 100%; display: block; }
.about-preview .text h2 { font-size: 32px; color: var(--primary); margin-bottom: 16px; }
.about-preview .text p { font-size: 15px; color: var(--text-light); line-height: 1.8; margin-bottom: 16px; }
.about-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 24px; }
.stat-item { text-align: center; padding: 16px; background: var(--bg-light); border-radius: var(--radius); }
.stat-item .num { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-item .label { font-size: 13px; color: var(--steel-light); }

/* === News === */
.news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.news-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  cursor: pointer;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-card .date { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.news-card .cat { display: inline-block; padding: 2px 10px; background: rgba(0,51,102,0.08); color: var(--primary); font-size: 12px; border-radius: 4px; margin-left: 8px; }
.news-card h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; line-height: 1.5; }
.news-card p { font-size: 14px; color: var(--text-light); }

/* === Contact === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h3 { font-size: 20px; color: var(--primary); margin-bottom: 20px; }
.contact-info .item { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.contact-info .item .ico { font-size: 20px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(0,51,102,0.08); border-radius: 50%; color: var(--primary); flex-shrink: 0; }
.contact-info .item .txt { font-size: 14px; color: var(--text); }
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  transition: var(--transition);
  margin-bottom: 16px;
  background: var(--bg-white);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,51,102,0.1); }
.contact-form textarea { height: 120px; resize: vertical; }
.contact-form .btn {
  padding: 12px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.contact-form .btn:hover { background: var(--primary-light); }

/* === Footer === */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h3 { color: white; font-size: 18px; margin-bottom: 20px; }
.footer h3::after { content: ''; display: block; width: 30px; height: 2px; background: var(--accent); margin-top: 8px; }
.footer p, .footer a { font-size: 14px; color: rgba(255,255,255,0.6); text-decoration: none; line-height: 2; display: block; transition: var(--transition); }
.footer a:hover { color: var(--accent); padding-left: 4px; }
.footer .copyright {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* === Page Banner === */
.page-banner {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  background-size: cover;
  background-position: center;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,26,51,0.65);
}
.page-banner .content { position: relative; z-index: 1; }
.page-banner h1 { font-size: 40px; font-weight: 700; margin-bottom: 8px; }
.page-banner p { font-size: 18px; opacity: 0.85; }

/* === Page Content === */
.page-content { padding: 60px 0; }
.page-content .content-body { max-width: 900px; margin: 0 auto; font-size: 15px; line-height: 1.9; color: var(--text); }
.page-content .content-body p { margin-bottom: 16px; }
.page-content .content-body ul { padding-left: 20px; margin-bottom: 16px; }
.page-content .content-body li { margin-bottom: 8px; }

/* === Detail Page === */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail .gallery img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.product-detail .info h1 { font-size: 28px; color: var(--primary); margin-bottom: 8px; }
.product-detail .info .subtitle { font-size: 16px; color: var(--accent); margin-bottom: 20px; }
.product-detail .info .desc { font-size: 15px; color: var(--text-light); line-height: 1.8; margin-bottom: 20px; }
.product-detail .info .specs { background: var(--bg-light); padding: 16px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.product-detail .features { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-detail .features li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
  font-size: 14px;
}
.product-detail .features li::before { content: '✓'; color: var(--accent); font-weight: 700; }

/* === Jobs === */
.jobs-list .job-item {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: var(--transition);
  cursor: pointer;
}
.jobs-list .job-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.job-item h3 { font-size: 16px; color: var(--primary); margin-bottom: 8px; }
.job-item .meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.job-item .meta span { display: flex; align-items: center; gap: 4px; }

/* === Downloads === */
.downloads-list .download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: var(--transition);
}
.download-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.download-item .info h3 { font-size: 16px; color: var(--text); }
.download-item .info p { font-size: 13px; color: var(--text-light); }
.download-item .btn {
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  transition: var(--transition);
}
.download-item .btn:hover { background: var(--primary-light); }

/* === Gallery === */
.gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.gallery-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 3/4;
  max-height: 480px;
}

.gallery-item .img-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
}
.gallery-item .img-bg img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.5s ease;
}
.gallery-item:hover .img-bg img { transform: scale(1.05); }
.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.gallery-item:hover .overlay { transform: translateY(0); }
.gallery-item .overlay h3 { font-size: 16px; }
.gallery-item .overlay p { font-size: 13px; opacity: 0.8; }

/* === Back to Top === */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}
.back-top.visible { opacity: 1; visibility: visible; }
.back-top:hover { background: var(--primary-light); transform: translateY(-4px); }

/* === Modal === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-body {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.95) translateY(20px); } to { opacity:1; transform: scale(1) translateY(0); } }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); transform: rotate(90deg); }

/* === Responsive === */
@media (max-width: 1024px) {
  .features-grid, .products-grid { grid-template-columns: repeat(2,1fr); }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; flex-direction: column; padding: 8px 16px; box-shadow: var(--shadow-lg); z-index: 2000; max-height: 80vh; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; font-size: 15px; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: none; }
  .mobile-toggle { display: block; }
  .hero { height: 360px; }
  .hero-content h2 { font-size: 28px; }
  .hero-content p { font-size: 16px; }
  .about-preview { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .page-banner { height: 200px; }
  .page-banner h1 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}

.topbar .container span:last-child a::before {
  content: '|';
  margin: 0 8px;
  color: rgba(255,255,255,0.3);
}
.topbar .container span:last-child a:first-child::before {
  content: '';
  margin: 0;
}
