/* 精高科 - 企业官网 Style.css */
/* 随机风格：现代科技蓝调 + 渐变与毛玻璃效果 */

/* === 全局重置与基础 === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0056b3;
  --primary-dark: #003d80;
  --accent: #ff6600;
  --accent-hover: #e55d00;
  --bg: #f9f9f9;
  --card-bg: rgba(255, 255, 255, 0.85);
  --text: #333;
  --text-light: #555;
  --border: #ddd;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --transition: 0.3s ease;
}

.dark-mode {
  --bg: #1a1a2e;
  --card-bg: rgba(30, 30, 50, 0.85);
  --text: #f0f0f0;
  --text-light: #ccc;
  --border: #444;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  text-decoration: underline;
  color: var(--accent);
}

/* === 容器 === */
.nav-container,
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === 头部导航 === */
header {
  background: var(--primary);
  color: #fff;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 86, 179, 0.92);
}

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

.logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff, #e0eaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 8px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 4px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(0, 86, 179, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px 20px;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.mobile-menu a {
  color: #fff;
  font-size: 18px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.active {
  display: flex;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Hero / 横幅轮播 === */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 100px 20px 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #0056b3 0%, #003d80 50%, #002b5e 100%);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.banner-carousel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.banner-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: opacity 0.8s ease;
  opacity: 0;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide:nth-child(1) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.banner-slide:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.banner-slide:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, #fff, #e0eaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px;
  opacity: 0.9;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #ff8533);
  color: #fff;
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 102, 0, 0.5);
  text-decoration: none;
  color: #fff;
}

/* === 通用区块 === */
.section {
  padding: 80px 20px;
}

.section h2 {
  font-size: 32px;
  margin-bottom: 40px;
  color: var(--primary);
  position: relative;
  padding-bottom: 12px;
  display: inline-block;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.section h3 {
  font-size: 24px;
  margin: 30px 0 15px;
  color: var(--text);
}

.section h4 {
  font-size: 18px;
  margin: 20px 0 10px;
  color: var(--text-light);
}

.section p {
  margin-bottom: 15px;
  color: var(--text-light);
}

/* === 网格卡片 === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,86,179,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card h3 {
  margin-top: 0;
  font-size: 20px;
  color: var(--primary);
}

.card p {
  font-size: 15px;
  line-height: 1.7;
}

/* === 文章列表 === */
.articles-list {
  list-style: none;
}

.articles-list li {
  margin-bottom: 20px;
  padding: 24px;
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all var(--transition);
}

.articles-list li:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.articles-list h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.articles-list .date {
  color: #888;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.articles-list .summary {
  color: var(--text-light);
  margin: 8px 0;
}

.articles-list a {
  font-weight: 600;
  color: var(--accent);
}

/* === FAQ === */
.faq-item {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: box-shadow var(--transition);
}

.faq-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.faq-question {
  background: rgba(0, 86, 179, 0.05);
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.faq-question:hover {
  background: rgba(0, 86, 179, 0.1);
}

.faq-question span {
  font-size: 20px;
  font-weight: 300;
  transition: transform var(--transition);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background: var(--card-bg);
}

.faq-answer.active {
  max-height: 300px;
  padding: 16px 20px;
}

.dark-mode .faq-question {
  background: rgba(255, 255, 255, 0.05);
}

.dark-mode .faq-question:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* === 教程步骤 === */
.howto-steps {
  list-style: decimal;
  padding-left: 24px;
}

.howto-steps li {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-left: 3px solid var(--primary);
}

/* === 搜索框 === */
.search-box {
  display: flex;
  gap: 12px;
  margin: 30px 0;
  max-width: 500px;
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 15px;
  background: var(--card-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: border-color var(--transition);
  color: var(--text);
}

.search-box input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.search-box button {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 86, 179, 0.4);
}

/* === 统计数字 === */
.stat-number {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark-mode .stat-number {
  background: linear-gradient(135deg, #ff8533, #ff6600);
  -webkit-background-clip: text;
  background-clip: text;
}

/* === 页脚 === */
.footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e0e0e0;
  padding: 50px 20px 30px;
  text-align: center;
}

.footer a {
  color: var(--accent);
  transition: color var(--transition);
}

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

.footer .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}

.footer .links a {
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--transition);
}

.footer .links a:hover {
  background: rgba(255, 102, 0, 0.15);
  text-decoration: none;
}

.footer p {
  font-size: 14px;
  margin: 6px 0;
  opacity: 0.8;
}

/* === 返回顶部 === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  display: none;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
  transition: all var(--transition);
  border: none;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 86, 179, 0.5);
}

/* === 滚动动画（配合JS） === */
.card,
.articles-list li,
.faq-item,
.howto-steps li {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.visible,
.articles-list li.visible,
.faq-item.visible,
.howto-steps li.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === 图片懒加载占位 === */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* === 响应式 === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero {
    padding: 80px 20px 60px;
    min-height: 400px;
  }

  .section {
    padding: 50px 15px;
  }

  .section h2 {
    font-size: 26px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    padding: 20px;
  }

  .footer .links {
    gap: 12px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
  }

  .btn {
    padding: 12px 28px;
    font-size: 15px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    width: 100%;
  }
}

/* === 暗色模式微调 === */
.dark-mode .card,
.dark-mode .articles-list li,
.dark-mode .faq-item {
  border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .faq-answer {
  background: rgba(255, 255, 255, 0.03);
}

.dark-mode .search-box input {
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
  border-color: #555;
}

.dark-mode .search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

/* === 额外动画 === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero p {
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero .btn {
  animation: fadeInUp 0.8s ease 0.6s both;
}