/* =====================================================
   聚银 GS PACK 主样式表
   布局+通用组件+响应式
   ===================================================== */

@import url('design-system.css');

/* --- 重置 --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-white);
  overflow-x: hidden;
}

/* --- 容器 --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* --- 通用 --- */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* --- 链接 --- */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-primary-dark);
}

/* --- 标题 --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--line-height-heading);
  color: var(--color-dark);
  margin-bottom: var(--space-4);
}
h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-light);
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}
.btn:focus {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
}
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
}
.btn-text {
  background: none;
  color: var(--color-primary);
  padding: 0;
  font-weight: 500;
}
.btn-text:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}
.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

/* --- 章节 --- */
.section {
  padding: var(--space-16) 0;
}
.section-title {
  font-size: var(--font-size-4xl);
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-title.light { color: var(--color-white); }
.bg-light { background-color: var(--color-light); }
.bg-dark { 
  background: var(--gradient-dark);
  color: var(--color-white);
}

/* --- 卡片 --- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  transition: all var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* --- 网格通用 --- */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: var(--space-6);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* --- Hero --- */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  color: var(--color-white);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}
.hero h1 {
  color: var(--color-white);
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-4);
}
.hero-sub {
  font-size: var(--font-size-xl);
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-8);
}
.hero-cta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero-cta .btn-secondary {
  color: var(--color-white);
  border-color: var(--color-white);
}
.hero-cta .btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
}
.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  opacity: 0.3;
  z-index: 1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 功能卡片 --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-8);
}
.feature-card {
  text-align: center;
  padding: var(--space-6);
}
.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-3);
}
.feature-card p { color: var(--color-text-light); }

/* --- 产品卡片 --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}
.product-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-8px);
}
.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background-color: var(--color-light);
  padding: var(--space-4);
}
.product-card h3, .product-card p, .product-card .btn-text {
  padding: 0 var(--space-6);
}
.product-card h3 {
  font-size: var(--font-size-lg);
  margin: var(--space-4) 0 var(--space-2);
}
.product-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}
.product-card .btn-text {
  margin-bottom: var(--space-6);
  display: inline-block;
}

/* --- 应用领域 --- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-6);
}
.app-item {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.app-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.app-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-3);
}
.app-item h4 {
  font-size: var(--font-size-base);
  margin-bottom: 0;
}

/* --- 认证 --- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
}
.cert-item {
  text-align: center;
  color: var(--color-white);
}
.cert-item img {
  width: 150px;
  height: 100px;
  object-fit: contain;
  background: var(--color-white);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}
.cert-item p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 0;
}

/* Certificate link style for PDF download */
.cert-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.cert-link:hover {
  background: var(--color-primary);
  color: var(--color-white);
}
.cert-icon {
  font-size: 1.2rem;
}

/* Floating Contact Button */
.floating-contact {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #25D366;
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.2s;
}
.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  color: #fff;
}
.float-icon {
  display: flex;
  align-items: center;
}
.float-label {
  white-space: nowrap;
}

/* --- 博客卡片 --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-8);
}
.blog-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.blog-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.blog-card-content {
  padding: var(--space-6);
}
.blog-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
  line-height: 1.4;
}
.blog-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
}

/* --- CTA --- */
.cta-section {
  background: var(--gradient-primary);
  color: var(--color-white);
  text-align: center;
}
.cta-section h2 {
  color: var(--color-white);
  margin-bottom: var(--space-3);
}
.cta-section p {
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-8);
  font-size: var(--font-size-lg);
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-dark-2);
  color: rgba(255,255,255,0.7);
  padding: var(--space-12) 0 var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.site-footer h4 {
  color: var(--color-white);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}
.site-footer p {
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-2);
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: var(--space-2); }
.site-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.site-footer a:hover { color: var(--color-primary-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  text-align: center;
  font-size: var(--font-size-sm);
}
.footer-bottom p { margin-bottom: 0; }

/* --- 响应式 --- */
@media (max-width: 991px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
  .section { padding: var(--space-12) 0; }
  .hero { min-height: 70vh; }
  .hero-bg { width: 100%; opacity: 0.2; }
  .hero-cta { justify-content: center; }
}

@media (max-width: 576px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  .section { padding: var(--space-8) 0; }
  .hero { text-align: center; }
  .hero-cta { flex-direction: column; align-items: center; }
  .product-grid, .features-grid, .app-grid, .blog-grid {
    grid-template-columns: 1fr;
  }
}
