/* ======================================
   奈斯AI 官网样式
   杭州奈斯智云科技有限公司
   ====================================== */

:root {
  --primary: #667eea;
  --primary-dark: #5a6fd6;
  --secondary: #764ba2;
  --accent: #4facfe;
  --accent2: #00f2fe;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --bg: #ffffff;
  --bg-light: #f9fafb;
  --bg-dark: #111827;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --nav-height: 72px;
}

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

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== 导航栏 ==================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(102,126,234,0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
}
.btn-white:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 16px;
  border-radius: var(--radius);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

/* ==================== Hero ==================== */

.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  background: linear-gradient(135deg, #f0f4ff 0%, #fdf2f8 50%, #f0fdf4 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(102,126,234,0.1) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  border-radius: 50%;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(102,126,234,0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-placeholder {
  width: 480px;
  height: 360px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 72px;
  box-shadow: 0 20px 60px rgba(102,126,234,0.3);
  position: relative;
  overflow: hidden;
}

.hero-image-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
}

/* ==================== 产品矩阵 ==================== */

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.section-header p {
  font-size: 18px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 28px;
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.product-card-icon.blue { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: var(--primary); }
.product-card-icon.purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: var(--secondary); }
.product-card-icon.cyan { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0891b2; }

.product-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.product-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-card .btn {
  padding: 8px 20px;
  font-size: 13px;
}

/* ==================== 功能特性 ==================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #f0f4ff, #ede9fe);
  color: var(--primary);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ==================== 数据亮点 ==================== */

.stats-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  color: #fff;
}

.stat-item h3 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 6px;
}

.stat-item p {
  font-size: 15px;
  opacity: 0.85;
}

/* ==================== CTA ==================== */

.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 36px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ==================== 页脚 ==================== */

.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand p {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #fff;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #9ca3af;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
}

.footer-bottom a {
  color: #6b7280;
}

.footer-bottom a:hover {
  color: #9ca3af;
}

/* ==================== 新闻页面 ==================== */

.page-header {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 48px;
  background: linear-gradient(135deg, #f0f4ff, #fdf2f8);
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 16px;
  color: var(--text-light);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--text-lighter);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-lighter);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.news-list {
  padding: 48px 0;
}

.news-card {
  display: flex;
  gap: 24px;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transition: all 0.3s;
  cursor: pointer;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.news-card-image {
  width: 240px;
  min-height: 160px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 36px;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-lighter);
  margin-bottom: 10px;
}

.news-card-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.news-card-tag.company { background: #dbeafe; color: #2563eb; }
.news-card-tag.product { background: #dcfce7; color: #16a34a; }
.news-card-tag.industry { background: #ffedd5; color: #ea580c; }

.news-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.4;
}

.news-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}

.news-card-footer {
  margin-top: 12px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.pagination button:hover,
.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== 新闻详情 ==================== */

.news-detail {
  padding: 48px 0 80px;
}

.news-detail-wrapper {
  max-width: 100%;
}

.news-detail h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
}

.news-detail-meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-lighter);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.news-detail-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.news-detail-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 32px 0 16px;
}

.news-detail-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
}

.news-detail-body p {
  margin-bottom: 16px;
}

.news-detail-body img {
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.news-detail-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.news-detail-nav a {
  font-size: 14px;
  color: var(--text-light);
}

.news-detail-nav a:hover {
  color: var(--primary);
}

/* ==================== 详情页两栏布局 ==================== */

.detail-layout {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.detail-main {
  flex: 1;
  min-width: 0;
}

.detail-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.sidebar-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.sidebar-news-list {
  list-style: none;
}

.sidebar-news-list li {
  margin-bottom: 0;
}

.sidebar-news-list a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar-news-list li:last-child a {
  border-bottom: none;
}

.sidebar-news-list a:hover {
  background: #fafafa;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 6px;
}

.sidebar-news-title {
  display: block;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-news-list a:hover .sidebar-news-title {
  color: var(--primary);
}

.sidebar-news-date {
  display: block;
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 4px;
}

.sidebar-cta {
  background: linear-gradient(135deg, #f0f4ff 0%, #f6f0ff 100%);
  border-color: #d6e4ff;
  text-align: center;
}

.sidebar-cta p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 960px) {
  .detail-layout {
    flex-direction: column;
  }
  .detail-sidebar {
    width: 100%;
    position: static;
  }
}

/* ==================== 关于我们 ==================== */

.about-intro {
  display: flex;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
}

.about-intro-text {
  flex: 1;
}

.about-intro-text h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.about-intro-text p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 12px;
}

.about-intro-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 48px 0;
}

.about-value-card {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.about-value-card .icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.about-value-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.about-value-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.contact-info {
  background: var(--bg-light);
  padding: 48px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-card {
  text-align: center;
  padding: 32px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-card .icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.contact-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* ==================== 动画 ==================== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== Loading ==================== */

.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
}

.loading-spinner::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-lighter);
  font-size: 16px;
}

/* ==================== 响应式 ==================== */

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  }

  .nav-cta.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(var(--nav-height) + 200px);
    left: 0;
    right: 0;
    background: #fff;
    padding: 0 24px 24px;
    gap: 12px;
  }

  .hero { padding-top: calc(var(--nav-height) + 40px); padding-bottom: 40px; }
  .hero .container { flex-direction: column; gap: 32px; text-align: center; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .hero-actions { justify-content: center; }
  .hero-image-placeholder { width: 100%; height: 240px; font-size: 48px; }

  .section { padding: 48px 0; }
  .section-header h2 { font-size: 28px; }
  .section-header p { font-size: 16px; }

  .products-grid,
  .features-grid,
  .about-values,
  .contact-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stat-item h3 { font-size: 32px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .news-card { flex-direction: column; }
  .news-card-image { width: 100%; min-height: 180px; }

  .about-intro { flex-direction: column; }

  .page-header h1 { font-size: 28px; }
  .news-detail h1 { font-size: 24px; }
}

/* ==================== 相关推荐 ==================== */

.related-news {
  margin-top: 48px;
  padding: 40px 0;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.related-news-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.related-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-news-card {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
}

.related-news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.related-news-cover {
  height: 140px;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  overflow: hidden;
}

.related-news-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-news-info {
  padding: 14px 16px;
}

.related-news-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-news-info span {
  font-size: 12px;
  color: var(--text-lighter);
}

@media (max-width: 768px) {
  .related-news-grid { grid-template-columns: 1fr; }
  .related-news-cover { height: 120px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 28px; }
  .btn-lg { padding: 12px 28px; font-size: 15px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
